/* ============================================================
   PILLANGO PRODUCTIONS — site design
   After the current pillangoprod.com: live bokeh light behind every
   page, light Cormorant Garamond headings over a short amber rule,
   small Outfit text, and small hairline boxes that lift on hover
   with orange light spilling from underneath. The logo — white serif
   caps with the mirrored orange LL — opens the flight.

   Fonts are self-hosted (css/fonts.css) — no third-party requests.
   ============================================================ */

:root {
  --night:    #0A0A0B;
  --black:    #050505;
  --glass:    rgba(16, 12, 18, 0.72);   /* box fill over the bokeh */
  --hair:     rgba(237, 234, 227, 0.09); /* box borders */
  --hair-2:   rgba(237, 234, 227, 0.16);
  --white:    #EFECE6;
  --text:     #ABA7A0;
  --text-dim: #77736D;
  --amber:    #EE8A2B;
  --amber-hi: #F6A452;
  --orange:   #FF4A00;                    /* the logo's LL */
  --glow:     255, 118, 36;               /* the light under boxes and cursor */

  --font-display:  "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-body:     "Outfit", "Helvetica Neue", Arial, system-ui, sans-serif;

  --nav-h: 4rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-slow: cubic-bezier(0.22, 0.61, 0.24, 1);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }
html.snap,
html.snap body { touch-action: pan-x pinch-zoom; overscroll-behavior-y: none; }
html.snap .overlay-menu,
html.snap .gate { touch-action: pan-y pinch-zoom; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  background: var(--night);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--amber);
  color: var(--black);
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

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

/* ============================================================
   THE BACKGROUND — live bokeh (js/main.js) with a colour veil
   ============================================================ */
.bokeh {
  position: fixed;
  top: -48px;
  left: -48px;
  width: calc(100% + 96px);
  height: calc(100% + 96px);   /* overhangs the screen, see the water ripple */
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 0% 40%, rgba(196, 70, 98, 0.5), rgba(196, 70, 98, 0) 46vmax),
    radial-gradient(circle at 38% 0%, rgba(128, 56, 140, 0.42), rgba(128, 56, 140, 0) 55vmax),
    radial-gradient(circle at 95% 95%, rgba(4, 12, 18, 0.6), rgba(4, 12, 18, 0) 50vmax),
    linear-gradient(to bottom right, #2d1524 0%, #1e1423 42%, #0f1119 75%, #05090d 100%);
}
/* the three depths (and the sparks) slide apart as the flight moves */
.bk-layer { position: absolute; inset: 0; will-change: transform; }
/* one light: painted once, then only moved and faded by the compositor */
.bk {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
  animation-name: bk-drift, bk-breathe;
  animation-timing-function: ease-in-out, ease-in-out;
  animation-iteration-count: infinite, infinite;
  animation-direction: alternate, alternate;
}
.bk.spark {
  background: radial-gradient(circle closest-side, rgba(255, 238, 210, 1) 0%, rgba(255, 196, 140, 0.9) 12%, rgba(255, 150, 80, 0.28) 35%, rgba(255, 130, 60, 0) 100%);
  animation-name: bk-drift, bk-twinkle;
}
@keyframes bk-drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(var(--dx), var(--dy), 0) scale(var(--ds, 1)); } }
@keyframes bk-breathe { from { opacity: 1; } to { opacity: 0.55; } }
@keyframes bk-twinkle { from { opacity: 0.95; } to { opacity: 0.2; } }

.grade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(10, 10, 11, 0.55);
}
.page .grade { background: rgba(10, 10, 11, 0.82); }

/* ============================================================
   ARRIVING AND LEAVING — every page pulls into focus as it arrives
   and falls out of focus as the flight moves on
   ============================================================ */
/* Arriving: the page comes up from the distance (or, flying back, from
   behind the camera) out of focus and settles sharp. The light behind it
   only moves (a cheap transform), it never re-blurs. */
/* Focus is pulled on the content block (.layer-inner), not the whole
   screen: it reads the same and costs a fraction of a full-screen blur. */
#stage, #page {
  transition: transform 1.5s var(--ease-slow), opacity 1.1s var(--ease-slow);
}
.bokeh { transition: transform 1.6s var(--ease-slow); }
html.js.arriving #stage,
html.js.arriving #page { transform: scale(0.92); opacity: 0; }
html.js.arriving .layer.is-active .layer-inner,
html.js.arriving .doc-main { filter: blur(12px); }
html.js.arriving.arriving-back #stage,
html.js.arriving.arriving-back #page { transform: scale(1.08); }
html.js.arriving .bokeh { transform: scale(1.08); }

/* Leaving, in order: the page starts fading at once (no moment where it
   sits sharp under the next title), drifts past the camera, and only
   then does the next page's name come up. */
