/* ---------- Design tokens ---------- */
:root {
  --ink: #1c1712;
  --ink-soft: #4a3f36;
  --paper: #faf6ef;
  --paper-dim: #f1eadd;
  --line: #e5d9c6;
  --clay: #c9702b;
  --clay-deep: #a5551c;
  --clay-light: #f1a15f;
  --moss: #5c6b4f;
  --dark: #17140f;
  --dark-2: #221d16;
  --cream: #fff7ec;
  --radius: 18px;
  --shadow: 0 20px 50px -20px rgba(23, 20, 15, 0.45);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.12; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; }
.section-inner { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* subtle grain overlay for texture, self-contained (data-uri noise) */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.kicker {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--clay-deep);
  margin: 0 0 14px;
}
.kicker--dark { color: var(--clay); }
.kicker--light { color: var(--clay-light); }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn--primary { background: var(--clay); color: var(--cream); box-shadow: 0 12px 28px -12px rgba(201,112,43,.65); }
.btn--primary:hover { transform: translateY(-2px); background: var(--clay-deep); }
.btn--ghost { background: rgba(255,247,236,.08); color: var(--cream); border: 1.5px solid rgba(255,247,236,.55); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255,247,236,.16); transform: translateY(-2px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: rgba(250, 246, 239, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-family: var(--serif); font-size: 19px; color: var(--ink); }
.nav__mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--clay); color: var(--cream);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: 16px;
}
.nav__links { display: flex; gap: 30px; }
.nav__links a { text-decoration: none; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); transition: color .2s; }
.nav__links a:hover { color: var(--clay); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: var(--cream);
  text-align: center;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) brightness(.62); transform: scale(1.04); }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,16,10,.55) 0%, rgba(20,16,10,.35) 40%, rgba(17,14,9,.88) 100%);
}
.hero__content { position: relative; max-width: 760px; padding: 0 28px; }
.hero .kicker { color: var(--clay-light); text-align: center; }
.hero h1 {
  font-size: clamp(52px, 10vw, 108px);
  letter-spacing: -.01em;
  margin-bottom: .18em;
  color: var(--cream);
}
.hero__lead { font-size: clamp(16.5px, 2.1vw, 20px); color: rgba(255,247,236,.88); max-width: 620px; margin: 0 auto 34px; }
.hero__ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255,247,236,.6); border-radius: 14px;
}
.scroll-cue span { position: absolute; top: 7px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--cream); animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 1; transform: translateY(0);} 70% { opacity: 0; transform: translateY(14px);} 100% { opacity: 0; } }

/* ---------- Stats ---------- */
.stats { background: var(--dark); color: var(--cream); padding: 56px 0; }
.stats__grid { max-width: 1080px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.stat { text-align: center; }
.stat__num { display: block; font-family: var(--serif); font-size: clamp(30px, 4vw, 42px); color: var(--clay-light); font-weight: 700; margin-bottom: 8px; }
.stat__label { font-size: 13.5px; color: rgba(255,247,236,.78); line-height: 1.45; }
.stat__label em { font-style: normal; color: rgba(255,247,236,.5); }

/* ---------- Section rhythm ---------- */
section:not(.hero):not(.stats) { padding: 96px 0; }
.problem { background: var(--paper); }
.problem__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.problem__img img { border-radius: var(--radius); box-shadow: var(--shadow); }
.problem h2 { font-size: clamp(28px, 3.6vw, 40px); }

.framework { background: var(--paper-dim); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.framework h2 { font-size: clamp(30px, 4.2vw, 46px); }
.framework__lead { max-width: 620px; font-size: 17px; }

.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: start; gap: 20px; margin-top: 56px; }
.flow__step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; }
.flow__icon { width: 48px; height: 48px; color: var(--clay); margin-bottom: 18px; }
.flow__icon svg { width: 100%; height: 100%; }
.flow__step h3 { font-size: 21px; margin-bottom: 10px; }
.flow__step p { font-size: 14.5px; margin: 0; }
.flow__arrow { align-self: center; font-size: 22px; color: var(--clay); opacity: .6; padding-top: 40px; }

