/* Daywend — public site. No web fonts, no tracking, no cookies; GSAP is served from this site. */

:root {
  color-scheme: light;
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --bg-sunk: #f1f1f3;
  --text: #18181b;
  --text-2: #3f3f46;
  --text-3: #71717a;
  --line: rgba(0, 0, 0, 0.08);
  --ink: #26262b;

  /* Diary coins (design-system §3.5.1): past days grey, only today has colour. */
  --read-face: #b4b9c2;
  --read-edge: #8f95a0;
  --missed-face: #f1f1f3;
  --today-face: #3dbe6a;
  --today-edge: #2a9450;
  --spark: #ff7a1a;

  --bezel: #1c1c1e;
  --phone-w: min(300px, 70vw);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2 { font-family: var(--font-display); letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
p, li { text-wrap: pretty; }
figcaption { text-wrap: balance; }
p { margin: 0; }

.eyebrow {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 12px;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 56px;
  padding: 0 max(20px, env(safe-area-inset-left));
  background: rgba(250, 250, 250, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.brand img { border-radius: 7px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }
.pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.pill.big { height: 50px; padding: 0 28px; font-size: 17px; }
@media (max-width: 640px) { .nav-links { display: none; } .nav .pill { margin-left: auto; } }

/* ---------- Phone frame ---------- */

.phone {
  margin: 0;
  width: var(--phone-w);
  aspect-ratio: 1206 / 2622;
  padding: calc(var(--phone-w) * 0.035);
  border-radius: calc(var(--phone-w) * 0.17);
  background: var(--bezel);
  box-shadow: 0 0 0 1.5px #3a3a3c inset, 0 40px 80px -30px rgba(20, 20, 40, 0.35);
  position: relative;
}
.phone > img, .phone .screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--phone-w) * 0.135);
}

/* ---------- ① Hero ---------- */

/* One phone size for all three, small enough that a whole phone fits under the nav. */
.hero { --hero-w: min(290px, 64vw, calc((100svh - 120px) / 2.174)); }
.hero-stage {
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding-top: calc(56px + 9vh);
}
.hero-copy { text-align: center; padding: 0 20px; }
.hero h1 { font-size: clamp(44px, min(9vw, 11vh), 112px); line-height: 1.02; }
.hero .lede { margin-top: 18px; font-size: clamp(18px, 2.2vw, 26px); color: var(--text-2); }
.hero-phones { position: relative; margin-top: 7vh; flex: none; }
.hero-phones .phone { --phone-w: var(--hero-w); }
/* Notes of what Daywend keeps, beside the phone; only where they fit. */
.float {
  position: absolute;
  top: var(--t);
  width: max-content;
  max-width: 270px;
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 12px 16px 12px 12px;
  border-radius: 18px;
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 14px 36px -12px rgba(24, 24, 27, 0.22);
  text-align: left;
}
.float.l { right: calc(100% + 36px); }
.float.r { left: calc(100% + 36px); }
.float .ico { grid-row: span 2; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); }
.float svg { width: 20px; height: 20px; fill: var(--c); }
.float b { font-size: 14px; font-weight: 650; line-height: 1.25; }
.float small { font-size: 12.5px; color: var(--text-3); line-height: 1.3; }
@media (max-width: 999px) { .float { display: none; } }
.scroll-hint {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-stage { position: relative; }
/* On a phone the hint would sit on the phone's screen. */
@media (max-width: 760px) { .scroll-hint { display: none; } }

/* ---------- ② ③ ④ Chapters: a pinned phone, steps that swap beside it ---------- */

.chapter-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8vw;
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px 40px;
}
/* Phone on the left, words on the right: alternate chapters face the other way. */
.chapter.flip .chapter-stage { grid-template-columns: auto minmax(0, 1fr); }
.chapter.flip .chapter-phone { order: -1; }
.chapter.flip .step { justify-self: end; }
#stay { background: #fff; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.step { max-width: 460px; }
.step + .step { margin-top: 56px; }
.motion .step { grid-area: 1 / 1; margin-top: 0; }
.step-n {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  margin-bottom: 20px;
}
.step h2 { font-size: clamp(36px, 5vw, 60px); line-height: 1.05; }
.step p:not(.eyebrow) { margin-top: 18px; font-size: 21px; color: var(--text-2); }
.chapter-phone { display: grid; justify-items: center; gap: 22px; }
.chapter-phone .phone { --phone-w: min(320px, 62vw, calc((100svh - 190px) / 2.174)); }
/* The screen behind the bezel; it clips, so a screen can scroll in from below. */
.glass {
  position: absolute;
  inset: calc(var(--phone-w) * 0.035);
  border-radius: calc(var(--phone-w) * 0.135);
  overflow: hidden;
  isolation: isolate;
  background: #fff;
}
.glass .screen { position: absolute; inset: 0; border-radius: 0; }
.dots { display: flex; gap: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #d4d4d8; transition: background 0.3s, width 0.3s; }
.dots i.on { background: var(--ink); width: 22px; border-radius: 4px; }

/* Morning report call-outs: small cards that stick out of the phone beside the part they name. */
.chip {
  position: absolute;
  top: var(--t);
  left: 74%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 14px 32px -12px rgba(20, 20, 40, 0.35);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-align: left;
  translate: 0 -50%;
}
.chip i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
/* With the phone on the right, call-outs reach left, into the space beside the words. */
.chapter:not(.flip) .chip { left: auto; right: 74%; }

@media (max-width: 860px) {
  .chapter-stage, .chapter.flip .chapter-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 28px;
    padding-top: 88px;
    text-align: center;
  }
  .chapter-phone, .chapter.flip .chapter-phone { order: -1; }
  .chapter.flip .step { justify-self: center; }
  .chapter-phone .phone { --phone-w: min(230px, 52vw, calc((100svh - 370px) / 2.174)); }
  .step { max-width: 520px; }
  .step h2 { font-size: 30px; line-height: 1.12; }
  .step p:not(.eyebrow) { margin-top: 12px; font-size: 17px; }
  .step .eyebrow { margin-bottom: 8px; font-size: 13px; }
  .step-n { display: none; }
  /* Narrow: the call-out sits over the screen's right edge instead of beside the phone. */
  .chip, .chapter:not(.flip) .chip { left: auto; right: -14px; padding: 6px 10px; border-radius: 10px; font-size: 12px; gap: 6px; text-align: left; }
  .chip i { width: 7px; height: 7px; }
}

