:root {
  --blue: #0a4dff;
  --white: #fff;
  --ink: #10234d;
  --muted: rgba(255, 255, 255, 0.78);
  --rule: rgba(255, 255, 255, 0.28);
  font-family: Inter, Arial, sans-serif;
  font-weight: 300;
  color: var(--white);
  background: var(--blue);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--blue); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid #eaff00;
  outline-offset: 5px;
}
::selection { color: var(--blue); background: #eaff00; }

.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 100;
  padding: 14px 18px;
  color: var(--blue);
  background: white;
}
.skip:focus { top: 10px; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  min-height: 84px;
  padding: 14px clamp(22px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--blue);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font: italic clamp(42px, 4vw, 56px)/0.8 "Instrument Serif", serif;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 36px);
  font-size: 13px;
  white-space: nowrap;
}
.login, .nav-start, .button {
  min-height: 48px;
  padding: 13px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 0;
}
.nav-start, .button {
  color: var(--blue);
  background: white;
  border-color: white;
}
.button { gap: 28px; font-size: 16px; }
.button span { font-size: 22px; }

.story { position: relative; }
.chapter {
  position: relative;
  min-height: 78svh;
  scroll-margin-top: 0;
  background: var(--blue);
  border-top: 1px solid var(--rule);
}
.chapter:first-of-type { border-top: 0; }
.chapter-meet { min-height: 100svh; }
.chapter-program, .chapter-adapt { min-height: 104svh; }
.chapter-food, .chapter-progress { min-height: 88svh; }
.chapter-inner {
  position: relative;
  width: min(100%, 1600px);
  min-height: inherit;
  margin: 0 auto;
  padding: clamp(118px, 12vh, 160px) clamp(22px, 5vw, 80px) clamp(62px, 8vh, 100px);
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(430px, 1.3fr);
  gap: clamp(36px, 4vw, 72px);
  align-items: start;
  overflow: clip;
}
.chapter-copy { position: relative; z-index: 3; max-width: 650px; }
.chapter-meet .chapter-inner { align-items: center; }
.chapter-food .chapter-inner { grid-template-columns: 1fr 1fr; }
.eyebrow {
  margin: 0 0 24px;
  font: 400 10px/1.5 Menlo, monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
}
h1, h2 {
  margin: 0 0 26px;
  font-weight: 300;
  font-size: clamp(42px, 4.4vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}
h1 em, h2 em {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
}
.body-copy {
  max-width: 510px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.62;
}
.helper { margin: 12px 0 25px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.text-link { display: inline-block; padding-bottom: 8px; border-bottom: 1px solid var(--rule); font-size: 13px; }

.hero-person {
  position: absolute;
  z-index: 1;
  right: 24%;
  bottom: 0;
  width: min(36%, 520px);
  height: 86%;
  object-fit: contain;
  object-position: bottom;
  pointer-events: none;
  filter: grayscale(1) contrast(3);
  mix-blend-mode: screen;
}

.chapter-demo { position: relative; z-index: 4; justify-self: end; width: 100%; max-width: 720px; }
.paired-demo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2vw, 32px); align-items: center; }

