:root {
  /* Space-black gunmetal base — deep neutral darks, red reserved for the Cylon eye */
  --bg: #0b0d11;
  --bg-alt: #10131a;
  --surface: #161a22;
  --border: #272d38;
  --text: #e9edf2;
  --text-dim: #a2aab6;
  --accent: #ff3b4e;
  --accent-soft: rgba(255, 59, 78, 0.12);
  --ember: #ff7a45;
  --gold: #f2b84b;
  --chrome-hi: #f6f8fb;
  --chrome-mid: #aeb6c2;
  --chrome-lo: #4d5560;
  --max: 1080px;
}

@font-face {
  font-family: "Battlestar";
  src: url("fonts/Battlestar.ttf") format("truetype");
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

code {
  font-family: Consolas, "SF Mono", monospace;
  font-size: 0.92em;
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 13, 17, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(190, 200, 215, 0.45), transparent) 1;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
/* Wordmark — Cylon scanner sweeps inside the letters */
.brand-name {
  position: relative;
  display: inline-block;
  font-family: "Battlestar", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image:
    radial-gradient(ellipse 50% 60% at 50% 50%, #ffb9ad 0%, #ff2231 42%, rgba(255, 34, 49, 0) 100%),
    radial-gradient(ellipse 52% 130% at 50% 50%, #dc1440 0%, #a80d2f 42%, #520718 74%, #1d0309 92%, #0e0105 100%);
  background-size: 30% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: -25% 0, 0 0;
  animation: text-scan 2.86s ease-in-out infinite;
}
@keyframes text-scan {
  0%   { background-position: 0% 0, 0 0; }
  50%  { background-position: 100% 0, 0 0; }
  100% { background-position: 0% 0, 0 0; }
}
/* Faint ambient halo that just kisses the edges of the letterforms */
.brand-name::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -5%;
  aspect-ratio: 1;
  height: 115%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at center,
    rgba(255, 45, 60, 0.18) 0%,
    rgba(255, 45, 60, 0.08) 45%,
    rgba(255, 45, 60, 0) 70%);
  filter: blur(3px);
  pointer-events: none;
  animation: halo-scan 2.86s ease-in-out infinite;
}
@keyframes halo-scan {
  0%   { left: 10%; }
  50%  { left: 90%; }
  100% { left: 10%; }
}

/* Logo mark — polished Cylon chrome tile, gunmetal psi glyph */
.logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(165deg,
    #ffffff 0%,
    #dde2e9 16%,
    #a8b0bb 34%,
    #626a76 50%,
    #343a44 62%,
    #59616c 80%,
    #9aa2ad 94%,
    #cfd5dd 100%);
  border: 1px solid rgba(214, 222, 232, 0.55);
  box-shadow:
    0 0 12px rgba(170, 195, 230, 0.35),
    0 0 22px rgba(255, 59, 78, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -6px 12px rgba(0, 0, 0, 0.5);
}
/* Passing specular sheen — light sweeping over the armor */
.logo-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(115deg,
    transparent 32%,
    rgba(255, 255, 255, 0.0) 40%,
    rgba(255, 255, 255, 0.75) 48%,
    rgba(255, 255, 255, 0.0) 56%,
    transparent 64%);
  background-size: 300% 100%;
  background-repeat: no-repeat;
  background-position: 120% 0;
  animation: chrome-sheen 60s ease-in-out infinite;
  pointer-events: none;
}
/* Sheen rests for ~58s, then sweeps across in ~1.5s */
@keyframes chrome-sheen {
  0%, 97%    { background-position: 120% 0; }
  99.5%, 100% { background-position: -75% 0; }
}
/* Psi built from the font's own U (bowl) and I (stem) outlines, composed as one SVG.
   Masks let each letter's stripe gap punch through the other where they intersect. */
.logo-mark .psi-svg {
  display: block;
  height: 23px;
  width: auto;
  color: #dc1440;
}
.logo-mark.xl .psi-svg { height: 58px; }
.logo-mark.xl {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  box-shadow:
    0 0 34px rgba(175, 200, 235, 0.4),
    0 0 90px rgba(255, 59, 78, 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.95),
    inset 0 -14px 28px rgba(0, 0, 0, 0.55);
}
.logo-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 30px;
}
/* Lens flare anchored to the hero tile's upper-left corner:
   bright core + four-point star + long anamorphic horizontal streak */
