@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; }
body.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; }
}

/* ============================================================
   Taverna Lyhnari — "lamplit garden"
   ------------------------------------------------------------
   The name means oil lamp, and the brand mark is one; the taverna
   itself is a walled garden of cobalt chairs, white cloths, ivy and
   terracotta. So: a night-green ground, brass for the lamp, cobalt
   for the tables, and a strictly centred, symmetric composition —
   everything hangs off one vertical axis, the way a hand-set
   taverna menu board does.

   Photography is 900px wide at most, so it is never blown up to
   full-bleed. Photos sit in framed panels and triptychs at or below
   their native size, which keeps them sharp.
   ============================================================ */

:root {
  --cream:    #faf6ec;
  --cream-2:  #f2ead9;
  --cream-3:  #e8dcc4;
  --night:    #0e2019;
  --night-2:  #16302410;
  --panel:    #143126;

  --ink:      #1b2b23;
  --ink-2:    #4c5d53;
  --on-night: #f1e9d8;
  --on-night-2: #bfd0c1;

  --brass:    #7f5c16;   /* on cream — dark enough for AA text at small sizes */
  --brass-lt: #e0b559;   /* on night */
  --cobalt:   #17458f;
  --terra:    #9c4a34;

  --sand:     #e6d6b0;   /* the original site's header colour, kept */
  --rust:     #8f3606;   /* its active-link rust, darkened to pass AA on sand (5.4:1) */
  --line:     #d9cdb2;
  --line-dk:  #2c4a3a;

  --wrap: 1120px;
  --narrow: 660px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --shadow: 0 18px 44px -26px rgba(14,32,25,.5);
}

body {
  background: var(--cream);
  color: var(--ink);
  font: 400 clamp(1.02rem, .98rem + .18vw, 1.12rem)/1.72 "Alegreya Sans", "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "kern" 1;
}

h1, h2, h3, .display { font-family: Cardo, Georgia, "Times New Roman", serif; font-weight: 400; line-height: 1.14; }
h1 { font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4rem); letter-spacing: -.005em; }
h2 { font-size: clamp(1.85rem, 1.4rem + 1.9vw, 2.85rem); }
h3 { font-size: clamp(1.2rem, 1.08rem + .5vw, 1.45rem); }

a { color: var(--cobalt); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--terra); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100%, var(--narrow)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  z-index: 200; background: var(--night); color: var(--on-night);
  padding: .6rem 1.1rem; border-radius: 0 0 4px 4px; text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ---------- Eyebrow + lamp divider ------------------------------------- */
.eyebrow {
  display: block; font-size: .74rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--brass);
}
.eyebrow--night { color: var(--brass-lt); }
.eyebrow .gr { font-family: Cardo, serif; text-transform: none; letter-spacing: .12em; font-size: 1.15em; }

/* The section rule: a hairline broken by the lamp. Centre axis made visible. */
.lamp-rule { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.4rem auto 1.8rem; color: var(--brass); }
.lamp-rule::before, .lamp-rule::after { content: ""; height: 1px; width: clamp(2.5rem, 12vw, 7rem); background: currentColor; opacity: .5; }
.lamp-rule svg { width: 34px; height: 22px; fill: currentColor; flex: none; }
.lamp-rule--night { color: var(--brass-lt); }

/* ---------- Header ------------------------------------------------------ */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  padding: .85rem 0;
  background: var(--sand);
  box-shadow: 0 1px 0 rgba(143,54,6,.18);
  transition: background .35s var(--ease), padding .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header.is-stuck {
  padding: .5rem 0;
  box-shadow: 0 6px 18px -10px rgba(14,32,25,.45);
}
/* Desktop: the wordmark sits on the centre axis with the menu split around it. */
.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
}
/* Every cell is placed explicitly. Auto-placement never moves backwards, so
   a brand in column 2 would push a following column-1 item onto a second row. */
.brand { grid-column: 2; grid-row: 1; justify-self: center; display: block; }
.brand img { width: clamp(120px, 17vw, 180px); height: auto; }
.nav { display: contents; }
.nav a {
  font-size: .82rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; padding: .5rem .1rem;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current] { color: var(--rust); border-bottom-color: var(--rust); }
