/* Lesson Shuffle landing page.
   Tokens match the brand: Days One + Rubik, four suit colours, navy ink.
   Edit colours and spacing here, not in the HTML. No inline styles anywhere (strict CSP). */

@font-face { font-family: "Days One"; src: url(/assets/fonts/days-one-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Rubik"; src: url(/assets/fonts/rubik-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Rubik"; src: url(/assets/fonts/rubik-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Rubik"; src: url(/assets/fonts/rubik-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Rubik"; src: url(/assets/fonts/rubik-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Rubik"; src: url(/assets/fonts/rubik-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #fbfcf9;
  --surface: #ffffff;
  --ink: #26384a;
  --muted: #566673;
  --rule: #dfe7e0;
  --primary: #305f82;       /* buttons, links */
  --primary-hover: #234a67;
  --on-primary: #ffffff;
  --band: #305f82;          /* the navy band */
  --on-band: #ffffff;
  --focus: #1f6fb2;

  --blue: #6ca9d8;   --blue-soft: #e6f1fa;   --blue-ink: #305f82;
  --green: #80c783;  --green-soft: #e7f5e8;  --green-ink: #066633;
  --yellow: #ffd54f; --yellow-soft: #fff5d1; --yellow-ink: #7a5a00;
  --red: #e57373;    --red-soft: #fbe6e9;    --red-ink: #b13b55;

  --display: "Days One", "Arial Black", system-ui, sans-serif;
  --body: "Rubik", "Segoe UI", system-ui, sans-serif;
  --r: 0.9rem;
  --shadow: 0 1px 2px rgba(20, 40, 60, .06), 0 6px 18px rgba(20, 40, 60, .07);
  --shadow-lift: 0 2px 4px rgba(20, 40, 60, .08), 0 14px 30px rgba(20, 40, 60, .12);
  --max: 70rem;
  --gut: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141b20;
    --surface: #1b252c;
    --ink: #e6edf1;
    --muted: #a3b3be;
    --rule: #2b3943;
    --primary: #6ca9d8;
    --primary-hover: #8cbfe6;
    --on-primary: #0f1a22;
    --band: #1d3a4f;
    --on-band: #f2f7fa;
    --focus: #9fd0f3;
    --blue-soft: #1d3140;   --blue-ink: #9fd0f3;
    --green-soft: #1e3324;  --green-ink: #9be39f;
    --yellow-soft: #3a3217; --yellow-ink: #ffd54f;
    --red-soft: #3b2227;    --red-ink: #ff9aa9;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .3);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 30px rgba(0, 0, 0, .4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html { scroll-padding-top: 7rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn-main:hover, .tool:hover { transform: none; }
}
main { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 0.18em; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: 0.005em; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--primary); color: var(--on-primary); padding: .7rem 1rem; border-radius: .5rem; transition: top .15s; }
.skip:focus { top: 1rem; }

/* Suit colour hooks: a class sets four variables that children read. */
.suit-blue   { --suit: var(--blue);   --soft: var(--blue-soft);   --sink: var(--blue-ink); }
.suit-green  { --suit: var(--green);  --soft: var(--green-soft);  --sink: var(--green-ink); }
.suit-yellow { --suit: var(--yellow); --soft: var(--yellow-soft); --sink: var(--yellow-ink); }
.suit-red    { --suit: var(--red);    --soft: var(--red-soft);    --sink: var(--red-ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .6rem 1.4rem;
  border-radius: 999px; border: 2px solid var(--primary);
  font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background-color .15s, color .15s;
}
.btn-main { background: var(--primary); color: var(--on-primary); }
.btn-main:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--blue-soft); color: var(--primary-hover); }
.btn-sm { min-height: 2.75rem; padding: .45rem 1.1rem; font-size: .95rem; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; padding-block: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); min-height: 3rem; }
.brand img { height: 2.75rem; width: auto; }
.brand span { font-family: var(--display); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: .15rem 1.25rem; flex-wrap: wrap; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; padding: .6rem .1rem; min-height: 2.75rem; min-width: 2.75rem; justify-content: center; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
.nav a:not(.btn):hover { border-bottom-color: var(--blue); color: var(--ink); }
.stripe { display: grid; grid-template-columns: repeat(4, 1fr); height: 4px; }
.stripe i:nth-child(1) { background: var(--blue); } .stripe i:nth-child(2) { background: var(--green); }
.stripe i:nth-child(3) { background: var(--yellow); } .stripe i:nth-child(4) { background: var(--red); }
/* Phones: brand and "Join the list" button on row one, the four links on row two.
   Desktop: brand left, links and button right. */
.brand { order: 1; }
.header-cta { order: 2; }
.nav { order: 3; flex-basis: 100%; justify-content: space-between; gap: 0 .5rem; }
.nav a:not(.btn) { font-size: .95rem; }
.nav .nav-join { display: none; }
.bar { row-gap: 0; }
@media (max-width: 47.99rem) { .brand span { font-size: .85rem; } .brand img { height: 2.25rem; } .header-cta { padding-inline: .8rem; } }
@media (min-width: 48rem) {
  .nav { order: 2; flex-basis: auto; justify-content: flex-end; gap: .15rem 1.25rem; }
  .nav a:not(.btn) { font-size: 1rem; }
  .nav .nav-join { display: inline-flex; }
  .header-cta { display: none; }
  .bar { row-gap: .25rem; }
}

/* Sections */
section { scroll-margin-top: 7rem; }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.wrap p.eyebrow { font: 600 .8125rem/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem; }
.section-head { max-width: 42rem; margin-bottom: 2.25rem; }
.section-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); margin-bottom: .9rem; }
.section-head p { color: var(--muted); font-size: 1.125rem; margin: 0; }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(46rem 26rem at 88% -8%, var(--green-soft), transparent 70%),
    radial-gradient(34rem 22rem at -8% 8%, var(--blue-soft), transparent 70%),
    radial-gradient(30rem 18rem at 70% 110%, var(--yellow-soft), transparent 70%);
}
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 52rem) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 3rem; } }
.hero h1 { font-size: clamp(2.15rem, 5.6vw, 4rem); text-transform: uppercase; line-height: 1.04; margin-bottom: 1.25rem; text-wrap: balance; }
.mark { background: linear-gradient(transparent 58%, var(--yellow) 58% 92%, transparent 92%); padding-inline: .08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (prefers-color-scheme: dark) { .mark { background: linear-gradient(transparent 58%, rgba(255, 213, 79, .45) 58% 92%, transparent 92%); } }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink); max-width: 36rem; margin-bottom: 1.75rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.75rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem .6rem; }
.chips li { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .85rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); font-size: .9375rem; font-weight: 500; }
.chips li::before { content: ""; width: .65rem; height: .65rem; border-radius: 50%; background: var(--suit); }

