:root {
  --ink: #1a1c18;
  --ink-soft: #3d4238;
  --muted: #5c6356;
  --paper: #f3efe6;
  --paper-2: #e7e1d4;
  --accent: #c45c26;
  --accent-dark: #9a4418;
  --line: rgba(26, 28, 24, 0.12);
  --max: 1080px;
  --narrow: 680px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --focus: 0 0 0 3px rgba(196, 92, 38, 0.35);
  --header-h: 4.75rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(196, 92, 38, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 20%, rgba(90, 110, 80, 0.08), transparent 50%),
    linear-gradient(180deg, #efe9dc 0%, var(--paper) 40%, #ebe6da 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Unmistakable progress bar */
.page-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 6px;
  z-index: 100;
  background: rgba(26, 28, 24, 0.12);
  pointer-events: none;
}
.page-progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #e08a4f);
  box-shadow: 0 0 16px rgba(196, 92, 38, 0.65);
}

.boot-veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: var(--paper);
  opacity: 0;
  transition: opacity 0.4s ease;
}
body.is-booting .boot-veil { opacity: 1; }

/* Do NOT hide main forever — only soft fade during boot */
body.is-booting main,
body.is-booting .site-header,
body.is-booting .site-footer {
  opacity: 0.001;
}
body.is-ready main,
body.is-ready .site-header,
body.is-ready .site-footer,
body.motion-fallback main,
body.motion-fallback .site-header,
body.motion-fallback .site-footer {
  opacity: 1;
  transition: opacity 0.45s ease;
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 1rem; z-index: 110;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(243, 239, 230, 0.9);
  border-bottom: 1px solid var(--line);
}
.site-header.is-scrolled {
  background: rgba(243, 239, 230, 0.97);
  box-shadow: 0 12px 30px rgba(26, 28, 24, 0.1);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.95rem 0;
}
.logo {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  will-change: transform;
}
.logo:hover { color: var(--accent-dark); }

.nav { display: none; gap: 1.35rem; }
.nav a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -0.15rem;
  width: 100%; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.nav a:hover { color: var(--accent-dark); }
.nav a:hover::after { transform: scaleX(1); }

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.3rem;
  background: var(--accent);
  color: #fffaf4;
  text-decoration: none;
  font-weight: 600;
  border: 0;
  border-radius: 2px;
  will-change: transform;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  box-shadow: 0 8px 0 rgba(154, 68, 24, 0.35);
}
.btn.is-magnetic { transition: none; }
.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
  box-shadow: 0 14px 0 rgba(154, 68, 24, 0.28), 0 18px 28px rgba(154, 68, 24, 0.22);
}
.btn:active, .btn.is-pressed {
  transform: translateY(2px) scale(0.97) !important;
  box-shadow: 0 2px 0 rgba(154, 68, 24, 0.35);
}
.btn-small { padding: 0.58rem 0.95rem; font-size: 0.9rem; }

a { color: var(--accent-dark); }
a:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: none; box-shadow: var(--focus);
}

.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: flex-end;
  padding: 4.5rem 0 4rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -20% 0;
  background:
    linear-gradient(105deg, rgba(26, 28, 24, 0.78) 0%, rgba(26, 28, 24, 0.45) 48%, rgba(26, 28, 24, 0.2) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='900' viewBox='0 0 1600 900'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%233a3f36'/%3E%3Cstop offset='1' stop-color='%231c221c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1600' height='900' fill='url(%23g)'/%3E%3Cg fill='none' stroke='%23c45c26' stroke-opacity='0.18' stroke-width='2'%3E%3Cpath d='M0 620 L420 420 L780 560 L1200 300 L1600 480'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.hero-orb {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; will-change: transform;
}
.hero-orb--a {
  width: min(42vw, 320px); height: min(42vw, 320px);
  right: 6%; top: 14%;
  background: radial-gradient(circle, rgba(196, 92, 38, 0.45), transparent 70%);
  animation: orbPulse 4s ease-in-out infinite alternate;
}
.hero-orb--b {
  width: min(30vw, 200px); height: min(30vw, 200px);
  left: 10%; bottom: 18%;
  background: radial-gradient(circle, rgba(247, 242, 232, 0.3), transparent 70%);
  animation: orbPulse 5.5s ease-in-out infinite alternate-reverse;
}
@keyframes orbPulse {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(3%, -5%, 0) scale(1.12); }
}

