/* getrico.app: Rico's own look. Pure black and white; color only ever comes from a course. */
:root {
  --paper: #fff;
  --ink: #000;
  --ink-2: #3a3a3c;
  --ink-3: #6e6e73;
  --rule: #e5e5ea;
  --card: #f5f5f7;
  --shadow: rgba(0, 0, 0, 0.22);
  --max: 72rem;
  --text: 40rem;
  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --math: "STIX Two Math", "Latin Modern Math", "Cambria Math", "Times New Roman", serif;
  /* Course colors, as each course's manifest sets them (light / dark). */
  --heart: #c62828;    --heart-d: #ff6e6e;
  --water: #0e7490;    --water-d: #67e8f9;
  --falls: #6d28d9;    --falls-d: #a78bfa;
  --doubling: #b45309; --doubling-d: #f2d16b;
  --fly: #1f5fa8;      --fly-d: #8ab4f8;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000;
    --ink: #fff;
    --ink-2: #d1d1d6;
    --ink-3: #98989d;
    --rule: #2c2c2e;
    --card: #141416;
    --shadow: rgba(0, 0, 0, 0.6);
    --heart: var(--heart-d); --water: var(--water-d); --falls: var(--falls-d);
    --doubling: var(--doubling-d); --fly: var(--fly-d);
  }
}
@media (prefers-contrast: more) {
  :root { --ink-2: var(--ink); --ink-3: var(--ink); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
main { overflow-x: clip; }
code { font-size: 0.92em; background: var(--card); padding: 0.1em 0.35em; border-radius: 0.35em; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: 1.25rem; }
.wrap-wide { max-width: 88rem; margin-inline: auto; padding-inline: 1.25rem; }

/* The voice: SF Pro Expanded Black, only for the biggest words. */
.display {
  font-weight: 900;
  font-stretch: expanded;
  letter-spacing: -0.015em;
  line-height: 0.98;
  text-wrap: balance;
}

.button {
  display: inline-block; background: var(--ink); color: var(--paper);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  padding: 0.85rem 1.5rem; border-radius: 999px;
}
.button:hover { opacity: 0.82; }
.button.inverse { background: var(--paper); color: var(--ink); }

/* Header and footer */
header.site {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.1rem;
}
header.site .mark { font-size: 1.5rem; text-decoration: none; }
header.site nav { display: flex; align-items: center; gap: 1.25rem; font-size: 0.9375rem; }
header.site nav a { text-decoration: none; color: var(--ink-2); }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--ink); }
header.site nav a.pill {
  color: var(--paper); background: var(--ink); font-weight: 600;
  padding: 0.45rem 0.95rem; border-radius: 999px;
}
footer.site {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 3rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem;
  color: var(--ink-3); font-size: 0.875rem;
}
footer.site nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
footer.site a { color: var(--ink-2); text-decoration: none; }
footer.site a:hover { color: var(--ink); text-decoration: underline; }
footer.site p { margin: 0; }

/* Hero: the headline, then the forgetting curve the whole app is built on. */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem) 2rem; }
.hero-title { font-size: clamp(3.4rem, 11.5vw, 10rem); line-height: 0.9; margin: 0 0 2.25rem; letter-spacing: -0.025em; }
.hero-foot {
  display: grid; grid-template-columns: minmax(0, 36rem) auto; gap: 1.5rem 3rem;
  align-items: end; justify-content: space-between;
}
.hero-sub { font-size: clamp(1.1875rem, 2.2vw, 1.4375rem); line-height: 1.4; margin: 0; color: var(--ink-2); }
.actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.note { color: var(--ink-3); font-size: 0.9375rem; }

/* The beta form: one pill holding the email field and the button. */
.join {
  display: flex; align-items: center; gap: 0.35rem; width: min(100%, 27rem);
  padding: 0.3rem 0.3rem 0.3rem 1.25rem; border-radius: 999px;
  background: var(--card); border: 1px solid var(--rule);
}
.join:focus-within { border-color: var(--ink-3); }
.join input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 1.0625rem; color: var(--ink); padding-block: 0.55rem;
}
.join input::placeholder { color: var(--ink-3); }
.join .button { border: 0; font: inherit; font-weight: 600; cursor: pointer; padding: 0.75rem 1.35rem; }
.join.inverse {
  background: color-mix(in srgb, var(--paper) 10%, transparent);
  border-color: color-mix(in srgb, var(--paper) 24%, transparent);
}
.join.inverse:focus-within { border-color: color-mix(in srgb, var(--paper) 60%, transparent); }
.join.inverse input { color: var(--paper); }
.join.inverse input::placeholder { color: var(--paper); opacity: 0.55; }
.join .trap, .hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.cta .fine { font-size: 0.875rem; opacity: 0.6; margin: 1rem 0 0; }
.cta .fine a { color: inherit; }
main.joined { padding-block: clamp(4rem, 12vw, 8rem); }
main.joined .join { margin-top: 1.5rem; }

