/* Adorably site. One family (Recursive), its Casual and Mono axes do the work. */

@font-face {
  font-family: "Recursive";
  src: url("/fonts/recursive-latin-full.woff2") format("woff2-variations"),
       url("/fonts/recursive-latin-full.woff2") format("woff2");
  font-weight: 300 1000;
  font-style: oblique 0deg 15deg;
  font-display: swap;
}

:root {
  --bg: #EFEEF8;
  --bg-band: #E4E2F3;
  --bg-raised: #FAF9FE;
  --ink: #221C4A;
  --ink-soft: #4E4875;
  --line: #C9C5E3;
  --wing: #0D7369;
  --wing-fill: #7FD9CC;
  --wing-soft: #D3EEEA;
  --glint: #C98A0E;
  --star: #E3A92B;
  --blush: #E77FA0;
  --ado-body: #FFFFFF;
  --term-bg: #221C4A;
  --term-ink: #ECEAF8;
  --term-dim: #A9A3D1;
  --term-accent: #7FD9CC;
  --term-star: #F3C54F;

  --font: "Recursive", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Recursive", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --casual: "CASL" 1, "MONO" 0, "CRSV" 1;
  --linear: "CASL" 0, "MONO" 0, "CRSV" 0.5;
  --code: "CASL" 0, "MONO" 1, "CRSV" 0;

  /* Scale: 1.25 from an 18px body. */
  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.40625rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem);
  --step-3: clamp(2.1rem, 1.4rem + 3.2vw, 3.6rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius-s: 6px;
  --radius-l: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15122B;
    --bg-band: #1C1838;
    --bg-raised: #221E44;
    --ink: #ECEAF8;
    --ink-soft: #B6B1D8;
    --line: #3B3669;
    --wing: #63D6C5;
    --wing-fill: #3FA99A;
    --wing-soft: #183F3C;
    --glint: #F3C54F;
    --star: #F3C54F;
    --blush: #E77FA0;
    --ado-body: #F4F2FF;
    --term-bg: #0E0B22;
    --term-ink: #ECEAF8;
    --term-dim: #9D97C6;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-variation-settings: var(--linear);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.55;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-variation-settings: var(--casual);
  line-height: 1.12;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h2 { font-size: var(--step-2); font-weight: 760; letter-spacing: -0.01em; }
h3 { font-size: var(--step-0); font-weight: 700; }
p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--wing); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }

:focus-visible {
  outline: 3px solid var(--wing);
  outline-offset: 3px;
  border-radius: 4px;
}

code {
  font-family: var(--mono);
  font-variation-settings: var(--code);
  font-size: 0.86em;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05em 0.3em;
  overflow-wrap: anywhere;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-s);
  z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */
.site-header { padding-block: 1.25rem; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  font-variation-settings: var(--casual);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.nav { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: var(--step--1); font-weight: 560; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.nav .nav-install { color: var(--wing); }
@media (max-width: 30rem) {
  .nav li:first-child { display: none; }
}

/* Hero */
.hero {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero { grid-template-columns: 1fr 1.05fr; }
}
.display {
  font-size: var(--step-3);
  font-weight: 820;
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin-bottom: 0.5em;
  max-width: 16ch;
}
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 34rem; font-weight: 380; }
@media (max-width: 40rem) {
  .lede { font-size: var(--step-0); }
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-top: 1.75rem; }

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-variation-settings: var(--casual);
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
}
.button:hover { background: var(--wing); color: var(--bg); }
.text-link { font-weight: 600; }

