/* ==========================================================================
   Yeni Kök Yayınları — bookshop-window design system

   Three architectural decisions, each borrowed from a production codebase:

   1. Width is handled by named grid lines (main / wide / full), the pattern
      TryGhost/Source uses. Nothing opts out of the container with negative
      margins, so there is no horizontal overflow to clip.
   2. Dark sections redefine the SAME semantic token names via `.dark`, so no
      component ever needs a per-section colour override.
   3. The palette is a lightness ramp on the logo's own OKLCH hue, so every
      tint stays on-brand and its contrast is predictable.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens — :where() keeps specificity at zero so anything can override
   -------------------------------------------------------------------------- */
:where(html) {
  /* The logo contains exactly two colours: #55664D and #909568.
     Converted to OKLCH they share a muted-olive character:
       #55664D -> oklch(48.9% 0.044 135.7)
       #909568 -> oklch(65.4% 0.063 113.3)
     Both hues are kept; only lightness moves. */
  --h-sage: 113.3;
  --c-sage: 0.063;
  --h-moss: 135.7;
  --c-moss: 0.044;
  --h-warm: 85;

  /* Surfaces */
  --paper: oklch(96.8% 0.012 var(--h-warm));
  --paper-alt: oklch(94.5% 0.014 var(--h-warm));
  --card: oklch(99.5% 0.004 var(--h-warm));
  --forest: oklch(25.5% 0.03 var(--h-moss));
  --forest-deep: oklch(20.5% 0.026 var(--h-moss));

  /* Neutral ink — 15.0 / 7.8 / 5.0 against paper */
  --ink-900: oklch(24% 0.018 var(--h-warm));
  --ink-600: oklch(42% 0.018 var(--h-warm));
  --ink-400: oklch(52% 0.018 var(--h-warm));

  /* Brand ramp. Contrast on paper:
     300 1.9 (decor) · 500 3.3 (display) · 600 4.3 (display) · 700 5.7 (text) */
  --sage-100: oklch(93% var(--c-sage) var(--h-sage));
  --sage-200: oklch(85% var(--c-sage) var(--h-sage));
  --sage-300: oklch(76% var(--c-sage) var(--h-sage));
  --sage-500: oklch(62% var(--c-sage) var(--h-sage));
  --sage-600: oklch(55.5% var(--c-sage) var(--h-sage));
  --sage-700: oklch(49% var(--c-sage) var(--h-sage));
  --moss: oklch(44% var(--c-moss) var(--h-moss));
  --moss-deep: oklch(36% var(--c-moss) var(--h-moss));

  /* ---- Semantic layer. `.dark` restates exactly these names. ---- */
  --bg: var(--paper);
  --fg: var(--ink-900);
  --fg-muted: var(--ink-600);
  --fg-soft: var(--ink-400);
  --accent: var(--sage-700);
  --accent-display: var(--sage-500);
  --line: oklch(24% 0.018 var(--h-warm) / 0.14);
  --line-soft: oklch(24% 0.018 var(--h-warm) / 0.08);
  --btn-bg: var(--moss);
  --btn-fg: var(--card);
  --shadow-img: 0 1px 2px oklch(24% 0.02 var(--h-warm) / 0.08),
                0 10px 26px oklch(24% 0.02 var(--h-warm) / 0.12);
  --shadow-book: 0 2px 4px oklch(24% 0.02 var(--h-warm) / 0.16),
                 0 14px 30px oklch(24% 0.02 var(--h-warm) / 0.2),
                 0 34px 60px oklch(24% 0.02 var(--h-warm) / 0.14);

  /* Type — calm on purpose: photographs lead, letters stay quiet */
  --sans: "Nunito Sans", ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: clamp(1.125rem, 0.25vw + 1.06rem, 1.25rem);
  --fs-h4: clamp(1rem, 0.2vw + 0.95rem, 1.125rem);
  --fs-h3: clamp(1.1875rem, 0.45vw + 1.08rem, 1.5rem);
  --fs-h2: clamp(1.5rem, 1.15vw + 1.14rem, 2.25rem);
  --fs-h1: clamp(2.125rem, 2.3vw + 1.52rem, 3.375rem);

  /* Space — one fluid step scales the whole rhythm */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 40px;
  --sp-8: 56px;
  --sp-9: clamp(56px, 4vw + 32px, 88px);
  --sp-10: clamp(72px, 6vw + 40px, 128px);

  /* Shape — soft radii read as a shop, not a printed page */
  --r-img: 14px;
  --r-btn: 10px;
  --r-pill: 999px;

  /* Frame */
  --gap: clamp(20px, 1.1rem + 1.7vw, 48px);
  --main-w: 1180px;
  --wide-w: 1440px;
  --bar: 68px;

  --ease: cubic-bezier(0.22, 0.68, 0, 1);
}