.curve { margin-top: clamp(2.5rem, 6vw, 4.5rem); margin-bottom: 0; }
.curve svg { width: 100%; height: auto; overflow: visible; }
.curve .kept { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.curve .alone { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-dasharray: 0.006 0.008; }
.curve .dot { fill: var(--paper); stroke: var(--ink); stroke-width: 3.5; }
.curve .day { fill: var(--ink-3); font: 500 15px var(--sans); text-anchor: middle; font-variant-numeric: tabular-nums; }
.curve .tag { font: 700 17px var(--sans); fill: var(--ink); }
.curve .tag-alone { fill: var(--ink-3); font-weight: 500; }
.curve figcaption { color: var(--ink-3); font-size: 0.9375rem; max-width: 38rem; margin-top: 1.25rem; }

@media (prefers-reduced-motion: no-preference) {
  .curve .kept { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.8s cubic-bezier(0.35, 0.1, 0.25, 1) 0.35s forwards; }
  .curve .alone, .curve .tag { opacity: 0; animation: appear 0.8s ease 0.35s forwards; }
  .curve .tag-kept { animation-delay: 3s; }
  .curve .dot { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) forwards; }
  .curve .d0 { animation-delay: 0.35s; }
  .curve .d1 { animation-delay: 0.85s; }
  .curve .d2 { animation-delay: 1.2s; }
  .curve .d3 { animation-delay: 1.6s; }
  .curve .d4 { animation-delay: 2.1s; }
  .curve .d5 { animation-delay: 2.7s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: scale(1); } }

/* Chapters */
.chapter { padding-block: clamp(4.5rem, 10vw, 8rem); }
.chapter h2 { font-size: clamp(2.25rem, 5.6vw, 4.5rem); margin: 0 0 1.5rem; max-width: 15ch; }
.chapter h3 { font-size: 1.125rem; margin: 0 0 0.4rem; }
.chapter p { color: var(--ink-2); }
.lead { font-size: clamp(1.125rem, 1.8vw, 1.3125rem); line-height: 1.5; max-width: var(--text); color: var(--ink-2); margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.copy p { font-size: 1.1875rem; max-width: 32rem; }
.copy h2 { max-width: 12ch; }

/* Real screens from The Heart, lit by the course's own colors like the app's aura. */
.phones { position: relative; display: flex; justify-content: center; align-items: center; padding-block: 2rem; isolation: isolate; }
.phones::before {
  content: ""; position: absolute; inset: -10% -20%; z-index: -1;
  background:
    radial-gradient(40% 45% at 30% 50%, color-mix(in srgb, var(--doubling) 30%, transparent), transparent 70%),
    radial-gradient(45% 50% at 55% 45%, color-mix(in srgb, var(--heart) 34%, transparent), transparent 70%),
    radial-gradient(40% 45% at 80% 55%, color-mix(in srgb, var(--water) 30%, transparent), transparent 70%);
  filter: blur(30px);
}
.phone {
  width: min(42%, 15rem); border-radius: 2.1rem;
  box-shadow: 0 0 0 1px var(--rule), 0 40px 70px -30px var(--shadow);
  background: var(--card);
}
.phone.p1, .phone.p3 { width: min(36%, 13rem); }
.phone.p1 { margin-right: -7%; transform: rotate(-4deg) translateY(1.5rem); }
.phone.p3 { margin-left: -7%; transform: rotate(4deg) translateY(1.5rem); }
.phone.p2 { position: relative; z-index: 1; }

/* Facts in a row: each a heading and a sentence or two, ruled from above. */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 3rem; }
.facts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 56rem; }
.facts > div { border-top: 2px solid var(--ink); padding-top: 1.1rem; }
.facts p { margin: 0; }
.today h2 { max-width: 18ch; }

