/* Roots site. Brand: PROJECTS/ROOTS/BRAND.md (Linen & Sienna, Figtree only, growth rings).
   Gradient background, white surfaces, ink text, sienna rare. No green, no purple, no dark backgrounds.
   Motion: slow, eased, like breathing. Things grow, draw in, settle. */
@font-face { font-family: "Figtree"; src: url("/assets/fonts/Figtree.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }

:root {
  --linen: #EFE2D4; --haze: #E7E8E4; --sky: #CBD9E0; --white: #FFFFFF;
  --sienna: #B4552D; --clay: #DFB39A; --porcelain: #ECE6DE; --ink: #3B3236; --ink-soft: #6A5F60;
  --line: rgba(59, 50, 54, .12);
  --ease: cubic-bezier(.45, 0, .2, 1);
  --r-card: 28px;
  --shadow: 0 1px 0 rgba(59, 50, 54, .04), 0 24px 60px -36px rgba(59, 50, 54, .35);
  --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--haze); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  font: 400 1.0625rem/1.65 "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--linen) 0%, var(--haze) 55%, var(--sky) 100%);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--clay); text-underline-offset: .2em; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--sienna); }
:focus-visible { outline: 3px solid var(--sienna); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 900; letter-spacing: -.028em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7.4vw, 4.9rem); }
h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
p { margin: 0 0 1em; }
.accent { color: var(--sienna); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
@media (min-width: 760px) { .wrap { padding: 0 40px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 14px; border-radius: 999px; z-index: 10; }
.skip:focus { left: 12px; }
.kicker { font-weight: 500; font-size: .95rem; color: var(--ink-soft); margin: 0 0 14px; letter-spacing: .005em; display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink-soft); flex: none; }
.lede { font-size: clamp(1.1rem, 2vw, 1.28rem); line-height: 1.6; color: var(--ink); max-width: 36ch; }
.soft { color: var(--ink-soft); }

/* ---------- header / wordmark ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; gap: 16px; }
.wordmark { display: inline-flex; align-items: baseline; font-weight: 900; font-size: 2rem; letter-spacing: -.03em; line-height: 1; text-decoration: none; color: var(--ink); white-space: nowrap; }
.wordmark img { width: .62em; height: .62em; margin: 0 .015em; align-self: center; position: relative; top: .1em; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { font-weight: 600; font-size: .98rem; text-decoration: none; padding: 9px 14px; border-radius: 999px; }
.nav a:hover { background: rgba(255, 255, 255, .55); }
.nav a[aria-current="page"] { background: var(--white); }
.nav .yt { display: none; }
@media (min-width: 560px) { .nav .yt { display: inline-block; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--white); font: 700 1.02rem/1 "Figtree", system-ui, sans-serif; text-decoration: none; cursor: pointer;
  transition: transform .5s var(--ease), background-color .5s var(--ease); }
.btn:hover { background: #2E2629; transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-ghost { background: rgba(255, 255, 255, .7); color: var(--ink); }
.btn-ghost:hover { background: var(--white); }
.tlink { font-weight: 600; text-decoration: underline; text-decoration-color: var(--clay); }
.yt-ic { width: 20px; height: 14px; flex: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding-top: 18px; padding-bottom: 56px; }
.hero-grid { display: grid; gap: 8px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }
.hero-art { order: -1; width: min(44vw, 190px); margin: -6px -4px 4px auto; }
@media (min-width: 900px) {
  .hero { padding-top: 40px; padding-bottom: 96px; }
  .hero-grid { grid-template-columns: 1.3fr .7fr; gap: 32px; }
  .hero h1 { font-size: clamp(3.4rem, 5.6vw, 4.7rem); }
  .hero-art { order: 0; width: 100%; max-width: 440px; margin: 0 0 0 auto; }
}

/* ---------- rings (drawn in, then breathing) ---------- */
.rings { overflow: visible; }
.rings .breathe { transform-box: fill-box; transform-origin: center; }
.js .rings path[pathLength] { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.js .rings .hrt { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); }
.js .rings.in path[pathLength] { animation: draw 2.4s var(--ease) forwards; }
.js .rings.in .hrt { animation: settle 1.4s var(--ease) forwards; }
.js .rings.in .breathe { animation: breathe 9s ease-in-out 4.5s infinite alternate; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes settle { to { opacity: 1; transform: none; } }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.018); } }

