/* Preload Tech — preload.tech
   Tokens follow the Preload Tech masterbrand v0.1 (Blueprint). */

@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin.woff2") format("woff2-variations"), url("fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin-ext.woff2") format("woff2-variations"), url("fonts/dm-sans-latin-ext.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #191a17;
  --raised: #23241f;
  --raised-hover: #2c2d28;
  --line: #34352f;
  --line-strong: #4a4b45;
  --paper: #f5f2e8;
  --body: #cfccc2;
  --muted: #b5b2a8;
  --blueprint: #6fa8ff;
  --blueprint-deep: #2f5fc4;
  --flare: #ff5936;
  --flare-bg: #3a221b;
  --beacon: #f0b44c;
  --beacon-bg: #3a311d;
  --quiz: #a78bfa;
  --quiz-bg: #2c2440;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 1200px;
  --radius: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--paper); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--blueprint); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--blueprint); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
@media (max-width: 480px) { .wrap { padding-inline: 16px; } }

.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.03em; color: var(--muted); text-transform: uppercase; margin: 0; }

/* Header */
.site-header .wrap {
  padding-block: 22px;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; min-height: 44px; }
.brand img { height: 26px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; font-size: 15px; font-weight: 600; }
.nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--blueprint); }
@media (max-width: 640px) {
  .nav { gap: 4px 18px; }
  .nav .nav-section { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 24px; border-radius: 8px;
  font-weight: 700; text-decoration: none; border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--blueprint); color: var(--ink); }
.btn-primary:hover { background: #8fbcff; color: var(--ink); }
.btn-ghost { border-color: var(--line-strong); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); color: var(--paper); }
.btn-sm { height: 44px; padding: 0 16px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero .wrap {
  padding-block: 96px 104px;
  display: flex; flex-wrap: wrap; gap: 48px; align-items: center; justify-content: space-between;
}
.hero-copy { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.hero h1 {
  margin: 0; font-size: clamp(44px, 7vw, 96px); font-weight: 930; line-height: 1; letter-spacing: -0.04em;
  font-variation-settings: "opsz" 40;
}
.hero h1 .accent { color: var(--blueprint); }
.lede { margin: 0; font-size: 19px; color: var(--body); max-width: 600px; }
.hero-art { flex: 0 1 340px; display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 320px; height: auto; }
@media (max-width: 720px) {
  .hero .wrap { padding-block: 56px 72px; }
  .hero-art { order: -1; justify-content: flex-start; }
  .hero-art img { max-width: 120px; }
}

/* Sections */
.section { border-top: 1px solid var(--line); }
.section > .wrap { padding-block: 88px; display: flex; flex-direction: column; gap: 36px; }
@media (max-width: 720px) { .section > .wrap { padding-block: 64px; } }
.section-head { display: flex; flex-direction: column; gap: 10px; }
.section h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); font-weight: 850; letter-spacing: -0.03em; line-height: 1.1; }

/* Products */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 20px; }
.product {
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 18px;
}
.product-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.product-icon { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 0 0 1px var(--line); }
.pill { font-size: 13px; font-weight: 700; border-radius: 99px; padding: 4px 12px; white-space: nowrap; }
.pill-flare { color: var(--flare); background: var(--flare-bg); }
.pill-beacon { color: var(--beacon); background: var(--beacon-bg); }
.pill-iris { color: var(--quiz); background: var(--quiz-bg); }
.product h3 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.product p { margin: 0; color: var(--body); }
.product-body { display: flex; flex-direction: column; gap: 8px; }
.product-link {
  margin-top: auto; font-weight: 700; text-decoration: underline; text-underline-offset: 4px;
  min-height: 44px; display: inline-flex; align-items: center; align-self: flex-start;
}
.product-link.flare { color: var(--flare); }
.product-link.beacon { color: var(--beacon); }
.product-link.iris { color: var(--quiz); }
.product-link:hover { text-decoration-thickness: 2px; }
.product.next { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.product.next img { width: 44px; height: auto; opacity: 0.35; }
.product.next h3 { color: var(--body); }
.product.next p { color: var(--muted); }
.status { margin-top: auto; font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* Principles */
.rules {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  margin: 0; padding: 0; list-style: none;
}
.rule { background: var(--ink); padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.rule code { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.rule h3 { margin: 0; font-size: 20px; font-weight: 750; }
.rule p { margin: 0; color: var(--body); }

/* Account */
.account .wrap { flex-direction: row !important; flex-wrap: wrap; gap: 48px !important; align-items: center; }
.account-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.account-copy p:not(.eyebrow) { margin: 0; font-size: 18px; color: var(--body); max-width: 520px; }
.account-copy .btn { align-self: flex-start; }
.switcher {
  flex: 1 1 380px; min-width: 0; max-width: 460px;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 6px;
}
.switcher-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 14px; border-bottom: 1px solid var(--line); gap: 12px; }
.switcher-head img { height: 18px; width: auto; }
.switcher-head span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.switcher-who { font-size: 13px; color: var(--muted); padding: 10px 8px 4px; }
.switcher-row { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: 10px; }
.switcher-row.active { background: var(--raised-hover); }
.switcher-row img, .switcher-row .slot { width: 36px; height: 36px; border-radius: 8px; flex: none; }
.switcher-row .slot { border: 1px dashed var(--line-strong); }
.switcher-row .name { flex: 1; font-weight: 700; }
.switcher-row .name.dim { font-weight: 600; color: var(--muted); }
.switcher-row .act { font-size: 13px; color: var(--muted); }
.switcher-row .act.beacon { color: var(--beacon); }
.switcher-row .act.mono { font-family: var(--mono); font-size: 12px; }

/* Company */
.company .wrap { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 40px !important; }
.company h2 { font-size: clamp(28px, 3.4vw, 36px); }
.company p:not(.eyebrow) { margin: 0; color: var(--body); font-size: 17px; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 15px; align-content: start; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts .mono { font-family: var(--mono); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  padding-block: 36px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  font-size: 14px; color: var(--muted);
}
.site-footer .left { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.site-footer img { height: 18px; width: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.site-footer nav a:hover { color: var(--paper); }

/* Prose pages (privacy, 404) */
.prose .wrap { max-width: 760px; padding-block: 72px 96px; }
.prose h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 900; letter-spacing: -0.035em; line-height: 1.05; margin: 12px 0 24px; }
.prose h2 { font-size: 22px; font-weight: 750; margin: 40px 0 10px; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--body); }
.prose ul { padding-left: 20px; }
.prose a { color: var(--blueprint); }