@media (min-width: 900px) { :where(html) { --bar: 80px; } }

/* Dark sections: same token names, inverted values. Any component placed
   inside simply inherits the right colours. */
.dark {
  --bg: var(--forest);
  --fg: var(--card);
  --fg-muted: oklch(100% 0 0 / 0.74);
  --fg-soft: oklch(100% 0 0 / 0.62);
  --accent: var(--sage-200);
  --accent-display: var(--sage-200);
  --line: oklch(100% 0 0 / 0.18);
  --line-soft: oklch(100% 0 0 / 0.1);
  --btn-bg: var(--card);
  --btn-fg: var(--forest);
  background: var(--bg);
  color: var(--fg);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar) + var(--sp-4));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, figure, dl, dd, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; flex: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
address { font-style: normal; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }

::selection { background: var(--sage-200); color: var(--forest); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 12px; left: 50%;
  z-index: 300;
  translate: -50% -250%;
  padding: 12px 24px;
  border-radius: var(--r-btn);
  background: var(--ink-900);
  color: var(--card);
  font-size: var(--fs-sm);
  font-weight: 700;
  transition: translate 0.2s var(--ease);
}
.skip:focus { translate: -50% 0; }

/* --------------------------------------------------------------------------
   Layout — named grid lines instead of containers + negative margins.
   A child picks its width with one class; nothing ever leaves the page box.
   -------------------------------------------------------------------------- */
.canvas {
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--gap), 1fr)
    [wide-start] minmax(0, calc((var(--wide-w) - var(--main-w)) / 2))
    [main-start] min(var(--main-w), 100% - var(--gap) * 2) [main-end]
    minmax(0, calc((var(--wide-w) - var(--main-w)) / 2)) [wide-end]
    minmax(var(--gap), 1fr) [full-end];
  row-gap: var(--sp-6);
}
.canvas > *      { grid-column: main; }
.canvas > .wide  { grid-column: wide; }
.canvas > .full  { grid-column: full; }

/* A `full` child that needs its own inner text column re-opens the grid */
.full.canvas { row-gap: 0; }

section { padding-block: var(--sp-10); }
section.flush-top { padding-block: var(--sp-5) 0; }
section.tight { padding-block: var(--sp-9); }

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.t-h1 { font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -0.03em; }
.t-h2 { font-size: var(--fs-h2); line-height: 1.14; letter-spacing: -0.025em; }
.t-h3 { font-size: var(--fs-h3); line-height: 1.24; }
.t-h4 { font-size: var(--fs-h4); line-height: 1.34; letter-spacing: -0.012em; }

/* Book titles are the one place the serif appears — the books get the
   bookish face, everything else stays in the quiet sans. */
.t-book {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "SOFT" 70, "WONK" 1;
  letter-spacing: -0.015em;
}

.lede {
  font-size: var(--fs-lg);
  line-height: 1.52;
  color: var(--fg-muted);
  text-wrap: pretty;
}

.body { line-height: 1.68; color: var(--fg-muted); text-wrap: pretty; }
.body + .body { margin-top: var(--sp-4); }

.note { font-size: var(--fs-base); line-height: 1.55; color: var(--fg-soft); }

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.accent { color: var(--accent-display); }

.measure { max-width: 46ch; }
.measure-sm { max-width: 34ch; }

/* --------------------------------------------------------------------------
   Section headers
   -------------------------------------------------------------------------- */
.head { display: grid; gap: var(--sp-4); align-content: start; }
@media (min-width: 900px) {
  .head--split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: end;
    gap: var(--sp-8);
  }
}
.head__title { display: grid; gap: var(--sp-3); }

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 50px;
  padding: 0 var(--sp-6);
  border-radius: var(--r-btn);
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease),
    color 0.2s var(--ease), translate 0.15s var(--ease);
}
.btn svg { width: 17px; height: 17px; }
.btn:active { translate: 0 1px; }

.btn--solid { background: var(--btn-bg); color: var(--btn-fg); }
.btn--solid:hover { background: var(--moss-deep); }
.dark .btn--solid:hover { background: var(--sage-100); }