/* ---------- reveals (edge wipes, masked rises) ---------- */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
.js .ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.js .ln > span { display: block; transform: translateY(105%); transition: transform 1.2s var(--ease); }
.js .ln.in > span { transform: none; }
.js h1 .ln:nth-child(2) > span { transition-delay: .12s; }
.js h1 .ln:nth-child(3) > span { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .js .rv, .js .ln > span { opacity: 1; transform: none; transition: none; }
  .js .rings path[pathLength] { stroke-dashoffset: 0; animation: none !important; }
  .js .rings .hrt { opacity: 1; transform: none; animation: none !important; }
  .js .rings .breathe { animation: none !important; }
  .btn { transition: none; }
}

/* ---------- sections ---------- */
section { padding: 56px 0; }
@media (min-width: 900px) { section { padding: 88px 0; } }
.sec-head { max-width: 640px; margin-bottom: 34px; }
.sec-head h2 { margin-bottom: 16px; }
.card { background: var(--white); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 28px 24px; }
@media (min-width: 760px) { .card { padding: 44px 48px; } }

/* story */
.story-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .story-grid { grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; } }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 22px 34px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: .42em; width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--white); }
.timeline li::after { content: ""; position: absolute; left: 10px; top: 1.45em; bottom: .1em; width: 2px; background: var(--porcelain); }
.timeline li:last-child::after { display: none; }
.timeline li.now::before { background: var(--sienna); border-color: var(--sienna); }
.timeline b { display: block; font-weight: 800; font-size: 1.08rem; line-height: 1.35; margin-bottom: 2px; }
.timeline span { color: var(--ink-soft); }
.belief { margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--line); font-weight: 700; font-size: 1.15rem; line-height: 1.45; }
.aside-app { margin: 18px 0 0; font-size: .95rem; color: var(--ink-soft); }

