/*
 * Littlebird — littlebird.chat
 *
 * The same palette, type and mark as the app, so someone who arrives here from
 * the App Store recognises it. No framework and no build step: the whole site
 * is four static pages, and anything heavier would be for our benefit rather
 * than the reader's.
 */

:root {
  --canvas: #fbf8f3;
  --surface: #ffffff;
  --ink: #1f1b16;
  --ink-2: #6b6259;
  --ink-3: #9c9289;
  --line: #e9e2d8;
  --brand: #e2603a;
  --brand-wash: #fdf0ea;

  --measure: 34rem;
  --radius: 18px;
  --radius-lg: 26px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #141210;
    --surface: #1e1b18;
    --ink: #f7f3ec;
    --ink-2: #a79c90;
    --ink-3: #6f665c;
    --line: #332d27;
    --brand: #ff8158;
    --brand-wash: #2e1d16;
  }
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
               "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* A very soft wash, the web cousin of the app's ambient layer. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 12% -8%, color-mix(in oklab, var(--brand) 16%, transparent), transparent 60%),
    radial-gradient(48rem 34rem at 92% 6%, color-mix(in oklab, #7c6cc4 14%, transparent), transparent 62%),
    radial-gradient(52rem 38rem at 50% 108%, color-mix(in oklab, #5fa88a 12%, transparent), transparent 60%);
}

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* ---------------------------------------------------------------- layout */

.wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.75rem 0;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.lockup svg { width: 2rem; height: 2rem; color: var(--brand); }

/* Bradley Hand is on every Apple device, which is where this app lives; the
   fallbacks keep the name handwritten elsewhere and legible everywhere. */
.wordmark {
  font-family: "Bradley Hand", "Bradley Hand ITC", "Segoe Script",
               "Brush Script MT", cursive;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.masthead nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.masthead nav a { color: var(--ink-2); text-decoration: none; }
.masthead nav a:hover, .masthead nav a[aria-current] { color: var(--brand); }

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 3.5rem 0 4rem;
  text-align: center;
}

.hero .mark { width: 7.5rem; height: 7.5rem; color: var(--brand); }

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 1.25rem 0 0.75rem;
  text-wrap: balance;
}

.hero p {
  color: var(--ink-2);
  font-size: 1.15rem;
  max-width: var(--measure);
  margin: 0 auto;
  text-wrap: pretty;
}

/* ----------------------------------------------------------------- cards */

/* Six chips, in a grid rather than a wrapping flex row. Flex breaks wherever
   the width runs out, and there is a band of screen sizes where that leaves a
   single chip stranded on its own line. A fixed column count steps 6 -> 3 -> 2,
   all of which divide six evenly. */
.chips {
  display: grid;
  grid-template-columns: repeat(6, 5.5rem);
  justify-content: center;
  /* Artwork, not prose: opt out of the reading measure the section applies to
     its other children, or the row is squeezed to 34rem and breaks badly. */
  max-width: none;
  gap: 1.1rem 0.9rem;
  margin: 2.75rem 0 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 42rem) {
  .chips { grid-template-columns: repeat(3, 5.5rem); }
}

@media (max-width: 21rem) {
  .chips { grid-template-columns: repeat(2, 5.5rem); }
}

.chip {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-2);
  line-height: 1.3;
}

.chip .art {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  margin-bottom: 0.45rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08),
              0 8px 18px color-mix(in oklab, var(--accent) 22%, transparent);
  background:
    radial-gradient(120% 120% at 22% 14%, color-mix(in oklab, var(--accent) 100%, white 26%), transparent 62%),
    linear-gradient(140deg,
      color-mix(in oklab, var(--accent) 100%, white 10%),
      color-mix(in oklab, var(--accent) 100%, black 34%));
}

.chip .art svg { width: 44%; height: 44%; fill: #fff; opacity: 0.95; }

/* --------------------------------------------------------------- section */

section { padding: 3.25rem 0; }
section + section { border-top: 1px solid var(--line); }

h2 {
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

h3 { font-size: 1.05rem; margin: 2rem 0 0.4rem; }

p, li { color: var(--ink-2); }
section > p, section > ul, section > ol { max-width: var(--measure); }
li { margin-bottom: 0.35rem; }

.lede { font-size: 1.1rem; color: var(--ink); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
}

.step .n {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--brand-wash);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.step h3 { margin: 0 0 0.3rem; font-size: 1.05rem; color: var(--ink); }
.step p { margin: 0; font-size: 0.95rem; }

.note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
  max-width: var(--measure);
}

.note p { margin: 0; }
.note strong { color: var(--ink); }

/* ------------------------------------------------------------------ legal */

.legal { padding-bottom: 4rem; }
.legal h1 { font-size: 2.2rem; letter-spacing: -0.02em; margin: 2rem 0 0.35rem; }
.legal .updated { color: var(--ink-3); font-size: 0.9rem; margin: 0 0 2.5rem; }
.legal h2 { font-size: 1.25rem; margin: 2.5rem 0 0.6rem; }
.legal p, .legal li { max-width: var(--measure); }
.legal table { border-collapse: collapse; margin: 1rem 0; max-width: var(--measure); width: 100%; }
.legal th, .legal td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-2);
  vertical-align: top;
}
.legal th { color: var(--ink); font-weight: 600; }

/* ----------------------------------------------------------------- footer */

footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3.5rem;
  color: var(--ink-3);
  font-size: 0.9rem;
}

footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

footer .links a { color: var(--ink-2); text-decoration: none; }
footer .links a:hover { color: var(--brand); }
footer p { color: var(--ink-3); margin: 0; max-width: var(--measure); font-size: 0.9rem; }

/* The masthead has five links and a wordmark; below about a phone's width they
   need their own line rather than being pushed off the edge. */
@media (max-width: 32rem) {
  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.25rem 0 1rem;
  }
  .masthead nav { gap: 1.1rem; font-size: 0.92rem; flex-wrap: wrap; }
  .hero { padding: 2.25rem 0 3rem; }
  .hero .mark { width: 6rem; height: 6rem; }
  section { padding: 2.5rem 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .chip .art { transition: transform 0.25s ease; }
  .chip:hover .art { transform: translateY(-3px); }
}