.hero-content { position: relative; z-index: 1; color: #f7f2e8; max-width: 720px; will-change: transform, opacity; }
.brand-mark {
  font-family: var(--display);
  font-size: clamp(2.55rem, 7.2vw, 4.35rem);
  line-height: 1.02; margin: 0 0 1.15rem; color: #fff8ee;
  text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}
.hero h1 {
  font-family: var(--font); font-weight: 600;
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  line-height: 1.28; margin: 0 0 1.1rem; max-width: 18ch; color: #f0ebe0;
}
.lede {
  font-size: 1.1rem; line-height: 1.55; color: rgba(247,242,232,0.9);
  max-width: 38ch; margin: 0 0 1.65rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.95rem 1.15rem; align-items: center; margin-bottom: 1.15rem; }
.text-link {
  color: #f7f2e8; font-weight: 600; text-decoration: none;
  border-bottom: 1.5px solid rgba(247,242,232,0.55);
}
.text-link:hover { color: #fff; border-color: #fff; }
.trust { margin: 0; font-size: 0.92rem; color: rgba(247,242,232,0.72); max-width: 40ch; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  z-index: 2; margin: 0; color: #fff; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  animation: cueBounce 1.4s ease-in-out infinite;
}
.scroll-cue span {
  width: 1.2rem; height: 1.9rem; border: 2px solid #fff; border-radius: 999px; position: relative;
}
.scroll-cue span::after {
  content: ""; position: absolute; left: 50%; top: 0.35rem; width: 4px; height: 4px;
  margin-left: -2px; border-radius: 50%; background: #fff;
  animation: cueDot 1.2s ease-in-out infinite;
}
@keyframes cueBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}
@keyframes cueDot {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(11px); }
}

body.is-ready .reveal {
  opacity: 0;
  transform: translateY(40px);
  animation: rise 0.85s var(--ease-out) forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.section { padding: 4.75rem 0; }
.section.tint {
  background: rgba(231, 225, 212, 0.55);
  border-block: 1px solid var(--line);
}
.section h2, .pin-title {
  font-family: var(--display);
  font-size: clamp(2.05rem, 4vw, 2.85rem);
  font-weight: 400; margin: 0 0 0.85rem; line-height: 1.12;
}
.section-lede { margin: 0 0 2rem; color: var(--ink-soft); max-width: 42ch; }
.section p { margin: 0 0 1rem; }
.muted { color: var(--muted); }

.offer-block {
  padding: 1.75rem 0; border-top: 1px solid var(--line);
  transition: transform 0.25s ease, background 0.25s ease, padding-left 0.25s ease;
}
.offer-block.interactive-block { border-radius: 4px; padding-inline: 0.4rem; margin-inline: -0.4rem; }
.offer-block.interactive-block:hover {
  background: rgba(255,250,244,0.65);
  padding-left: 1rem;
  transform: translateX(8px);
}
.offer-block h3 {
  margin: 0 0 0.55rem; font-size: 1.28rem;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: baseline;
}
.price { font-weight: 600; color: var(--accent-dark); font-size: 1rem; }
.offer-block ul, .principles { margin: 0.85rem 0 0; padding-left: 1.2rem; }
.offer-block li, .principles li { margin-bottom: 0.4rem; }
.addons { margin-top: 1.75rem; color: var(--muted); font-size: 0.95rem; }

/* PIN: tall track + sticky at ALL widths (motion-test pattern) */
.pin-stage {
  position: relative;
  border-block: 1px solid var(--line);
  background: rgba(231, 225, 212, 0.4);
}
.pin-stage__track {
  height: 220vh; /* always tall so sticky is obvious */
}
.pin-stage__sticky {
  position: sticky;
  top: 12vh;
  padding: 1rem 0;
}
.pin-card {
  position: relative;
  background: #fffdf8;
  border: 2px solid rgba(196, 92, 38, 0.28);
  border-radius: 14px;
  padding: 1.5rem 1.35rem 2rem;
  box-shadow: 0 22px 50px rgba(26, 28, 24, 0.12);
}
.pin-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.pin-kicker {
  margin: 0; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-dark);
}
.pin-meter {
  margin: 0; font-family: var(--display); font-size: 1.75rem; color: var(--accent-dark);
}
.pin-meter__total { color: var(--muted); font-size: 1rem; }
.pin-title { margin-bottom: 0.25rem; }
.pin-hint { margin: 0 0 1.2rem; color: var(--muted); font-weight: 600; }
.pin-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: rgba(26,28,24,0.08); border-radius: 0 0 12px 12px; overflow: hidden;
}
.pin-progress span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #e08a4f);
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.steps li {
  display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start;
  padding: 0.9rem 1rem; border-radius: 10px; border: 2px solid transparent;
  opacity: 0.28; transform: translateX(-12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.steps li.is-active {
  opacity: 1; transform: none; color: var(--accent-dark); font-weight: 600;
}
.steps li.is-current {
  background: rgba(196, 92, 38, 0.12);
  border-color: rgba(196, 92, 38, 0.45);
  box-shadow: 0 12px 28px rgba(196, 92, 38, 0.12);
}
.step-num {
  width: 2.4rem; height: 2.4rem; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font-weight: 700;
  transition: background 0.25s ease, transform 0.25s ease;
}
.steps li.is-current .step-num { background: var(--accent); transform: scale(1.12); }
.steps h3 { margin: 0.1rem 0 0.2rem; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--ink-soft); font-weight: 400; }
.principles { margin-top: 1.5rem; color: var(--ink-soft); }

.price-table { width: 100%; border-collapse: collapse; margin: 1.15rem 0 0.25rem; }
.price-table th, .price-table td {
  text-align: left; padding: 0.95rem 0.25rem; border-bottom: 1px solid var(--line);
}
.price-table th {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); font-weight: 600;
}
.price-table td:last-child { font-weight: 600; }
.price-row { transition: background 0.2s ease, transform 0.2s ease; }
.price-row:hover { background: rgba(196,92,38,0.08); transform: translateX(6px); }