.btn--outline { box-shadow: inset 0 0 0 1.5px var(--line); color: var(--fg); }
.btn--outline:hover { box-shadow: inset 0 0 0 1.5px var(--fg); }

.btn--block { width: 100%; }

/* Text link that grows its gap on hover */
.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-block: 10px;
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--accent);
  transition: gap 0.2s var(--ease), color 0.2s var(--ease);
}
.link:hover { gap: 11px; color: var(--fg); }
.link u { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* Small rounded tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--line-soft);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(96.8% 0.012 85 / 0.82);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.masthead[data-stuck="true"] {
  border-bottom-color: var(--line);
  background: oklch(96.8% 0.012 85 / 0.94);
}
.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--bar);
}

.brand { display: block; flex: none; padding-block: 10px; }
.brand img { width: auto; height: 30px; }
@media (min-width: 900px) { .brand img { height: 36px; } }

.nav { display: none; }
@media (min-width: 900px) {
  .nav { display: flex; align-items: center; gap: var(--sp-2); }
  .nav a {
    padding: 11px var(--sp-4);
    border-radius: var(--r-btn);
    font-size: var(--fs-base);
    font-weight: 600;
    color: var(--fg-muted);
    transition: background 0.18s var(--ease), color 0.18s var(--ease);
  }
  .nav a:hover { background: var(--line-soft); color: var(--fg); }
}

.masthead__end { display: flex; align-items: center; gap: var(--sp-3); }

.shop-link {
  display: none;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 var(--sp-5);
  border-radius: var(--r-btn);
  background: var(--moss);
  color: var(--card);
  font-size: var(--fs-base);
  font-weight: 700;
  transition: background 0.2s var(--ease);
}
.shop-link:hover { background: var(--moss-deep); }
@media (min-width: 620px) { .shop-link { display: inline-flex; } }

.burger { display: grid; gap: 5px; place-content: center; width: 44px; height: 44px; margin-right: -8px; }
@media (min-width: 900px) { .burger { display: none; } }
.burger i {
  width: 21px; height: 2px;
  border-radius: 2px;
  background: var(--fg);
  transition: rotate 0.3s var(--ease), translate 0.3s var(--ease), opacity 0.2s;
}
.burger[aria-expanded="true"] i:nth-child(1) { translate: 0 7px; rotate: 45deg; }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { translate: 0 -7px; rotate: -45deg; }

.sheet {
  position: fixed;
  inset: var(--bar) 0 0;
  z-index: 99;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: var(--sp-6);
  padding: var(--sp-6) var(--gap) calc(var(--sp-7) + env(safe-area-inset-bottom));
  background: var(--paper);
  overflow-y: auto;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.42s var(--ease);
}
.sheet[data-open="true"] { clip-path: inset(0 0 0 0); }
@media (min-width: 900px) { .sheet { display: none; } }

.sheet nav { align-self: start; display: grid; }
.sheet nav a {
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--line-soft);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sheet__end { display: grid; gap: var(--sp-4); justify-items: center; }

/* --------------------------------------------------------------------------
   Hero — greeting sits on the photograph, child stays visible on the right
   -------------------------------------------------------------------------- */
.banner {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(78vh, 640px);
  overflow: hidden;
  border-radius: 20px;
  background: var(--forest);
  color: var(--card);
}
@media (min-width: 800px) {
  .banner { align-items: center; min-height: 460px; }
}
.banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 28%;
}
/* Scrim keeps the type readable without covering the reader on the right. */
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, oklch(16% 0.02 135 / 0.88) 0%, oklch(16% 0.02 135 / 0.42) 46%, oklch(16% 0.02 135 / 0.12) 100%);
}
@media (min-width: 800px) {
  .banner::after {
    background:
      linear-gradient(100deg, oklch(16% 0.02 135 / 0.86) 0%, oklch(16% 0.02 135 / 0.62) 34%, oklch(16% 0.02 135 / 0.18) 62%, transparent 100%);
  }
  .banner img { object-position: 72% 42%; }
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--sp-4);
  justify-items: start;
  max-width: 38rem;
  padding: var(--sp-9) var(--gap);
}
.hero h1 { max-width: 14ch; color: var(--card); }
.hero .lede { max-width: 38ch; color: oklch(100% 0 0 / 0.88); }
.hero .note { max-width: 40ch; color: oklch(100% 0 0 / 0.74); }
.hero .eyebrow { color: var(--sage-200); }
.hero .accent { color: var(--sage-200); }
.hero__acts { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-2); }
@media (max-width: 439px) { .hero__acts { width: 100%; } .hero__acts .btn { flex: 1 1 100%; } }
.hero .btn--outline {
  color: var(--card);
  box-shadow: inset 0 0 0 1.5px oklch(100% 0 0 / 0.55);
}
.hero .btn--outline:hover {
  background: oklch(100% 0 0 / 0.12);
  box-shadow: inset 0 0 0 1.5px var(--card);
}