/* ---------- ⑤ Diaries ---------- */

.diaries { padding: 140px 24px 120px; max-width: 1120px; margin: 0 auto; }
.diaries-copy { max-width: 640px; }
.diaries h2 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; }
.diaries-copy p:last-child { margin-top: 18px; font-size: 21px; color: var(--text-2); }
.diary-row {
  --phone-w: min(300px, calc((100vw - 48px - 2 * 48px) / 3), calc((100svh - 200px) / 2.174));
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-top: 72px;
}
.diary { margin: 0; width: var(--phone-w); }
.diary:nth-child(2) { margin-top: 64px; }
.diary figcaption { margin-top: 20px; font-size: 16px; color: var(--text-3); }
.diary figcaption b { display: block; color: var(--text); font-size: 18px; }
@media (max-width: 860px) {
  .diaries { padding: 96px 0 80px; }
  .diaries-copy { padding: 0 24px; text-align: center; margin: 0 auto; }
  .diaries h2 { font-size: 36px; }
  .diaries-copy p:last-child { font-size: 17px; }
  /* One phone at a time, swiped sideways. */
  .diary-row {
    --phone-w: min(240px, 62vw);
    justify-content: flex-start;
    gap: 20px;
    margin-top: 40px;
    padding: 0 calc(50vw - var(--phone-w) / 2) 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .diary-row::-webkit-scrollbar { display: none; }
  .diary { flex: none; scroll-snap-align: center; text-align: center; }
  .diary:nth-child(2) { margin-top: 0; }
}

/* ---------- ③ Grow ---------- */

.grow { background: #fff; }
.grow-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  align-items: center;
  gap: 6vw;
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px;
}
.grow h2 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; }
.grow-notes { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 18px; max-width: 440px; }
.note { font-size: 19px; color: var(--text-3); }
.note b { display: block; color: var(--text); font-size: 21px; }