details {
  border-bottom: 1px solid var(--line); padding: 1rem 0.15rem;
  transition: background 0.2s ease, padding-left 0.2s ease, transform 0.2s ease;
}
details:hover { background: rgba(255,250,244,0.6); padding-left: 0.7rem; transform: translateX(4px); }
details[open] { background: rgba(231,225,212,0.5); }
summary { cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
details[open] summary::after { content: "-"; }
details p { margin: 0.7rem 0 0; color: var(--ink-soft); }

.contact .contact-block {
  margin: 1.75rem 0; padding: 1.5rem 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}

.site-footer {
  padding: 2.85rem 0 3.25rem; background: var(--ink);
  color: rgba(243,239,230,0.78); font-size: 0.92rem;
}
.footer-brand { font-family: var(--display); font-size: 1.6rem; color: #f7f2e8; margin: 0 0 0.85rem; }
.site-footer p { margin: 0 0 0.7rem; max-width: 52ch; }
.site-footer a { color: #f0c9a8; text-decoration: none; border-bottom: 1px solid rgba(240,201,168,0.35); }

/* CSS-first reveals: scroll-driven where supported, else JS .is-in */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(56px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  border-left: 4px solid transparent;
  padding-left: 0.15rem;
}
.reveal-on-scroll.is-in {
  opacity: 1;
  transform: none;
  border-left-color: var(--accent);
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
      opacity: 1;
      transform: none;
      border-left-color: transparent;
      animation: viewRise both linear;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
      transition: border-left-color 0.4s ease;
    }
    .reveal-on-scroll.is-in { border-left-color: var(--accent); }
    @keyframes viewRise {
      from { opacity: 0; transform: translateY(64px); }
      to { opacity: 1; transform: none; }
    }
  }
}

@media (min-width: 800px) {
  .nav { display: flex; }
  .section { padding: 5.25rem 0; }
  .hero { align-items: center; padding: 5.5rem 0 4.5rem; }
  .pin-steps { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
  .pin-stage__track { height: 260vh; }
  .pin-stage__sticky { top: calc(var(--header-h) + 1rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-on-scroll,
  body.is-ready .reveal,
  .hero-orb, .scroll-cue, .scroll-cue span::after,
  .steps li, .btn {
    animation: none !important;
    transition: none !important;
  }
  .reveal-on-scroll, body.is-ready .reveal, .steps li {
    opacity: 1 !important; transform: none !important;
  }
  .boot-veil, .scroll-cue { display: none !important; }
  body.is-booting main, body.is-booting .site-header, body.is-booting .site-footer { opacity: 1 !important; }
  .pin-stage__track { height: auto !important; }
  .pin-stage__sticky { position: relative !important; top: auto !important; }
}