.hero-art { position: relative; width: min(100%, 31rem); margin-inline: auto; aspect-ratio: 1 / 0.95; display: grid; place-items: center; }
.hero-art img { position: relative; z-index: 2; width: 88%; filter: drop-shadow(0 14px 22px rgba(20, 40, 60, .22)); }
.floatcard { position: absolute; z-index: 1; width: 26%; aspect-ratio: 5 / 7; border-radius: 12%; background: var(--suit); border: .45rem solid #fff; box-shadow: var(--shadow); }
.fc1 { left: 0; top: 14%; --rot: -16deg; }
.fc2 { left: 11%; top: 2%; --rot: -7deg; }
.fc3 { right: 11%; top: 2%; --rot: 8deg; }
.fc4 { right: 0; top: 16%; --rot: 17deg; }
.floatcard { transform: rotate(var(--rot)); }
@media (prefers-reduced-motion: no-preference) {
  .floatcard { animation: deal .9s cubic-bezier(.2, .8, .2, 1) both; }
  .fc2 { animation-delay: .1s; } .fc3 { animation-delay: .2s; } .fc4 { animation-delay: .3s; }
  .hero-art img { animation: pop .7s cubic-bezier(.2, .8, .2, 1) both; }
}
@keyframes deal { from { opacity: 0; transform: translate(calc(var(--rot) * -2), 40%) rotate(0deg) scale(.7); } to { opacity: 1; transform: rotate(var(--rot)); } }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }

/* The deck */
.deck-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 52rem) { .deck-grid { grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); gap: 4.5rem; } }
.sample { position: relative; width: min(100%, 21rem); margin-inline: auto; padding: 1.25rem 0 0; }
.sample::before { content: ""; position: absolute; inset: 0 -1rem 1.5rem -1rem; border-radius: 1.5rem; background: var(--yellow-soft); transform: rotate(4deg); }
.sample::after { content: ""; position: absolute; inset: 1rem -.5rem 2rem -1.2rem; border-radius: 1.5rem; background: var(--green-soft); transform: rotate(-3deg); }
.sample img { position: relative; z-index: 1; transform: rotate(-2.5deg); filter: drop-shadow(0 16px 24px rgba(20, 40, 60, .2)); }
.sample figcaption { position: relative; z-index: 1; margin-top: .5rem; text-align: center; color: var(--muted); font-size: .9rem; }
.deck-copy h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); margin-bottom: 1rem; }
.deck-copy > p { font-size: 1.125rem; color: var(--muted); max-width: 36rem; }
.anatomy { margin-top: 1.5rem; display: grid; gap: .9rem; }
.anatomy li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .75rem; align-items: start; }
.anatomy li::before { content: ""; margin-top: .55rem; width: 1.1rem; height: 1.1rem; border-radius: .3rem; background: var(--suit); transform: rotate(-8deg); }
.anatomy strong { font-weight: 600; }

.suits-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin: clamp(3rem, 6vw, 4.5rem) 0 1.5rem; }
.suits-head h3 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); }
.suits-head p { color: var(--muted); margin: .4rem 0 0; }
.suits { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); }
.suit { background: var(--surface); border: 1px solid var(--rule); border-top: .5rem solid var(--suit); border-radius: var(--r); padding: 1.25rem 1.25rem 1.4rem; box-shadow: var(--shadow); }
.suit h4 { margin: 0 0 .5rem; font-family: var(--display); font-weight: 400; font-size: 1.2rem; line-height: 1.2; color: var(--sink); text-transform: uppercase; }
.suit p { margin: 0; color: var(--muted); font-size: 1rem; }
.suits-note { margin-top: 1.25rem; color: var(--muted); }

/* How it works */
.how { background: var(--surface); border-block: 1px solid var(--rule); }
.steps { display: grid; gap: 1.25rem; counter-reset: step; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.step { position: relative; padding: 1.5rem 1.5rem 1.6rem; border-radius: var(--r); background: var(--soft); counter-increment: step; }
.step::before { content: counter(step); display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; margin-bottom: 1rem; background: var(--suit); color: #26384a; font-family: var(--display); font-size: 1.35rem; }
.step h3 { font-size: 1.3rem; margin-bottom: .5rem; color: var(--sink); }
.step p { margin: 0; }

/* Principles band */
.band { background: var(--band); color: var(--on-band); }
.band .wrap p.eyebrow { color: color-mix(in srgb, var(--on-band) 75%, transparent); }
.band h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); margin-bottom: 2rem; max-width: 40rem; }
.principles { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.principle { border-top: .4rem solid var(--suit); padding-top: 1rem; }
.principle h3 { font-size: 1.2rem; margin-bottom: .5rem; line-height: 1.2; }
.principle p { margin: 0; color: color-mix(in srgb, var(--on-band) 88%, transparent); }

/* Tools */
.tools { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.tool { display: flex; flex-direction: column; gap: .75rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 1.4rem; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
@media (hover: hover) { .tool:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); } }
.tool-top { display: flex; align-items: center; gap: .9rem; }
.tool img { width: 3.5rem; height: 3.5rem; flex: none; }
.tool h3 { font-size: 1.25rem; }
.tag { display: inline-block; margin-top: .25rem; font-size: .8125rem; font-weight: 600; letter-spacing: .04em; color: var(--sink); background: var(--soft); border-radius: 999px; padding: .1rem .65rem; }
.tool p { margin: 0; color: var(--muted); flex: 1; }
.tool .btn { align-self: flex-start; }
.tool .tool-links { flex: none; display: flex; flex-wrap: wrap; gap: 0 1.25rem; font-size: .9375rem; }
.tool .tool-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.tool-more { background: var(--soft); border-style: dashed; box-shadow: none; justify-content: center; }
.tool-more h3 { color: var(--sink); }
.tools-links { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .75rem; }

/* About */
.about-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 52rem) { .about-grid { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 4rem; } }
.portrait { width: min(100%, 18rem); margin-inline: auto; position: relative; }
.portrait::before { content: ""; position: absolute; inset: -.6rem; border-radius: 50%; background: conic-gradient(var(--blue) 0 25%, var(--green) 0 50%, var(--yellow) 0 75%, var(--red) 0); }
.portrait img { position: relative; border-radius: 50%; border: .4rem solid var(--bg); aspect-ratio: 1; object-fit: cover; }
.about-copy h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); margin-bottom: 1.25rem; }
.about-copy p { font-size: 1.125rem; max-width: 40rem; }
.sig { font-family: var(--display); font-size: 1.1rem; margin-top: 1.25rem; }
.sig span { display: block; font-family: var(--body); font-size: .95rem; color: var(--muted); }

