/* Elliott's App Service. Navy ink on warm paper for the company; an app's card wears that app's
   own colors (Auntie Ruth's Mahjong: felt, tile cream and gold; Winder: camera slate and teal). */

:root {
  --bg: #faf6ec;
  --bg-alt: #f1eadb;
  --surface: #fffdf7;
  --ink: #14213d;
  --ink-soft: #4b5670;
  --line: #ddd3bd;
  --tint: rgb(20 33 61 / 0.07);
  --accent: #1b4a8f;
  --accent-hover: #12356b;
  --rule: #b8862b;
  --focus: #1b4a8f;
  --footer: #14213d;

  --navy: #14213d;
  --cream: #f5eedc;
  --gold: #e8bf6e;

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.3vw, 2.3rem);
  --step-3: clamp(2.5rem, 1.5rem + 4.6vw, 4.9rem);
  --gutter: 20px;
  --radius: 14px;
  color-scheme: light dark;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1524;
    --bg-alt: #121c30;
    --surface: #17233b;
    --ink: #f1ead8;
    --ink-soft: #b3bccf;
    --line: #2a3752;
    --tint: rgb(241 234 216 / 0.08);
    --accent: #a9c3f5;
    --accent-hover: #d2defa;
    --rule: #e8bf6e;
    --focus: #e8bf6e;
    --footer: #090f1b;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--sans);
}
main { flex: 1; }
::selection { background: var(--gold); color: var(--navy); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 0.12em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
[id] { scroll-margin-top: 24px; }
.wrap { width: min(1080px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 10; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; color: var(--bg); }

/* Header: the nav drops under the sign on a phone. */
.site-header { border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 16px; min-height: 72px; padding-block: 12px; }
.wordmark { display: inline-flex; }
.wordmark img { width: auto; height: 44px; }
.site-header nav { display: flex; gap: 2px; margin-inline: -12px; }
.site-header nav a { color: var(--ink-soft); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-size: var(--step--1); font-weight: 600; }
.site-header nav a:hover { color: var(--ink); background: var(--tint); }

/* Small capitals with a gold rule: the eyebrow over the headline, and a section's label. */
.eyebrow, .label { display: flex; align-items: center; gap: 14px; font: 600 var(--step--1)/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.eyebrow::before, .eyebrow::after, .label::before { content: ""; flex: none; width: 36px; height: 2px; background: var(--rule); }
.eyebrow { justify-content: center; margin: 0 0 24px; }
.label { margin-bottom: 22px; }
@media (max-width: 520px) {
  .eyebrow { letter-spacing: 0.1em; }
  .eyebrow::before, .eyebrow::after { display: none; }
}

/* Hero: centered, like a shop sign. */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); text-align: center; }
.hero h1 { font-size: var(--step-3); line-height: 1.03; letter-spacing: -0.02em; max-width: 13ch; margin-inline: auto; }
.hero h1 em { font-style: normal; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 0.09em; text-underline-offset: 0.1em; text-decoration-skip-ink: none; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 44ch; margin: 26px auto 0; text-wrap: balance; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .actions { justify-content: center; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px; border-radius: 12px; font: 600 var(--step-0)/1.2 var(--sans); text-align: center; text-decoration: none; transition: background-color 120ms ease-out, transform 120ms ease-out; }
.button:active { transform: scale(0.98); }
.button-solid { background: var(--ink); color: var(--bg); }
.button-solid:hover { background: var(--accent-hover); color: var(--bg); }
.button-quiet { color: var(--ink); box-shadow: inset 0 0 0 1.5px currentColor; }
.button-quiet:hover { background: var(--tint); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }

/* Sections */
.band { padding: clamp(56px, 7vw, 88px) 0; }
.band-alt { background: var(--bg-alt); }
.apps { padding-bottom: clamp(56px, 7vw, 88px); }
.band h2 { font-size: var(--step-2); }
.section-head { max-width: 60ch; margin-bottom: 32px; }
.section-head p { color: var(--ink-soft); margin: 12px 0 0; }

/* An app's card, in that app's colors in both themes. */
.app {
  --card: #0b2e2b;
  --card-hi: #134239;
  --card-ink: #f5e8c9;
  --card-soft: #bfd0c4;
  --card-accent: #e8bf6e;
  --card-edge: rgb(232 191 110 / 0.2);
  --card-chip: rgb(232 191 110 / 0.34);
  display: grid;
  gap: 22px 48px;
  padding: clamp(24px, 4.5vw, 52px);
  border-radius: 22px;
  color: var(--card-ink);
  background: radial-gradient(120% 140% at 85% 0%, var(--card-hi), var(--card) 62%);
  box-shadow: 0 28px 50px -30px rgb(8 24 28 / 0.7), inset 0 0 0 1px var(--card-edge);
}
.winder {
  --card: #1d343b;
  --card-hi: #2b4c55;
  --card-ink: #eaf6f3;
  --card-soft: #b7cfcb;
  --card-accent: #5fe3cf;
  --card-edge: rgb(95 227 207 / 0.22);
  --card-chip: rgb(95 227 207 / 0.38);
}
.app + .app { margin-top: 20px; }
.app ::selection { background: var(--card-accent); color: var(--card); }
.app :focus-visible { outline-color: var(--card-accent); }
.app-icon { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 10px 24px -8px rgb(0 0 0 / 0.55); margin-bottom: 22px; }
.status { margin: 0 0 8px; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--card-accent); }
.app h3 { font-size: var(--step-2); }
.app-lede { font: 500 var(--step-1)/1.35 var(--serif); margin: 10px 0 0; }
.app-about { color: var(--card-soft); max-width: 46ch; margin: 0; }
.facts { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--step--1); }
.facts li { padding: 5px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--card-chip); }
.app .button-solid { background: var(--card-accent); color: var(--card); }
.app .button-solid:hover { background: var(--card-ink); color: var(--card); }
.app .button-quiet { color: var(--card-ink); box-shadow: inset 0 0 0 1.5px rgb(245 232 201 / 0.45); }
.app .button-quiet:hover { background: rgb(245 232 201 / 0.08); color: var(--card-ink); }
.app-shot { margin: 14px 0 0; }
.app-shot img { width: 100%; border: clamp(4px, 0.8vw, 8px) solid #05110f; border-radius: clamp(14px, 2.6vw, 28px); box-shadow: 0 0 0 1px rgb(245 232 201 / 0.16), 0 26px 46px -24px rgb(0 0 0 / 0.85); }
.app-shot figcaption { margin-top: 14px; font-size: var(--step--1); color: var(--card-soft); }
@media (min-width: 920px) {
  .app { grid-template-columns: 1fr 1fr; align-items: end; }
  .app-shot { grid-column: 1 / -1; }
  .app-slim { grid-template-columns: auto 1fr 1fr; align-items: center; }
  .app-slim .app-icon { margin-bottom: 0; }
}

.rules { display: grid; gap: 28px; }
.rules > div { padding-top: 20px; border-top: 2px solid var(--rule); }
.rules h3 { font-size: var(--step-1); margin-bottom: 10px; }
.rules p { color: var(--ink-soft); margin: 0; }
@media (min-width: 820px) { .rules { grid-template-columns: repeat(3, 1fr); gap: 36px; } }

.split { display: grid; gap: 32px; }
.split h2 { margin-bottom: 16px; }
.split p { color: var(--ink-soft); max-width: 46ch; }
.split p:last-child { margin-bottom: 0; }
.split .label { margin-bottom: 14px; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; } }
.email { font: 600 var(--step-1)/1.3 var(--serif); overflow-wrap: anywhere; }
.help { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.help li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; }
.help img { width: 44px; height: 44px; border-radius: 10px; flex: none; }

/* Reading pages */
.document { max-width: 68ch; padding-block: clamp(48px, 7vw, 88px); }
.document h1 { font-size: clamp(2.2rem, 1.6rem + 3vw, 3.6rem); margin-bottom: 18px; }
.document h2 { font-size: var(--step-1); margin: 40px 0 12px; }
.document .intro { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); }
.document .dated { font-size: var(--step--1); color: var(--ink-soft); }
.document li { margin-bottom: 0.5em; }

/* Footer: the sign, lit at night. */
.site-footer { background: var(--footer); color: #b9c2d6; padding: 44px 0 48px; font-size: var(--step--1); }
.footer-row { display: grid; gap: 18px; }
.footer-sign { width: auto; height: 92px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--gold); }
.site-footer :focus-visible { outline-color: var(--gold); }
.fine { margin: 0; max-width: 80ch; }