.logo-mark.xl::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 150px;
  left: 7px;
  top: 7px;
  transform: translate(-50%, -50%);
  z-index: 2;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 1) 0%, rgba(222, 236, 255, 0.5) 4%, rgba(210, 228, 255, 0) 10%),
    linear-gradient(0deg, transparent 49.4%, rgba(255, 255, 255, 0.85) 50%, transparent 50.6%) 50% 50% / 34% 100% no-repeat,
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.9) 50%, transparent 51%) 50% 50% / 100% 90% no-repeat,
    radial-gradient(ellipse 50% 3% at 50% 50%, rgba(185, 213, 255, 0.85) 0%, rgba(170, 205, 255, 0.25) 55%, transparent 100%);
  filter: blur(0.4px);
  animation: glint 60s ease-in-out infinite;
  pointer-events: none;
}
/* Flare brightens in sync with the sheen sweep once a minute */
@keyframes glint {
  0%, 96.5%, 100% { opacity: 0.45; transform: translate(-50%, -50%) scale(0.82); }
  98.25%          { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.hero-wordmark {
  font-size: clamp(2.6rem, 7.5vw, 4.6rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.nav-links a {
  color: var(--text-dim); text-decoration: none; margin-left: 24px;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--text); }

/* Nav brand (icon + wordmark) appears only after the hero lockup scrolls out of view */
.nav .brand {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}
.nav.scrolled .brand {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Hero */
.hero {
  padding: 96px 0 72px;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(165, 190, 230, 0.09), transparent),
    radial-gradient(ellipse 45% 35% at 50% 8%, rgba(255, 59, 78, 0.06), transparent),
    var(--bg);
  text-align: center;
}
/* Chrome headline text — bright crown, dark horizon, lifted base */
.hero h1, .section h2 {
  background-image: linear-gradient(180deg,
    #ffffff 0%,
    #e3e8ee 36%,
    #b7bfc9 49%,
    #737d8a 53%,
    #aeb6c1 62%,
    #dfe4ea 82%,
    #f4f6f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.lede {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 760px;
  margin: 0 auto 16px;
}
.lede strong { color: var(--text); }
.hero-badges { margin-top: 28px; }
.badge {
  display: inline-block;
  border: 1px solid rgba(174, 182, 194, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 45%),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 16px;
  margin: 4px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.button {
  display: inline-block;
  padding: 13px 32px;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid rgba(190, 200, 215, 0.45);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 50%),
    linear-gradient(180deg, #a80d2f, #520718);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 18px rgba(220, 20, 64, 0.22);
  transition: filter 0.15s ease;
}
.button:hover { filter: brightness(1.18); color: var(--text); }

/* Sections */
.section { padding: 80px 0; }
.section.alt {
  background: var(--bg-alt);
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(190, 200, 215, 0.4), transparent) 1;
}
.section h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.section h3 { margin: 36px 0 14px; font-size: 1.25rem; }
.section p { color: var(--text-dim); max-width: 820px; margin-bottom: 14px; }
.section p strong, .section li strong { color: var(--text); }
.kicker {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

/* Cards */
.grid { display: grid; gap: 20px; margin-top: 28px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.card h3, .card h4 { margin: 0 0 10px; }
.card p { margin: 0; font-size: 0.98rem; }
.card.small p { font-size: 0.92rem; }
.card a { color: var(--accent); text-decoration: none; }
.card a:hover { text-decoration: underline; }

/* Perf table */
.perf {
  width: 100%;
  max-width: 640px;
  border-collapse: collapse;
  margin: 10px 0 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.perf th, .perf td {
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.perf th {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.perf tr:last-child td { border-bottom: none; }
.perf .gold { color: var(--gold); font-weight: 600; }
.footnote { font-size: 0.85rem; color: var(--text-dim); opacity: 0.8; max-width: 640px; }

/* Steps */
.steps { margin: 8px 0 8px 22px; color: var(--text-dim); max-width: 820px; }
.steps li { margin-bottom: 16px; padding-left: 6px; }
.steps em { color: var(--text); font-style: normal; font-weight: 600; }

/* Callout */
.callout {
  margin-top: 28px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
}
.callout p { margin: 0; }

/* Footer */
.footer {
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(190, 200, 215, 0.4), transparent) 1;
  padding: 48px 0;
  text-align: center;
}
.footer p { color: var(--text-dim); margin-top: 10px; }
.footer .fine { font-size: 0.78rem; opacity: 0.7; max-width: 620px; margin: 16px auto 0; }

@media (max-width: 640px) {
  .nav-links a { margin-left: 14px; font-size: 0.85rem; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 56px 0; }
  .logo-mark.xl::after { display: none; }
}
