/* charli-site — the pages read fine with this file missing; it only makes them
   look like Charli. Lekton carries the hero and headings, Inconsolata the body. */

:root {
  color-scheme: light;
  --ink: #16121f;
  --ink-soft: #4a4458;
  --paper: #fffdf8;
  --paper-2: #f6f1ff;
  --line: #e3dcf2;
  --violet: #5b2bd6;
  --magenta: #e0338f;
  --amber: #ffb14a;
  --cyan: #2fd1c8;
  --gutter: 16px;
  --measure: 72ch;
}

html { font-family: Inconsolata, Menlo, Consolas, 'Courier New', monospace; color: var(--ink); background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0; overflow-x: hidden; }
main, nav.languages { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
h1, h2, h3, .hero-line { font-family: Lekton, 'Courier New', monospace; line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); margin: 2.4rem 0 0.8rem; }
h3 { font-size: clamp(1.2rem, 3.5vw, 1.5rem); margin: 1.8rem 0 0.5rem; }
p, li, td, th { font-size: 1.05rem; line-height: 1.55; }
a { color: var(--violet); }

/* Hero: the Crystal Ball's argument, big, glossy, slightly off the horizontal. */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 9vw, 6rem) var(--gutter) clamp(3rem, 10vw, 7rem);
  background:
    radial-gradient(120% 90% at 10% 0%, var(--magenta) 0%, transparent 55%),
    radial-gradient(90% 80% at 100% 100%, var(--cyan) 0%, transparent 50%),
    linear-gradient(135deg, var(--violet) 0%, #2a1466 60%, #12092e 100%);
  color: #fff;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 45%);
  pointer-events: none;
}
.hero-text { max-width: min(92vw, 56rem); margin: 0 auto; transform: rotate(-4deg); transform-origin: left top; position: relative; z-index: 1; }
.hero h1, .hero-line { max-width: 14ch; }
.hero h1 { font-size: clamp(2.4rem, 9vw, 5.6rem); font-weight: 700; margin: 0 0 1.2rem; text-shadow: 0 2px 0 rgba(0,0,0,0.25), 0 12px 40px rgba(0,0,0,0.35); }
/* The languages you can learn: one per line under the lead, smaller and indented, the commas kept. */
.hero-l2s { display: block; margin-top: 0.35em; padding-inline-start: 1.2em; font-size: 0.5em; line-height: 1.25; font-weight: 400; }
.hero-l2 { display: block; }
.hero-line { font-size: clamp(1.35rem, 4.6vw, 2.6rem); font-weight: 700; margin: 0.35rem 0; opacity: 0.95; }
.hero-line:nth-of-type(1) { color: var(--amber); }
.hero-line:nth-of-type(2) { color: #fff; }
.hero-line:nth-of-type(3) { color: var(--cyan); }
.hero-line:nth-of-type(4) { color: #ffd7ec; }
@media (max-width: 480px) { .hero-text { transform: none; max-width: none; } }

/* The chalk Charli: the watermark every Crystal Ball cell carries, chalk-white
   on the gradient, right of the text, tilted with it; off the right edge on purpose. */
.hero::before {
  content: '';
  position: absolute;
  right: -6vw; top: 50%;
  width: clamp(280px, 46vw, 640px); aspect-ratio: 1;
  transform: translateY(-50%) rotate(6deg);
  background: url('/site/charli-chalk.png') center / contain no-repeat;
  opacity: 0.22;
  pointer-events: none;
}
@media (max-width: 640px) { .hero::before { width: 62vw; right: -18vw; top: auto; bottom: -8vw; transform: rotate(6deg); opacity: 0.16; } }

/* The twin store badges follow the reader (owner 2026-11-11): fixed in the upper
   right from 1100px, where the prose measure leaves the side clear, and a slim
   fixed bar along the bottom below that, where the bottom pair drops out. */
/* (.hero-install .hero-badges outranks the general .badges rules declared below) */
.hero-install { position: fixed; z-index: 20; }
.hero-install .hero-badges { gap: 0.6rem; }
@media (min-width: 1100px) {
  .hero-install { top: clamp(1.2rem, 3vw, 2.2rem); right: clamp(1.2rem, 4vw, 3.5rem); }
  .hero-install .hero-badges { justify-content: flex-end; }
  .hero-install .hero-badges img { height: 48px; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.35)); }
  /* the language offer sits above the hero; keep the pair clear of it */
  body:has(> .lang-offer) .hero-install { top: calc(clamp(1.2rem, 3vw, 2.2rem) + 2.6rem); }
}
@media (max-width: 1099px) {
  .hero-install { left: 0; right: 0; bottom: 0; padding: 0.5rem var(--gutter) calc(0.5rem + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0,0,0,0.08); }
  /* one row always: the pair shrinks with the screen rather than wrapping into two */
  .hero-install .hero-badges { justify-content: center; flex-wrap: nowrap; gap: 0.5rem; }
  .hero-install .hero-badges img { height: clamp(30px, 9vw, 40px); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .install > .badges { display: none; }
}

/* Prose */
main > h2:first-child { margin-top: 2rem; }
/* The pedagogy page's title sits outside <main>; it takes the same measure and gutter. */
header.page-title { max-width: var(--measure); margin: 0 auto; padding: 2.4rem var(--gutter) 0; }
header.page-title h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0; }
header.page-title + main > h2:first-child, header.page-title + main > h3:first-child { margin-top: 1.6rem; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.2rem 0; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; min-width: 560px; width: 100%; background: #fff; }
th, td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--paper-2); font-weight: 600; }
tr > td:first-child, tr > th:first-child { font-weight: 600; color: var(--ink-soft); width: 10.5rem; }
tr > td:last-child { background: #fbf8ff; }

/* Journey */
#journey { margin: 2.6rem 0; padding: 1.4rem var(--gutter); background: var(--paper-2); border-radius: 16px; }
#journey h2 { margin-top: 0; }
.journey-pick ul { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.journey-pick a { display: inline-block; padding: 0.4rem 0.8rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
#journey figure { margin: 0; }
#journey figure:not(:target):not(:first-of-type) { display: none; }
#journey figure:has(~ figure:target) { display: none; }
#journey video { display: block; width: 100%; max-width: 360px; height: auto; aspect-ratio: 9 / 16; background: #000; border-radius: 14px; }
#journey figcaption { color: var(--ink-soft); margin-top: 0.4rem; }

/* Install: the foot of the page is centred (owner 2026-11-11). */
.install { margin: 2.6rem 0 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); text-align: center; }
.badges { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.install > .badges { justify-content: center; }
.badges a { display: inline-block; line-height: 0; }
.badges img { height: 60px; width: auto; }
.install-links { color: var(--ink-soft); }

/* Language row */
nav.languages { padding-top: 1rem; padding-bottom: 2.5rem; text-align: center; }
nav.languages ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1rem; }

/* The language offer: one line at the top, added by site.js when the browser's
   language is another rendered L1. */
.lang-offer { display: flex; align-items: center; justify-content: center; gap: 0.8rem; padding: 0.55rem var(--gutter); background: var(--ink); color: #fff; font-size: 0.95rem; }
.lang-offer a { color: var(--amber); text-decoration: none; font-weight: 600; }
.lang-offer a:hover { text-decoration: underline; }
.lang-offer button { background: none; border: 0; color: #fff; font-size: 1.3rem; line-height: 1; padding: 0 0.3rem; cursor: pointer; opacity: 0.8; }
.lang-offer button:hover { opacity: 1; }
nav.languages a { text-decoration: none; }
nav.languages [aria-current] { font-weight: 600; }

[dir="rtl"] .hero-text { transform-origin: right top; transform: rotate(4deg); }
@media (max-width: 480px) { [dir="rtl"] .hero-text { transform: none; } }
