/* ───────────────────── Skybridge - Design Tokens ─────────────────────
   Editorial / craft direction inspired by the hand-drawn logo.
   Cream paper background, deep charcoal ink, bridge-red as the
   single hot accent, sky-blue for secondary info.
   ─────────────────────────────────────────────────────────────────── */

:root {
  /* Brand */
  --bridge-red: #C14432;
  --bridge-red-hover: #A63529;
  --bridge-red-soft: #F2DDD8;
  --sky-blue: #2E6FB5;
  --sky-blue-soft: #DCE9F7;

  /* Bold light - default. Crisp white paper, near-black ink, hot red. */
  --paper: #FFFFFF;        /* main bg */
  --paper-2: #F6F2EA;      /* alt section bg - warm off-white */
  --paper-3: #EBE4D5;      /* divider tone */
  --ink: #0A0907;          /* primary text - near black */
  --ink-2: #1F1B16;
  --muted: #5A544B;
  --muted-2: #8C857A;
  --line: rgba(10, 9, 7, 0.10);
  --line-strong: rgba(10, 9, 7, 0.22);

  /* Type */
  --f-serif: "Instrument Serif", "Times New Roman", serif;
  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Sizing */
  --max-w: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 14px;
  --radius-sm: 8px;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);

  /* Inverted panels (hero metrics, featured tier) — fixed dark surface in both themes */
  --surface-invert: #0A0907;
  --surface-invert-fg: #F7F2E9;
  --surface-invert-muted: rgba(247, 242, 233, 0.55);
  --surface-invert-line: rgba(247, 242, 233, 0.18);
}

/* ────── Theme: technical-dark (alternative dark mode) ────── */
[data-theme="technical"] {
  --paper: #0B0E12;        /* deep blue-black */
  --paper-2: #11161C;
  --paper-3: #1A2029;
  --ink: #F2EEE7;
  --ink-2: #C9C3B8;
  --muted: #8F8A82;
  --muted-2: #5F5A52;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.18);
  --bridge-red: #FF6A52;
  --bridge-red-hover: #FF8472;
  --bridge-red-soft: rgba(255,106,82,0.14);
  --sky-blue: #6AA9F0;
  --sky-blue-soft: rgba(106,169,240,0.14);

  --surface-invert: #151B24;
  --surface-invert-fg: #F2EEE7;
  --surface-invert-muted: rgba(242, 238, 231, 0.58);
  --surface-invert-line: rgba(255, 255, 255, 0.12);
}

/* ────── Reset & base ────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img {
  max-width: 100%;
  display: block;
  -webkit-user-drag: none;
  user-drag: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ────── Layout utilities ────── */
.wrap { max-width: var(--max-w); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section--alt { background: var(--paper-2); }
.hairline { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ────── Type ────── */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bridge-red);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px; background: currentColor;
  display: inline-block;
}
.kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.h-display {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
.h-display em {
  font-style: italic;
  color: var(--bridge-red);
}
.h1 {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}
.h1 em { font-style: italic; color: var(--bridge-red); }
.h2 {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 0;
}
.h3 {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0;
}
.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 60ch;
}
.body-muted { color: var(--muted); }

/* ────── Buttons ────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn--primary {
  background: var(--bridge-red);
  color: #F7F2E9;
}
.btn--primary:hover { background: var(--bridge-red-hover); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.btn--ink {
  background: var(--ink);
  color: var(--paper);
}
.btn--ink:hover { background: var(--ink-2); transform: translateY(-1px); }
.btn--sm { padding: 9px 16px; font-size: 14px; }

.btn .arrow {
  width: 16px; height: 16px;
  transition: transform .2s var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }

/* ────── Chip / tag ────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--paper);
  letter-spacing: 0.02em;
}
.chip--red {
  color: var(--bridge-red);
  border-color: rgba(193, 68, 50, 0.3);
  background: var(--bridge-red-soft);
}
.chip--blue {
  color: var(--sky-blue);
  border-color: rgba(46, 111, 181, 0.3);
  background: var(--sky-blue-soft);
}

/* ────── Card ────── */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover { border-color: var(--line-strong); }

/* ────── Pull-quote serif accents ────── */
.serif { font-family: var(--f-serif); }
.mono { font-family: var(--f-mono); }
.italic { font-style: italic; }
.tabular { font-variant-numeric: tabular-nums; }

/* ────── Brush underline (SVG accent for headline emphasis) ────── */
.brush {
  position: relative;
  display: inline-block;
}
.brush::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -6%;
  height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'><path d='M2 8 C 30 2, 70 11, 110 5 S 180 9, 198 4' fill='none' stroke='%23C14432' stroke-width='3' stroke-linecap='round'/></svg>") no-repeat center/100% 100%;
  pointer-events: none;
}

/* ────── Grid utilities ────── */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ────── Image placeholder (striped, monospace caption) ────── */
.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--paper-2) 0 12px,
      var(--paper-3) 12px 24px
    );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow: hidden;
}

/* ────── Reveal on view ────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ────── Focus ring ────── */
:focus-visible {
  outline: 2px solid var(--bridge-red);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ────── Scrollbar (subtle) ────── */
html { scroll-behavior: smooth; }
::selection { background: var(--bridge-red); color: var(--paper); }