.nav-l, .nav-r { display: flex; gap: clamp(1.1rem, 2.6vw, 2.2rem); align-items: center; }
.nav-l { grid-column: 1; grid-row: 1; justify-content: flex-end; }
.nav-r { grid-column: 3; grid-row: 1; justify-content: flex-start; }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr auto 1fr; }
  .brand { grid-column: 2; }
  .nav-toggle {
    display: block; grid-column: 3; grid-row: 1; justify-self: end;
    width: 44px; height: 44px; border: 1px solid rgba(27,43,35,.35); border-radius: 3px;
    background: transparent; position: relative; cursor: pointer;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; position: absolute; left: 12px; width: 20px; height: 1.5px;
    background: var(--ink); transition: transform .3s var(--ease), opacity .2s;
  }
  .nav-toggle span { top: 21px; }
  .nav-toggle span::before { top: -6px; left: 0; }
  .nav-toggle span::after { top: 6px; left: 0; }
  .site-header.is-open .nav-toggle span { background: transparent; }
  .site-header.is-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
  .site-header.is-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

  .nav {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .4rem;
    position: fixed; inset: 0; z-index: -1;
    background: var(--sand);
    opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  }
  .nav-l, .nav-r { display: contents; }
  .site-header.is-open .nav { opacity: 1; visibility: visible; }
  .nav a { font-size: 1.05rem; padding: .85rem 2rem; letter-spacing: .2em; }
}

/* ---------- Hero: framed lantern panel ---------------------------------- */
.hero {
  background: var(--night);
  color: var(--on-night);
  /* Clears the fixed header at every width: the logo scales with the
     viewport, so the top padding has to as well or the eyebrow collides
     with the wordmark around 950px. */
  padding: clamp(7rem, 3rem + 12vw, 12rem) 0 clamp(3rem, 6vw, 4.5rem);
  text-align: center;
  position: relative; overflow: hidden;
}
/* A faint pool of lamplight behind the frame. */
.hero::before {
  content: ""; position: absolute; left: 50%; top: 22%;
  width: min(150%, 1400px); aspect-ratio: 2 / 1; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(224,181,89,.13), transparent 62%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero h1 { margin: .5rem auto .2rem; max-width: 15ch; }
.hero h1 em { font-style: italic; color: var(--brass-lt); }
.hero p { color: var(--on-night-2); max-width: 46ch; margin-inline: auto; }

.frame {
  position: relative; margin: clamp(2rem, 4vw, 3rem) auto 0;
  width: min(100%, 900px);
  border: 1px solid rgba(224,181,89,.45);
  padding: 10px; background: rgba(0,0,0,.18);
}
.frame::after {
  content: ""; position: absolute; inset: 4px; border: 1px solid rgba(224,181,89,.18);
  pointer-events: none;
}
.frame-stage { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--panel); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--ease); }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }

.hero-dots { display: flex; gap: .55rem; justify-content: center; margin-top: 1.1rem; }
.hero-dots button {
  width: 9px; height: 9px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--brass-lt); background: transparent; transition: background .3s;
}
.hero-dots button[aria-current="true"] { background: var(--brass-lt); }

.hero-meta {
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
  display: flex; flex-wrap: wrap; gap: .6rem clamp(1.2rem, 3vw, 2.4rem);
  justify-content: center; align-items: center;
  font-size: .82rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--on-night-2);
}
.hero-meta b { color: var(--brass-lt); font-weight: 500; }
.hero-meta a { color: var(--on-night); }
.hero-meta a:hover { color: var(--brass-lt); }

/* ---------- Sections ---------------------------------------------------- */
.section { padding: clamp(3.6rem, 8vw, 6.5rem) 0; }
.section--tint { background: var(--cream-2); }
.section--night { background: var(--night); color: var(--on-night); }
.section--night h2 { color: var(--on-night); }
.section--night p { color: var(--on-night-2); }
.section--night a { color: var(--brass-lt); }
.section--night a:hover { color: #fff; }
.section-head { text-align: center; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--ink-2); max-width: 58ch; margin-inline: auto; }
.section--night .section-head p { color: var(--on-night-2); }

