/* Tare's marketing page: maximal, in the app's own materials. Jade and ink rooms, a saffron
   needle colour, the dial's rings, food, and the time of day. Every section sets its own theme. */
:root {
  --paper: #F1F4F0;
  --raised: #FFFFFF;
  --ink: #1C2621;
  --ink-soft: #5D6B63;
  --mist: #DCE4DE;
  --jade: #2A7A5E;
  --jade-deep: #123A2D;
  --jade-bright: #5CC49A;
  --mint: #D3EADD;
  --saffron: #E8A33A;
  --saffron-deep: #B8741A;
  --night: #121916;
  --serif: ui-serif, "New York", "Newsreader", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --wide: "Archivo", -apple-system, system-ui, sans-serif;
  --measure: 38rem;
  --gutter: clamp(1.1rem, 5vw, 3rem);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Full-bleed pieces use 100vw, which counts the scrollbar; clip the few pixels over. */
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Grain over everything, so every colour reads as a material, not a flat fill. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: var(--grain); opacity: 0.22; mix-blend-mode: soft-light;
}

a { color: inherit; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible, input:focus-visible, .screens-track:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -0.015em; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.04; text-wrap: balance; }
h3 { font-size: 1.4rem; line-height: 1.22; }
p { margin: 0.5rem 0 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { position: relative; max-width: 76rem; margin: 0 auto; padding: 0 var(--gutter); }
main > section { position: relative; overflow: hidden; padding: clamp(4.5rem, 11vw, 9rem) 0; }

/* Themes: each section is a room. */
.theme-paper { background: var(--paper); color: var(--ink); }
.theme-jade { background: var(--jade-deep); color: var(--paper); }
.theme-ink { background: var(--night); color: #E4EBE6; }
.theme-saffron { background: var(--saffron); color: var(--ink); }
.theme-mint { background: var(--mint); color: var(--ink); }

/* Bar ------------------------------------------------------------------- */
.bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 76rem; margin: 0 auto; padding: 1.25rem var(--gutter);
  color: var(--paper);
}
.mark { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; font: 500 1.45rem var(--serif); }
.mark img { border-radius: 22%; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
.bar-link { font-weight: 600; text-decoration: none; padding: 0.55rem 1rem; border: 1px solid rgba(241, 244, 240, 0.35); border-radius: 999px; }

/* Hero ------------------------------------------------------------------ */
main > .hero { padding: clamp(7rem, 14vw, 10rem) 0 clamp(4rem, 8vw, 7rem); min-height: min(100svh, 62rem); display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; width: 100%; }
.hero h1 { font-size: clamp(3.2rem, 6.6vw, 6.2rem); line-height: 0.95; letter-spacing: -0.03em; max-width: 6.2em; }
.promise { font: 400 clamp(1.5rem, 3vw, 2.35rem)/1.18 var(--serif); margin-top: 1.1rem; max-width: 22ch; color: #CFE8DA; text-wrap: balance; }
.lede { max-width: 33rem; font-size: 1.15rem; margin: 1.5rem 0 2rem; color: rgba(241, 244, 240, 0.78); }

/* Drifting light: three blurred blobs of the app's colours, slowly moving. */
.glow { position: absolute; inset: -20%; pointer-events: none; filter: blur(70px); opacity: 0.85; }
.glow span { position: absolute; border-radius: 50%; }
.glow span:nth-child(1) { width: 46vw; height: 46vw; left: 48%; top: 8%; background: #2A7A5E; animation: drift1 26s ease-in-out infinite alternate; }
.glow span:nth-child(2) { width: 30vw; height: 30vw; left: 70%; top: 55%; background: rgba(232, 163, 58, 0.45); animation: drift2 32s ease-in-out infinite alternate; }
.glow span:nth-child(3) { width: 38vw; height: 38vw; left: 5%; top: 50%; background: rgba(92, 196, 154, 0.35); animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(-12vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-18vw, -14vh) scale(0.85); } }
@keyframes drift3 { to { transform: translate(14vw, -8vh) scale(1.2); } }

.hero-rings {
  position: absolute; width: min(1300px, 150vw); aspect-ratio: 1; right: -32%; top: 50%; translate: 0 -50%;
  color: rgba(207, 232, 218, 0.13); animation: turn 180s linear infinite; pointer-events: none;
}
@keyframes turn { to { rotate: 360deg; } }

/* The app over a plate. */
.hero-art { position: relative; aspect-ratio: 1 / 1.05; }
.plate {
  position: absolute; width: 78%; aspect-ratio: 1; object-fit: cover; left: 0; top: 10%;
  border-radius: 50%; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); border: 10px solid rgba(241, 244, 240, 0.9);
}
.phone { position: absolute; width: 40%; border-radius: 26px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); }
.phone-back { right: 28%; top: 0; rotate: -9deg; }
.phone-front { right: 0; top: 16%; rotate: 7deg; }
.sticker {
  position: absolute; left: 6%; bottom: 4%;
  font: 600 1.5rem/1 var(--wide); font-stretch: 125%; color: var(--ink);
  background: var(--saffron); padding: 0.9rem 1.15rem 0.8rem; border-radius: 1rem; rotate: -4deg;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}
.sticker small { display: block; font: 600 0.8rem var(--sans); margin-top: 0.3rem; opacity: 0.75; }

/* Invite form ----------------------------------------------------------- */
.invite { display: flex; flex-wrap: wrap; gap: 0.6rem; max-width: 34rem; }
.invite input[type="email"] {
  flex: 1 1 15rem; min-width: 0; font: inherit; color: var(--ink);
  padding: 0.95rem 1.2rem; background: var(--raised); border: 0; border-radius: 999px;
}
.invite input[type="email"]::placeholder { color: var(--ink-soft); opacity: 0.7; }
.invite button {
  font: 600 1rem var(--sans); padding: 0.95rem 1.5rem; cursor: pointer;
  color: var(--ink); background: var(--saffron); border: 0; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(232, 163, 58, 0.35);
}
.invite button:disabled { opacity: 0.6; cursor: default; }
.invite .trap { position: absolute; left: -9999px; }
.invite-status { flex-basis: 100%; margin: 0.25rem 0 0; min-height: 1.5em; font-size: 0.95rem; opacity: 0.85; }
.invite.done input[type="email"], .invite.done button { display: none; }
.invite.done .invite-status { font-size: 1.1rem; opacity: 1; }

/* Marquee --------------------------------------------------------------- */
main > .marquee { padding: 1.4rem 0; }
.marquee-track { display: flex; width: max-content; animation: slide 55s linear infinite; }
.marquee ul { display: flex; list-style: none; margin: 0; padding: 0; }
.marquee li { font: 400 clamp(1.5rem, 3.2vw, 2.4rem)/1.2 var(--serif); white-space: nowrap; padding: 0 2rem; }
.marquee li::after { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-left: 4rem; border-radius: 50%; background: var(--ink); vertical-align: 0.3em; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Film ------------------------------------------------------------------ */
.film-title { margin-bottom: 2rem; color: var(--paper); }
.film video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain;
  border-radius: clamp(14px, 2.4vw, 28px); background: #000;
  box-shadow: 0 40px 120px rgba(92, 196, 154, 0.12);
}

/* Screens carousel ------------------------------------------------------- */
.screens { --slide: clamp(14rem, 24vw, 19rem); }
.screens-head { margin-bottom: 1.5rem; }
.screens-track {
  display: flex; gap: clamp(1rem, 2.5vw, 2rem);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 1.5rem calc(50vw - var(--slide) / 2) 2rem;
}
.screens-track::-webkit-scrollbar { display: none; }
.screens-track figure { flex: 0 0 var(--slide); margin: 0; scroll-snap-align: center; transition: opacity 0.3s, transform 0.3s; }
.screens-track figure:not(.current) { opacity: 0.5; transform: scale(0.94); }
.screens-track img {
  display: block; width: 100%; height: auto; border-radius: clamp(22px, 2.6vw, 34px);
  box-shadow: 0 1px 2px rgba(28, 38, 33, 0.08), 0 20px 50px rgba(28, 38, 33, 0.16); background: var(--raised);
}
.screens-track figcaption { margin-top: 1rem; font: 400 1.15rem var(--serif); text-align: center; }
.screens-controls { display: flex; align-items: center; justify-content: center; gap: 1.5rem; }
.screens-dots { display: flex; gap: 0.25rem; }
.screens-dots button { width: 2rem; height: 2rem; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.screens-dots button::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--mist); transition: background 0.2s, transform 0.2s; }
.screens-dots button[aria-current="true"]::before { background: var(--jade); transform: scale(1.3); }
.screens-arrows { display: flex; gap: 0.6rem; }
.screens-arrows button {
  width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper);
  font: 400 1.6rem/1 var(--sans); cursor: pointer; display: grid; place-items: center; padding-bottom: 0.15rem;
}
.screens-arrows button:disabled { opacity: 0.25; cursor: default; }

