/* Landing page (index.html). Shared header/footer basics live in styles.css; this file re-skins
   them for the home page in the app's warm brand palette and adds the page's own sections. */
body.home {
  --marigold: #ffb800;
  --marigold-deep: #f2a900;
  --amber-ink: #a05a00;
  --butter: #fff0d2;
  --peach: #fcebe6;
  --cream: #faf7f2;
  --paper: #ffffff;
  --ink: #2b2d42;
  --ink-soft: #5b6070;
  --line: #ebe3d6;
  --morning: #fff0d2;
  --morning-ink: #8a5a00;
  --meals: #e3f5ec;
  --meals-ink: #17784f;
  --afternoon: #fde4dc;
  --afternoon-ink: #b4472e;
  --evening: #e4ecfd;
  --evening-ink: #3557b0;
  --success: #17784f;
  --danger: #b4321f;

  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
}

body.home h1,
body.home h2,
body.home h3 {
  font-family: 'Outfit', 'Nunito', system-ui, sans-serif;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

body.home a {
  color: var(--amber-ink);
}

/* WebP-with-JPEG-fallback wrappers stay out of layout, so grid and order rules see the <img>. */
body.home picture {
  display: contents;
}

/* Browsers don't hide <source> by default; with display: contents it would become a grid cell. */
body.home picture > source {
  display: none;
}

body.home :focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 2px;
}

/* ---- Header ---- */
body.home header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

body.home .brand {
  font-family: 'Outfit', sans-serif;
}

body.home nav.site {
  display: flex;
  align-items: center;
  gap: 22px;
}

body.home nav.site a {
  margin: 0;
  color: var(--ink);
}

body.home nav.site a:hover {
  color: var(--amber-ink);
}

body.home nav.site a.nav-cta {
  background: var(--ink);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
}

body.home nav.site a.nav-cta:hover {
  background: #1d1f30;
  color: #fff;
}

@media (max-width: 760px) {
  body.home nav.site a:not(.nav-cta) {
    display: none;
  }
}

/* ---- Shared bits ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-ink);
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--marigold);
  box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.25);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head h2,
.problem h2,
.join h2,
.faq-section h2 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  margin: 0 0 14px;
}

.section-lead {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0;
}

.page-art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
  box-shadow: 0 24px 48px -28px rgba(43, 45, 66, 0.45);
}

.wrap.narrow {
  max-width: 760px;
}

/* ---- Hero ---- */
body.home .hero {
  text-align: left;
  padding: 56px 0 72px;
  background: linear-gradient(160deg, var(--butter) 0%, var(--cream) 55%, var(--peach) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
}

body.home .hero h1 {
  font-size: clamp(36px, 5.4vw, 56px);
  line-height: 1.05;
  margin: 0 0 18px;
  max-width: none;
}

body.home .hero p.lead {
  font-size: 18.5px;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 34em;
}

.hero-art {
  position: relative;
  padding: 0 0 48px 0;
}

.hero-main {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
  box-shadow: 0 30px 60px -30px rgba(43, 45, 66, 0.5);
}

.polaroid {
  position: absolute;
  left: -28px;
  bottom: 0;
  width: 38%;
  margin: 0;
  padding: 10px 10px 12px;
  background: var(--paper);
  border-radius: 14px;
  transform: rotate(-5deg);
  box-shadow: 0 18px 36px -18px rgba(43, 45, 66, 0.45);
}

.polaroid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.polaroid figcaption {
  margin-top: 8px;
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--amber-ink);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .polaroid {
    left: -6px;
    width: 34%;
  }
}

/* ---- Wait list form ---- */
.waitlist {
  max-width: 520px;
}

.waitlist-label {
  display: block;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 8px;
}

.waitlist-row {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 24px -18px rgba(43, 45, 66, 0.4);
}

.waitlist-row:focus-within {
  border-color: var(--marigold);
}

.waitlist input[type='email'] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}

.waitlist input[type='email']:focus {
  outline: none;
}