.lede { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); line-height: 1.6; color: var(--ink); }
.prose { text-align: center; }
.prose p + p { margin-top: 0; }
.prose p { color: var(--ink-2); }
.prose .lede { color: var(--ink); }

/* Small caps opening line for the story — the axis again. */
.since {
  font-family: Cardo, serif; font-size: clamp(3.2rem, 2rem + 5vw, 5.2rem);
  color: var(--brass); line-height: 1; opacity: .9;
}
.since span { display: block; font-family: "Alegreya Sans", sans-serif; font-size: .18em; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-2); margin-top: .5rem; }

/* ---------- Triptych of detail photos ----------------------------------- */
.triptych { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.6rem, 1.6vw, 1.1rem); }
.triptych figure { margin: 0; }
.triptych img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.triptych figcaption {
  margin-top: .6rem; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); text-align: center;
}
.section--night .triptych figcaption { color: var(--on-night-2); }
@media (max-width: 640px) {
  .triptych { grid-template-columns: 1fr 1fr; }
  .triptych figure:last-child { display: none; }
}

/* ---------- Duet: photo beside text, centred pair ----------------------- */
.duet {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.6rem, 4vw, 3.2rem); align-items: center;
}
.duet img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.duet .duet-text { text-align: left; }
.duet-photo { position: relative; padding: 8px; border: 1px solid var(--line); }
.section--night .duet-photo { border-color: var(--line-dk); }

/* ---------- Facts strip ------------------------------------------------- */
.facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  text-align: center; border-block: 1px solid var(--line);
}
.facts > div { padding: clamp(1.4rem, 3vw, 2.2rem) 1rem; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts dt { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); font-weight: 700; }
.facts dd { margin: .5rem 0 0; font-family: Cardo, serif; font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); line-height: 1.4; }
.facts dd a { text-decoration: none; }
.facts dd a:hover { text-decoration: underline; }
@media (max-width: 620px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Buttons ----------------------------------------------------- */
.btn {
  display: inline-block; background: transparent; cursor: pointer;
  font: 500 .82rem/1 "Alegreya Sans", sans-serif; letter-spacing: .18em; text-transform: uppercase;
  padding: 1.02rem 2rem; border: 1px solid var(--brass); color: var(--brass);
  text-decoration: none; transition: background .25s var(--ease), color .25s var(--ease);
}
.btn:hover { background: var(--brass); color: var(--cream); }
.btn--solid { background: var(--brass); color: var(--cream); border-color: var(--brass); }
.btn--solid:hover { background: var(--terra); border-color: var(--terra); color: var(--cream); }
.btn--night { border-color: var(--brass-lt); color: var(--brass-lt); }
.btn--night:hover { background: var(--brass-lt); color: var(--night); }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; margin-top: 2rem; }

/* ---------- Gallery ----------------------------------------------------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(.5rem, 1.4vw, .9rem);
}
.tile {
  padding: 0; border: 0; background: var(--cream-3); cursor: pointer; overflow: hidden;
  position: relative; display: block; aspect-ratio: 3 / 2;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), filter .5s; }
.tile::after {
  content: ""; position: absolute; inset: 0; border: 1px solid rgba(250,246,236,.0);
  transition: border-color .3s, box-shadow .3s;
}
.tile:hover img, .tile:focus-visible img { transform: scale(1.045); }
.tile:hover::after, .tile:focus-visible::after { border-color: rgba(224,181,89,.9); box-shadow: inset 0 0 0 4px rgba(14,32,25,.25); }
.tile.is-entering { animation: tile-in .5s var(--ease) backwards; }
@keyframes tile-in { from { opacity: 0; transform: translateY(10px); } }

.gallery-more { display: flex; justify-content: center; margin-top: 2rem; }

/* ---------- Lightbox ---------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(8, 18, 14, .95);
  opacity: 0; transition: opacity .26s var(--ease);
  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: min(100%, 900px); max-height: 74vh; width: auto; height: auto;
  object-fit: contain; border: 1px solid rgba(224,181,89,.35);
  transition: opacity .2s;
}
.lb-img.is-loading { opacity: .3; }
.lb-caption { color: var(--on-night-2); font-size: .9rem; text-align: center; max-width: 60ch; }
.lb-counter {
  margin: .8rem 0 0; text-align: center; color: var(--brass-lt);
  font-size: .78rem; letter-spacing: .2em;
}
.lb-btn {
  position: absolute; border: 1px solid rgba(224,181,89,.4); background: rgba(14,32,25,.6);
  color: var(--on-night); width: 48px; height: 48px; cursor: pointer;
  display: grid; place-items: center; transition: background .25s, border-color .25s;
}
.lb-btn:hover:not(:disabled) { background: var(--brass-lt); color: var(--night); border-color: var(--brass-lt); }
.lb-btn:disabled { opacity: .3; cursor: default; }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.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); }

/* ---------- Contact ----------------------------------------------------- */
.contact-card {
  background: var(--cream); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: clamp(1.8rem, 4vw, 3rem); text-align: center;
}
.contact-list { list-style: none; display: grid; gap: 1.5rem; }
.contact-list dt, .contact-list .lbl {
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--brass); font-weight: 700; margin-bottom: .3rem;
}
.contact-list .val { font-family: Cardo, serif; font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem); line-height: 1.45; }
.contact-list .val a { text-decoration: none; }
.contact-list .val a:hover { text-decoration: underline; }

