@import url("fonts.css");

/* ============================================================
   Plumbing only. Nothing here is a design decision — no colour,
   no typeface, no layout. Each site writes its own visual system
   on top; this file only carries the things that must be right
   on every site and are invisible when they are.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* A sideways-scrollable page drags position:fixed elements out of view on
     phones. Clip rather than scroll. (clip, not hidden: hidden would make html
     a scroll container and break scroll-padding and sticky.) */
  overflow-x: clip;
}

body { margin: 0; }
/* Lock scrolling on the ROOT, not on body. html already has overflow-x:clip,
   so overflow:hidden on body turns body into its own scroll container — a
   position:sticky header then sticks to body and is thrown off-screen (with
   its close button) when the menu opens after scrolling. site.js puts
   .is-locked on <html> directly; a :has() selector was tried first and its
   style invalidation visibly lagged behind the menu opening. */
html.is-locked { overflow: hidden; }
/* [hidden] must win. A rule like `.gallery-more { display:flex }` outranks the
   browser's own `[hidden] { display:none }`, which left an empty "Show 0 more"
   button on screen whenever a gallery had nothing further to reveal. */
[hidden] { display: none !important; }

img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
/* A <button> inherits the user agent's grey `buttonface` unless something says
   otherwise. An outline/ghost button that sets only border-color and color then
   renders as light-grey with (often white) text on it — invisible. Reset here;
   any variant that wants a fill sets one and wins on specificity. */