.hero__formats { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.hero .tag {
  background: oklch(100% 0 0 / 0.12);
  color: var(--card);
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 0.28);
}

/* --------------------------------------------------------------------------
   Shop window — the three works, presented large and early
   -------------------------------------------------------------------------- */
#kitaplik { padding-block-start: var(--sp-8); }

.window {
  display: grid;
  gap: var(--sp-7) var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.book { display: grid; gap: var(--sp-4); align-content: start; }
.book__cover {
  display: block;
  position: relative;
  border-radius: var(--r-img);
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--paper-alt);
  box-shadow: var(--shadow-img);
  transition: translate 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.book__cover img { width: 100%; height: 100%; object-fit: cover; }
.book:hover .book__cover { translate: 0 -6px; box-shadow: var(--shadow-book); }

.book__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--fg-soft);
}
.book__meta .dot { color: var(--accent); font-weight: 700; }
.book__title { font-size: var(--fs-h3); }

/* --------------------------------------------------------------------------
   Story — photograph beside text, calm
   -------------------------------------------------------------------------- */
.story { display: grid; gap: var(--sp-7); align-items: center; }
@media (min-width: 900px) {
  .story { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-10); }
  .story--flip .story__art { order: 2; }
}
.story__art {
  border-radius: var(--r-img);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-alt);
  box-shadow: var(--shadow-img);
}
.story__art img { width: 100%; height: 100%; object-fit: cover; }
.story__text { display: grid; gap: var(--sp-5); align-content: center; }

.points { display: grid; gap: var(--sp-4); }
.points li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-4); }
.points .num {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: var(--r-pill);
  background: var(--sage-100);
  color: var(--sage-700);
  font-size: var(--fs-xs);
  font-weight: 800;
}
.dark .points .num { background: oklch(100% 0 0 / 0.14); color: var(--sage-100); }
.points h3 { font-size: var(--fs-h4); margin-bottom: 2px; }
.points p { font-size: var(--fs-base); color: var(--fg-muted); line-height: 1.55; }

/* --------------------------------------------------------------------------
   Gallery — reading moments, photographs at generous size
   -------------------------------------------------------------------------- */
.gallery {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}
.shot { display: grid; gap: var(--sp-4); align-content: start; }
.shot figure {
  border-radius: var(--r-img);
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: var(--paper-alt);
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.8s var(--ease); }
.shot:hover img { scale: 1.04; }
.shot h3 { font-size: var(--fs-h4); }
.shot__step { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }

/* --------------------------------------------------------------------------
   Listing — one work in detail: big cover, facts beside it
   -------------------------------------------------------------------------- */
.listing { display: grid; gap: var(--sp-7); }
@media (min-width: 900px) {
  .listing {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: var(--sp-10);
    align-items: start;
  }
  .listing--flip .listing__art { order: 2; }
}

.listing__art { display: grid; gap: var(--sp-4); }
.listing__art .pic {
  border-radius: var(--r-img);
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--paper-alt);
  box-shadow: var(--shadow-book);
}
.listing__art img { width: 100%; height: 100%; object-fit: cover; }

.listing__body { display: grid; gap: var(--sp-5); align-content: start; }
.listing__title { display: grid; gap: var(--sp-2); }

/* Facts as quiet rounded chips, not a printed imprint table */
.facts {
  display: grid;
  gap: var(--sp-1) var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  padding: var(--sp-5);
  border-radius: var(--r-img);
  background: var(--line-soft);
}
.facts div { display: grid; gap: 1px; padding-block: var(--sp-2); }
.facts dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-soft); }
.facts dd { font-size: var(--fs-base); font-weight: 700; font-variant-numeric: tabular-nums; }

.highlights { display: grid; gap: var(--sp-3); }
.highlights li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-3);
  font-size: var(--fs-base);
  color: var(--fg-muted);
}
.highlights svg { width: 18px; height: 18px; margin-top: 3px; color: var(--accent); }