/* ---------- How it works ---------- */
.how { background: var(--paper); }
.how h2 { font-size: clamp(28px, 3.8vw, 42px); margin-bottom: 56px; }
.how__row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-bottom: 90px; }
.how__row:last-child { margin-bottom: 0; }
.how__row--reverse { direction: rtl; }
.how__row--reverse > * { direction: ltr; }
.how__media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.how__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3.1; }
.how__tag {
  position: absolute; top: 18px; left: 18px;
  background: rgba(23,20,15,.72); color: var(--cream); backdrop-filter: blur(4px);
  padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
}
.how__copy h3 { font-size: 24px; }
.checklist { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 26px; font-size: 15px; color: var(--ink-soft); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 7px; width: 9px; height: 9px; border-radius: 3px; background: var(--clay); }
.how__emph { font-weight: 600; color: var(--ink); border-left: 3px solid var(--clay); padding-left: 16px; }

/* ---------- Demo / Story video sections ---------- */
.demo { background: var(--dark-2); color: var(--cream); }
.demo h2, .story h2 { color: var(--cream); font-size: clamp(28px, 3.8vw, 42px); }
.demo__lead, .demo .kicker { max-width: 700px; }
.demo__lead { color: rgba(255,247,236,.8); font-size: 16px; }
.demo__video, .story__video {
  margin-top: 36px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 70px -25px rgba(0,0,0,.6);
  border: 1px solid rgba(255,247,236,.12);
}
.demo__video video, .story__video video { width: 100%; display: block; background: #000; }
.demo__caption { margin-top: 16px; font-size: 13.5px; color: rgba(255,247,236,.55); }

.story { background: var(--paper); }
.story h2 { color: var(--ink); }

/* ---------- Poster ---------- */
.poster-section { background: var(--paper-dim); border-top: 1px solid var(--line); }
.poster-section h2 { font-size: clamp(26px, 3.4vw, 36px); }
.poster-frame {
  margin-top: 26px; position: relative; display: block; width: 100%; max-width: 480px;
  border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow);
}
.poster-frame img { transition: transform .4s ease; }
.poster-frame:hover img { transform: scale(1.03); }
.poster-frame__hint {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(23,20,15,.72); color: var(--cream); font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
}

/* ---------- Impact ---------- */
.impact { position: relative; padding: 110px 0; overflow: hidden; }
.impact__bg { position: absolute; inset: 0; }
.impact__bg img { width: 100%; height: 100%; object-fit: cover; }
.impact__scrim { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(17,14,9,.94) 10%, rgba(23,18,12,.86) 100%); }
.impact__content { position: relative; color: var(--cream); }
.impact h2 { font-size: clamp(28px, 4vw, 44px); max-width: 760px; color: var(--cream); }
.impact__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 50px; }
.impact__cols h3 { color: var(--clay-light); font-size: 19px; }
.impact__cols p { color: rgba(255,247,236,.78); font-size: 14.5px; margin: 0; }

/* ---------- Team ---------- */
.team { background: var(--paper); }
.team h2 { font-size: clamp(28px, 3.8vw, 42px); }
.team__lead { max-width: 640px; font-size: 16px; }
.team__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 40px; }
.team__gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.team__gallery img { width: 100%; height: 360px; object-fit: cover; }
.team__gallery figcaption { padding: 14px 18px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); background: var(--paper-dim); }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: var(--cream); padding: 40px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer strong { font-family: var(--serif); margin-left: 8px; }
.footer__muted { color: rgba(255,247,236,.5); font-size: 13px; margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,8,5,.92);
  display: flex; align-items: center; justify-content: center; padding: 40px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.lightbox[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox__close {
  position: absolute; top: 22px; right: 26px; background: none; border: 0; color: var(--cream);
  font-size: 34px; line-height: 1; cursor: pointer; opacity: .8;
}
.lightbox__close:hover { opacity: 1; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .problem__grid, .how__row, .how__row--reverse { grid-template-columns: 1fr; }
  .how__row--reverse { direction: ltr; }
  .flow { grid-template-columns: 1fr; }
  .flow__arrow { display: none; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .impact__cols { grid-template-columns: 1fr; }
  .team__gallery { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 18px 28px; gap: 18px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__toggle { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue span { animation: none; }
}
