/* ==========================================================================
   plannibble.com — the site outside the product.
   The tokens are the product's (DESIGN.md, "The Working Drawing"), set at
   marketing scale. One orange: the critical path, blocked, a cost to the
   date, and the logo's piece. Nothing else.
   ========================================================================== */

:root {
  --paper: #F4EFE6;
  --raised: #FBF8F2;
  --sunken: #E9E1D3;
  --ink: #26231F;
  --ink-2: #5C554C;
  --ink-3: #857C70;
  --hair: #D8CFC0;
  --signal: #BF4008;
  --signal-fill: #FAEEE6;
  --invert-bg: #26231F;
  --invert-ink: #F4EFE6;
  --piece: #FF5A1F;

  --sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 3.4vw, 56px);
  --max: 1440px;
  --bar: 64px;
  --split-gap: clamp(28px, 5vw, 96px);

  /* The type roles. Every size outside the drawing and the product's own
     list forms is one of these, or a claim or section head. Bold is kept
     for headings; a phrase that leads a line steps up to ink at 500. */
  --t-label: 12px;
  --t-small: 14px;
  --t-body: 17px;
  --t-lead: clamp(19px, 1.6vw, 22px);
  --t-h3: clamp(22px, 2vw, 27px);
  --t-list: clamp(28px, 3vw, 44px);
  --ease: cubic-bezier(0.2, 0, 0, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B1917;
    --raised: #24211E;
    --sunken: #2E2A26;
    --ink: #EDE6DA;
    --ink-2: #9A9184;
    --ink-3: #7A7165;
    --hair: #403A33;
    --signal: #EE6B3F;
    --signal-fill: #33231B;
    --invert-bg: #EDE6DA;
    --invert-ink: #1B1917;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #1B1917;
  --raised: #24211E;
  --sunken: #2E2A26;
  --ink: #EDE6DA;
  --ink-2: #9A9184;
  --ink-3: #7A7165;
  --hair: #403A33;
  --signal: #EE6B3F;
  --signal-fill: #33231B;
  --invert-bg: #EDE6DA;
  --invert-ink: #1B1917;
  color-scheme: dark;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 16px); scrollbar-color: var(--ink-3) var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
img, svg { display: block; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
button { font: inherit; color: inherit; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* a date inside running words: Plex Mono's wide space, closed to Archivo's */
.d { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.94em; word-spacing: -0.4em; white-space: nowrap; font-weight: 500; }
.or { color: var(--signal); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* ---------- type ---------- */

.claim {
  font-weight: 800;
  font-stretch: 118%;
  font-size: clamp(54px, 7vw, 108px);
  line-height: 0.92;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.h2 {
  font-weight: 800;
  font-stretch: 116%;
  font-size: clamp(34px, 4.1vw, 56px);
  line-height: 1.0;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.h3 {
  font-weight: 700;
  font-stretch: 112%;
  font-size: var(--t-h3);
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.deck { font-size: var(--t-lead); line-height: 1.45; color: var(--ink-2); max-width: 34em; text-wrap: pretty; }
.deck b, .deck strong, .body b, .body strong { color: var(--ink); font-weight: 500; }
.body { color: var(--ink-2); max-width: 34em; text-wrap: pretty; }
.body + .body { margin-top: 0.9em; }
/* a Label names a thing: a step, a line, a section, a field. Never a kicker. */
.label { font-size: var(--t-label); font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-2); line-height: 1.25; }

/* ---------- controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 18px;
  border: 0; border-radius: 2px;
  background: var(--invert-bg); color: var(--invert-ink);
  font-family: var(--sans); font-size: 15px; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: opacity 140ms linear;
}
.btn:hover { opacity: 0.86; }
.btn.lg { height: 54px; padding: 0 26px; font-size: 17px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }
.btn.ghost:hover { opacity: 1; box-shadow: inset 0 0 0 1.5px var(--ink); }

/* words with a rule under them, on a 44px target */
.tb {
  display: inline-flex; align-items: center; min-height: 44px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 16px; color: var(--ink-2);
  text-decoration: underline; text-decoration-color: var(--ink-3);
  text-decoration-thickness: 1px; text-underline-offset: 5px;
}
.tb:hover { color: var(--ink); text-decoration-color: var(--ink); }
.tb.lead { color: var(--ink); font-weight: 700; text-decoration-color: var(--ink); text-decoration-thickness: 2px; }
.tb.quiet { font-size: 14px; }
.tb.lg { font-size: 17px; }

kbd {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 1px 5px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink-2);
}

/* ---------- the bar ---------- */

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; }
.skip:focus { top: 10px; }

.bar {
  position: sticky; top: 0; z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
}
.bar .wrap { display: flex; align-items: center; gap: 28px; height: var(--bar); }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; min-height: 44px; }
.brand svg { height: 24px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  font-size: 15px; color: var(--ink-2); text-decoration: none;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.bar .end { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.bar .end .tb { font-size: 15px; }
.menu-btn { display: none; min-width: 44px; justify-content: center; }

@media (max-width: 900px) {
  .bar .wrap { gap: 12px; }
  .nav, .bar .end .signin, .bar .end .theme { display: none; }
  .menu-btn { display: inline-flex; }
  .bar .end .btn { height: 44px; padding: 0 14px; font-size: 14px; }
  .bar.open .sheet-menu { display: block; }
}
@media (max-width: 380px) {
  .bar .end .btn { display: none; }
}
.sheet-menu {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--raised);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--hair);
}
.sheet-menu ul { list-style: none; padding: 8px var(--gutter) 16px; }
.sheet-menu li + li { border-top: 1px solid var(--hair); }
.sheet-menu a, .sheet-menu button.tb {
  display: flex; align-items: center; min-height: 52px; font-size: 18px; color: var(--ink); text-decoration: none; width: 100%;
}
.sheet-menu button.tb { text-decoration: none; }

/* ---------- sections ---------- */

.sec { padding: clamp(72px, 9vw, 136px) 0; border-top: 1px solid var(--hair); }
/* A section's head and what follows it share one split, so the note
   beside a heading starts on the same line as the column under it. */
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--split-gap); align-items: end; margin-bottom: clamp(36px, 4.5vw, 64px); }
.sec-head .body { padding-bottom: 6px; }
@media (max-width: 900px) { .sec-head { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- the bite glyph, as type ---------- */

.glyph { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.12em; overflow: visible; }

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

.foot { border-top: 1px solid var(--hair); padding: 56px 0 40px; color: var(--ink-2); font-size: 15px; }
.foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot .wm { color: var(--ink); display: inline-flex; min-height: 44px; align-items: center; }
.foot .wm svg { height: 20px; width: auto; }
.foot .note { margin-top: 10px; max-width: 30em; font-size: var(--t-small); }
.foot h2 { font-size: var(--t-label); font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.foot ul { list-style: none; }
.foot li a, .foot li button { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-size: 15px; }
.foot li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot .fine { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--hair); display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; font-size: var(--t-small); }
@media (max-width: 760px) {
  .foot .cols { grid-template-columns: 1fr 1fr; }
  .foot .cols > :first-child { grid-column: 1 / -1; }
}

/* ---------- the close ---------- */

.close { padding: clamp(88px, 11vw, 168px) 0; border-top: 2px solid var(--ink); }
.close .claim { font-size: clamp(44px, 6.4vw, 96px); max-width: 11em; }
.close .acts { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; margin-top: 36px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; scroll-behavior: auto !important; }
}
