/* ══════════════════════════════════════════
   FIRE SITE KIT: THE STORY LOOK
   Every Fire web page is drawn in this look (fire-design skill, "Fire
   Websites: The Story Look"): fire.co's front page, ported from its
   public/css/landing-story.css (MarketingSite2.0, b3e4f6f, 2026-11-13).
   Light text on dark greys that lean blue, with Fire red. Headlines and
   figures in the serif, their accent in red italic; eyebrows, numbers, and
   chips in the mono, small, in capitals, widely tracked; everything else in
   Inter. Words sit in a 1216px column. Linked after the kit's other
   stylesheets and before theme.css; class="story" on <body> sets its
   colours over the page, the header and footer included.

   It changes the words and the ground, not the controls: buttons, fields,
   the header, and the footer are the kit's. A console in the story keeps
   console.css's tables, modals, and rows; this sets their titles in Inter
   at 20px and their grounds in the story's colours.
   ══════════════════════════════════════════ */

/* The serif and the mono, from the kit's folder: no third-party request.
   A browser fetches a face only for a page that sets something in it. */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(../fonts/source-serif-4-latin.woff2) format('woff2');
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url(../fonts/source-serif-4-latin-italic.woff2) format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(../fonts/jetbrains-mono-latin.woff2) format('woff2');
}

/* The story's colours, set over the kit's dark tokens. Its two greys of text
   lean blue as its grounds do, and read at 4.5:1 even on a raised surface:
   --text-2 5.9:1, --text-3 4.9:1. The text is a warm white. Dark only. */
.story {
  --bg: #151618;
  --surface: #1b1b1f;
  --surface-2: #303034;
  --story-raised: #202124;
  --border: #303032;
  --border-hover: #7a7a7e;
  --text: #ebe9e9;
  --text-2: #999da7;
  --text-3: #8a8e99;
  --accent: #d61d3e;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --story-column: 1216px;
  --story-gutter: var(--space-8);
  /* The room above and below each numbered part (fire.co's, 2026-11-08). */
  --story-part-top: 180px;
  --story-part-bottom: 240px;

  background: var(--bg);
  color: var(--text);
}

/* Every line is a paragraph, which base.css narrows; the parts set their
   own measures. :where() keeps this rule below theirs. */
:where(.story) p {
  max-width: none;
}

/* ── Parts ─────────────────────────────────── */

/* A part runs the window's width; its words sit in the column. */
.story-part {
  padding: var(--story-part-top) var(--story-gutter) var(--story-part-bottom);
  scroll-margin-top: var(--site-nav-height);
}

.story-part__inner {
  max-width: var(--story-column);
  margin: 0 auto;
}

.story-part-tint {
  background: var(--surface);
}

/* A working page (a console's): the column, with room under the header but
   none of a numbered part's 180px. */
.story-page {
  max-width: calc(var(--story-column) + 2 * var(--story-gutter));
  margin: 0 auto;
  padding: var(--space-16) var(--story-gutter) var(--space-24);
}

/* ── The opening ───────────────────────────
   The first screen: Fire's mark in red, the largest headline, its line, and
   what follows (figures on a front page, the one form on a door). */
.story-opening {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--space-24) var(--story-gutter);
  scroll-margin-top: var(--site-nav-height);
}

.story-opening .story-part__inner {
  width: 100%;
}

.story-opening__mark {
  margin-bottom: var(--space-4);
}

.story-opening__mark .fire-mark {
  width: 88px;
  height: 88px;
  color: var(--accent);
}

/* ── Words ─────────────────────────────────── */

/* "01 · HOW IT WORKS", after a small red square. */
.story-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-6);
  font: 500 var(--text-xs)/1.4 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.story-eyebrow::before {
  content: "";
  flex: none;
  width: var(--space-2);
  height: var(--space-2);
  border-radius: 2px;
  background: var(--accent);
}

.story-eyebrow a {
  color: inherit;
}

.story-headline {
  max-width: 20em;
  margin: 0 0 var(--space-2);
  font: 400 clamp(36px, 4.5vw, 60px)/1.08 var(--serif);
  letter-spacing: -0.02em;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* A few words of a headline, usually the last; never the whole of it. */
.story-headline em {
  font-style: italic;
  color: var(--accent);
}

.story-headline-opening {
  max-width: 14em;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1.02;
}

/* A headline within a part or a step: the card's size. */
.story-headline-small {
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.15;
}

.story-lede {
  max-width: 680px;
  margin: var(--space-4) 0 var(--space-12);
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-2);
}

/* A part with no line under its headline keeps the same room before what
   follows. */
.story-part .story-headline + :not(.story-lede) {
  margin-top: var(--space-10);
}

/* A status: grey on a soft grey, in the mono. Its word says the state, so
   colour is never the only sign. */
.story-chip {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-2);
  font: 500 10px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
}

/* ── Figures ───────────────────────────────── */