html.leaving #stage, html.leaving #page,
html.leaving-back #stage, html.leaving-back #page {
  transition-duration: 1s, 0.45s;
  transition-timing-function: cubic-bezier(0.5, 0, 0.7, 0.4), cubic-bezier(0.1, 0.4, 0.4, 1);
  opacity: 0;
}
html.leaving .layer-inner, html.leaving-back .layer-inner,
html.leaving .doc-main, html.leaving-back .doc-main {
  filter: blur(10px);
  transition: filter 0.7s cubic-bezier(0.4, 0, 0.6, 1);
}
html.leaving #stage, html.leaving #page { transform: scale(1.14); }
html.leaving-back #stage, html.leaving-back #page { transform: scale(0.88); }
html.leaving .bokeh { transition: transform 1.1s cubic-bezier(0.45, 0, 0.55, 1); transform: scale(1.08); }
html.leaving-back .bokeh { transition: transform 1.1s cubic-bezier(0.45, 0, 0.55, 1); transform: scale(0.97); }

/* The title card: the name of the page we are flying to, over a short
   amber line. The two pseudo-elements always exist (empty and invisible
   when there is no transit) so that they can fade in and out — an
   element created on the spot can only pop.
   The sequence never overlaps text:
     old page dissolves (0–0.5 s) → name fades in (0.35–0.85 s)
     → page swapped underneath → name fades out drifting up (0.45 s)
     → only then does the new page pull into focus. */
html::before,
html::after {
  position: fixed;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
}
html::before {
  content: attr(data-transit);
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: 0.16em;
  color: var(--white);
  transform: translateY(0.6rem);
  transition: opacity 0.36s var(--ease-slow), letter-spacing 0.8s var(--ease-slow), transform 0.5s var(--ease-slow);
}
html::after {
  content: "";
  left: 50%;
  top: calc(50% + clamp(2rem, 4vw, 2.8rem));
  width: 3.2rem;
  height: 1px;
  margin-left: -1.6rem;
  background: var(--amber);
  transform: scaleX(0);
  transition: opacity 0.4s var(--ease-slow), transform 0.7s var(--ease-slow);
}
html:not([data-transit])::before, html:not([data-transit])::after { visibility: hidden; }
/* coming in: while leaving, and held while the new page is swapped in */
html.leaving::before, html.leaving-back::before, html.transit-in::before {
  opacity: 1;
  letter-spacing: 0.05em;
  transform: none;
  transition-duration: 0.42s, 0.9s, 0.6s;
}
html.leaving::before, html.leaving-back::before { transition-delay: 0.28s; }
html.leaving::after, html.leaving-back::after, html.transit-in::after { opacity: 1; transform: scaleX(1); }
html.leaving::after, html.leaving-back::after { transition-delay: 0.4s; }
/* going out (transit-in removed): quick, and drifting up out of the way */
html[data-transit]:not(.leaving):not(.leaving-back):not(.transit-in)::before { transform: translateY(-0.8rem); }

/* ============================================================
   THE CURSOR — a tiny ⅃L with a pool of orange light beneath it
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
  html, body {
    cursor: url("/assets/img/cursor-normal.svg") 16 16, url("/assets/img/cursor-normal.png") 16 16, auto;
  }
  a, button, [role="button"], label, select, summary, .box {
    cursor: url("/assets/img/cursor-hover.svg") 16 16, url("/assets/img/cursor-hover.png") 16 16, pointer;
  }
  input, textarea { cursor: text; }
}
.cursor-light {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 35;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.cursor-light::before,
.cursor-light::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  transition: transform 0.45s var(--ease), opacity 0.45s;
}
/* the wide pool */
.cursor-light::before {
  width: 22rem;
  height: 22rem;
  left: -11rem;
  top: -11rem;
  background: radial-gradient(circle, rgba(var(--glow), 0.16) 0%, rgba(var(--glow), 0.06) 32%, rgba(var(--glow), 0) 68%);
}
/* the warm core right under the ⅃L */
.cursor-light::after {
  width: 3.4rem;
  height: 3.4rem;
  left: -1.7rem;
  top: -1.7rem;
  background: radial-gradient(circle, rgba(255, 150, 70, 0.45) 0%, rgba(var(--glow), 0.12) 45%, rgba(var(--glow), 0) 70%);
}
.cursor-light.is-on { opacity: 1; }
.cursor-light.is-hot::before { transform: scale(1.35); opacity: 1.2; }
.cursor-light.is-hot::after { transform: scale(1.6); }

/* ---------- ripples: rings on the surface (the water distortion is an SVG filter) ---------- */
.fx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ripple {
  position: fixed;
  z-index: 200;
  width: 0;
  height: 0;
  pointer-events: none;
}
.ripple i {
  position: absolute;
  left: -6rem;
  top: -6rem;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  border: 1px solid rgba(var(--glow), 0.8);
  box-shadow: 0 0 12px rgba(var(--glow), 0.25), inset 0 0 12px rgba(var(--glow), 0.15);
  opacity: 0;
  transform: scale(0.04);
  animation: ripple 1.4s cubic-bezier(0.2, 0.6, 0.3, 1) forwards;
}
.ripple i:nth-child(2) { animation-delay: 0.16s; border-color: rgba(239, 236, 230, 0.5); }
.ripple i:nth-child(3) { animation-delay: 0.32s; }
@keyframes ripple {
  0%   { transform: scale(0.04); opacity: 0.85; }
  100% { transform: scale(1); opacity: 0; }
}

/* ============================================================
   THE FLIGHT
   ============================================================ */
.scroll-space { height: 1200vh; width: 1px; pointer-events: none; position: relative; z-index: 2; }

.stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  height: 100dvh;
  perspective: 1000px;
  perspective-origin: 50% 48%;
  overflow: hidden;
}

.layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: safe center;
  padding: calc(var(--nav-h) + 1rem) clamp(1.25rem, 6vw, 5rem) 3.5rem;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  transform-style: flat;
}
.layer.is-active { pointer-events: auto; }
/* a chapter pulls into focus as it becomes the current one */
.layer .layer-inner { filter: blur(4px); transition: filter 1.2s var(--ease-slow); }
.layer.is-active .layer-inner { filter: none; }
.doc-main { transition: filter 1.3s var(--ease-slow); }

.layer-inner { width: min(100%, 40rem); text-align: center; }
.layer-inner.narrow { width: min(100%, 34rem); }
.layer-inner.wide { width: min(100%, 60rem); }

/* ---------- type: smaller, lighter, more air ---------- */
.kicker {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.1rem;
}
.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--white);
  text-wrap: balance;
}
.display::after {
  content: "";
  display: block;
  width: 3.2rem;
  height: 1px;
  background: var(--amber);
  margin: 1.1rem auto 1.4rem;
}
.display.intro { font-size: clamp(2.3rem, 5.4vw, 3.8rem); }
.display em { font-style: italic; }
.lede {
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  line-height: 1.85;
  color: var(--text);
}
.lede + .lede { margin-top: 1rem; }
.lede strong { color: var(--white); font-weight: 400; }
.small {
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-dim);
}
.small a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--hair-2); }
.small a:hover { color: var(--amber); border-color: var(--amber); }

/* ---------- the next page, waiting at the end of each page ---------- */
.next-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin-top: 2.6rem;
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s;
}
.next-hint b {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--white);
  transition: color 0.3s;
}
.next-hint::after {
  content: "";
  width: 1px;
  height: 2.2rem;
  background: linear-gradient(to bottom, var(--amber), transparent);
  animation: cue 2.4s ease-in-out infinite;
}
.next-hint:hover, .next-hint:hover b { color: var(--amber); }
.next-hint i {
  font-style: normal;
  font-size: 0.54rem;
  letter-spacing: 0.26em;
  color: var(--amber);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.4s, transform 0.4s var(--ease);
  order: 3;
}
.next-hint::after { order: 4; }
.next-hint.is-nudged i { animation: whisper 2.4s var(--ease) both; }
.next-hint.is-nudged b { color: var(--amber); }
@keyframes whisper { 0% { opacity: 0; transform: translateY(-4px); } 15%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ============================================================
   BOXES — small, hairline, glassy. On hover they lift a little and
   orange light spills out from underneath. Used everywhere.
   ============================================================ */
.box-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 1rem;
  text-align: left;
}
.box-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 34rem; margin-inline: auto; }
.box-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.box-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.05rem 1.1rem 1.15rem;
  background: var(--glass);
  border: 1px solid var(--hair);
  color: inherit;
  text-decoration: none;
  font: inherit;
  text-align: left;
  transition: transform 0.45s var(--ease), border-color 0.45s, box-shadow 0.45s var(--ease), background 0.45s;
}
/* the light underneath */
.box::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -1.4rem;
  height: 2.2rem;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(var(--glow), 0.55) 0%, rgba(var(--glow), 0.18) 45%, rgba(var(--glow), 0) 72%);
  filter: blur(6px);
  opacity: 0;
  transform: scaleX(0.7);
  transition: opacity 0.45s, transform 0.45s var(--ease);
  pointer-events: none;
  z-index: -1;
}
/* only boxes that lead somewhere lift */
a.box:hover, button.box:hover,
a.box:focus-visible, button.box:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(var(--glow), 0.32);
  background: rgba(20, 15, 16, 0.62);
  box-shadow: 0 16px 28px -18px rgba(var(--glow), 0.75), 0 2px 0 -1px rgba(var(--glow), 0.25);
}
a.box:hover::after, button.box:hover::after,
a.box:focus-visible::after, button.box:focus-visible::after { opacity: 1; transform: scaleX(1); }

.icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.box h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.15;
  color: var(--white);
}
.box p { font-size: 0.78rem; line-height: 1.6; }
.box .meta {
  font-size: 0.56rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--amber);
}
.box .go {
  margin-top: auto;
  padding-top: 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--amber);
}
.box .go::after { content: " →"; }

/* a logo box: the mark on top, a line beneath */
.logo-box { align-items: flex-start; }
.logo-mark {
  height: 2.6rem;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
}
.logo-mark img { max-height: 2.2rem; width: auto; filter: grayscale(1) brightness(1.8); opacity: 0.85; }
.logo-box.is-empty { border-style: dashed; background: rgba(16, 12, 18, 0.3); }
.logo-box.is-empty .logo-mark { color: var(--text-dim); font-size: 0.7rem; letter-spacing: 0.28em; }

/* image placeholders */
.frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 30% 35%, rgba(200, 90, 150, 0.2), transparent 60%),
    radial-gradient(ellipse at 75% 75%, rgba(var(--glow), 0.1), transparent 55%),
    rgba(20, 16, 22, 0.8);
  border-bottom: 1px solid var(--hair);
}
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame-label {
  font-size: 0.54rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  padding: 0 1rem;
}
.frame.is-portrait { aspect-ratio: 2 / 3; }
.box > .frame { margin: -1.05rem -1.1rem 0.4rem; width: calc(100% + 2.2rem); max-width: none; }
.box-grid > li > .box { width: 100%; height: 100%; }

