/* ============================================================
   PRAETOR — Sovereign AI Infrastructure
   Shared design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700;800&family=Space+Mono:ital,wght@0,400;0,700&display=swap');

:root {
  /* ---- Surfaces (true black + navy) ---- */
  --ink:        #0a0a0a;
  --ink-1:      #0f0f0f;
  --ink-2:      #1a1a1a;
  --ink-3:      #252525;
  --line:       #404040;
  --line-soft:  #2a2a2a;

  /* ---- Gold (refreshed champagne -> antique) ---- */
  --gold:       #d8b25c;
  --gold-hi:    #f1dda3;
  --gold-deep:  #a87b32;
  --gold-soft:  #9a8453;
  --gold-dim:   #6d5d3a;

  /* ---- Text ---- */
  --bone:       #ffffff;
  --bone-dim:   #e0e0e0;
  --mist:       #b0b0b0;
  --mist-deep:  #808080;

  /* ---- Cool accent (reserved for data signal) ---- */
  --steel:      #6f97ad;
  --steel-dim:  #3c4f5a;

  /* ---- Type ---- */
  --serif: 'Barlow', system-ui, sans-serif;
  --sans:  'Barlow', system-ui, sans-serif;
  --mono:  'Space Mono', ui-monospace, monospace;

  /* ---- Metrics ---- */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 3px;
  --gold-grad: linear-gradient(150deg, var(--gold-hi) 0%, var(--gold) 42%, var(--gold-deep) 100%);
}

/* ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 300;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient grain + vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(216,178,92,0.07), transparent 60%),
    radial-gradient(100% 60% at 50% 120%, rgba(216,178,92,0.04), transparent 55%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header, footer, section { position: relative; z-index: 2; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: rgba(216,178,92,0.28); color: var(--bone); }

/* ---------------------------------------------------------- TYPE */
h1, h2, h3 { font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold-soft);
  display: inline-block;
}

.serif { font-family: var(--serif); }
.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.005em;
}

.lead {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.6;
  color: var(--bone-dim);
  font-weight: 300;
}

.gold-text {
  color: var(--gold);
}

/* ---------------------------------------------------------- LAYOUT */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

section.block { padding-block: clamp(72px, 11vh, 140px); }

.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ---------------------------------------------------------- BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 26px;
  border-radius: var(--radius);
  transition: all 0.35s cubic-bezier(0.2,0.7,0.2,1);
  position: relative;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold);
  color: #1a1305;
  font-weight: 700;
}
.btn-gold:hover {
  background: var(--gold-hi);
  transform: translateY(-1px);
}
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--bone-dim);
  background: rgba(255,255,255,0.012);
}
.btn-ghost:hover {
  border-color: var(--gold-soft);
  color: var(--bone);
  background: rgba(216,178,92,0.05);
}
.btn .arrow { transition: transform 0.35s cubic-bezier(0.2,0.7,0.2,1); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------------------------------------------------------- NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.4s, border-color 0.4s, padding 0.4s, box-shadow 0.4s;
  background: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
.nav::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--gold);
  width: var(--scroll-progress, 0%);
  opacity: 0.65;
  box-shadow: 0 0 8px rgba(216,178,92,0.4);
  transition: width 0.08s linear;
}
.nav.scrolled {
  background: var(--ink);
  border-bottom: 1px solid var(--line-soft);
  padding-block: 12px;
  box-shadow: 0 4px 16px -8px rgba(0,0,0,0.5);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand .mark { width: 30px; height: auto; }
.brand .wordmark {
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone);
}
.nav-links { display: flex; align-items: center; gap: 38px; }
.nav-links a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
  transition: color 0.25s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--bone); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 1px;
  background: var(--gold);
}
.nav-cta { display: flex; align-items: center; gap: 20px; }
.menu-btn { display: none; }

/* ---------------------------------------------------------- FOOTER */
.footer {
  border-top: 1px solid var(--line-soft);
  background: var(--ink-1);
  padding-block: 64px 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer .brand .wordmark { font-size: 26px; }
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 18px;
}
.footer-col a, .footer-col p {
  display: block;
  color: var(--mist);
  font-size: 15px;
  margin-bottom: 11px;
  transition: color 0.25s;
}
.footer-col a:hover { color: var(--bone); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--mist-deep);
  text-transform: uppercase;
}

/* ---------------------------------------------------------- REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.2,0.7,0.2,1), transform 0.9s cubic-bezier(0.2,0.7,0.2,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------- UTIL */
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.muted { color: var(--mist); }
.hairline { border: 0; height: 1px; background: var(--line-soft); }

/* ---------------------------------------------------------- MOBILE NAV */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10,9,8,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.mobile-nav.open { opacity: 1; pointer-events: auto; }
.mobile-nav a {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--bone-dim);
}
.mobile-nav a.btn {
  font-family: var(--mono);
  font-size: 13px;
  margin-top: 14px;
}

/* ---------------------------------------------------------- RESPONSIVE */
@media (max-width: 1040px) {
  .nav-links { gap: 26px; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .nav-cta .btn-gold { display: none; }
  .menu-btn { display: inline-flex; align-items: center; color: var(--bone); }
  .nav { padding-block: 16px; }
  .nav.scrolled { padding-block: 12px; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (min-width: 861px) {
  .mobile-nav { display: none; }
}
@media (max-width: 560px) {
  :root { --gutter: 20px; }
  body { font-size: 15.5px; }
  section.block { padding-block: clamp(48px, 9vh, 72px); }
  .eyebrow { font-size: 11px; letter-spacing: 0.22em; }
  .eyebrow::before { width: 16px; }
  .sec-head p, .lead { font-size: 16px; }
  .brand .wordmark { font-size: 20px; }
  .brand .mark { width: 26px; }
  .footer { padding-block: 48px 32px; }
  .footer .brand .wordmark { font-size: 22px; }
  /* Primary CTAs go full-width and stack on phones */
  .hero-cta { flex-direction: column; align-items: stretch; gap: 12px; width: 100%; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}
@media (max-width: 380px) {
  :root { --gutter: 16px; }
}