.trail { position: relative; width: 400px; height: 640px; }
.trail-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trail-line > path {
  fill: none;
  stroke: #c9ccd2;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 0.1 16;
}
.coin {
  --size: 76px;
  --edge-h: 8px;
  position: absolute;
  left: calc(var(--x) - var(--size) / 2);
  top: calc(var(--y) - var(--size) / 2);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 26px/1 var(--font-display);
  color: #fff;
}
.coin.read { background: var(--read-face); box-shadow: 0 var(--edge-h) 0 var(--read-edge); }
.coin.missed {
  background: var(--missed-face);
  color: var(--text-3);
  box-shadow: 0 0 0 2px #d4d4d8 inset;
}
.coin.missed.caught { background: var(--read-face); color: #fff; box-shadow: 0 var(--edge-h) 0 var(--read-edge); }
.coin.today {
  --size: 92px;
  background: var(--today-face);
  box-shadow: 0 10px 0 var(--today-edge), 0 0 0 0 rgba(61, 190, 106, 0.4);
  font-size: 32px;
}
.tag {
  position: absolute;
  left: var(--x);
  top: calc(var(--y) - 62px);
  transform: translateX(-50%);
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.spark {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-sunk);
  font-weight: 700;
}
.flame { width: 20px; height: 20px; fill: var(--spark); }
.spark-n { font-variant-numeric: tabular-nums; min-width: 1ch; }

@media (max-width: 860px) {
  .grow-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 72px; gap: 20px; }
  .grow h2 { font-size: 36px; }
  .grow-notes { margin-top: 14px; gap: 0; display: grid; }
  .note { font-size: 16px; }
  .motion .note { grid-area: 1 / 1; }
  .note b { font-size: 18px; }
}

/* ---------- ⑦ Month ---------- */

.month-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8vw;
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px 40px;
}
.month h2 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; }
.month-lede { margin-top: 18px; font-size: 21px; color: var(--text-2); max-width: 440px; }

