/* ============================================================================
   BrowserFleet design system
   ----------------------------------------------------------------------------
   Subject: we rent real machines — Apple Silicon Macs — as browsers, per minute.
   So the page is instrumentation, not brochure: readouts, capacity, hardware.

   Two accents on purpose. A single bright accent on near-black is the stock
   look; splitting the roles is what makes it read as considered:
     amber  = live state, hardware, the one primary action
     steel  = structure, links, secondary data
   Amber is never used for a link, steel never for a call to action.
   ========================================================================== */

:root {
  /* ground → raised, each step a touch bluer so panels read as lit, not grey */
  --ground:    #0b0f14;
  --surface:   #121820;
  --raised:    #1a222c;
  --rule:      #232d39;
  --rule-soft: #1a222c;

  --ink:       #e8edf4;
  --ink-2:     #b3c0cf;
  --muted:     #8695a6;
  --faint:     #5c6b7c;

  --amber:     #e8a343;
  --amber-dim: rgba(232, 163, 67, 0.13);
  --steel:     #7ba2c9;
  --steel-dim: rgba(123, 162, 201, 0.12);
  --live:      #4cc38a;
  /* text ON the amber fill. A token, not an override — a `:root[data-theme] .btn`
     rule would out-specify `.btn-ghost` and paint ghost labels invisible. */
  --on-amber:  #0b0f14;

  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Helvetica, Arial, sans-serif;

  /* type scale — 1.25 ratio, held to strictly */
  --t-xs:   11.5px;
  --t-sm:   13px;
  --t-base: 15.5px;
  --t-md:   17px;
  --t-lg:   21px;
  --t-xl:   27px;
  --t-2xl:  34px;

  /* spacing — 8px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --page: 1120px;
  --measure: 64ch;
  --radius: 7px;

  /* Emil: built-in easings are too weak — these have the punch that reads as intentional */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --shadow: 0 1px 0 rgba(255, 255, 255, 0.028) inset;
}

@media (prefers-color-scheme: light) {
  :root {
    --ground: #f7f9fb; --surface: #ffffff; --raised: #f0f4f8;
    --rule: #dde4ec; --rule-soft: #e8edf3;
    --ink: #0d141c; --ink-2: #35424f; --muted: #5b6b7b; --faint: #8496a6;
    --amber: #9a6212; --amber-dim: rgba(154, 98, 18, 0.09);
    --steel: #2f6392; --steel-dim: rgba(47, 99, 146, 0.09);
    --live: #16794c;
    --on-amber: #ffffff;
    --shadow: 0 1px 2px rgba(13, 20, 28, 0.05);
  }
}
/* the viewer's toggle must beat the OS preference in BOTH directions */
:root[data-theme="dark"] {
  --ground: #0b0f14; --surface: #121820; --raised: #1a222c;
  --rule: #232d39; --rule-soft: #1a222c;
  --ink: #e8edf4; --ink-2: #b3c0cf; --muted: #8695a6; --faint: #5c6b7c;
  --amber: #e8a343; --amber-dim: rgba(232,163,67,0.13);
  --steel: #7ba2c9; --steel-dim: rgba(123,162,201,0.12);
  --live: #4cc38a; --on-amber: #0b0f14;
  --shadow: 0 1px 0 rgba(255,255,255,0.028) inset;
}
:root[data-theme="light"] {
  --ground: #f7f9fb; --surface: #ffffff; --raised: #f0f4f8;
  --rule: #dde4ec; --rule-soft: #e8edf3;
  --ink: #0d141c; --ink-2: #35424f; --muted: #5b6b7b; --faint: #8496a6;
  --amber: #9a6212; --amber-dim: rgba(154,98,18,0.09);
  --steel: #2f6392; --steel-dim: rgba(47,99,146,0.09);
  --live: #16794c; --on-amber: #ffffff;
  --shadow: 0 1px 2px rgba(13,20,28,0.05);
}

/* ── base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
img, svg { max-width: 100%; }

.wrap { max-width: var(--page); margin-inline: auto; padding-inline: var(--s-5); }
.prose { max-width: var(--measure); }
.stack   { display: flex; flex-direction: column; gap: var(--s-4); align-items: flex-start; }
.stack-6 { display: flex; flex-direction: column; gap: var(--s-6); }
.stack-7 { display: flex; flex-direction: column; gap: var(--s-7); }

a { color: var(--steel); text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* :not(.btn) throughout — a bare `a:hover` out-specifies `.btn` and would repaint a
   button's label on hover, which is how you get an invisible call to action. */
a:not(.btn):hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 3px; border-radius: 3px; }