/* ---------- buttons: thin, small, same lift ---------- */
.btn {
  position: relative;
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background: rgba(10, 10, 11, 0.35);
  border: 1px solid rgba(var(--glow), 0.55);
  padding: 0.8rem 1.6rem;
  cursor: pointer;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background 0.3s, color 0.3s;
}
.btn:hover, .btn:focus-visible {
  transform: translateY(-3px);
  background: rgba(var(--glow), 0.14);
  box-shadow: 0 14px 24px -16px rgba(var(--glow), 0.9);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-top: 1.6rem; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.back::before { content: "←"; letter-spacing: 0; }

/* ---------- the rail: every page by name, where you are, what comes next ---------- */
.rail {
  position: fixed;
  right: clamp(1rem, 2.4vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
}
.rail-pages { list-style: none; display: grid; gap: 0.62rem; justify-items: end; }
.rail-pages > li { display: grid; justify-items: end; }
.rail-pages a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  opacity: 0.75;
  transition: color 0.35s, opacity 0.35s;
}
.rail-pages a::after {
  content: "";
  width: 0.9rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
  transition: width 0.45s var(--ease), background 0.35s;
}
.rail-pages a:hover { color: var(--white); opacity: 1; }
.rail-pages a:hover::after { width: 1.5rem; }
.rail-pages .is-next > a { color: var(--text); opacity: 1; }
.rail-pages .is-current > a { color: var(--amber); opacity: 1; }
.rail-pages .is-current > a::after { width: 2.2rem; background: var(--amber); opacity: 1; box-shadow: 0 0 8px rgba(var(--glow), 0.6); }
.rail-stops {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  justify-items: end;
  margin: 0.55rem 0 0.2rem;
  padding-right: calc(1.1rem - 3px);
}
.rail-stops button {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(var(--glow), 0.5);
  padding: 0;
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}
.rail-stops button:hover { transform: scale(1.4); }
.rail-stops button.is-current {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 8px rgba(var(--glow), 0.8);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.5'/></svg>");
}

@keyframes cue {
  0%, 100% { transform: scaleY(0.55); transform-origin: top; opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 1; }
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.8rem;
  width: 1px;
  height: 3.4rem;
  background: linear-gradient(to bottom, transparent, var(--amber));
  animation: cue 2.4s ease-in-out infinite;
}

/* ============================================================
   NAV — the logo, and the one menu
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 3vw, 2.2rem);
  color: var(--white);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-brand { display: flex; align-items: center; text-decoration: none; line-height: 1; transition: opacity 0.5s; }
.nav.at-hero .nav-brand { opacity: 0; pointer-events: none; }
.nav-burger {
  width: 2.4rem;
  height: 2.4rem;
  background: none;
  border: 0;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 0.4rem;
  padding: 0.3rem;
}
.nav-burger span { display: block; width: 1.6rem; height: 1px; background: currentColor; transition: width 0.3s, transform 0.3s; }
.nav-burger:hover span:nth-child(2) { width: 1.05rem; }
.menu-open .nav { z-index: 70; }
.menu-open .nav-brand { opacity: 0; pointer-events: none; }
.menu-open .nav-burger span:nth-child(1) { transform: translateY(0.2rem) rotate(45deg); }
.menu-open .nav-burger span:nth-child(2) { transform: translateY(-0.2rem) rotate(-45deg); width: 1.6rem; }

.overlay-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 7, 9, 0.95);
  display: grid;
  place-content: center;
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  overflow-y: auto;
  animation: menu-in 0.5s var(--ease);
}
@keyframes menu-in { from { opacity: 0; } to { opacity: 1; } }
.overlay-links { display: grid; gap: 0.1rem; counter-reset: m; }
.overlay-links a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.35;
  color: var(--white);
  text-decoration: none;
  transition: color 0.25s, letter-spacing 0.4s var(--ease);
}
.overlay-links a:hover { color: var(--amber); letter-spacing: 0.02em; }
.overlay-links a[aria-current="page"] { color: var(--amber); }
.overlay-legal {
  display: flex;
  gap: 1.4rem;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--hair);
}
.overlay-legal a {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
}
.overlay-legal a:hover, .overlay-legal a[aria-current="page"] { color: var(--amber); }




/* ---------- the logo (assets/img/pillango-logo*.webp) ---------- */
.wm { display: block; height: auto; max-width: 100%; }
.wm-nav { width: 7.2rem; }
.wm-hero { width: min(40rem, 80vw); }
.wm-foot { width: 7.6rem; margin: 0 auto; }
.hero-logo-wrap { font-weight: inherit; display: flex; justify-content: center; }

/* ============================================================
   HELD STILL — the password box
   ============================================================ */
.gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(6, 5, 7, 0.78);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.gate.is-open { opacity: 1; }
.gate-box {
  position: relative;
  width: min(100%, 20rem);
  padding: 1.8rem 1.6rem 1.5rem;
  background: rgba(14, 12, 16, 0.82);
  border: 1px solid var(--hair-2);
  text-align: center;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.5s var(--ease), border-color 0.5s, box-shadow 0.6s var(--ease);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.gate.is-open .gate-box { transform: none; }
.gate-box::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -1.6rem;
  height: 2.4rem;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(var(--glow), 0.5), rgba(var(--glow), 0) 70%);
  filter: blur(7px);
  opacity: 0.5;
  pointer-events: none;
}
.gate-close {
  position: absolute;
  top: 0.4rem;
  right: 0.55rem;
  width: 1.8rem;
  height: 1.8rem;
  background: none;
  border: 0;
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1;
}
.gate-close:hover { color: var(--amber); }
.gate-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.56rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.8rem;
}
.gate-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 1.3rem;
}
.gate input {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-align: center;
  color: var(--white);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair-2);
  padding: 0.6rem 0.4rem;
  margin-bottom: 1.2rem;
  transition: border-color 0.3s;
}
.gate input::placeholder { color: var(--text-dim); letter-spacing: 0.24em; font-size: 0.68rem; text-transform: uppercase; }
.gate input:focus { outline: none; border-bottom-color: var(--amber); }
.gate .btn { width: 100%; }
.gate-msg { min-height: 1.2rem; margin-top: 0.9rem; font-size: 0.72rem; color: var(--text); }
.gate-box.is-wrong { animation: shake 0.45s; border-color: rgba(230, 110, 90, 0.5); }
@keyframes shake {
  20% { transform: translateX(-7px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(2px); }
}
.gate-box.is-granted {
  border-color: rgba(var(--glow), 0.8);
  box-shadow: 0 0 0 1px rgba(var(--glow), 0.4), 0 0 60px rgba(var(--glow), 0.45);
}
/* through the gate: the whole page dissolves into warm light */
.gate-light {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 236, 214, 1) 0%, rgba(255, 150, 70, 0.9) 22%, rgba(120, 40, 20, 0.95) 55%, #050505 100%);
  transform: scale(0.2);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease);
}
html.gate-through .gate-light { opacity: 1; transform: scale(1.6); }
html.gate-through #stage { opacity: 0.3; transition: opacity 0.9s; }

