:root {
  --bg: #f5e7c8;
  --bg-deep: #173c49;
  --ink: #38291f;
  --muted: #8d8170;
  --brass: #b88a44;
  --moss: #65734c;
  --seal: #963e35;
  --water: #5ba8a0;
  --paper: #ead5a7;
  --rail-w: 11.5rem;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(91, 168, 160, 0.18), transparent 55%),
    linear-gradient(165deg, #f8edd4 0%, var(--bg) 42%, #e8d4a8 100%);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--bg-deep);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--seal);
}

/* —— split_panel_left —— */
.split-rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  padding: 1.75rem 1.15rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-deep) 0%, #0f2a33 100%);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 20;
  border-right: 1px solid rgba(184, 138, 68, 0.35);
}

.rail-mark {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.rail-nav a {
  color: rgba(245, 231, 200, 0.72);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.65rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.rail-nav a:hover,
.rail-nav a.is-active {
  color: var(--brass);
  border-left-color: var(--brass);
}

.rail-note {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.4;
  color: rgba(245, 231, 200, 0.45);
  letter-spacing: 0.04em;
}

.sheet {
  margin-left: var(--rail-w);
  padding: 0 clamp(1.25rem, 4vw, 3.5rem) 4rem;
  max-width: 58rem;
}

/* —— editorial_type hero —— */
.hero-editorial {
  min-height: min(88vh, 52rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.5rem 0 3.5rem;
  animation: rise 0.9s ease both;
}

.hero-kicker {
  margin: 0 0 1.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moss);
}

.hero-display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.hero-line {
  display: block;
  font-size: clamp(3.8rem, 14vw, 7.8rem);
  color: var(--ink);
}

.hero-amp {
  display: block;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-style: italic;
  font-weight: 500;
  color: var(--brass);
  margin: 0.15rem 0 0.2rem;
}

.hero-lede {
  margin: 1.75rem 0 0;
  max-width: 28rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 300;
  color: var(--ink);
  opacity: 0.9;
}

.hero-rule {
  width: 4.5rem;
  height: 2px;
  margin: 2rem 0 1.25rem;
  background: linear-gradient(90deg, var(--brass), transparent);
  transform-origin: left;
  animation: draw 1.1s 0.35s ease both;
}

.hero-aside {
  margin: 0;
  max-width: 22rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--muted);
}

/* —— single_centered_band intros —— */
.intro-band {
  text-align: center;
  max-width: 28rem;
  margin: 0 auto 2.75rem;
}

.intro-band h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.intro-band p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.band-features,
.band-screens,
.band-gallery,
.band-legal,
.band-support {
  padding: 4.5rem 0 1rem;
}

/* —— numbered_steps —— */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(56, 41, 31, 0.15);
}

.step {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.25rem;
  padding: 1.65rem 0;
  border-bottom: 1px solid rgba(56, 41, 31, 0.15);
  align-items: start;
  transition: background 0.25s ease;
}

.step:hover {
  background: rgba(234, 213, 167, 0.35);
}

.step-num {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--brass);
  line-height: 1;
  padding-top: 0.2rem;
}

.step h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
}

.step p {
  margin: 0;
  color: var(--ink);
  opacity: 0.82;
  max-width: 36rem;
}

/* —— polaroid_scatter —— */
.polaroid-field {
  position: relative;
  min-height: 28rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 1.5rem 2rem;
  padding: 2rem 0 1rem;
}

.polaroid {
  margin: 0;
  background: #fffef8;
  padding: 0.7rem 0.7rem 2.1rem;
  width: min(14.5rem, 42vw);
  box-shadow:
    0 1px 0 rgba(56, 41, 31, 0.06),
    0 18px 40px rgba(23, 60, 73, 0.18);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.polaroid img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  object-position: top center;
  background: var(--bg-deep);
}

.polaroid figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-align: center;
  color: var(--ink);
}

.tilt-a {
  transform: rotate(-7deg) translateY(1.2rem);
  z-index: 1;
}

