/* Turnip Learning — landing page.
   Colors and type come from docs/brand/turnip-brand-guide.md:
   Lavender Mist ground, Glasses Plum, Sprout Green, the four world colors;
   Fraunces (Soft) for display, DM Sans for everything else.
   No cream, tan or navy, and Turnip never sits on a dark purple. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dmsans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --mist: #F6F5FB;       /* Lavender Mist: page ground */
  --mist-deep: #ECEAF7;
  --lavender: #8B86B8;   /* Turnip Lavender */
  --lavender-soft: #C9C5E8;
  --plum: #5D5A87;       /* Glasses Plum: headings, dark bands */
  --plum-deep: #4A476E;
  --ink: #37364F;        /* Deep Ink: body text */
  --slate: #585878;      /* Glasses Slate: secondary text */
  --sprout: #B7D77F;
  --sprout-deep: #3F6B1A;
  --sage: #EEF4E2;
  --nature: #2E7D4F;
  --animals: #F2A53A;
  --earth: #2B63C0;
  --biology: #6E48C8;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "DM Sans", system-ui, -apple-system, sans-serif;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); }
a:focus-visible { outline: 3px solid var(--sprout-deep); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: var(--plum);
}
h2 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 1.25rem; }
h3 { font-family: var(--body); font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1rem; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.band { padding: 88px 0; }
.eyebrow {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sprout-deep);
  margin-bottom: 0.75rem;
}
.eyebrow-light { color: var(--sprout); }
.lede { font-size: 1.2rem; max-width: 44rem; color: var(--slate); }

/* Top bar */
.topbar {
  max-width: 1120px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.15rem;
  color: var(--plum); text-decoration: none;
}
.brand img { border-radius: 8px; background: #fff; }
.topnav { display: flex; gap: 22px; font-size: 0.95rem; }
.topnav a { color: var(--slate); text-decoration: none; }
.topnav a:hover { color: var(--plum); text-decoration: underline; }

/* Hero */
.hero {
  max-width: 1120px; margin: 0 auto; padding: 40px 24px 24px;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center;
}
.hero h1 { font-size: clamp(2.8rem, 6.4vw, 4.8rem); margin-bottom: 1rem; }
.hero-sub { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--slate); max-width: 30rem; margin-bottom: 2rem; }
.hero-art { margin: 0; position: relative; justify-self: center; width: 100%; max-width: 380px; }
.hero-disc {
  position: absolute; inset: 8% 0 10%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fff 0 52%, var(--mist-deep) 53% 100%);
}
.hero-turnip { position: relative; width: 78%; margin: 0 auto; }
.hero-art figcaption {
  position: relative; text-align: center; margin-top: 14px;
  font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 600;
  color: var(--plum); font-size: 1.1rem;
}

/* App Store button + status (appears twice) */
.store { max-width: 30rem; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--plum); color: #fff;
  font-weight: 700; font-size: 1rem;
  padding: 14px 24px; border-radius: 999px; text-decoration: none;
}
a.store-btn:hover { background: var(--plum-deep); }
.store-btn.is-soon { cursor: default; }
.store-status { font-size: 0.92rem; color: var(--slate); margin: 14px 0 0; }

/* Soft rows between hero and the plum band, like a garden bed */
.rows { line-height: 0; margin-top: 40px; }
.rows svg { width: 100%; height: clamp(64px, 9vw, 150px); display: block; }