/* Actual app captures retain their own iOS chrome. The surrounding rim is physical hardware only. */
.app-capture {
  width: min(100%, 330px);
  margin: 0;
  justify-self: center;
}
.app-capture img { display: block; width: 100%; height: auto; overflow: hidden; border: 7px solid #171719; border-radius: clamp(28px, 3vw, 42px); box-shadow: 0 18px 44px rgba(0, 12, 54, .28), inset 0 0 0 1px rgba(255,255,255,.24); }
.app-capture figcaption { padding: 8px 0 0; color: #fff; background: transparent; font: 11px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; text-align: center; }

/* Editable examples are deliberately Messages, rather than invented Athos screens. */
.demo-device {
  position: relative;
  aspect-ratio: 1206 / 2622;
  min-height: 0;
  padding: 7px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #1c1c1e;
  background: #fff;
  border: 7px solid #1c1c1f;
  border-radius: clamp(30px, 3vw, 45px);
  box-shadow: 0 18px 44px rgba(0, 12, 54, .3), inset 0 0 0 1px rgba(255,255,255,.22);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}
.ios-status {
  min-height: 28px;
  padding: 5px 17px 2px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  color: #1c1c1e;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.ios-status::after { content: ""; width: 76px; height: 22px; position: absolute; top: 7px; left: 50%; border: 1px solid #242428; border-radius: 16px; background: #000; box-shadow: 0 1px 2px rgba(255,255,255,.08); transform: translateX(-50%); }
.device-top {
  min-height: 51px;
  padding: 6px 12px 9px;
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  color: #1c1c1e;
  border-bottom: 1px solid #e5e5ea;
  text-align: center;
  font-size: 11px;
}
.device-top strong { font-size: 13px; font-weight: 600; }
.device-top .coach-avatar { width: 25px; height: 25px; margin: 0 auto 2px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #8b8b91, #4c4c50); border-radius: 50%; font-size: 12px; font-weight: 600; }
.device-top .contact-name { display: block; margin-top: 1px; font-size: 13px; font-weight: 600; }
.device-top .contact-label { display: block; margin-top: 1px; color: #8e8e93; font-size: 9px; font-weight: 400; }
.device-top > span:first-child { color: #2294fa; font-size: 0; text-align: left; }
.device-top > span:first-child::before { content: "‹"; font-size: 32px; font-weight: 300; line-height: .45; }
.device-top > span:last-child { position: relative; color: #2294fa; font-size: 0; text-align: right; }
.device-top > span:last-child::before { content: ""; width: 14px; height: 9px; display: inline-block; border: 1.5px solid currentColor; border-radius: 3px; }
.device-top > span:last-child::after { content: ""; position: absolute; top: 50%; right: 1px; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 5px solid currentColor; transform: translateY(-50%); }
.messages { flex: 1; min-height: 0; padding: 13px 10px 76px; }
.message {
  position: relative;
  max-width: 87%;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 18px;
  font-size: max(13px, clamp(13px, 1vw, 15px));
  line-height: 1.34;
  animation: arrive 300ms ease both;
}
.coach { color: #1c1c1e; background: #e9e9eb; }
.you { margin-left: auto; color: #fff; background: #2294fa; }
.coach::before, .you::before { content: ""; position: absolute; bottom: 0; width: 16px; height: 16px; background: inherit; }
.coach::before { left: -5px; border-bottom-right-radius: 12px; }
.you::before { right: -5px; border-bottom-left-radius: 12px; }
.coach::after, .you::after { content: ""; position: absolute; bottom: 0; width: 10px; height: 18px; background: #fff; }
.coach::after { left: -10px; border-bottom-right-radius: 10px; }
.you::after { right: -10px; border-bottom-left-radius: 10px; }
.time { max-width: 100%; padding: 2px 0 7px; color: #8e8e93; background: transparent; text-align: center; font-size: 10px; }
.note { width: fit-content; max-width: 87%; color: #2294fa; background: #e9e9eb; border: 0; border-radius: 18px 18px 18px 4px; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.ios-composer {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  z-index: 3;
  min-height: 56px;
  padding: 9px 10px 8px;
  display: flex;
  align-items: center;
  color: #8e8e93;
  background: rgba(255,255,255,.96);
  border-top: 1px solid #e5e5ea;
  font-size: 13px;
}
.ios-composer::before { content: "+"; width: 22px; height: 22px; margin-right: 7px; display: grid; place-items: center; border-radius: 50%; color: #000; background: #aeb0b5; font-size: 18px; line-height: 1; }
.ios-composer { font-size: 0; }
.ios-composer > * { display: none; }
.ios-composer::after { content: "iMessage"; flex: 1; padding: 7px 10px; border: 1px solid #c7c7cc; border-radius: 16px; font-size: 13px; }
.mobile-conversation { display: none; }

.food-demo { width: min(100%, 340px); max-width: 340px; }
.food-demo .messages { padding-top: 11px; }
.food-demo .message { margin-bottom: 7px; padding: 8px 10px; }
.meal-photo-card { padding: 5px; }
.meal-photo-card img { display: block; width: 100%; height: 108px; object-fit: cover; border-radius: 13px; }
.meal-photo-card figcaption { padding: 4px 3px 1px; color: rgba(255,255,255,.82); font-size: 10px; }
.nutrition-analysis { max-width: 96%; }
.nutrition-analysis p { margin: 0 0 6px; }
.nutrition-analysis p:first-child { display: grid; }
.nutrition-analysis p span { color: #aeaeb2; font-size: 10px; }
.nutrition-analysis dl { margin: 5px 0 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.nutrition-analysis dl div { padding: 5px; background: #333336; border-radius: 7px; text-align: center; }
.nutrition-analysis dt { color: #aeaeb2; font-size: 9px; }
.nutrition-analysis dd { margin: 2px 0 0; color: #fff; font-weight: 600; font-size: 11px; }

.progress-demo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2vw, 32px); align-items: center; }

.connection-preview { max-width: 650px; display: grid; grid-template-columns: 1fr 46px 1.1fr 46px 1fr; align-items: center; }
.connection-source, .connection-core { min-height: 170px; padding: 20px 16px; display: flex; flex-direction: column; justify-content: center; gap: 9px; border: 1px solid var(--rule); }
.connection-source span { font: italic 20px/1 "Instrument Serif", serif; }
.connection-source strong, .connection-core strong { font-size: 12px; font-weight: 400; }
.connection-source small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.connection-core { color: var(--blue); background: white; text-align: center; }
.connection-core .phone-wordmark { margin-bottom: 8px; }
.connection-line { height: 1px; background: var(--rule); }
.app-channel-label { margin: 4px 12px; color: #657088; font-size: 9px; text-align: center; }
.hero-chat { max-width: 320px; }

.closing, .faq, footer { position: relative; z-index: 10; background: var(--blue); }
.closing { min-height: 64svh; padding: 100px clamp(22px, 5vw, 80px); border-top: 1px solid var(--rule); }
.closing h2 { font-size: clamp(48px, 6vw, 88px); }
.faq { padding: 30px clamp(22px, 5vw, 80px) 100px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 10%; }
.faq h2 { grid-row: 1 / 6; font-size: 40px; }
details { padding: 21px 0; border-top: 1px solid var(--rule); }
summary { cursor: pointer; font-size: 17px; line-height: 1.5; }
details p { max-width: 550px; color: var(--muted); font-size: 15px; line-height: 1.7; }
footer { padding: 36px clamp(22px, 5vw, 80px); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--rule); }
footer p, footer nav { font-size: 12px; }
footer nav { display: flex; gap: 24px; }

@keyframes arrive {
  from { opacity: 0; transform: translateY(7px); }
}

/* Each scene scrolls fully, then holds while the next scene covers it. */
.story--ready .chapter { position: sticky; top: var(--chapter-pin, 0px); }
.story-anchor { height: 0; scroll-margin-top: 0; }

/* This middle range stays in normal flow to prevent copy/device overlap. */
@media (min-width: 901px) and (max-width: 1199px) {
  .chapter-inner {
    padding-inline: 5%;
    grid-template-columns: minmax(280px, 0.9fr) minmax(390px, 1.1fr);
    gap: 34px;
  }
  .phone-stage { width: 27%; }
  .hero-person { right: 25%; width: 30%; }
  .paired-demo { gap: 10px; }
  .chapter-program .chapter-inner,
  .chapter-adapt .chapter-inner,
  .chapter-progress .chapter-inner { grid-template-columns: 1fr; }
  .paired-demo, .progress-demo { max-width: 660px; justify-self: center; }
}

@media (max-height: 720px) and (min-width: 901px) {
  .chapter-inner { padding-top: 104px; padding-bottom: 35px; }
  .message { margin-bottom: 6px; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 76px; }
  .site-header { min-height: 76px; padding: 12px 5%; }
  .wordmark { font-size: 43px; }
  .site-header nav { gap: 9px; }
  .site-header nav > a:first-child, .nav-agent { display: none; }
  .login, .nav-start { min-height: 42px; padding: 10px 12px; font-size: 11px; }
  .chapter, .chapter-meet, .chapter-program, .chapter-adapt, .chapter-food, .chapter-progress {
    min-height: auto;
    scroll-margin-top: 0;
  }
  .chapter-inner {
    min-height: 0;
    padding: 112px 6% 66px;
    display: block;
    overflow: hidden;
  }
  .chapter:not(.chapter-meet) .chapter-inner { padding-top: 72px; }
  .chapter-copy { max-width: 620px; }
  h1, h2 { max-width: 600px; font-size: clamp(42px, 11vw, 58px); }
  .body-copy { max-width: 560px; font-size: 17px; }
  .hero-person {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(80%, 430px);
    height: auto;
    max-height: 470px;
    margin: -35px -8% -35px auto;
    display: block;
    object-fit: contain;
  }
  .chapter-meet .chapter-inner { display: flex; flex-direction: column; align-items: flex-start; }
  .chapter-meet .chapter-copy { order: 1; margin-top: 0; }
  .chapter-meet .hero-person { order: 2; }
  .chapter-meet .hero-chat { order: 3; align-self: center; }
  .chapter-demo { max-width: 610px; margin: 38px auto 0; justify-self: auto; }
  .paired-demo { gap: 14px; }
  .app-capture { width: min(100%, 350px); }
  .mobile-conversation { display: block; max-width: 350px; margin-top: 34px; padding: 23px 18px; color: var(--blue); background: white; }
  .mobile-conversation .eyebrow { margin-bottom: 18px; text-align: center; }
  .mobile-conversation .message { font-size: 14px; animation: none; }
  .chapter:has(.chapter-demo) .mobile-conversation { display: none; }
  .food-demo { max-width: 350px; }
  .connection-preview { grid-template-columns: 1fr; gap: 0; max-width: 420px; }
  .connection-line { width: 1px; height: 28px; margin-inline: auto; }
  .closing { min-height: 0; padding: 72px 6%; }
  .faq { padding: 0 6% 65px; display: block; }
  .faq h2 { margin-bottom: 32px; font-size: 34px; }
  footer { padding: 30px 6%; flex-wrap: wrap; }
  footer p { width: 100%; order: 3; }
}

@media (max-width: 540px) {
  .site-header .login { display: none; }
  .paired-demo, .progress-demo { display: grid; grid-template-columns: 1fr; gap: 24px; }
  .paired-demo .demo-device, .progress-demo .demo-device { width: 100%; max-width: 350px; margin-inline: auto; transform: none; }
  .paired-demo .app-capture, .progress-demo .app-capture { width: min(100%, 350px); }
  .device-top { min-height: 49px; }
  .demo-device .message { padding: 8px 9px; margin-bottom: 7px; font-size: 13px; }
  .food-demo .message { font-size: 13.5px; }
  .food-demo .meal-photo-card img { height: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .story--ready .chapter { position: relative; top: auto; }
  .message { animation: none; }
}

.chapter-followup .demo-device { max-width: 350px; }