.hours { list-style: none; display: grid; gap: .35rem; max-width: 26rem; margin: 0 auto; }
.hours li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.hours li:last-child { border-bottom: 0; }
.hours b { font-weight: 500; }
.hours span { font-family: Cardo, serif; }

.map-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 300px;
  background: var(--cream-2); border: 1px solid var(--line); overflow: hidden;
}
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent { position: absolute; inset: 0; display: grid; place-content: center; gap: .9rem; padding: 1.5rem; text-align: center; }
.map-consent p { color: var(--ink-2); max-width: 34ch; margin: 0 auto; }

/* ---------- Footer ------------------------------------------------------ */
.site-footer {
  background: var(--night); color: var(--on-night-2);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; text-align: center;
}
.site-footer img { width: 150px; margin: 0 auto 1.5rem; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.8rem; justify-content: center; margin-bottom: 1.6rem; }
.footer-links a { color: var(--on-night); text-decoration: none; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; }
.footer-links a:hover { color: var(--brass-lt); }
.footer-meta { font-size: .9rem; }
.footer-meta a { color: var(--on-night); }
.footer-meta a:hover { color: var(--brass-lt); }
.social { display: flex; gap: 1rem; justify-content: center; margin: 1.4rem 0; }
.social a {
  width: 42px; height: 42px; border: 1px solid var(--line-dk); border-radius: 50%;
  display: grid; place-items: center; color: var(--on-night);
}
.social a:hover { border-color: var(--brass-lt); color: var(--brass-lt); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.colophon { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line-dk); font-size: .8rem; color: #93a596; }

/* ---------- Page header for subpages ------------------------------------ */
.page-head {
  background: var(--night); color: var(--on-night); text-align: center;
  padding: clamp(8rem, 4rem + 12vw, 13rem) 0 clamp(3rem, 6vw, 4.5rem);
  position: relative; overflow: hidden;
}
.page-head::before {
  content: ""; position: absolute; left: 50%; top: 30%; transform: translateX(-50%);
  width: min(140%, 1200px); aspect-ratio: 2/1;
  background: radial-gradient(ellipse at center, rgba(224,181,89,.12), transparent 62%);
}
.page-head > * { position: relative; }
.page-head p { color: var(--on-night-2); max-width: 52ch; margin-inline: auto; }
.crumbs { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-night-2); margin-bottom: 1rem; }
.crumbs a { color: var(--on-night-2); text-decoration: none; }
.crumbs a:hover { color: var(--brass-lt); }
.crumbs span { color: var(--brass-lt); }

/* The client's own lamp illustration, on the contact card. */
.card-lamp { width: clamp(120px, 22vw, 190px); margin: 0 auto clamp(1rem, 3vw, 1.8rem); }

/* Story: Dimitri at the table, beside the account of how he started. */
.story-duet { margin-top: clamp(2rem, 4vw, 3rem); text-align: left; }
.story-duet .duet-photo img { aspect-ratio: 3 / 2; }