.listing__acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); }
@media (max-width: 439px) { .listing__acts .btn { width: 100%; } }

/* --------------------------------------------------------------------------
   Offers — Airbnb's real card pattern: image + text on the page, no chrome
   -------------------------------------------------------------------------- */
/* On small screens the rail spans the `full` column and pads itself in, so it
   can scroll to the screen edge without a single negative margin. */
.rail {
  grid-column: full;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 74%;
  gap: var(--sp-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gap);
  padding: 0 var(--gap) var(--sp-3);
  scrollbar-width: none;
  /* A column-flow grid leaks scrollable overflow into the document in Chrome;
     paint containment keeps the pan inside this rail. */
  contain: paint;
}
.rail::-webkit-scrollbar { display: none; }
@media (min-width: 560px) { .rail { grid-auto-columns: 46%; } }
@media (min-width: 1000px) {
  .rail {
    grid-column: main;
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto auto auto;
    grid-auto-columns: auto;
    gap: var(--sp-6);
    overflow: visible;
    padding: 0;
    contain: none;
    align-items: start;
  }
}

.offer { display: grid; gap: var(--sp-3); align-content: start; scroll-snap-align: start; }
@media (min-width: 1000px) {
  /* Subgrid keeps all four titles and links on a shared baseline */
  .offer { grid-row: span 4; grid-template-rows: subgrid; align-content: stretch; }
  .offer h3 { align-self: start; }
  .offer .link { align-self: end; justify-self: start; }
}
.offer__pic {
  display: block;
  border-radius: var(--r-img);
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--line-soft);
}
.offer__pic img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.7s var(--ease); }
.offer:hover .offer__pic img { scale: 1.05; }
.offer__meta { display: flex; flex-wrap: wrap; gap: 3px var(--sp-2); font-size: var(--fs-sm); color: var(--fg-soft); }
.offer h3 { font-size: var(--fs-h4); }

/* --------------------------------------------------------------------------
   Upcoming
   -------------------------------------------------------------------------- */
.pulse { display: inline-flex; align-items: center; gap: 8px; }
.pulse::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: var(--r-pill);
  background: currentColor;
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; scale: 1; } 50% { opacity: 0.3; scale: 0.65; } }

.fields { display: grid; gap: var(--sp-3); }
.field {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-5);
  border-radius: var(--r-img);
  background: var(--line-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}
.field b { font-size: var(--fs-h4); font-weight: 700; letter-spacing: -0.012em; }
.field span { font-size: var(--fs-sm); color: var(--fg-soft); }

/* --------------------------------------------------------------------------
   Questions
   -------------------------------------------------------------------------- */
.qa { display: grid; gap: var(--sp-7); }
@media (min-width: 950px) {
  .qa { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--sp-10); align-items: start; }
  .qa__aside { position: sticky; top: calc(var(--bar) + var(--sp-6)); }
}
.qa__aside { display: grid; gap: var(--sp-4); align-content: start; }
.qa__list { display: grid; gap: var(--sp-3); }

.q {
  border-radius: var(--r-img);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.2s var(--ease);
}
.dark .q { background: oklch(100% 0 0 / 0.05); }
.q[open], .q:hover { box-shadow: inset 0 0 0 1px var(--fg-soft); }

.q > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  font-size: var(--fs-h4);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.34;
}
.q__sign { position: relative; width: 16px; height: 16px; }
.q__sign::before, .q__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  translate: 0 -50%;
  transition: rotate 0.32s var(--ease);
}
.q__sign::after { rotate: 90deg; }
.q[open] .q__sign::after { rotate: 0deg; }

