/* ═══════════════════════════════════════════════════════
   BlueList.ai — shared design system
   Dark editorial "war-room" aesthetic.
   Fraunces (display) · Instrument Sans (body) · JetBrains Mono (data)
   ═══════════════════════════════════════════════════════ */

:root {
  /* Core palette — dark editorial war-room */
  --ink: #05122A;
  --ink-2: #0A1A34;
  --ink-3: #0F2344;
  --ink-4: #16305A;
  --rule: rgba(244, 239, 230, .12);
  --rule-strong: rgba(244, 239, 230, .22);

  /* Cream / paper */
  --cream: #F4EFE6;
  --cream-2: #ECE5D6;
  --cream-ink: #1A1612;

  /* Signal blues */
  --signal: #4FA8FF;
  --signal-2: #2E7FFB;
  --signal-3: #1E5ADF;
  --signal-glow: rgba(79, 168, 255, .35);

  /* Accents */
  --desert: #E4B57A;   /* warm amber, Arizona earth */
  --rust: #C6562E;     /* sparingly, for live/alert */
  --kelly: #3DD598;    /* status/live indicators */

  /* Type */
  --display: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-feature-settings: "ss01", "ss02";
  color: rgba(244, 239, 230, .78);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.55;
}

::selection { background: var(--signal); color: var(--ink); }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ─────────── GRAIN + GRID BACKDROP (atmosphere) ─────────── */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: .06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ─────────── NAV ─────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(5, 18, 42, .92) 0%, rgba(5, 18, 42, .78) 100%);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: -.02em;
}
.logo img {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1) drop-shadow(0 0 18px rgba(79, 168, 255, .35));
  transition: filter .4s var(--ease-out);
}
.logo:hover img { filter: brightness(0) invert(1) drop-shadow(0 0 24px rgba(79, 168, 255, .6)); }
.logo-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 16px var(--signal-glow);
  animation: pulse 2.6s var(--ease-in-out) infinite;
}
.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a:not(.nav-cta) {
  position: relative;
  color: rgba(244, 239, 230, .55);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .02em;
  transition: color .3s var(--ease-out);
}
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.nav-links a:not(.nav-cta):hover { color: var(--cream); }
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--cream); }
.nav-links a.active::after { transform: scaleX(1); }
.nav-cta {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--cream);
  color: var(--ink);
  padding: .6rem 1.2rem;
  border-radius: 2px;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: background .25s var(--ease-out), color .25s var(--ease-out), transform .25s var(--ease-out);
}
.nav-cta:hover { background: var(--signal); transform: translateY(-1px); }
.nav-portal {
  display: inline-flex; align-items: center; gap: .4rem;
  background: transparent;
  color: var(--signal);
  padding: .6rem 1.2rem;
  border-radius: 2px;
  border: 1px solid rgba(79, 168, 255, .35);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: border-color .25s var(--ease-out), color .25s var(--ease-out), background .25s var(--ease-out), transform .25s var(--ease-out);
}
.nav-portal:hover { border-color: var(--signal); background: rgba(79,168,255,.1); color: var(--cream); transform: translateY(-1px); }

/* ─────────── GENERIC HERO (non-index pages) ─────────── */
.page-hero {
  position: relative;
  padding: 11rem 2rem 6rem;
  background: radial-gradient(ellipse at 20% 10%, var(--ink-3) 0%, var(--ink) 55%);
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 40%, transparent 85%);
  opacity: .5;
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(79, 168, 255, .12) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  text-align: left;
}
.page-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, .55);
  padding: .5rem .9rem;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: rgba(79, 168, 255, .04);
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp .9s var(--ease-out) .2s forwards;
}
.page-hero .eyebrow .live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--kelly);
  box-shadow: 0 0 10px rgba(61, 213, 152, .8);
  animation: pulse 1.8s var(--ease-in-out) infinite;
}
.page-hero h1 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  font-weight: 340;
  line-height: 1;
  letter-spacing: -.035em;
  color: var(--cream);
  margin-bottom: 1.5rem;
  max-width: 18ch;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s var(--ease-out) .4s forwards;
}
.page-hero h1 em {
  font-style: italic;
  font-weight: 280;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--signal);
}
.page-hero .sub {
  font-size: 1.1rem;
  color: rgba(244, 239, 230, .6);
  max-width: 56ch;
  line-height: 1.7;
  margin-top: 1.5rem;
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp .9s var(--ease-out) .7s forwards;
}

/* ─────────── BUTTONS ─────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--cream);
  color: var(--ink);
  padding: 1rem 1.75rem;
  border-radius: 2px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: none; cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease-out), color .3s var(--ease-out);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--signal);
  transform: translateX(-101%);
  transition: transform .5s var(--ease-in-out);
  z-index: 0;
}
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover::before { transform: translateX(0); }
.btn-primary:hover { color: var(--ink); transform: translateY(-2px); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: .6rem;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--cream);
  padding: 1rem 1.75rem;
  border-radius: 2px;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: all .3s var(--ease-out);
}
.btn-secondary:hover {
  border-color: var(--signal);
  color: var(--signal);
  background: rgba(79, 168, 255, .06);
}

/* ─────────── SECTION COMMON ─────────── */
section { padding: 7rem 2rem; position: relative; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.section-label {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--signal);
  display: flex;
  align-items: center;
  gap: .6rem;
  white-space: nowrap;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--signal);
}
.section-title {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 340;
  color: var(--cream);
  letter-spacing: -.03em;
  line-height: 1.02;
}
.section-title em { font-style: italic; color: var(--signal); font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 100; }
.section-desc {
  font-size: 1rem;
  color: rgba(244, 239, 230, .55);
  max-width: 58ch;
  line-height: 1.7;
  margin-top: 1.25rem;
}