/* Who it's for */
.band-lavender { background: var(--plum); color: #fff; padding-top: 56px; }
.band-lavender h2 { color: #fff; }
.who-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.who-card {
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius); padding: 28px 26px;
}
.who-card h3 { color: #fff; margin: 8px 0 12px; }
.who-card p { color: #EDECF6; font-size: 1rem; margin: 0; }
.num {
  display: inline-block; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); background: var(--sprout); border-radius: 999px; padding: 4px 10px;
}
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 64px; }
.phones figure { margin: 0; text-align: center; }
.phone {
  max-width: 250px; margin: 0 auto; padding: 8px; background: #2A2940;
  border-radius: 38px; box-shadow: 0 24px 50px rgba(30, 29, 43, 0.35);
}
.phone img { border-radius: 30px; width: 100%; }
.phones figcaption {
  margin-top: 18px; font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 600;
  color: #fff; font-size: 1.1rem;
}
.phones-note { text-align: center; color: var(--lavender-soft); font-size: 0.92rem; margin: 32px 0 0; }

/* Four worlds: bold world colors, used as navigation in the app */
.worlds {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.world { border-radius: var(--radius); padding: 26px 22px 28px; color: #fff; min-height: 190px; }
.world h3 {
  font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 600;
  font-size: 1.6rem; margin-bottom: 10px;
}
.world p { margin: 0; font-size: 0.98rem; }
.world-nature { background: var(--nature); }
.world-animals { background: var(--animals); color: var(--ink); }
.world-earth { background: var(--earth); }
.world-biology { background: var(--biology); }

.band-mist { background: var(--mist-deep); }

/* The rebuild */
.band-sprout { background: var(--sage); }
.rebuild { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 56px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 1.5rem 0; }
.ticks li { position: relative; padding: 0 0 14px 34px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21V11' stroke='%233F6B1A' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpath d='M12 12C12 7 8 5 4 5c0 4 3 7 8 7zM12 10c0-4 3-6 7-6 0 4-3 6-7 6z' fill='%23B7D77F' stroke='%233F6B1A' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.rebuild-art { margin: 0; justify-self: center; max-width: 240px; }

/* Safe by design: plain and quiet on purpose */
.band-plum { background: var(--plum-deep); color: #EDECF6; }
.band-plum h2 { color: #fff; }
.band-plum p { font-size: 1.12rem; }
.closing-line {
  font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 600;
  color: #fff; font-size: 1.4rem; margin-top: 1.5rem;
}

/* Closing banner */
.closing {
  background: var(--lavender-soft);
  display: flex; align-items: center; justify-content: center; gap: 48px;
  padding: 72px 24px;
}
.closing-turnip { width: 180px; flex: none; }
.closing h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); max-width: 14em; }
.closing .store-status { color: var(--plum-deep); }

/* Footer */
.footer {
  background: var(--plum); color: #EDECF6; text-align: center;
  padding: 28px 24px 36px; font-size: 0.92rem;
}
.footer a { color: #fff; }
.footer p { margin: 0; }

/* Tablet */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { max-width: 320px; }
  .who-grid, .phones { grid-template-columns: 1fr; }
  .phones { gap: 48px; }
  .worlds { grid-template-columns: repeat(2, 1fr); }
  .rebuild { grid-template-columns: 1fr; }
  .rebuild-art { display: none; }
  .closing { flex-direction: column; text-align: center; gap: 24px; }
  .closing .store { margin: 0 auto; }
}

/* Phone */
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .band { padding: 64px 0; }
  .wrap, .hero, .topbar { padding-left: 16px; padding-right: 16px; }
  .topnav { display: none; }
  .hero { padding-top: 16px; }
  .worlds { grid-template-columns: 1fr; }
  .world { min-height: 0; }
  .phone { max-width: 230px; }
  .closing { padding: 56px 16px; }
  .closing-turnip { width: 140px; }
}

/* Shared bits for the story sections */
h3.sub { font-size: 1.35rem; margin: 56px 0 12px; color: var(--plum); }
.dots { list-style: none; padding: 0; margin: 12px 0 0; }
.dots li { position: relative; padding: 0 0 12px 22px; }
.dots li::before {
  content: ""; position: absolute; left: 2px; top: 0.6em; width: 9px; height: 9px;
  border-radius: 50%; background: var(--sprout); box-shadow: 0 0 0 2px var(--plum);
}
.steps { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 14px 42px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--plum); color: #fff; font-weight: 700; font-size: 0.9rem;
  display: grid; place-items: center;
}

/* Origin */
.origin { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 56px; align-items: center; }
.origin p { max-width: 40rem; }
.pull {
  font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; color: var(--plum);
  border-left: 5px solid var(--sprout); padding: 4px 0 4px 18px; margin: 1.5rem 0;
}
.cards { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cards img { border-radius: 12px; box-shadow: 0 16px 36px rgba(55, 54, 79, 0.22); }
.cards img:first-child { transform: rotate(-3deg); }
.cards img:nth-child(2) { transform: rotate(3deg) translateY(18px); }
.cards figcaption { grid-column: 1 / -1; text-align: center; color: var(--slate); font-size: 0.92rem; margin-top: 24px; }

/* The first Turnip */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 36px; }
.split h3 { color: var(--plum); }
.gallery { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 24px; margin-top: 48px; align-items: start; }
.gallery figure { margin: 0; background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: 0 10px 28px rgba(55, 54, 79, 0.1); }
.gallery img { border-radius: 10px; width: 100%; }
.gallery figcaption { color: var(--slate); font-size: 0.92rem; margin-top: 12px; }
.stats { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stats li { background: #fff; border-radius: 16px; padding: 18px 20px; font-size: 0.98rem; color: var(--slate); }
.stats strong {
  display: block; font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 600;
  font-size: 2.2rem; line-height: 1.1; color: var(--plum); margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

/* Versions: a dotted line joins each build, oldest first */
.versions { list-style: none; margin: 48px 0 0; padding: 0; position: relative; }
.versions::before {
  content: ""; position: absolute; left: 10px; top: 10px; bottom: 10px;
  border-left: 3px dotted var(--lavender);
}
.versions li { position: relative; padding: 0 0 36px 48px; max-width: 50rem; }
.versions li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 23px; height: 23px;
  border-radius: 50%; background: var(--sprout); border: 3px solid var(--plum);
}
.versions li.is-next::before { background: #fff; border-style: dashed; }
.era {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; background: var(--plum); border-radius: 999px; padding: 4px 10px; margin-bottom: 10px;
}
.is-next .era { background: var(--sprout-deep); }
.versions h3 { font-size: 1.3rem; margin-bottom: 6px; color: var(--ink); }
.versions p { margin-bottom: 8px; }
.tools { color: var(--slate); font-size: 0.95rem; }
.tools::before { content: "Built with: "; font-weight: 700; color: var(--plum); }
.learned { font-size: 0.98rem; background: #fff; border-radius: 12px; padding: 10px 14px; border: 1px solid var(--mist-deep); }
.learned span {
  display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sprout-deep); margin-bottom: 2px;
}

/* Today */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
.compare > div { background: #fff; border-radius: var(--radius); padding: 24px; }
.compare h3 { color: var(--plum); }

/* v2 design */
.v2-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; margin-top: 36px; }
.v2-mascot { margin: 0; background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: 0 10px 28px rgba(55, 54, 79, 0.1); }
.v2-mascot figcaption { color: var(--slate); font-size: 0.92rem; margin-top: 12px; }
.v2-notes h3 { color: var(--plum); }
.v2-notes .ticks { margin-top: 12px; }
.swatches { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.swatches li { font-size: 0.78rem; color: var(--slate); }
.swatches li::before { content: ""; display: block; height: 48px; border-radius: 12px; background: var(--c); margin-bottom: 6px; }
.worlds { margin-top: 20px; }

/* Skills */
.skills { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.skills li { background: var(--mist-deep); border-radius: var(--radius); padding: 22px; }
.skills h3 { color: var(--plum); margin-bottom: 8px; }
.skills p { margin: 0; font-size: 0.96rem; }

@media (max-width: 900px) {
  .origin, .split, .gallery, .compare, .v2-grid { grid-template-columns: 1fr; }
  .cards { max-width: 360px; margin: 0 auto; }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .swatches { grid-template-columns: repeat(2, 1fr); }
  .versions li { padding-left: 40px; }
}