/* ── type roles ───────────────────────────────────────────────────────── */
.display {
  font-family: var(--mono);
  font-size: clamp(30px, 5.1vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.038em;
  font-weight: 600;
}
.h2 {
  font-family: var(--mono);
  font-size: clamp(var(--t-xl), 3vw, var(--t-2xl));
  line-height: 1.16;
  letter-spacing: -0.028em;
  font-weight: 600;
}
.h3 { font-size: var(--t-md); font-weight: 650; letter-spacing: -0.012em; line-height: 1.35; }
.lede { font-size: var(--t-md); color: var(--ink-2); max-width: 50ch; }
.body-muted { color: var(--muted); }
.small { font-size: var(--t-sm); }

/* eyebrows name a real thing on the page — never a decorative 01/02/03 */
.eyebrow {
  display: flex; align-items: center; gap: var(--s-3);
  font-family: var(--mono); font-size: var(--t-xs);
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--faint);
}
.eyebrow::after { content: ""; height: 1px; flex: 1; background: var(--rule); }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ── header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(10px) saturate(1.4);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5); padding-block: var(--s-3);
}
.brand {
  font-family: var(--mono); font-weight: 650; font-size: var(--t-base);
  letter-spacing: -0.035em; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: var(--s-2);
}
.brand .mark { color: var(--amber); }
.nav { display: flex; align-items: center; gap: var(--s-5); }
/* :not(.btn) matters — `.nav a` out-specifies `.btn`, so without it the header
   button would inherit the nav's muted colour and its label would vanish into the fill. */
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: var(--t-sm); transition: color 140ms ease; }
.nav a:not(.btn):hover, .nav a:not(.btn)[aria-current="page"] { color: var(--ink); }
@media (max-width: 820px) { .nav .opt { display: none; } }

/* ── buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--mono); font-size: var(--t-sm); font-weight: 650; letter-spacing: -0.01em;
  padding: 9px 15px; border-radius: var(--radius);
  background: var(--amber); color: var(--on-amber); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  /* never `all` — only the properties that actually move */
  transition: transform 160ms var(--ease-out), filter 160ms ease, border-color 160ms ease;
}
/* press feedback: the interface confirming it heard you */
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { filter: brightness(1.07); } }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { filter: none; border-color: var(--faint); }
}
.btn-lg { font-size: var(--t-base); padding: 12px 20px; }

/* ── sections ─────────────────────────────────────────────────────────── */
.section { padding-block: var(--s-9); border-top: 1px solid var(--rule); }
.section-tight { padding-block: var(--s-8); border-top: 1px solid var(--rule); }
.section-first { padding-block: var(--s-8) var(--s-9); border-top: 0; }

/* ── panel / readout: the signature element ───────────────────────────── */
.panel {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--raised);
  font-family: var(--mono); font-size: var(--t-xs); color: var(--muted); letter-spacing: 0.02em;
}
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--live); }
.live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); }
@media (prefers-reduced-motion: no-preference) {
  .live .dot { animation: breathe 2.6s ease-in-out infinite; }
}
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.32; } }

.readout { padding: 14px; font-family: var(--mono); font-size: var(--t-sm); line-height: 1.9; overflow-x: auto; }
.readout dl { display: grid; grid-template-columns: auto 1fr; gap: 1px var(--s-5); margin: 0; }
.readout dt { color: var(--faint); white-space: nowrap; }
.readout dd { margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.readout dd .hi { color: var(--amber); font-weight: 600; }
.panel-foot {
  border-top: 1px solid var(--rule); padding: 10px 14px;
  font-family: var(--mono); font-size: var(--t-xs); color: var(--muted);
}
.panel-foot b { color: var(--live); font-weight: 600; }

/* ── code ─────────────────────────────────────────────────────────────── */
pre {
  margin: 0; padding: var(--s-4);
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow-x: auto; font-family: var(--mono); font-size: var(--t-sm); line-height: 1.75;
}
code { font-family: var(--mono); font-size: 0.94em; }
p code, li code, td code { color: var(--ink-2); background: var(--raised); padding: 1px 5px; border-radius: 4px; }
.k { color: var(--amber); }
.s { color: var(--steel); }
.c { color: var(--faint); }

/* ── grids ────────────────────────────────────────────────────────────── */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: start; }
.hero-grid { display: grid; grid-template-columns: 1.04fr 0.96fr; gap: var(--s-7); align-items: start; }
@media (max-width: 900px) {
  .cols-2, .hero-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}

.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden;
}
.cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .cards, .cards-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }
.card p { color: var(--muted); font-size: var(--t-sm); }