/* ============================================================
   DOCUMENT PAGES — legal, project details, blog posts
   ============================================================ */
#page { position: relative; z-index: 2; }
.page .nav { background: linear-gradient(to bottom, rgba(8, 7, 9, 0.85), rgba(8, 7, 9, 0)); }
.doc-main {
  padding: calc(var(--nav-h) + clamp(2.5rem, 8vh, 4.5rem)) clamp(1.25rem, 5vw, 3rem) clamp(3rem, 8vh, 5rem);
  max-width: 44rem;
  margin: 0 auto;
}
.doc-main.wide { max-width: 64rem; }
.doc-head { text-align: center; margin-bottom: 2.2rem; }
.doc-head .btn { margin-bottom: 2rem; }

.prose { font-size: 0.9rem; line-height: 1.85; }
.prose > * + * { margin-top: 1rem; }
.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--white);
  margin-top: 2.4rem;
}
.prose h3 {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--amber);
  margin-top: 1.8rem;
}
.prose ul, .prose ol { padding-left: 1.1rem; }
.prose li + li { margin-top: 0.3rem; }
.prose li::marker { color: var(--amber); }
.prose a { color: var(--amber); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--amber-hi); }
.prose strong { font-weight: 400; color: var(--white); }
.prose dl { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: 0.55rem 1.4rem; }
.prose dt {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 0.35rem;
}
.prose dd { color: var(--white); }
.tbc {
  font-size: 0.85em;
  color: var(--amber);
  border: 1px dashed rgba(var(--glow), 0.5);
  padding: 0.02rem 0.35rem;
}
.updated {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 2.4rem;
}
.stub {
  border: 1px dashed rgba(var(--glow), 0.4);
  padding: 1.4rem;
  background: rgba(14, 12, 16, 0.5);
}

.dots { list-style: none; display: grid; gap: 0.45rem; text-align: left; }
.dots li { position: relative; padding-left: 1rem; font-size: 0.8rem; line-height: 1.6; }
.dots li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--amber);
}

.site-foot {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--hair);
  padding: 2rem clamp(1.25rem, 5vw, 3rem) 2.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  max-width: 64rem;
  margin: 0 auto;
}
.footer-line { font-size: 0.64rem; letter-spacing: 0.1em; color: var(--text-dim); }

/* ============================================================
   FLAT MODE — reduced motion or no 3D: a plain stacked page
   ============================================================ */