/* foundations */
.found { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 640px) { .found { grid-template-columns: 1fr 1fr; gap: 18px; } }
@media (min-width: 1000px) { .found { grid-template-columns: 1.35fr 1fr 1fr 1fr; } }
.found li { background: rgba(255, 255, 255, .72); border-radius: 24px; padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.found li.core { background: var(--white); box-shadow: var(--shadow); }
.found .ic { width: 44px; height: 44px; margin-bottom: 6px; }
.found p { margin: 0; color: var(--ink-soft); }
.found .share { margin-top: auto; padding-top: 12px; font-weight: 600; font-size: .9rem; color: var(--ink); }

/* rings explainer */
.days-grid { display: grid; gap: 30px; align-items: center; }
@media (min-width: 900px) { .days-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.days-art { max-width: 440px; width: 100%; margin: 0 auto; }
.legend { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.legend li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.legend i { flex: none; width: 34px; height: 12px; border-radius: 999px; }
.legend .l-good { background: var(--clay); }
.legend .l-hard { background: var(--ink); height: 5px; }
.legend .l-new { background: var(--sienna); }
.caption { font-size: .9rem; color: var(--ink-soft); margin-top: 12px; }

/* join (signup) */
.join-card { display: grid; gap: 30px; position: relative; overflow: hidden; }
@media (min-width: 900px) { .join-card { grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; } }
.join-card h2 { margin-bottom: 14px; }
.ticks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .38em; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--clay); }
.ticks li:first-child::before { border-color: var(--sienna); background: radial-gradient(circle, var(--sienna) 0 3px, transparent 3.5px); }
.signup { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 8px; }
.field input { width: 100%; min-height: 56px; padding: 0 20px; border: 1.5px solid var(--line); border-radius: 16px; background: #FCFBFA;
  font: 500 1.06rem/1 "Figtree", system-ui, sans-serif; color: var(--ink); transition: border-color .4s var(--ease), background-color .4s var(--ease); }
.field input::placeholder { color: #A39A98; }
.field input:focus { outline: none; border-color: var(--ink); background: var(--white); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: .95rem; line-height: 1.5; color: var(--ink); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ts:empty { display: none; }
.signup .btn { width: 100%; }
.status { min-height: 1.4em; margin: 0; font-weight: 600; }
.status.err { color: var(--sienna); }
.status.ok { font-size: 1.1rem; line-height: 1.55; }
.fine { font-size: .88rem; color: var(--ink-soft); margin: 16px 0 0; }
.join-card.is-done h2 { color: var(--ink); }

/* youtube */
.yt-card { display: grid; gap: 22px; align-items: center; }
@media (min-width: 760px) { .yt-card { grid-template-columns: auto 1fr auto; gap: 32px; } }
.yt-card .avatar { width: 84px; height: 84px; border-radius: 50%; }
.yt-card h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 8px; }
.yt-card p { margin: 0; color: var(--ink-soft); }

/* free page */
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.chapters li { display: grid; grid-template-columns: 56px 1fr; gap: 6px 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.chapters li:last-child { border-bottom: 1px solid var(--line); }
.chapters .ic { width: 44px; height: 44px; grid-row: span 2; }
.chapters h3 { align-self: end; }
.chapters p { margin: 0; color: var(--ink-soft); }
.free-grid { display: grid; gap: 34px; }
@media (min-width: 900px) { .free-grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }
.week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week li { aspect-ratio: 1; border-radius: 50%; border: 2.5px solid var(--clay); display: grid; place-items: center; font-weight: 800; font-size: .95rem; background: rgba(255, 255, 255, .6); }
.week li:first-child { border-color: var(--sienna); background: var(--sienna); color: var(--white); }
.week-cap { display: flex; justify-content: space-between; font-size: .88rem; color: var(--ink-soft); margin-top: 10px; }
.note-card { background: rgba(255, 255, 255, .55); border-radius: 22px; padding: 22px 24px; font-size: .98rem; }
.note-card p:last-child { margin: 0; }
.free-art { position: absolute; right: -90px; bottom: -110px; width: 360px; opacity: .55; pointer-events: none; }
@media (max-width: 899px) { .free-art { display: none; } }
.join-card > * { position: relative; }

/* prose (privacy, messages) */
.prose { max-width: 720px; padding-top: 24px; padding-bottom: 80px; }
.prose h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); margin-bottom: 22px; }
.prose h2 { font-size: 1.4rem; letter-spacing: -.015em; margin: 38px 0 10px; }
.prose ul { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 8px; }
.msg { min-height: 52vh; }
.msg .btn { margin-top: 12px; }
.msg form .soft { margin: 6px 0 10px; }

/* footer */
.foot { padding: 46px 0 40px; border-top: 1px solid var(--line); margin-top: 24px; }
.foot .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.foot .wordmark { font-size: 1.6rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { font-weight: 600; text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.not-advice { margin: 26px 0 8px; max-width: 64ch; font-size: .9rem; color: var(--ink-soft); }
.foot small { display: block; color: var(--ink-soft); font-size: .85rem; }

@media print { body { background: #fff; } .top nav, .foot nav, .join, .hero-art { display: none; } }

/* fixes after the first screenshot review */
.yt-card .btn-ghost { background: var(--white); box-shadow: inset 0 0 0 1.5px var(--ink); }
.yt-card .btn-ghost:hover { background: var(--porcelain); }
@media (min-width: 900px) { section { padding: 72px 0; } }
@media (max-width: 899px) { .days-art { max-width: 300px; } section { padding: 48px 0; } }