button { background: transparent; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Reveal-on-scroll. The JS failsafe shows everything if the observer
   never runs, so content can never be stranded invisible. */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease, ease), transform .7s var(--ease, ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

@media print {
  .site-header, .lightbox, .skip-link, .gallery-more, .filters, .map-consent, .callbar { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff !important; color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .75em; color: #555; }
}

/* ============================================================
   Studios Ritsa — "chapters"
   ------------------------------------------------------------
   A travel-magazine feature: a full-bleed poster cover with a
   numbered contents list, then numbered chapters, each a half-page
   photograph pinned while its text scrolls past. Typographic lists
   and tables, square edges, a full-screen numbered menu. No cards,
   no rounded arches, no pill chips.

   Every text pair measured:
     ink #14213d on white 16.0:1      magenta #a61f5a on white 7.1:1
     muted #4e5a66 on white 7.1:1     ink on lemon-lite #fdf3cf 14.4:1
     white on night #0f1a45 16.8:1    lemon #f3c63a on night 10.3:1
     white on the cover's shade (rgba 10,16,40,.78) above 7:1
   Piazzolla (display) + Geologica (text), both with Greek.
   ============================================================ */

:root {
  --ink: #14213d;
  --muted: #4e5a66;
  --paper: #f5f3ec;
  --white: #fff;
  --olive: #4d5e0a;
  --lagoon: #0b6f73;
  --lemon: #f3c63a;
  --lemon-lite: #fdf3cf;
  --magenta: #a61f5a;
  --night: #0f1a45;
  --line: rgba(20,33,61,.14);
  --ease: cubic-bezier(.22,.8,.24,1);
  --display: "Piazzolla", Georgia, "Times New Roman", serif;
  --text: "Geologica", "Segoe UI", system-ui, -apple-system, sans-serif;
  --pad: clamp(1.5rem, 5vw, 5.5rem);
}

body { background: var(--white); color: var(--ink); font: 400 clamp(1rem, .96rem + .2vw, 1.1rem)/1.75 var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); letter-spacing: -.015em; }
h2 { font-weight: 700; font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.6rem); line-height: 1.02; margin-bottom: 1.4rem; }
h3 { font-weight: 700; font-size: 1.35rem; margin: 2.4rem 0 .9rem; }
a { color: var(--ink); text-decoration-color: var(--lemon); text-decoration-thickness: 3px; text-underline-offset: .22em; }
a:hover { color: var(--magenta); }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }
::selection { background: var(--lemon); color: var(--ink); }
.skip-link { position: absolute; left: 1rem; top: -80px; z-index: 300; background: var(--ink); color: #fff; padding: .7rem 1.1rem; }
.skip-link:focus { top: 1rem; color: #fff; }
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header: floating logo + Menu ------------------------------------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 1rem clamp(1rem, 3vw, 2rem); pointer-events: none; }
.site-header > * { pointer-events: auto; }
.brand { display: block; padding: .6rem .9rem; background: #fff; box-shadow: 0 8px 30px -12px rgba(0,0,0,.35); }
.brand img { width: clamp(130px, 12vw, 170px); height: auto; }
.head-actions { display: flex; gap: .5rem; position: relative; z-index: 2; }
.pill { display: inline-flex; align-items: center; gap: .6rem; height: 48px; padding: 0 1.1rem; border: 0; background: #fff; color: var(--ink); font: 700 .85rem/1 var(--text); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer; box-shadow: 0 8px 30px -12px rgba(0,0,0,.35); transition: background .2s, color .2s; }
.pill:hover { background: var(--lemon); color: var(--ink); }
.nt-lines, .nt-lines::before { display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform .3s var(--ease); }
.nt-lines::before { content: ""; position: absolute; top: 6px; }
.site-header.is-open .nav-toggle { background: var(--lemon); }
.site-header.is-open .nt-lines { transform: translateY(3px) rotate(45deg); }
.site-header.is-open .nt-lines::before { transform: translateY(-6px) rotate(-90deg); }

.nav { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: 6rem var(--pad) 2.5rem; background: var(--night); color: #fff;
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s; overflow-y: auto; }
.site-header.is-open .nav { opacity: 1; visibility: visible; }
.nav-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 6vw, 6rem); max-width: 1100px; }
.nav-list a { display: flex; align-items: baseline; gap: 1.2rem; padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.14); color: #fff; font: 700 clamp(1.7rem, 1.2rem + 2vw, 3rem)/1.15 var(--display); text-decoration: none; transition: color .2s, padding .3s var(--ease); }
.nav-list a i { font: 700 .85rem/1 var(--text); font-style: normal; letter-spacing: .1em; color: var(--lemon); min-width: 2ch; }
.nav-list a:hover, .nav-list a[aria-current="true"] { color: var(--lemon); padding-left: .4rem; }
.nav-foot { margin-top: 2.5rem; color: #c9d0ea; font-size: .95rem; }
.nav-foot a { color: #fff; }
@media (max-width: 700px) { .nav-list { grid-template-columns: 1fr; } .nav { justify-content: flex-start; } }
/* Small phones: logo, language and Menu must fit on one row (the Greek label is longer). */
@media (max-width: 420px) {
  .site-header { padding: .75rem; }
  .brand { padding: .45rem .6rem; }
  .brand img { width: 112px; }
  .head-actions { gap: .35rem; }
  .pill { height: 42px; padding: 0 .75rem; font-size: .78rem; letter-spacing: .08em; gap: .45rem; }
}

/* ---------- Cover --------------------------------------------------------------- */
.cover { position: relative; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1.4fr .6fr; align-items: end; color: #fff; overflow: hidden; background: var(--night); }
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 45% 55%; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,40,.1) 30%, rgba(10,16,40,.78) 78%, rgba(10,16,40,.9) 100%); }
.cover-inner { position: relative; z-index: 1; padding: 0 var(--pad) clamp(2.5rem, 6vw, 4.5rem); }
.cover-kicker { font: 700 .82rem/1 var(--text); letter-spacing: .22em; text-transform: uppercase; color: var(--lemon); margin-bottom: 1rem; }
.cover-title { font-weight: 700; font-size: clamp(3.6rem, 2rem + 8.5vw, 10.5rem); line-height: .86; color: #fff; letter-spacing: -.03em; margin: 0 0 1.4rem; }
.cover-title span { display: block; }
.cover-title em { display: block; font-weight: 500; font-style: italic; color: var(--lemon); }
.cover-sub { max-width: 34ch; font-size: clamp(1.05rem, 1rem + .35vw, 1.3rem); color: #eef1fb; margin: 0; }
.cover-index { position: relative; z-index: 1; padding: 0 var(--pad) clamp(2.5rem, 6vw, 4.5rem) 0; }
.cover-index ol { list-style: none; border-top: 2px solid var(--lemon); }
.cover-index a { display: flex; gap: .9rem; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.2); color: #fff; font-weight: 500; font-size: .95rem; text-decoration: none; }
.cover-index a i { font-style: normal; font-weight: 700; color: var(--lemon); }
.cover-index a:hover { color: var(--lemon); }
@media (max-width: 860px) {
  .cover { grid-template-columns: 1fr; }
  .cover-index { display: none; }
}

/* ---------- Chapters: pinned photo | scrolling text -------------------------------- */
.chapter { display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.chapter--paper { background: var(--paper); }
.chapter--lemon { background: var(--lemon-lite); }
.ch-photo { position: sticky; top: 0; height: 100vh; height: 100svh; margin: 0; overflow: hidden; background: var(--paper); }
.ch-photo img { width: 100%; height: 100%; object-fit: cover; }
.ch-photo figcaption { position: absolute; left: 0; bottom: 0; max-width: 80%; padding: .55rem 1rem; background: rgba(255,255,255,.95); color: var(--ink); font-size: .82rem; }
.chapter--flip .ch-photo { order: 2; }
.chapter--flip .ch-photo figcaption { left: auto; right: 0; }
.ch-text { padding: clamp(6rem, 12vw, 10rem) var(--pad) clamp(4rem, 9vw, 7rem); max-width: 760px; }
.ch-num { display: block; font: 700 clamp(4.5rem, 3rem + 5vw, 8rem)/.8 var(--display); color: transparent; -webkit-text-stroke: 2px var(--lemon); margin-bottom: 1.2rem; }
.ch-kicker { font: 700 .8rem/1.3 var(--text); letter-spacing: .2em; text-transform: uppercase; color: var(--magenta); margin-bottom: .9rem; }
.ch-lede { font: 500 clamp(1.25rem, 1.1rem + .6vw, 1.6rem)/1.4 var(--display); color: var(--ink); margin-bottom: 1.3rem; }
.ch-text p:not(.ch-kicker):not(.ch-lede):not(.fine) { color: #34405a; }

.figures { display: grid; grid-template-columns: repeat(2, 1fr); margin: 2.4rem 0 0; border-top: 2px solid var(--ink); }
.figures div { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.figures div:nth-child(odd) { padding-right: 1rem; border-right: 1px solid var(--line); }
.figures div:nth-child(even) { padding-left: 1.2rem; }
.figures dt { font: 700 clamp(2rem, 1.6rem + 1.5vw, 3rem)/1 var(--display); color: var(--olive); }
.figures dd { margin: .35rem 0 0; color: var(--muted); font-size: .95rem; }

.spec { margin: 1.8rem 0 0; border-top: 2px solid var(--ink); }
.spec div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.spec dt { font: 700 .78rem/1.8 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: 0; font: 500 1.12rem/1.5 var(--display); }
@media (max-width: 520px) { .spec div { grid-template-columns: 1fr; gap: .1rem; } }

.amen { list-style: none; columns: 2; column-gap: 2rem; }
.amen li { break-inside: avoid; padding: .45rem 0 .45rem 1.4rem; position: relative; border-bottom: 1px dashed var(--line); }
.amen li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: .6rem; height: .6rem; background: var(--lemon); }

.ch-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 2.4rem; }
.ch-thumbs .tile { aspect-ratio: 1; }
.ch-thumbs .tile:only-child { grid-column: span 3; aspect-ratio: 16 / 9; }

.chapter--night { background: var(--night); }
.chapter--night h2, .chapter--night .ch-lede { color: #fff; }
.chapter--night .ch-text p:not(.ch-kicker):not(.ch-lede) { color: #c9d0ea; }
.chapter--night .ch-kicker { color: var(--lemon); }
.chapter--night .ch-photo figcaption { background: var(--night); color: #fff; }

@media (max-width: 860px) {
  .chapter { grid-template-columns: 1fr; }
  .ch-photo { position: relative; height: 62vh; }
  .chapter--flip .ch-photo { order: 0; }
  .chapter--flip .ch-photo figcaption { left: 0; right: auto; }
  .ch-text { padding: 2.6rem 1.5rem 3.5rem; }
  .ch-num { -webkit-text-stroke-width: 1.5px; }
}

/* ---------- Distances ------------------------------------------------------------ */
.dist { width: 100%; border-collapse: collapse; margin-top: 1.8rem; }
.dist tbody + tbody .dist-head th { padding-top: 2rem; }
.dist-head th { text-align: left; font: 700 .78rem/1 var(--text); letter-spacing: .16em; text-transform: uppercase; color: var(--magenta); padding: 0 0 .7rem; border-bottom: 2px solid var(--ink); }
.dist th[scope="row"] { text-align: left; font-weight: 400; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.dist td { text-align: right; white-space: nowrap; font: 700 1.2rem/1 var(--display); padding: .7rem 0 .7rem 1rem; border-bottom: 1px solid var(--line); }
.fine { font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.map-frame { position: relative; margin-top: 2rem; aspect-ratio: 4 / 3; min-height: 280px; background: var(--paper) repeating-linear-gradient(90deg, transparent 0 39px, var(--line) 39px 40px), var(--paper); border: 2px solid var(--ink); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; text-align: center; padding: 1.5rem; background: rgba(245,243,236,.9); }
.map-consent p { max-width: 24rem; margin: 0; }
.btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 50px; padding: .8rem 1.4rem; border: 2px solid var(--ink); background: var(--ink); color: #fff; font: 700 .85rem/1 var(--text); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: var(--lemon); color: var(--ink); }

/* ---------- Gallery ---------------------------------------------------------------- */
.gallery { padding: clamp(5rem, 10vw, 8rem) var(--pad) clamp(4rem, 8vw, 6rem); background: #fff; border-top: 1px solid var(--line); }
.gallery-head { display: grid; grid-template-columns: auto 1fr; column-gap: 2rem; align-items: end; margin-bottom: 2.2rem; }
.gallery-head .ch-num { grid-row: span 3; margin: 0; }
.gallery-head h2 { margin-bottom: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .2rem 1.6rem; }
.filter { padding: .4rem 0; border: 0; border-bottom: 3px solid transparent; background: none; font: 700 .85rem/1 var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.filter small { font-size: .78rem; color: var(--muted); }
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--lemon); }
.tile { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; overflow: hidden; background: var(--paper); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .4s; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.04); }
.tile.is-entering { animation: pop .45s var(--ease) backwards; }
@keyframes pop { from { opacity: 0; } }
.grid { columns: 4 240px; column-gap: .6rem; }
.grid .tile { margin-bottom: .6rem; break-inside: avoid; }
.grid .tile img { height: auto; }
.gallery-more { display: flex; justify-content: center; margin-top: 2rem; }
@media (max-width: 700px) { .gallery-head { grid-template-columns: 1fr; } .gallery-head .ch-num { grid-row: auto; margin-bottom: .8rem; } }

/* ---------- Contact ------------------------------------------------------------------ */
.contact { background: var(--lemon); padding: clamp(5rem, 10vw, 8rem) var(--pad); }
.contact-inner { max-width: 1100px; }
.contact .ch-num { -webkit-text-stroke-color: var(--ink); }
.contact .ch-kicker { color: var(--ink); }
.contact-lede { font-size: 1.15rem; max-width: 42ch; color: var(--ink); }
.big-phone { display: inline-block; margin: 1.2rem 0 2rem; font: 700 clamp(2.2rem, 1.2rem + 4.5vw, 5.5rem)/1 var(--display); color: var(--ink); text-decoration: none; border-bottom: 4px solid var(--ink); letter-spacing: -.02em; }
.big-phone:hover { color: var(--magenta); border-color: var(--magenta); }
.contact-lines { list-style: none; border-top: 2px solid var(--ink); max-width: 760px; }
.contact-lines li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid rgba(20,33,61,.25); }
.cl-label { font: 700 .78rem/1.9 var(--text); letter-spacing: .16em; text-transform: uppercase; }
.contact-lines a { color: var(--ink); text-decoration-color: var(--ink); font-weight: 500; }
.contact-lines a:hover { color: var(--magenta); }
@media (max-width: 520px) { .contact-lines li { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Footer --------------------------------------------------------------------- */
.site-footer { display: grid; justify-items: start; gap: .4rem; padding: 2.5rem var(--pad) 2rem; background: #fff; border-top: 1px solid var(--line); }
.footer-logo { width: 160px; height: auto; margin-bottom: .5rem; }
.site-footer p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Lightbox --------------------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 400; display: none; background: rgba(10,16,40,.97); opacity: 0; transition: opacity .26s; padding: clamp(1rem, 4vw, 3rem); }
.lightbox.is-open { display: grid; grid-template-rows: 1fr auto; }
.lightbox.is-visible { opacity: 1; }
.lb-stage { display: grid; place-items: center; min-height: 0; }
.lb-figure { margin: 0; display: grid; place-items: center; gap: .9rem; max-height: 100%; }
.lb-img { max-width: 100%; max-height: 80vh; width: auto; height: auto; object-fit: contain; transition: opacity .2s; }
.lb-img.is-loading { opacity: .3; }
.lb-caption { color: #eef1fb; text-align: center; max-width: 60ch; }
.lb-counter { margin: .6rem 0 0; text-align: center; color: var(--lemon); font-weight: 700; letter-spacing: .12em; }
.lb-btn { position: absolute; width: 54px; height: 54px; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .2s, color .2s; }
.lb-btn:hover:not(:disabled) { background: var(--lemon); color: var(--ink); }
.lb-btn:disabled { opacity: .3; cursor: default; }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-prev { left: clamp(.5rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(.5rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.lb-close { right: clamp(.5rem, 2vw, 1.5rem); top: clamp(.5rem, 2vw, 1.5rem); }