.waitlist button {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  background: var(--marigold);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  font-size: 15.5px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.waitlist button:hover:not(:disabled) {
  background: var(--marigold-deep);
}

.waitlist button:active:not(:disabled) {
  transform: scale(0.97);
}

.waitlist button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.waitlist.is-done .waitlist-row {
  display: none;
}

.waitlist-status {
  margin: 10px 4px 0;
  font-weight: 700;
  font-size: 15px;
}

.waitlist-status:empty {
  display: none;
}

.waitlist-status.is-success {
  color: var(--success);
}

.waitlist-status.is-error {
  color: var(--danger);
}

.waitlist-note {
  margin: 10px 4px 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* Honeypot: off-screen for people, still filled in by naive bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 480px) {
  .waitlist-row {
    flex-direction: column;
    border-radius: 22px;
  }

  .waitlist button {
    padding: 14px;
  }
}

/* ---- Problem ---- */
.problem {
  padding: 88px 0;
}

.problem-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.problem p:not(.eyebrow) {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 34em;
}

/* ---- A day ---- */
.day {
  padding: 24px 0 72px;
}

.chapter {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  margin: 0 auto 64px;
  max-width: 960px;
}

.chapter:nth-of-type(even) .page-art {
  order: 2;
}

.chapter h3 {
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
  margin: 14px 0 12px;
}

.chapter p {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0;
}

.period {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.period-morning { background: var(--morning); color: var(--morning-ink); }
.period-meals { background: var(--meals); color: var(--meals-ink); }
.period-afternoon { background: var(--afternoon); color: var(--afternoon-ink); }
.period-evening { background: var(--evening); color: var(--evening-ink); }

@media (max-width: 760px) {
  .problem-grid,
  .chapter {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .chapter:nth-of-type(even) .page-art {
    order: 0;
  }

  .problem {
    padding: 56px 0;
  }

  .chapter {
    margin-bottom: 48px;
  }
}

/* ---- The app ---- */
.the-app {
  padding: 80px 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.phone {
  margin: 0;
  text-align: center;
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border: 8px solid var(--ink);
  border-radius: 34px;
  background: var(--cream);
  box-shadow: 0 26px 50px -30px rgba(43, 45, 66, 0.6);
}

.phone figcaption {
  margin-top: 14px;
  font-weight: 700;
  font-size: 15px;
}

@media (max-width: 760px) {
  .phones {
    display: flex;
    overflow-x: auto;
    gap: 18px;
    margin: 0 -24px;
    padding: 0 24px 12px;
    scroll-snap-type: x mandatory;
  }

  .phone {
    flex: 0 0 68%;
    scroll-snap-align: center;
  }
}

/* ---- Storybook strip ---- */
.storybook {
  padding: 80px 0 40px;
}

.strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 36px -26px rgba(43, 45, 66, 0.5);
}

.strip picture:nth-child(odd) img {
  transform: rotate(-1.5deg);
}

.strip picture:nth-child(even) img {
  transform: rotate(1.5deg) translateY(10px);
}

@media (max-width: 560px) {
  .strip {
    grid-template-columns: 1fr;
    max-width: 320px;
  }
}

/* ---- Join ---- */
.join {
  padding: 56px 0;
}

.join-card {
  display: flex;
  justify-content: center;
  text-align: center;
  background: linear-gradient(150deg, var(--butter), var(--peach));
  border-radius: 36px;
  padding: 48px;
  max-width: 1032px;
}

.join-card p:not(.eyebrow):not(.waitlist-status) {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 24px;
}

.join-card .waitlist {
  margin: 0 auto;
  text-align: left;
}

.join-card > div {
  max-width: 560px;
}

@media (max-width: 760px) {
  .join-card {
    padding: 28px 22px;
    margin: 0 16px;
    border-radius: 28px;
  }
}

/* ---- FAQ ---- */
.faq-section {
  padding: 40px 0 24px;
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 24px;
}

body.home .faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.home .faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 20px;
}

body.home .faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 800;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

body.home .faq summary::-webkit-details-marker {
  display: none;
}

body.home .faq summary::after {
  content: '+';
  font-size: 22px;
  line-height: 1;
  color: var(--amber-ink);
  transition: transform 0.15s ease;
}

body.home .faq details[open] summary::after {
  transform: rotate(45deg);
}

body.home .faq p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 15.5px;
}

body.home footer.site a:hover {
  color: var(--amber-ink);
}

@media (prefers-reduced-motion: reduce) {
  .waitlist button {
    transition: none;
  }

  .strip picture img,
  .polaroid {
    transform: none;
  }
}

/* ---- Language switch + prompt ---- */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

body.home nav.site .lang-switch a {
  display: inline-block;
  min-width: 34px;
  padding: 5px 9px;
  border-radius: 999px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

body.home nav.site .lang-switch a[aria-current='page'] {
  background: var(--marigold);
  color: var(--ink);
}

@media (max-width: 760px) {
  body.home nav.site .lang-switch a {
    display: inline-block;
  }

  body.home nav.site {
    gap: 10px;
  }

  body.home nav.site a.nav-cta {
    padding: 8px 12px;
    font-size: 13px;
  }
}

body.home .brand,
body.home nav.site a.nav-cta {
  white-space: nowrap;
}

/* Phones: the logo alone, so the wait list button and language switch fit on one line. */
@media (max-width: 480px) {
  body.home .brand {
    font-size: 0;
    gap: 0;
  }
}

.lang-prompt {
  background: var(--ink);
  color: #fff;
  font-size: 14.5px;
}

.lang-prompt[hidden] {
  display: none;
}

.lang-prompt .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}

body.home .lang-prompt a {
  color: var(--marigold);
  font-weight: 800;
}

.lang-prompt button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