.flat .stage { position: relative; height: auto; perspective: none; overflow: visible; }
.flat .layer .layer-inner { filter: none; }
.flat .layer {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  min-height: 100svh;
}
.flat .scroll-space, .flat .rail { display: none; }
.flat .nav { background: linear-gradient(to bottom, rgba(8, 7, 9, 0.9), rgba(8, 7, 9, 0)); }
.flat .nav.at-hero .nav-brand { opacity: 1; pointer-events: auto; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .rail { display: none; }
  .box-grid.cols-3, .box-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .layer { padding-top: calc(var(--nav-h) + 0.5rem); padding-bottom: 2.5rem; }
  .box-grid { gap: 0.6rem; }
  .box { padding: 0.8rem 0.85rem 0.9rem; }
  .box > .frame { margin: -0.8rem -0.85rem 0.3rem; width: calc(100% + 1.7rem); }
  .layer .box p { font-size: 0.72rem; }
  .prose dl { grid-template-columns: 1fr; gap: 0.1rem; }
  .prose dd { margin-bottom: 0.6rem; }
  .next-hint { margin-top: 1.8rem; }
}
@media (max-height: 740px) {
  .display { font-size: clamp(1.7rem, 3.8vw, 2.5rem); }
  .display.intro { font-size: clamp(2rem, 4.6vw, 3rem); }
  .display::after { margin: 0.8rem auto 1rem; }
  .lede { line-height: 1.7; }
  .next-hint { margin-top: 1.6rem; }
  .next-hint::after { height: 1.5rem; }
  .wm-hero { width: min(30rem, 84vw); }
}
@media (max-width: 420px) {
  .wm-nav { width: 6rem; }
  .layer .box p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html.js.arriving #stage, html.js.arriving #page, html.js.arriving .bokeh { filter: none; transform: none; opacity: 1; }
  .bk { animation: none !important; }
}

/* pictures inside a flight chapter never push it past one screen */
.layer .frame { max-height: 30vh; }
.layer .frame.is-portrait { max-height: none; }

/* narrower screens: the rail keeps its lines, the names move into the menu */
@media (max-width: 1100px) {
  .rail-pages a { font-size: 0; gap: 0; }
}

/* the instant a new page is swapped in: jump from "dissolved" to
   "out of focus" without animating in between (js/main.js swapIn) */
html.no-trans #stage, html.no-trans #page, html.no-trans .layer-inner { transition: none !important; }

/* ============================================================
   CONTACT — the form (/contact)
   ============================================================ */
.contact { gap: 0.9rem; padding: 1.4rem 1.4rem 1.2rem; }
.contact:hover { transform: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field > span { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-dim); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 0.85rem;
  color: var(--white);
  background: rgba(10, 10, 11, 0.35);
  border: 0;
  border-bottom: 1px solid var(--hair-2);
  padding: 0.45rem 0.1rem;
  border-radius: 0;
  transition: border-color 0.3s;
}
.field textarea { resize: none; line-height: 1.5; }
.field select { appearance: none; cursor: inherit; padding-right: 1.4rem;
  background: rgba(10, 10, 11, 0.35) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23EE8A2B'/%3E%3C/svg%3E") right 0.3rem center / 0.6rem no-repeat; }
.field select option { background: #141116; color: var(--white); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--amber); }
.field.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.7rem; line-height: 1.5; color: var(--text); }
.consent input { accent-color: var(--amber); margin-top: 0.15rem; }
.contact .btn-row { margin-top: 0.2rem; }
.form-msg { min-height: 1rem; font-size: 0.72rem; color: var(--text); text-align: center; }
.contact.is-sent { text-align: center; padding: 2rem 1.4rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } .contact { gap: 0.6rem; } }

/* ============================================================
   SERVICE PAGES — /services/<slug>: normal scrolling, × back to the boxes
   ============================================================ */
.close-x {
  position: fixed;
  z-index: 60;
  top: calc(var(--nav-h) + 0.6rem);
  right: clamp(1rem, 3vw, 2rem);
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--hair-2);
  border-radius: 50%;
  background: var(--glass);
  transition: border-color 0.4s, box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.close-x span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1rem;
  height: 1px;
  background: var(--white);
  transform: translate(-50%, -50%) rotate(45deg);
}
.close-x span + span { transform: translate(-50%, -50%) rotate(-45deg); }
.close-x:hover, .close-x:focus-visible {
  border-color: rgba(var(--glow), 0.6);
  box-shadow: 0 10px 22px -12px rgba(var(--glow), 0.9);
  transform: rotate(90deg);
}
.doc-hero { position: relative; height: clamp(14rem, 42vh, 26rem); overflow: hidden; }
.doc-hero img { width: 100%; height: 100%; object-fit: cover; display: block;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 40%, rgba(0, 0, 0, 0.6) 70%, transparent 100%); }
.doc-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10, 10, 11, 0.3), rgba(10, 10, 11, 0) 35%); pointer-events: none; }
.doc-hero + .doc-main { padding-top: clamp(1.5rem, 5vh, 3rem); margin-top: -4rem; position: relative; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.prose h2 .icon { vertical-align: -0.1em; margin-right: 0.35rem; }
.box.photo { padding: 0; overflow: hidden; margin-top: 1.6rem; }
.box.photo img { display: block; width: 100%; height: auto; }
.doc-boxes { margin: 1.6rem 0; padding-left: 0 !important; list-style: none; }
.doc-boxes .box { flex-direction: row; align-items: center; gap: 0.7rem; }
.doc-boxes .box h3 + p, .doc-boxes .box h3 { margin: 0; }
ul.box-grid.cols-2.doc-boxes .box:has(h3) { flex-direction: column; align-items: flex-start; }
.doc-boxes li + li { margin-top: 0; }
.magyar { margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--hair); }
.magyar .kicker { margin-bottom: 0.4rem; }
.doc-cta { text-align: center; margin-top: clamp(2.5rem, 7vh, 4rem); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.magyar > * + * { margin-top: 0.8rem; }

/* ============================================================
   LOCATION DATABASE (/locations)
   ============================================================ */
.loc-tool { margin-top: 0.5rem; }
.loc-bar { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-bottom: 1rem; }
.loc-search { flex: 1 1 18rem; }
.loc-search input {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--white);
  background: var(--glass);
  border: 1px solid var(--hair-2);
  padding: 0.75rem 1rem;
  border-radius: 0;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.loc-search input:focus { outline: none; border-color: rgba(var(--glow), 0.6); box-shadow: 0 10px 24px -18px rgba(var(--glow), 0.9); }
.loc-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.6rem; }
.chip {
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--hair-2);
  padding: 0.42rem 0.8rem;
  cursor: inherit;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.chip.small { font-size: 0.66rem; padding: 0.32rem 0.7rem; }