/* The exam forecast, drawn the way the course page draws it. */
.forecast { --c: var(--water); margin: 0; background: var(--card); border-radius: 2rem; padding: clamp(1.5rem, 3vw, 2.25rem); }
.fc-head { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9375rem; }
.fc-course { font-weight: 700; color: var(--c); }
.fc-when { color: var(--ink-3); }
.forecast .fc-number {
  margin: 1.25rem 0 0; color: var(--ink); line-height: 0.9;
  font-size: clamp(4.5rem, 10vw, 7rem); font-weight: 800; font-stretch: condensed;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.fc-number span { color: var(--c); }
.forecast .fc-label { margin: 0.4rem 0 1.25rem; color: var(--ink-2); }
.forecast svg { width: 100%; height: auto; display: block; }
.forecast .band80 { fill: var(--c); opacity: 0.12; }
.forecast .band50 { fill: var(--c); opacity: 0.22; }
.forecast .line { fill: none; stroke: var(--c); stroke-width: 3.5; stroke-linecap: round; }
.forecast .goal { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 5 6; }
.forecast .examline { stroke: var(--ink-3); stroke-width: 1.5; }
.forecast .end { fill: var(--c); stroke: var(--card); stroke-width: 3; }
.fc-axis { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 0.8125rem; margin-top: 0.4rem; font-variant-numeric: tabular-nums; }
.forecast figcaption { color: var(--ink-3); font-size: 0.8125rem; margin-top: 1rem; }

.share { margin-top: 2.5rem; max-width: var(--text); }

.private h2.big { font-size: clamp(3rem, 10.5vw, 8.5rem); line-height: 0.92; max-width: none; margin-bottom: 2rem; }


/* The "why" under a headline: one short sentence, quieter than the "what". */
.chapter .why, .why { color: var(--ink-3); font-size: 1.0625rem; max-width: 34rem; margin: 0; }
.copy .why { font-size: 1.0625rem; margin-top: 1.25rem; }
.chapter > .wrap > .why { margin-bottom: 0; }

/* Make a course: three ways in, one file out, shared with anyone. */
.flow {
  display: grid; grid-template-columns: minmax(0, 1.25fr) 3.5rem minmax(0, 0.8fr) 3.5rem minmax(0, 0.8fr);
  align-items: center; gap: 1rem; margin-top: 3.5rem;
}
.sources { display: grid; gap: 0.75rem; }
.src { background: var(--card); border-radius: 1.25rem; padding: 1rem 1.1rem; display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 1rem; align-items: center; }
.src b { font-size: 1.0625rem; }
.src > span { color: var(--ink-3); font-size: 0.875rem; grid-column: 1; }
.src > :last-child { grid-column: 2; grid-row: 1 / span 2; }
.mini-editor { width: 8.5rem; display: grid; gap: 0.3rem; background: var(--paper); border-radius: 0.6rem; padding: 0.55rem 0.6rem; }
.mini-editor em { font-style: normal; font-size: 0.6875rem; font-weight: 700; order: -1; }
.mini-editor i { display: block; height: 0.3rem; border-radius: 1rem; background: var(--rule); }
.mini-editor i.short { width: 60%; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chips code { background: var(--paper); border: 1px solid var(--rule); font-size: 0.75rem; padding: 0.2rem 0.5rem; border-radius: 999px; }
.flow .bubble { margin: 0; max-width: 11rem; background: var(--ink); color: var(--paper); font-size: 0.75rem; line-height: 1.35; padding: 0.55rem 0.75rem; border-radius: 1rem 1rem 0.25rem 1rem; }
.flow .arrow { width: 100%; height: auto; }
.flow .arrow path { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.file-tile { display: grid; justify-items: center; text-align: center; gap: 0.35rem; }
.file-tile .doc {
  width: 5.5rem; height: 7rem; border-radius: 0.9rem; background: var(--ink); position: relative; margin-bottom: 0.6rem;
  box-shadow: 0 30px 50px -25px var(--shadow);
}
.file-tile .doc::after { content: "R"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--paper); font-weight: 900; font-stretch: expanded; font-size: 2.2rem; }
.file-tile b { font-size: 1.0625rem; }
.file-tile span:last-child { color: var(--ink-3); font-size: 0.875rem; }
.share-to { display: grid; justify-items: center; gap: 0.8rem; text-align: center; }
.share-to b { font-size: 1.0625rem; }
.share-to .chips { justify-content: center; }
.share-to .chips code { background: var(--card); border-color: transparent; }
.faces { display: flex; }
.faces i { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 3px solid var(--paper); margin-left: -0.6rem; background: var(--ink-3); }
.faces i:nth-child(1) { margin-left: 0; background: var(--ink); }
.faces i:nth-child(2) { background: var(--ink-2); }
.faces i:nth-child(4) { background: var(--rule); }

.chapter.private h2.big { margin-bottom: 1.5rem; }


.cta { background: var(--ink); color: var(--paper); padding-block: clamp(4.5rem, 10vw, 7.5rem); }
.cta h2 { font-size: clamp(2.5rem, 7vw, 5.5rem); margin: 0 0 1.25rem; }
.cta p { color: var(--paper); opacity: 0.78; max-width: 34rem; font-size: 1.1875rem; margin: 0 0 2rem; }

/* Text pages: privacy, terms, support */
main.doc { max-width: var(--text); margin: 0 auto; padding: 2.5rem 1.25rem 5rem; }
main.doc h1 { font-size: clamp(2.5rem, 9vw, 4rem); margin: 0 0 0.75rem; font-weight: 900; font-stretch: expanded; letter-spacing: -0.015em; line-height: 1; }
main.doc h2 { font-size: 1.3125rem; margin: 2.75rem 0 0.5rem; }
main.doc h3 { font-size: 1.0625rem; margin: 1.75rem 0 0.25rem; }
main.doc p, main.doc li { color: var(--ink-2); }
main.doc strong { color: var(--ink); }
main.doc ul { padding-left: 1.2rem; }
main.doc li { margin: 0.4rem 0; }
main.doc li::marker { color: var(--ink-3); }
main.doc .updated { color: var(--ink-3); font-size: 0.9375rem; margin-bottom: 2rem; }

@media (max-width: 56rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .facts.two { grid-template-columns: minmax(0, 1fr); }
  .hero-foot { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .flow .arrow { width: 3rem; justify-self: center; transform: rotate(90deg); }
}
@media (max-width: 30rem) {
  header.site nav { gap: 0.9rem; font-size: 0.875rem; }
  header.site nav a.nav-privacy { display: none; }
  .curve .kept, .curve .dot { stroke-width: 6; }
  .curve .alone { stroke-width: 3.5; }
  .curve .dot { r: 11px; }
  .curve .day { font-size: 34px; }
  .curve .day:nth-of-type(1) { text-anchor: start; }
  .curve .day:nth-of-type(2), .curve .day:nth-of-type(3) { display: none; }
  .curve .tag { font-size: 36px; }
  .curve .tag-alone { display: none; }
}

.today .copy h2 { max-width: 13ch; }
.make h2 { max-width: 14ch; }

/* Two phones side by side, or one alone, lit from behind like the app's course aura. */
.duo, .solo { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 1.25rem; padding-block: 1.5rem; isolation: isolate; }
.duo::before, .solo::before {
  content: ""; position: absolute; inset: 0 -10%; z-index: -1; filter: blur(40px);
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--glow, var(--heart)) 26%, transparent), transparent 72%);
}
.duo .phone, .solo .phone { width: min(46%, 16rem); }
.solo .phone { width: min(70%, 17rem); }
.duo .d2 { margin-top: 3rem; }
.exam { --glow: var(--heart); }
.today { --glow: var(--water); }
.teach .copy, .exam .copy { order: 0; }

/* Research */
.research { padding-bottom: 5rem; }
.r-intro { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem); }
.r-intro h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); margin: 0 0 1.25rem; max-width: 14ch; line-height: 0.95; }
.r-intro .why { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); max-width: 36rem; }
.findings { list-style: none; margin: 0 auto; counter-reset: f; }
.findings li {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1rem clamp(2rem, 5vw, 4rem);
  padding-block: 2.25rem; border-top: 1px solid var(--rule);
}
.findings h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.02; margin: 0; max-width: 16ch; }
.findings p { margin: 0 0 0.75rem; color: var(--ink-2); }
.findings p:first-child { color: var(--ink); font-size: 1.125rem; }
.findings .in b { color: var(--ink); margin-right: 0.4rem; }
.findings .cite { color: var(--ink-3); font-size: 0.875rem; margin: 0; }
.findings .cite a { color: var(--ink-3); }
.r-own { border-top: 1px solid var(--rule); padding-top: 3rem; margin-top: 1rem; }
.r-own h2 { font-size: clamp(1.75rem, 4vw, 3rem); margin: 0 0 1rem; }
@media (max-width: 56rem) {
  .findings li { grid-template-columns: minmax(0, 1fr); }
}

.phones.wide { margin-top: 3rem; }