/* Ask anything ---------------------------------------------------------- */
.ask-rings { position: absolute; width: 70rem; aspect-ratio: 1; left: -28rem; bottom: -34rem; color: rgba(42, 122, 94, 0.18); animation: turn 240s linear infinite reverse; }
.ask-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.ask h2 { font-size: clamp(2.6rem, 6vw, 5rem); }
.ask-text p { font-size: 1.15rem; max-width: var(--measure); margin-top: 1rem; color: #33443B; }
.chat { display: flex; flex-direction: column; gap: 0.7rem; }
.bubble { margin: 0; max-width: 26rem; padding: 0.85rem 1.15rem; line-height: 1.4; box-shadow: 0 10px 30px rgba(18, 58, 45, 0.12); }
.bubble.you { align-self: flex-end; background: var(--ink); color: var(--paper); border-radius: 1.3rem 1.3rem 0.35rem 1.3rem; }
.bubble.coach { align-self: flex-start; background: var(--raised); font: 400 1.12rem/1.4 var(--serif); border-radius: 1.3rem 1.3rem 1.3rem 0.35rem; }
.bubble.you + .bubble.coach { margin-top: 0.2rem; }
.bubble.coach + .bubble.you { margin-top: 1rem; }

/* A day with it: the light changes from dawn to night as you scroll down it. */
.day {
  background: linear-gradient(180deg,
    #F6DFA8 0%, #FBEFD2 14%, #EAF4EE 30%, #F3D2A2 48%, #E59A63 58%,
    #7E5A7A 70%, #2B2F45 82%, #121916 94%);
  color: var(--ink);
}
.timeline { list-style: none; margin: 3rem 0 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, var(--measure)); gap: 2rem;
  padding: clamp(2rem, 5vw, 3.5rem) 0; border-top: 1px solid rgba(28, 38, 33, 0.15);
}
.timeline time { font: 600 clamp(1.7rem, 3.4vw, 2.6rem)/1 var(--wide); font-stretch: 125%; }
.timeline p { font-size: 1.1rem; opacity: 0.85; }
.t-dawn time { color: #B8741A; }
.t-noon time { color: var(--jade); }
.t-dusk time { color: #7A3E2A; }
.timeline .t-night, .timeline .t-sunday { color: #F1F4F0; border-top-color: rgba(241, 244, 240, 0.18); }
.t-night time { color: #F0B04A; }
.t-sunday time { color: var(--jade-bright); }

/* Why it works: four coloured tiles. */
.why h2 { max-width: 14ch; }
.reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 3rem; }
.reason { padding: clamp(1.75rem, 3.5vw, 2.75rem); border-radius: 2rem; min-height: 15rem; display: flex; flex-direction: column; justify-content: flex-end; }
.reason h3 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.reason p { font-size: 1.08rem; opacity: 0.88; max-width: 30rem; }
.r-jade { background: var(--jade); color: var(--paper); rotate: -0.6deg; }
.r-saffron { background: var(--saffron); color: var(--ink); rotate: 0.6deg; }
.r-ink { background: var(--ink); color: var(--paper); rotate: 0.6deg; }
.r-mint { background: var(--mint); color: var(--ink); rotate: -0.6deg; }

/* The dial: its needle follows your scroll to the reading. */
.dial-grid { display: grid; grid-template-columns: minmax(12rem, 30rem) minmax(0, var(--measure)); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.dial { width: 100%; height: auto; overflow: visible; }
.dial .track, .dial .fill { fill: none; stroke-width: 16; stroke-linecap: round; }
.dial .track { stroke: rgba(228, 235, 230, 0.12); }
.dial .fill { stroke: var(--jade-bright); }
.dial .needle line { stroke: var(--saffron); stroke-width: 5; stroke-linecap: round; }
.dial .needle circle { fill: var(--saffron); }
.dial .needle { transform-origin: 120px 120px; transform: rotate(var(--needle, -38deg)); }
.readout { display: block; font: 600 clamp(4rem, 11vw, 8rem)/0.9 var(--wide); font-stretch: 125%; color: var(--paper); margin-bottom: 1rem; font-variant-numeric: tabular-nums; }
.dial-note p { font-size: 1.2rem; color: rgba(228, 235, 230, 0.75); }

/* The mission, over food. */
.mission { color: var(--paper); background: var(--jade-deep); }
.mission-photo {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(18, 58, 45, 0.96) 0%, rgba(18, 58, 45, 0.86) 45%, rgba(18, 58, 45, 0.35) 100%), url("/media/photos/yogurt.jpg") right center / cover no-repeat;
}
.mission-statement { font: 400 clamp(2rem, 4.4vw, 3.6rem)/1.12 var(--serif); letter-spacing: -0.015em; max-width: 22ch; margin: 0; text-wrap: pretty; }
.mission-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 3rem; max-width: 52rem; margin-top: 3rem; }
.mission-body p { margin: 0; font-size: 1.1rem; color: rgba(241, 244, 240, 0.82); }

/* The graduation line, huge, on saffron. */
.graduate-line { font: 500 clamp(2.8rem, 7.6vw, 6.8rem)/0.98 var(--serif); letter-spacing: -0.03em; margin: 0; max-width: 16ch; text-wrap: balance; }
.graduate-after { max-width: var(--measure); font-size: 1.2rem; margin-top: 2rem; }
.human-coach { margin-top: 3.5rem; padding: 1.75rem 2rem; max-width: 40rem; background: var(--ink); color: var(--paper); border-radius: 1.5rem; rotate: -1deg; }
.human-coach p { opacity: 0.8; }
.soon { display: inline-block; vertical-align: 0.2em; margin-left: 0.5rem; font: 600 0.78rem/1 var(--sans); color: var(--ink); background: var(--saffron); padding: 0.4rem 0.65rem; border-radius: 999px; }

.private p { max-width: var(--measure); font-size: 1.15rem; margin-top: 1rem; color: var(--ink-soft); }
.private a { color: var(--jade); }

.close-rings { position: absolute; width: 80rem; aspect-ratio: 1; right: -30rem; top: -24rem; color: rgba(207, 232, 218, 0.12); animation: turn 200s linear infinite; }
.close h2 { font-size: clamp(3rem, 8vw, 6.5rem); line-height: 0.98; }
.close p { max-width: var(--measure); font-size: 1.2rem; margin-top: 1.25rem; color: rgba(241, 244, 240, 0.8); }
.close .invite { margin-top: 2.25rem; }

.foot { padding: 2.5rem 0 3rem; }
.foot-row { display: flex; gap: 1.5rem; align-items: baseline; font-size: 0.95rem; }
.foot-row span { font: 500 1.2rem var(--serif); margin-right: auto; }

/* Reveals: things arrive as you reach them (only with JS, so nothing hides without it). */
.js [data-reveal] { opacity: 0; translate: 0 18px; transition: opacity 0.6s ease, translate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js [data-reveal].revealed { opacity: 1; translate: 0 0; }

/* Narrow screens -------------------------------------------------------- */
@media (max-width: 52rem) {
  .hero-grid, .ask-grid, .dial-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 30rem; width: 100%; margin: 0 auto; }
  .timeline li { grid-template-columns: 1fr; gap: 0.6rem; }
  .reasons, .mission-body { grid-template-columns: 1fr; }
  .dial { max-width: 18rem; }
  .screens { --slide: 68vw; }
  .mission-photo { background: linear-gradient(180deg, rgba(18, 58, 45, 0.9), rgba(18, 58, 45, 0.94)), url("/media/photos/yogurt.jpg") center / cover no-repeat; }
}

/* Less motion: everything stays put. */
@media (prefers-reduced-motion: reduce) {
  .glow span, .hero-rings, .ask-rings, .close-rings { animation: none; }
  .marquee-track { animation: none; width: auto; }
  .marquee ul[aria-hidden] { display: none; }
  .marquee ul { flex-wrap: wrap; justify-content: center; }
  .js [data-reveal] { opacity: 1; translate: 0 0; transition: none; }
  .screens-track { scroll-behavior: auto; }
  .screens-track figure { transition: none; }
}