/* Terminal mock: the one loud thing on the page. */
.terminal { margin: 0; min-width: 0; }
.term-bar,
.term-body {
  background: var(--term-bg);
  color: var(--term-ink);
}
.term-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.8rem 1rem 0.2rem;
  border-radius: var(--radius-l) var(--radius-l) 0 0;
}
.term-bar span { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #4A4380; }
.term-body {
  font-family: var(--mono);
  font-variation-settings: var(--code);
  font-size: clamp(0.78rem, 0.72rem + 0.25vw, 0.9rem);
  line-height: 1.6;
  padding: 0.8rem clamp(0.9rem, 3vw, 1.5rem) 1.1rem;
  border-radius: 0 0 var(--radius-l) var(--radius-l);
  box-shadow: 0 30px 60px -30px rgba(34, 28, 74, 0.55);
}
.term-line { margin: 0 0 0.3rem; overflow-wrap: anywhere; }
.term-dim { color: var(--term-dim); }
.term-prompt { color: var(--term-accent); font-weight: 700; }
.term-status { margin: 1rem 0 0; color: var(--term-dim); border-top: 1px solid #3B3669; padding-top: 0.6rem; }
.glint { color: var(--term-star); }

.moment {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  margin-top: 1.1rem;
}
.ado-hero { width: clamp(4.5rem, 13vw, 7rem); height: auto; margin-top: -0.6rem; }
.bubble {
  position: relative;
  border: 1.5px solid var(--term-accent);
  border-radius: 14px;
  padding: 0.75rem 0.9rem 0.6rem;
  min-width: 0;
}
.bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 1.4rem;
  width: 14px;
  height: 14px;
  background: var(--term-bg);
  border-left: 1.5px solid var(--term-accent);
  border-bottom: 1.5px solid var(--term-accent);
  transform: rotate(45deg);
}
.bubble-line { margin: 0 0 0.25rem; padding-right: 3rem; }
.bubble-line strong { font-weight: 700; }
.bubble-actions { margin: 0.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; color: var(--term-accent); }
.bubble-actions span:not(:first-child) { color: var(--term-dim); }

.why { position: static; }
.why summary {
  position: absolute;
  right: 0.8rem;
  top: 0.65rem;
  cursor: pointer;
  color: var(--term-star);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  list-style: none;
}
.why summary::-webkit-details-marker { display: none; }
.why summary:focus-visible { outline-color: var(--term-star); }
.why p {
  margin: 0.7rem 0 0.1rem;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  background: rgba(243, 197, 79, 0.12);
  color: var(--term-ink);
}
.why[open] p { animation: why-open 220ms ease-out; }
@keyframes why-open {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.terminal figcaption {
  margin-top: 0.8rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* Ado */
.ado-wing { fill: var(--wing-fill); fill-opacity: 0.85; stroke: #221C4A; stroke-width: 2.5; }
.ado-wing-low { fill-opacity: 0.6; }
.ado-body { fill: var(--ado-body); stroke: #221C4A; stroke-width: 2.5; }
.ado-line { fill: none; stroke: #221C4A; stroke-width: 2.5; stroke-linecap: round; }
.terminal .ado-line:not(.ado-smile) { stroke: var(--term-ink); }
.terminal .ado-wing,
.terminal .ado-body { stroke: var(--term-bg); }
.terminal .ado-wing { fill: var(--term-accent); }
.ado-eye { fill: #221C4A; }
.ado-cheek { fill: var(--blush); opacity: 0.7; }
.ado-star { fill: var(--star); }
.terminal .ado-star { fill: var(--term-star); }
.ado-wings { transform-box: fill-box; transform-origin: center; }

/* The one orchestrated moment: Ado flies in, flaps, then rests still. */
@media (prefers-reduced-motion: no-preference) {
  .ado-hero { animation: ado-arrive 1.3s cubic-bezier(.2,.8,.3,1) 0.5s both; }
  .ado-hero .ado-wings { animation: ado-flap 0.25s steps(2, jump-none) 0.5s 6; }
  .ado-hero .ado-trail { animation: ado-trail 1.6s ease-out 0.5s both; }
  .bubble { animation: bubble-in 0.35s ease-out 1.6s both; }
}
@keyframes ado-arrive {
  0% { transform: translate(160%, -90%) rotate(14deg); opacity: 0; }
  30% { opacity: 1; }
  70% { transform: translate(-6%, 6%) rotate(-6deg); }
  100% { transform: none; }
}
@keyframes ado-flap {
  from { transform: scaleY(1); }
  to { transform: scaleY(0.72); }
}
@keyframes ado-trail {
  0%, 60% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes bubble-in {
  from { opacity: 0; transform: scale(0.96); transform-origin: left center; }
  to { opacity: 1; transform: none; }
}

/* Sections */
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.band { background: var(--bg-band); padding-block: clamp(3rem, 8vw, 6rem); }
.prose { max-width: 40rem; }
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 60rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.note { color: var(--ink-soft); font-size: var(--step--1); max-width: 44rem; }

/* Local flow diagram */
.flow { display: grid; gap: 0; }
.flow-zone {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-l);
  padding: 1.1rem 1.25rem 0.4rem;
  background: var(--bg-raised);
}
.flow-local { border-color: var(--wing); border-width: 2px; }
.flow-zone h3 { font-size: var(--step--1); color: var(--ink-soft); font-weight: 650; margin-bottom: 0.7rem; }
.flow-local h3 { color: var(--wing); }
.steps { margin: 0; padding-left: 1.4rem; font-size: 1rem; }
.steps li { margin-bottom: 0.7rem; padding-left: 0.2rem; }
.steps li::marker { font-variation-settings: var(--code); color: var(--ink-soft); }
.steps strong { font-variation-settings: var(--casual); font-weight: 700; }
.flow-wire {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding-block: 0.6rem;
  font-family: var(--mono);
  font-variation-settings: var(--code);
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.flow-wire span { display: inline-flex; align-items: center; gap: 0.4rem; }
.wire-in::before { content: "↑"; color: var(--ink-soft); }
.wire-out::before { content: "↓"; color: var(--ink-soft); }

/* What we send */
.table-scroll { overflow-x: auto; margin-block: 1.5rem; }
.sent-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1rem;
  line-height: 1.45;
}
.sent-table th {
  text-align: left;
  font-variation-settings: var(--casual);
  font-size: var(--step-1);
  font-weight: 760;
  padding: 0 1.25rem 0.8rem 0;
  width: 50%;
}
.sent-table th:first-child { color: var(--wing); }
.sent-table td {
  vertical-align: top;
  padding: 0.85rem 1.25rem 0.85rem 0;
  border-top: 1px solid var(--line);
}
.sent-table td:first-child { padding-left: 0.9rem; border-left: 3px solid var(--wing); }
.sent-table td:last-child { color: var(--ink-soft); }
.sent-table td:last-child::before { content: "✕ "; color: var(--ink-soft); }
@media (max-width: 40rem) {
  .sent-table, .sent-table tbody, .sent-table tr, .sent-table td { display: block; width: 100%; }
  .sent-table thead { display: none; }
  .sent-table tr { border-top: 1px solid var(--line); padding-block: 0.7rem; }
  .sent-table td { border-top: 0; padding: 0.2rem 0 0.2rem 0.9rem; }
  .sent-table td:last-child { border-left: 3px solid var(--line); margin-top: 0.3rem; }
  .sent-table td:first-child::before { content: "Sent: "; font-weight: 700; color: var(--wing); }
  .sent-table td:last-child::before { content: "Never sent: "; font-weight: 700; }
}

/* Quiet rules and commands */
.rules { padding-left: 1.2rem; margin: 1.25rem 0 0; }
.rules li { margin-bottom: 0.55rem; }
.rules li::marker { content: "◇  "; color: var(--wing); }
.commands { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.commands > div { padding-block: 1rem; border-bottom: 1px solid var(--line); display: grid; gap: 0.25rem; }
@media (min-width: 40rem) {
  .commands > div { grid-template-columns: 10rem 1fr; gap: 1rem; align-items: baseline; }
}
.commands dt code { font-size: 1rem; background: transparent; border: 0; padding: 0; color: var(--wing); font-weight: 650; }
.commands dd { margin: 0; color: var(--ink-soft); }

/* Perks pane mock */
.pane {
  margin: 0;
  background: var(--term-bg);
  color: var(--term-ink);
  border-radius: var(--radius-s);
  font-family: var(--mono);
  font-variation-settings: var(--code);
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 1rem 1.1rem 0.9rem;
}
.pane-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; border-bottom: 1px solid #3B3669; padding-bottom: 0.6rem; font-weight: 700; }
.pane-head .term-dim { font-weight: 400; }
.pane-rows { list-style: none; margin: 0; padding: 0; }
.pane-rows li {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: 0.15rem 0.8rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid #3B3669;
}
.pane-name { font-weight: 700; }
.pane-why { grid-column: 2 / -1; color: var(--term-dim); }
.ok { color: var(--term-accent); }
.label { font-size: 0.78rem; padding: 0.05rem 0.45rem; border-radius: 4px; align-self: start; white-space: nowrap; }
.label-paid { background: var(--term-star); color: #221C4A; font-weight: 700; }
.label-public { border: 1px solid var(--term-dim); color: var(--term-ink); }
.pane-foot { margin: 0.7rem 0 0; color: var(--term-dim); }
.pane figcaption {
  font-family: var(--font);
  font-variation-settings: var(--linear);
  color: var(--term-dim);
  margin-top: 0.8rem;
  font-size: var(--step--1);
}
@media (max-width: 30rem) {
  .pane-rows li { grid-template-columns: 1fr auto; }
  .pane-value, .pane-why { grid-column: 1 / -1; }
}

/* Install */
.install .cmd {
  font-family: var(--mono);
  font-variation-settings: var(--code);
  background: var(--term-bg);
  color: var(--term-ink);
  border-radius: var(--radius-s);
  padding: 1.1rem 1.25rem;
  margin: 0 0 1.5rem;
  overflow-x: auto;
  font-size: clamp(0.85rem, 0.75rem + 0.6vw, 1.15rem);
  max-width: 48rem;
}
.install .cmd code { background: none; border: 0; padding: 0; font-size: inherit; user-select: all; overflow-wrap: normal; white-space: pre; }
.install .cmd code::before { content: "› "; color: var(--term-accent); user-select: none; }
.cmd-inline { user-select: all; }

.band-sellers h2 { font-size: var(--step-1); }

/* Footer */
.site-footer { padding-block: 2.5rem 3rem; border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--ink-soft); }
.footer-row { display: grid; gap: 1rem; }
@media (min-width: 50rem) {
  .footer-row { grid-template-columns: 1fr auto; align-items: start; }
}
.footer-row p { max-width: 36rem; margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.footer-links a { color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); }

/* Legal pages */
.doc { padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 8vw, 6rem); }
.doc .prose { max-width: 42rem; }
.doc h1 { font-size: var(--step-3); font-weight: 820; letter-spacing: -0.02em; margin-bottom: 0.3em; }
.doc h2 { font-size: var(--step-1); margin-top: 2.2em; }
.doc .updated { color: var(--ink-soft); font-size: var(--step--1); margin-bottom: 2rem; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.5rem; }
.doc .table-scroll { margin-block: 1rem 1.5rem; }

/* 404 */
.lost { padding-block: clamp(3rem, 10vw, 7rem); display: grid; justify-items: start; gap: 0.5rem; }
.lost .ado-nap { width: 8rem; height: auto; margin-bottom: 1rem; }
.lost h1 { font-size: var(--step-3); font-weight: 820; letter-spacing: -0.02em; }
.ado-zz { font-family: var(--font); font-variation-settings: var(--casual); font-weight: 700; fill: var(--ink-soft); font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .why[open] p { animation: none; }
}

/* Antenna follows the page ink so it stays visible in dark mode; face lines stay dark on Ado's light body. */
.ado-line:not(.ado-smile) { stroke: var(--ink); }
.steps code { white-space: nowrap; }