.chip:hover { color: var(--white); border-color: rgba(var(--glow), 0.45); }
.chip[aria-pressed="true"] { color: var(--night); background: var(--amber); border-color: var(--amber); }
.fav-toggle b { font-weight: 500; margin-left: 0.3rem; }
.fav-panel, .shared-banner { margin: 0.8rem 0 0.4rem; padding: 1rem 1.2rem; border: 1px solid rgba(var(--glow), 0.35); background: var(--glass); font-size: 0.85rem; }
.fav-panel .btn-row, .shared-banner .btn-row { justify-content: flex-start; margin-top: 0.8rem; }
.fav-panel .form-msg { text-align: left; margin-top: 0.6rem; }
.loc-count { margin: 1rem 0 0.8rem; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.loc-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1rem; }
.loc-card { position: relative; }
.loc-open {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--glass);
  border: 1px solid var(--hair);
  cursor: inherit;
  transition: transform 0.45s var(--ease), border-color 0.45s, box-shadow 0.45s var(--ease);
}
.loc-open:hover, .loc-open:focus-visible { transform: translateY(-5px); border-color: rgba(var(--glow), 0.32); box-shadow: 0 16px 28px -18px rgba(var(--glow), 0.75), 0 2px 0 -1px rgba(var(--glow), 0.25); }
.loc-thumb { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #141116; }
.loc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.loc-open:hover .loc-thumb img { transform: scale(1.04); }
.loc-nophoto { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.loc-n { position: absolute; left: 0.5rem; bottom: 0.5rem; padding: 0.15rem 0.45rem; font-size: 0.6rem; letter-spacing: 0.12em; background: rgba(10, 10, 11, 0.7); }
.loc-body { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.8rem 0.9rem 0.95rem; }
.loc-cat { font-size: 0.56rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--amber); }
.loc-name { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.2; color: var(--white); }
.loc-area { font-size: 0.74rem; color: var(--text-dim); }
.loc-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.loc-tags i { font-style: normal; font-size: 0.62rem; padding: 0.1rem 0.4rem; border: 1px solid var(--hair); color: var(--text); }
.heart {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: rgba(239, 236, 230, 0.85);
  background: rgba(10, 10, 11, 0.6);
  border: 1px solid rgba(239, 236, 230, 0.25);
  cursor: inherit;
  transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.heart:hover { transform: scale(1.08); border-color: rgba(var(--glow), 0.7); }
.heart.is-on, .heart-btn.is-on { color: var(--orange); border-color: rgba(var(--glow), 0.8); box-shadow: 0 0 18px -4px rgba(var(--glow), 0.8); }
.heart-btn.is-on span::after { content: "d"; }
.loc-empty { margin-top: 1.5rem; text-align: center; color: var(--text); }
.loc-promo { margin-top: 1.4rem; }

.loc-locked { overflow: hidden; }
.loc-modal { position: fixed; inset: 0; z-index: 120; overflow-y: auto; padding: clamp(0.8rem, 5vh, 3rem) 0.8rem; background: rgba(6, 5, 7, 0.9); opacity: 0; transition: opacity 0.3s var(--ease); }
.loc-modal.is-open { opacity: 1; }
.loc-modal-box { position: relative; width: min(100%, 60rem); margin: 0 auto; background: #0d0b0e; border: 1px solid var(--hair-2); outline: none; transform: translateY(14px); transition: transform 0.45s var(--ease); }
.loc-modal.is-open .loc-modal-box { transform: none; }
.m-x { position: absolute; z-index: 3; top: 0.8rem; right: 0.8rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(10, 10, 11, 0.7); border: 1px solid var(--hair-2); cursor: inherit; transition: border-color 0.3s, transform 0.4s var(--ease); }
.m-x:hover { border-color: rgba(var(--glow), 0.7); transform: rotate(90deg); }
.m-x::before, .m-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0.95rem; height: 1px; background: var(--white); transform: translate(-50%, -50%) rotate(45deg); }
.m-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.lm-photo { position: relative; aspect-ratio: 16 / 10; background: #000; }
.lm-photo img { width: 100%; height: 100%; object-fit: contain; }
.lm-none { display: grid; place-items: center; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.lm-prev, .lm-next { position: absolute; top: 50%; margin-top: -1.3rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; font-size: 1.4rem; line-height: 1; color: var(--white); background: rgba(10, 10, 11, 0.6); border: 1px solid var(--hair-2); cursor: inherit; }
.lm-prev { left: 0.8rem; }
.lm-next { right: 0.8rem; }
.lm-prev:hover, .lm-next:hover { border-color: rgba(var(--glow), 0.7); }
.lm-count { position: absolute; right: 0.8rem; bottom: 0.7rem; font-size: 0.66rem; letter-spacing: 0.14em; padding: 0.15rem 0.5rem; background: rgba(10, 10, 11, 0.7); }
.lm-thumbs { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.5rem; background: #070608; scrollbar-width: thin; }
.lm-thumbs button { flex: none; width: 5.5rem; aspect-ratio: 3 / 2; padding: 0; border: 1px solid transparent; background: #141116; opacity: 0.6; cursor: inherit; transition: opacity 0.3s, border-color 0.3s; }
.lm-thumbs button:hover, .lm-thumbs button.is-on { opacity: 1; border-color: var(--amber); }
.lm-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lm-body { padding: clamp(1.2rem, 3vw, 2rem); }
.lm-body h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.2rem); color: var(--white); margin: 0.3rem 0 1rem; }
.lm-facts { display: grid; grid-template-columns: minmax(6rem, 8rem) 1fr; gap: 0.45rem 1.2rem; font-size: 0.85rem; }
.lm-facts dt { font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); padding-top: 0.2rem; }
.lm-body .btn-row { justify-content: flex-start; }
@media (max-width: 560px) { .lm-facts { grid-template-columns: 1fr; gap: 0.1rem; } .lm-facts dd { margin-bottom: 0.5rem; } }

/* ---------- blog posts ---------- */
.post-hero { margin: 0 0 2.4rem; padding: 0; overflow: hidden; }
.doc-head .kicker { margin-bottom: 0.8rem; }
.post-cta { margin-top: 2.6rem; }
.post-card h3 { font-size: 1.05rem; }

/* ---------- the book (/book) ---------- */
.display .accent { font-style: italic; color: var(--amber); }
.edition { display: inline-block; margin-top: 1.2rem; padding: 0.35rem 0.8rem; border: 1px solid rgba(var(--glow), 0.4); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); }
.book-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; text-align: left; }
.book-split .display::after { margin-left: 0; }
.book-split .btn-row { justify-content: flex-start; }
.book-img img { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6)); }
.book-cover { display: flex; justify-content: center; }
.book-cover img { width: min(100%, 17rem, 38vh); height: auto; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--hair); }
.dash-list { list-style: none; padding: 0; margin-top: 1rem; font-size: 0.92rem; line-height: 1.6; color: var(--text); }
.dash-list li { position: relative; padding-left: 1.4rem; }
.dash-list li + li { margin-top: 0.55rem; }
.dash-list li::before { content: "—"; position: absolute; left: 0; color: var(--amber); }
@media (max-width: 800px) {
  .book-split { grid-template-columns: 1fr; gap: 1.2rem; text-align: center; }
  .book-split .display::after { margin-left: auto; }
  .book-split .btn-row { justify-content: center; }
  .book-img img { max-height: 28vh; width: auto; margin: 0 auto; }
  .book-cover img { width: min(9rem, 22vh); }
  .dash-list { text-align: left; font-size: 0.82rem; }
}
.book-one .display.intro { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.book-one .edition { margin-top: 0.6rem; }
.book-pitch { margin-top: 1.1rem; font-size: 0.86rem; line-height: 1.7; color: var(--text); max-width: 32rem; }
.book-one + .next-hint { margin-top: 1.4rem; }
@media (max-width: 800px) {
  .book-one .book-img img { max-height: 20vh; }
  .book-one .display.intro { font-size: 1.5rem; }
  .book-pitch { font-size: 0.76rem; line-height: 1.55; margin-top: 0.7rem; }
}
@media (max-height: 700px) and (max-width: 800px) { .book-pitch { display: none; } }

/* ---------- product pages (/flintmoors) ---------- */
.overlay-product { margin-top: 1.4rem; }
.overlay-product a { font-size: 0.7rem; letter-spacing: 0.32em; color: var(--text); text-decoration: none; transition: color 0.3s; }
.overlay-product a:hover, .overlay-product a[aria-current="page"] { color: var(--amber); }
.product-page { min-height: calc(100svh - 7rem); display: grid; place-items: center; }
.product { max-width: 36rem; text-align: center; }
.product .display { letter-spacing: 0.14em; }
.product-deck { margin-bottom: 1.6rem; }
.product-body { font-size: 0.92rem; line-height: 1.8; color: var(--text); }
.product-body + .product-body { margin-top: 0.9rem; }
.product .btn-row { margin-top: 2rem; }
.product .btn { white-space: normal; line-height: 1.5; max-width: 26rem; }
.product-note { margin-top: 1.4rem; font-size: 0.62rem; letter-spacing: 0.16em; color: var(--text-dim); }
.product .btn { text-transform: none; letter-spacing: 0.03em; font-size: 0.82rem; }
.product-logo { line-height: 0; }
.product-logo img { width: min(22rem, 78vw); height: auto; margin: 0 auto; }