/* Join */
.join { padding-block: 0 clamp(3.5rem, 8vw, 6rem); }
.join-card { background: var(--green-soft); border: 1px solid var(--rule); border-left: .5rem solid var(--green); border-radius: 1.25rem; padding: clamp(1.5rem, 4vw, 3rem); display: grid; gap: 2rem; }
@media (min-width: 52rem) { .join-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; } }
.join-card h2 { font-size: clamp(1.75rem, 3.6vw, 2.4rem); margin-bottom: .8rem; }
.join-card p { margin: 0; color: var(--muted); }
.form { display: grid; gap: .9rem; }
.field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.field input { width: 100%; min-height: 3.25rem; padding: .7rem 1rem; font: 1rem var(--body); color: var(--ink); background: var(--surface); border: 2px solid var(--muted); border-radius: .7rem; }
.field input:focus { border-color: var(--primary); outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent); outline-offset: 0; }
.field .hint { font-weight: 400; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .9375rem; color: var(--muted); }
.status { min-height: 1.6rem; font-weight: 600; margin: 0; }
.status.ok { color: var(--green-ink); }
.status.err { color: var(--red-ink); }
.js-only { display: none; }
.js .js-only { display: block; }
.js .form.js-only { display: grid; }
.js .btn.js-only { display: inline-flex; }
.js .no-js-note { display: none; }

/* Footer */
.footer { border-top: 1px solid var(--rule); background: var(--surface); }
.footer .stripe { height: 6px; }
.footer-grid { display: grid; gap: 2rem; padding-block: 2.75rem 2rem; }
@media (min-width: 52rem) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer img { width: 6.5rem; margin-bottom: .6rem; }
.footer .tagline { font-family: var(--display); font-size: 1.2rem; margin: 0 0 .4rem; }
.footer h2 { font: 600 .8125rem/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .7rem; }
.footer ul { display: grid; gap: .1rem; }
.footer li a, .tool .tool-links a { min-width: 2.75rem; }
.footer li a { display: inline-flex; min-height: 2.75rem; align-items: center; color: var(--ink); }
.legal { border-top: 1px solid var(--rule); padding-block: 1.25rem 2rem; color: var(--muted); font-size: .9375rem; }
.legal a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* Simple content pages (privacy, thanks, 404) */
.page { padding-block: clamp(3rem, 7vw, 5rem); }
.page h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1.25rem; }
.page h2 { font-size: 1.4rem; margin: 2rem 0 .6rem; }
.page .prose { max-width: 42rem; }
.page .prose li { margin-bottom: .4rem; list-style: disc; margin-left: 1.25rem; }
.center { text-align: center; }
.center .prose { margin-inline: auto; }
.center img { width: min(14rem, 60%); margin: 0 auto 1.5rem; }

@media print { .site-header, .hero-art, .join { display: none; } }