.story-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(224px, 1fr));
  gap: var(--space-8);
  margin: var(--space-4) 0 0;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}

.story-figure {
  min-width: 0;
}

.story-figure__value {
  font: 400 clamp(40px, 5vw, 64px)/1 var(--serif);
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* A figure's unit beside it, in the mono, small, as it is written: "2.5
   eUSD", "1216 px". */
.story-figure__unit {
  margin-left: var(--space-2);
  font: 500 var(--text-sm)/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--text-2);
}

.story-figure__caption {
  max-width: 18em;
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text-2);
}

/* ── Cards ─────────────────────────────────── */

.story-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--story-raised);
}

/* A card that is a link: the whole card answers the pointer and the keyboard. */
a.story-card {
  color: inherit;
  text-decoration: none;
  transition: border-color var(--duration-fast, 150ms) ease-out;
}

a.story-card:hover {
  border-color: var(--border-hover);
}

a.story-card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.story-card__n {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.14em;
  color: var(--text-3);
}

.story-card__title {
  font: 400 24px/1.2 var(--serif);
  letter-spacing: -0.01em;
  color: var(--text);
}

.story-card__body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
}

/* ── Rows ──────────────────────────────────── */

.story-rows {
  margin: 0;
  border-top: 1px solid var(--border);
}

.story-row {
  display: grid;
  grid-template-columns: minmax(160px, 288px) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: baseline;
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--border);
}

.story-row__title {
  margin: 0;
  font: 400 24px/1.2 var(--serif);
  color: var(--text);
}

.story-row__body {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* ── The close ─────────────────────────────── */

.story-close {
  padding: var(--space-24) var(--story-gutter);
  border-top: 1px solid var(--border);
  text-align: center;
}

.story-headline-close {
  max-width: none;
  margin: 0 0 var(--space-4);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
}

.story-close__words {
  margin: 0 0 var(--space-8);
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--text-2);
}

.story-close__actions {
  justify-content: center;
}

/* ── A product's front door in the story ──────
   The hero (hero.css) as a product's own front door opens: Fire's mark in
   red beside the product's name in the serif's italic, the largest line on
   the page, the mark sized in ems of the name so the two scale together;
   then its promise in the serif, its last words the accent, in red italic;
   then its actions. First set for Fire Box's page on fire.co, and the Fire
   Blackbox's front door, beside the hero cube (hero-cube.css). */
.story .hero__name {
  display: flex;
  align-items: flex-end;
  gap: var(--space-4);
  margin: 0;
  font: italic 400 clamp(44px, 7vw, 112px)/0.9 var(--serif);
  letter-spacing: 0;
  color: var(--text);
  white-space: nowrap;
}

.story .hero__name .fire-mark {
  flex: none;
  width: 0.56em;
  height: 0.56em;
  margin-bottom: 0.08em;
  color: var(--accent);
}

.story .hero__promise {
  max-width: 14em;
  margin: var(--space-6) 0 var(--space-10);
  font: 400 clamp(28px, 3.2vw, 44px)/1.15 var(--serif);
  letter-spacing: -0.02em;
  color: var(--text);
}

.story .hero__promise em {
  font-style: italic;
  color: var(--accent);
}

/* ── A console in the story ────────────────────
   A control panel takes the story's colours and its three families, never
   its layout: no opening, no giant headline, no long lede. console.css's
   parts keep their shape; their titles take Inter at 20px (owner,
   2026-11-18; the serif at 24px until then), a menu's group labels the
   mono, and the grounds are the story's (they read --surface and
   --border). */
.story .console-table__title,
.story .console-modal__title,
.story .console-panel__title {
  font: 400 20px/1.2 var(--sans);
  letter-spacing: -0.01em;
}

.story.console-shell .console-head h1 {
  font: 400 32px/1.15 var(--serif);
  letter-spacing: -0.01em;
}

.story .console-side__label {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.14em;
}

/* A table's head (its title, filters, and buttons) on the raised ground
   too, over the rows (owner, 2026-11-17). */
.story .console-table__head {
  background: var(--story-raised);
}

/* A table of facts' names, down its first column, on the raised ground
   as well (owner, 2026-11-17). */
.story table.console-data.facts tbody th {
  background: var(--story-raised);
}

/* ── Smaller screens ───────────────────────── */

@media (max-width: 1024px) {
  .story-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* On a phone the parts close in, the cards and rows stack. */
@media (max-width: 768px) {
  .story {
    --story-gutter: var(--space-5);
  }

  .story-part {
    padding: var(--space-16) var(--story-gutter);
  }

  .story-page {
    padding: var(--space-10) var(--story-gutter) var(--space-16);
  }

  .story-opening {
    min-height: 0;
    padding: var(--space-24) var(--story-gutter) var(--space-16);
  }

  .story-lede {
    margin-bottom: var(--space-8);
    font-size: var(--text-lg);
  }

  .story-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }

  .story-close {
    padding: var(--space-16) var(--story-gutter);
  }
}