.tilt-b {
  transform: rotate(2deg) translateY(-0.5rem);
  z-index: 3;
}

.tilt-c {
  transform: rotate(6deg) translateY(0.8rem);
  z-index: 2;
}

.polaroid:hover {
  z-index: 5;
  box-shadow:
    0 1px 0 rgba(56, 41, 31, 0.06),
    0 22px 48px rgba(23, 60, 73, 0.28);
}

.tilt-a:hover { transform: rotate(-3deg) translateY(0.4rem) scale(1.03); }
.tilt-b:hover { transform: rotate(0deg) translateY(-1rem) scale(1.03); }
.tilt-c:hover { transform: rotate(3deg) translateY(0.2rem) scale(1.03); }

/* gallery */
.gallery-row {
  display: grid;
  gap: 1rem;
}

.gallery-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 2px;
  filter: saturate(0.92);
  box-shadow: 0 20px 50px rgba(23, 60, 73, 0.2);
}

.gallery-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.gallery-tiles img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  opacity: 0;
  animation: fade-up 0.7s ease forwards;
}

.gallery-tiles img:nth-child(1) { animation-delay: 0.05s; }
.gallery-tiles img:nth-child(2) { animation-delay: 0.15s; }
.gallery-tiles img:nth-child(3) { animation-delay: 0.25s; }

/* —— inline_expand legal —— */
.legal-summary {
  max-width: 38rem;
  margin: 0 auto;
  text-align: center;
}

.legal-summary p {
  margin: 0 0 1.25rem;
  color: var(--ink);
  opacity: 0.88;
}

.expand-toggle {
  appearance: none;
  border: 1px solid rgba(184, 138, 68, 0.55);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.7rem 1.35rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.expand-toggle:hover,
.expand-toggle[aria-expanded="true"] {
  background: var(--bg-deep);
  color: var(--paper);
  border-color: var(--bg-deep);
}

.legal-detail {
  max-width: 38rem;
  margin: 1.75rem auto 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(56, 41, 31, 0.12);
  text-align: left;
}

.legal-detail[hidden] {
  display: none;
}

.legal-detail h3 {
  margin: 1.35rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.legal-detail p {
  margin: 0 0 0.75rem;
  color: var(--ink);
  opacity: 0.85;
  font-size: 0.95rem;
}

.support-prose {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

.support-prose p {
  margin: 0 0 0.9rem;
  color: var(--ink);
  opacity: 0.88;
}

.sheet-foot {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(56, 41, 31, 0.12);
  text-align: center;
}

.sheet-foot p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.sheet-foot .muted {
  margin-top: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(1.25rem); }
  to { opacity: 1; transform: none; }
}

@keyframes draw {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .split-rail {
    position: sticky;
    top: 0;
    inset: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-right: none;
    border-bottom: 1px solid rgba(184, 138, 68, 0.35);
  }

  .rail-mark {
    font-size: 1rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .rail-mark br {
    display: none;
  }

  .rail-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.15rem;
    -webkit-overflow-scrolling: touch;
  }

  .rail-nav a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.4rem 0.55rem;
    font-size: 0.65rem;
    white-space: nowrap;
  }

  .rail-nav a:hover,
  .rail-nav a.is-active {
    border-left-color: transparent;
    border-bottom-color: var(--brass);
  }

  .rail-note {
    display: none;
  }

  .sheet {
    margin-left: 0;
    padding: 0 1.15rem 3rem;
  }

  .hero-editorial {
    min-height: auto;
    padding: 2.75rem 0 2rem;
  }

  .step {
    grid-template-columns: 3rem 1fr;
    gap: 0.75rem;
  }

  .polaroid-field {
    min-height: 0;
  }

  .tilt-a,
  .tilt-b,
  .tilt-c {
    transform: none;
  }

  .polaroid {
    width: min(11.5rem, 46%);
  }

  .gallery-tiles {
    grid-template-columns: 1fr;
  }

  @media (min-width: 520px) {
    .gallery-tiles {
      grid-template-columns: repeat(3, 1fr);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