/* ─────────── PROSE — for long-form pages (privacy, terms, firewall) ─────────── */
.prose {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(244, 239, 230, .72);
}
.prose h2 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: 1.85rem;
  font-weight: 360;
  color: var(--cream);
  letter-spacing: -.025em;
  line-height: 1.15;
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--rule);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 420;
  color: var(--cream);
  margin-top: 2rem;
  margin-bottom: .6rem;
  letter-spacing: -.015em;
}
.prose p {
  margin-bottom: 1.1rem;
  color: rgba(244, 239, 230, .68);
}
.prose strong { color: var(--cream); font-weight: 600; }
.prose em { color: var(--cream); font-style: italic; }
.prose ul, .prose ol {
  margin: 1rem 0 1.25rem 1.25rem;
  padding-left: 1rem;
}
.prose li {
  margin-bottom: .55rem;
  color: rgba(244, 239, 230, .68);
}
.prose li::marker { color: var(--signal); }
.prose a {
  color: var(--signal);
  border-bottom: 1px solid rgba(79, 168, 255, .3);
  transition: border-color .25s var(--ease-out);
}
.prose a:hover { border-color: var(--signal); }
.prose hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}
.prose .toc {
  background: var(--ink-2);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--signal);
  padding: 1.75rem 2rem;
  margin-bottom: 3rem;
}
.prose .toc h2 {
  font-size: .72rem;
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--signal);
  margin: 0 0 1rem;
  padding: 0;
  border: none;
}
.prose .toc ol {
  margin: 0;
  padding-left: 1.25rem;
  columns: 2;
  column-gap: 2rem;
  font-size: .9rem;
}
.prose .toc li { margin-bottom: .45rem; }
.prose .toc a {
  border-bottom: none;
  color: rgba(244, 239, 230, .7);
}
.prose .toc a:hover { color: var(--signal); }
.prose .meta {
  font-family: var(--mono);
  font-size: .7rem;
  color: rgba(244, 239, 230, .4);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.prose .callout {
  border: 1px solid var(--rule);
  border-left: 2px solid var(--signal);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(79, 168, 255, .03);
  font-size: .92rem;
  color: rgba(244, 239, 230, .75);
}

/* ─────────── CTA SECTION ─────────── */
.cta-section {
  padding: 9rem 2rem;
  text-align: center;
  position: relative;
  background: var(--ink-2);
  overflow: hidden;
  border-top: 1px solid var(--rule);
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 1200px; height: 1200px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(79, 168, 255, .12) 0%, transparent 60%);
  pointer-events: none;
}
.cta-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  opacity: .4;
  pointer-events: none;
}
.cta-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.cta-eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--signal);
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.cta-eyebrow::before, .cta-eyebrow::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--signal);
  opacity: .5;
}
.cta-section h2 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 320;
  color: var(--cream);
  letter-spacing: -.03em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
}
.cta-section h2 em { font-style: italic; color: var(--signal); }
.cta-section > .cta-inner > p {
  font-size: 1.1rem;
  color: rgba(244, 239, 230, .55);
  max-width: 520px;
  margin: 0 auto 2.75rem;
  line-height: 1.7;
}
.cta-section .btn-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─────────── FOOTER ─────────── */
footer {
  background: var(--ink);
  padding: 5rem 2rem 2rem;
  border-top: 1px solid var(--rule);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--rule);
}
.footer-brand .logo { font-size: 1.3rem; margin-bottom: 1rem; }
.footer-brand p {
  font-size: .85rem;
  color: rgba(244, 239, 230, .4);
  line-height: 1.7;
  max-width: 300px;
  margin-bottom: 1.5rem;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(244, 239, 230, .3);
  margin-bottom: 1.25rem;
}
.footer-col a {
  display: block;
  color: rgba(244, 239, 230, .55);
  font-size: .88rem;
  padding: .35rem 0;
  transition: color .25s var(--ease-out), transform .25s var(--ease-out);
}
.footer-col a:hover { color: var(--cream); transform: translateX(3px); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  font-family: var(--mono);
  font-size: .68rem;
  color: rgba(244, 239, 230, .3);
  letter-spacing: .08em;
}
.footer-bottom a {
  color: rgba(244, 239, 230, .4);
  margin-left: 1.5rem;
  transition: color .25s;
}
.footer-bottom a:hover { color: var(--cream); }

/* ─────────── REVEAL ─────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .1s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .2s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .3s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .4s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .5s; }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }

/* ─────────── KEYFRAMES ─────────── */
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideInRight { to { opacity: 1; transform: translateX(0); } }
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 14px var(--signal-glow); }
  50% { opacity: .35; box-shadow: 0 0 4px var(--signal-glow); }
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 1024px) {
  .section-head { grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 9rem 1.5rem 5rem; }
  .prose .toc ol { columns: 1; }
}
@media (max-width: 640px) {
  .nav-links a:not(.nav-cta):not(.nav-portal) { display: none; }
  .page-hero { padding: 8rem 1.25rem 4rem; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: .75rem; text-align: center; }
  .footer-bottom a { margin-left: 0; margin-right: 1rem; }
  section { padding: 5rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .page-hero h1, .page-hero .eyebrow, .page-hero .sub { opacity: 1; transform: none; }
}