/* Today's line-up beside the calendar, and what the red dots ahead are. */
.agenda { margin-top: 36px; max-width: 400px; }
.agenda-day { font-size: 13px; font-weight: 700; color: var(--text-3); letter-spacing: 0.02em; text-transform: uppercase; }
.agenda-day.later { margin-top: 20px; }
.agenda ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.agenda li { display: grid; grid-template-columns: 10px 58px 1fr; align-items: baseline; gap: 10px; font-size: 16px; font-weight: 600; }
.agenda li > i { width: 8px; height: 8px; border-radius: 50%; align-self: start; margin-top: 0.5em; }
.agenda time { color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.agenda small { display: block; font-size: 14px; font-weight: 400; color: var(--text-3); }
.comp { background: #3b82f6; }
.info { background: #8a63f2; }
.agenda .due, .k.due { background: #e5484d; }

.cal {
  --cell: min(54px, calc((100vw - 48px - 40px - 6 * 10px) / 7));
  padding: 26px 20px 22px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 40px 80px -40px rgba(20, 20, 40, 0.3);
}
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 18px; }
.cal-head b { font: 700 24px/1 var(--font-display); letter-spacing: -0.02em; }
.cal-spark {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff1e6;
  color: #c2410c;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cal-spark .flame { width: 18px; height: 18px; fill: var(--spark); }
/* The run is broken: the flame goes grey until a day is read again. */
.cal-spark.out { background: var(--bg-sunk); color: var(--text-3); }
.cal-spark.out .flame { fill: #c4c4cc; }
.cal-spark, .cal-spark .flame { transition: background 0.25s, color 0.25s, fill 0.25s; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, var(--cell)); column-gap: 10px; }
.cal-week { padding-bottom: 8px; }
.cal-week span { text-align: center; font-size: 12px; font-weight: 600; color: var(--text-3); }
.cal-grid { row-gap: 24px; }
.d {
  --edge-h: 5px;
  position: relative;
  width: var(--cell);
  height: var(--cell);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 calc(var(--cell) * 0.33)/1 var(--font-display);
  font-style: normal;
}
.d.past { background: var(--read-face); color: #fff; box-shadow: 0 var(--edge-h) 0 var(--read-edge); }
.d.missed { background: var(--missed-face); color: var(--text-3); box-shadow: 0 0 0 2px #d4d4d8 inset; }
.d.today { background: var(--today-face); color: #fff; box-shadow: 0 var(--edge-h) 0 var(--today-edge), 0 0 0 calc(var(--edge-h) + 3px) rgba(61, 190, 106, 0.16); }
.d.future { color: #a1a1aa; box-shadow: 0 0 0 1.5px #e4e4e7 inset; }
/* Something due that day: a small red dot under the date. */
.d.due::after {
  content: "";
  position: absolute;
  bottom: calc(var(--cell) * 0.14);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e5484d;
}
.cal-key { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; max-width: calc(7 * var(--cell) + 60px); margin: 26px auto 0; font-size: 13px; color: var(--text-3); }
.cal-key span { display: flex; align-items: center; gap: 6px; }
.k { width: 10px; height: 10px; border-radius: 50%; }
.k.read { background: var(--read-face); }
.k.missed { box-shadow: 0 0 0 1.5px #d4d4d8 inset; }
.k.today { background: var(--today-face); }
.k.due { width: 6px; height: 6px; }
.k.comp { background: #3b82f6; }
.k.info { background: #8a63f2; }
/* Classes that day: a dot per course under the coin. */
.d s { position: absolute; top: calc(100% + var(--edge-h) + 5px); left: 0; right: 0; display: flex; justify-content: center; gap: 3px; }
.d u { width: 5px; height: 5px; border-radius: 50%; }
.d u.comp { background: #3b82f6; }
.d u.info { background: #8a63f2; }
.d.future u { opacity: 0.55; }
.d.today.due::after { background: #fff; }

@media (max-width: 860px) {
  .month-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 28px; padding-top: 80px; }
  .month h2 { font-size: 36px; }
  /* Narrow: the calendar, then today's line-up under it; the rest of the copy stays on wide screens. */
  .month-stage { padding-top: 72px; gap: 18px; }
  .month-lede, .agenda .later, .cal-key { display: none; }
  .month-copy { display: contents; }
  .month-copy .eyebrow { margin-bottom: -8px; }
  .agenda { order: 3; margin-top: 0; text-align: left; }
  .agenda ul { gap: 6px; margin-top: 6px; }
  .agenda li { font-size: 14px; grid-template-columns: 8px 46px 1fr; gap: 8px; }
  .agenda small { display: inline; font-size: 13px; margin-left: 6px; }
  .cal { --cell: min(38px, calc((100vw - 48px - 28px - 6 * 8px) / 7)); padding: 16px 14px 18px; border-radius: 22px; }
  .cal-week, .cal-grid { column-gap: 8px; }
  .cal-grid { row-gap: 18px; }
  .cal-head { padding-bottom: 10px; }
  .d { --edge-h: 4px; }
  .cal-head b { font-size: 20px; }
}

/* ---------- ⑤ Reel ---------- */

.reel { background: #111113; color: #f4f4f5; overflow: hidden; }
.reel-stage { height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 48px; }
.reel-title { font-size: clamp(36px, 5vw, 64px); line-height: 1.05; padding: 0 max(24px, 8vw); }
.reel-track { display: flex; gap: 56px; padding: 0 max(24px, 8vw); width: max-content; }
/* With motion the row starts off to the right and slides all the way through. */
.motion .reel-track { padding-left: 55vw; }
.card { margin: 0; width: var(--card-w); }
.reel { --card-w: min(300px, calc((100svh - 420px) / 2.174)); }
.card .phone { --phone-w: var(--card-w); box-shadow: 0 0 0 1.5px #3a3a3c inset; }
.card figcaption { margin-top: 20px; color: #a1a1aa; font-size: 16px; }
.card figcaption b { display: block; color: #fff; font-size: 19px; }

/* ---------- ⑥ Privacy ---------- */

.private-stage { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 56px 24px 0; max-width: 1000px; margin: 0 auto; }
.private-line { font: 700 clamp(34px, 5vw, 64px)/1.15 var(--font-display); letter-spacing: -0.02em; }
.private-line .w { color: #d4d4d8; }

/* ---------- ⑦ Get ---------- */

/* The closing screen fills the window above the footer and sits in its middle (under the nav). */
.get {
  min-height: calc(100vh - 90px);
  min-height: calc(100svh - 90px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  padding: calc(56px + 48px) 24px 48px;
  text-align: center;
}
.get-icon { border-radius: 22px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.35); }
.get h2 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; }
.get p { color: var(--text-2); font-size: 19px; }

.foot {
  display: flex;
  gap: 22px;
  justify-content: center;
  padding: 28px 24px 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-3);
}
.foot a { text-decoration: none; }

/* Without motion (no script, or Reduce Motion) everything simply sits in place. */
html:not(.motion) .glass .screen:not(:first-child), html:not(.motion) .chip { display: none; }
html:not(.motion) .grow-notes { gap: 18px; }
html:not(.motion) .private-line .w { color: inherit; }

/* A short window keeps only today's line-up beside the month. */
@media (max-height: 820px) and (min-width: 861px) { .month-lede { display: none; } .agenda { margin-top: 28px; } }