.q__a {
  max-width: 64ch;
  padding: 0 var(--sp-5) var(--sp-5);
  font-size: var(--fs-base);
  line-height: 1.66;
  color: var(--fg-muted);
  animation: unfold 0.35s var(--ease);
}
.q__a a { font-weight: 700; color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
@keyframes unfold { from { opacity: 0; translate: 0 -5px; } }

/* --------------------------------------------------------------------------
   Coda — closing photograph
   -------------------------------------------------------------------------- */
.coda { position: relative; display: grid; align-items: end; min-height: min(78vh, 660px); overflow: hidden; }
.coda__bg { position: absolute; inset: 0; }
.coda__bg img { width: 100%; height: 100%; object-fit: cover; }
.coda__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, oklch(18% 0.02 135 / 0.9) 4%, oklch(18% 0.02 135 / 0.42) 54%, oklch(18% 0.02 135 / 0.14)),
    linear-gradient(100deg, oklch(18% 0.02 135 / 0.6), transparent 66%);
}
.coda__in {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--sp-5);
  justify-items: start;
  padding-block: var(--sp-9);
  color: oklch(100% 0 0);
}
.coda__in h2 { max-width: 22ch; }
.coda__in .eyebrow { color: var(--sage-200); }
.coda__acts { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
@media (max-width: 439px) { .coda__acts { width: 100%; } .coda__acts .btn { flex: 1 1 100%; } }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.foot {
  --bg: var(--forest-deep);
  --fg: var(--card);
  --fg-muted: oklch(100% 0 0 / 0.74);
  --fg-soft: oklch(100% 0 0 / 0.6);
  --line: oklch(100% 0 0 / 0.16);
  --line-soft: oklch(100% 0 0 / 0.09);
  --accent: var(--sage-200);
  background: var(--bg);
  color: var(--fg-muted);
  padding-block: var(--sp-9) calc(var(--sp-6) + env(safe-area-inset-bottom));
  font-size: var(--fs-base);
}

.foot__top {
  display: grid;
  gap: var(--sp-5);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 800px) { .foot__top { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-9); } }
.foot__top .brand img { height: 28px; }
.foot__slogan { color: var(--fg); font-size: var(--fs-h3); font-weight: 800; letter-spacing: -0.022em; }
.foot__slogan span { display: block; margin-top: 5px; font-size: var(--fs-base); font-weight: 400; letter-spacing: 0; color: var(--fg-muted); }

.foot__cols { display: grid; gap: var(--sp-7); padding-block: var(--sp-7); }
@media (min-width: 560px) { .foot__cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 950px) { .foot__cols { grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); } }

.foot__col h4 { margin-bottom: var(--sp-3); color: var(--fg); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.foot__col a { display: inline-block; padding-block: 11px; transition: color 0.18s var(--ease); }
.foot__col a:hover { color: var(--fg); }
.foot__col address { padding-top: 11px; line-height: 1.62; }

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--fg-soft);
}
.crumb a { color: var(--accent); }
.pull {
  margin: 0;
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--r-img);
  background: var(--line-soft);
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 500;
  font-variation-settings: "SOFT" 70, "WONK" 1;
  font-style: italic;
  line-height: 1.45;
  color: var(--fg);
}

.foot__legal { display: grid; gap: var(--sp-2); padding-block: var(--sp-6); border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--fg-soft); }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-2) var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--fg-soft); }

/* --------------------------------------------------------------------------
   Dialogs — contact form and privacy notice
   -------------------------------------------------------------------------- */
.modal {
  width: min(520px, calc(100vw - 32px));
  max-height: min(88vh, 760px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow-book);
}
.modal--wide { width: min(680px, calc(100vw - 32px)); }
.modal::backdrop { background: oklch(16% 0.02 135 / 0.55); }
.modal__form {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-6);
  overflow: auto;
  max-height: min(88vh, 760px);
}
.modal__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
}
.modal__bar .eyebrow { margin-bottom: 6px; }
.modal__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -8px -8px 0 0;
  border-radius: var(--r-btn);
  color: var(--fg-muted);
}
.modal__close:hover { background: var(--line-soft); color: var(--fg); }
.modal__label {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.modal__input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--paper);
  color: var(--fg);
  font: inherit;
}
textarea.modal__input { min-height: 140px; resize: vertical; }
.modal__input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.modal__status:empty { display: none; }
.modal__status { font-size: var(--fs-base); font-weight: 600; }
.modal__status[data-state="ok"] { color: var(--moss); }
.modal__status[data-state="err"] { color: #8a3b2a; }
.modal__copy { display: grid; gap: var(--sp-3); }
.modal__copy h3 { font-size: var(--fs-h4); margin-top: var(--sp-3); }
.modal__copy p { font-size: var(--fs-base); line-height: 1.65; color: var(--fg-muted); }
.modal__copy a { font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Motion — opt-in only, so content can never be trapped invisible
   -------------------------------------------------------------------------- */
html[data-anim="1"] [data-rise] {
  opacity: 0;
  translate: 0 12px;
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
}
html[data-anim="1"] [data-rise].shown { opacity: 1; translate: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-rise] { opacity: 1 !important; translate: none !important; }
}