/* ── fleet strip: the machines, as inventory ──────────────────────────── */
.fleet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
         background: var(--rule); border: 1px solid var(--rule);
         border-radius: var(--radius); overflow: hidden; }
@media (max-width: 900px) { .fleet { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .fleet { grid-template-columns: 1fr; } }
.fleet-cell { background: var(--surface); padding: var(--s-4) var(--s-5); display: flex; flex-direction: column; gap: 3px; }
.fleet-cell.is-flagship { background: var(--amber-dim); }
.fleet-cell .name { font-size: var(--t-sm); font-weight: 650; }
.fleet-cell .hw { font-size: var(--t-xs); color: var(--muted); font-family: var(--mono); }
.fleet-cell .price { font-family: var(--mono); font-size: var(--t-lg); letter-spacing: -0.03em;
                     font-variant-numeric: tabular-nums; margin-top: var(--s-2); }
.fleet-cell.is-flagship .price { color: var(--amber); }
.fleet-cell .per { font-size: var(--t-xs); color: var(--faint); font-family: var(--mono); }

/* ── tables ───────────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); min-width: 560px; background: var(--surface); }
th, td { text-align: left; padding: 12px var(--s-4); border-bottom: 1px solid var(--rule-soft); }
thead th {
  font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint); font-weight: 500; background: var(--raised);
}
tbody tr:last-child td { border-bottom: 0; }
td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; }
tr.is-flagship td { background: var(--amber-dim); }
.tag {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.07em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 3px; vertical-align: 1px;
  background: var(--amber-dim); color: var(--amber); margin-left: var(--s-2);
}
.tag-steel { background: var(--steel-dim); color: var(--steel); }

/* ── the rail: surfaces, in the order the fleet grows ─────────────────────
   A sequence device is only honest when the content really is a sequence — this
   one is: containers first, physical devices last, because that is the actual
   order of difficulty. The lit stops are running today; the rest are not. */
.rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
@media (max-width: 900px) { .rail { grid-template-columns: repeat(2, 1fr); row-gap: var(--s-6); } }
@media (max-width: 560px) { .rail { grid-template-columns: 1fr; row-gap: var(--s-5); } }

.stop { display: flex; flex-direction: column; gap: var(--s-3); padding-right: var(--s-5); }
/* the track: a hairline through the marker row, brighter where the fleet already runs */
.stop .track { position: relative; height: 9px; display: flex; align-items: center; }
.stop .track::before {
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--rule);
}
.stop.is-live .track::before { background: color-mix(in srgb, var(--amber) 55%, var(--rule)); }
.stop:last-child .track::before { right: 50%; }
.stop .marker {
  position: relative; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ground); border: 1.5px solid var(--rule); flex: none;
}
.stop.is-live .marker { background: var(--amber); border-color: var(--amber); }
.stop.is-next .marker { border-color: var(--amber); }

.stop .state {
  font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--faint);
}
.stop.is-live .state { color: var(--amber); }
.stop .name { font-size: var(--t-md); font-weight: 650; letter-spacing: -0.015em; }
.stop.is-planned .name { color: var(--ink-2); }
.stop p { font-size: var(--t-sm); color: var(--muted); padding-right: var(--s-4); }

/* ── footer ───────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--rule); padding-block: var(--s-6) var(--s-8); color: var(--faint); font-size: var(--t-sm); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; align-items: flex-start; }
.site-footer a:not(.btn) { color: var(--muted); text-decoration: none; }
.site-footer a:not(.btn):hover { color: var(--ink); }
.foot-cols { display: flex; gap: var(--s-7); flex-wrap: wrap; }
.foot-col { display: flex; flex-direction: column; gap: var(--s-2); }
.foot-col .label { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.12em;
                   text-transform: uppercase; color: var(--faint); }

/* ── page-load stagger ────────────────────────────────────────────────────
   Deliberate and once-only: a first impression, not a scroll gimmick. Small
   distance, short delays, opacity+transform only (GPU), and fully skipped for
   reduced motion. Content is visible by default — animation only subtracts. */
@media (prefers-reduced-motion: no-preference) {
  .enter { opacity: 0; transform: translateY(7px); animation: enter 480ms var(--ease-out) forwards; }
  .enter:nth-child(1) { animation-delay: 20ms; }
  .enter:nth-child(2) { animation-delay: 70ms; }
  .enter:nth-child(3) { animation-delay: 120ms; }
  .enter:nth-child(4) { animation-delay: 170ms; }
  .enter-panel { opacity: 0; transform: translateY(9px); animation: enter 560ms var(--ease-out) 150ms forwards; }
}
@keyframes enter { to { opacity: 1; transform: translateY(0); } }
