/* ============================================
   GRANTRADAR DESIGN SYSTEM
   Editorial intelligence aesthetic
   ============================================ */

:root {
  /* PALETTE */
  --bg: #0e0e0f;
  --bg-elevated: #161618;
  --bg-card: #1a1a1d;
  --bg-card-hover: #1f1f23;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --ink: #fafaf7;
  --ink-dim: #b8b8b3;
  --ink-muted: #6e6e6a;
  --signal: #ff8a00;
  --signal-dim: rgba(255,138,0,0.12);
  --signal-line: rgba(255,138,0,0.24);
  --live: #00d97e;
  --critical: #ff4d4d;

  /* TYPE */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* SPACING */
  --gutter: clamp(20px, 5vw, 48px);
  --max-w: 1240px;
  --max-w-text: 720px;

  /* TIMING */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'kern', 'liga', 'cv11';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* GRAIN OVERLAY */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* SCAN LINE EFFECT */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(255,255,255,0.008) 3px,
    rgba(255,255,255,0.008) 4px
  );
}

a { color: var(--signal); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--ink); }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

img, svg { display: block; max-width: 100%; }

/* ============================================
   TYPOGRAPHY
   ============================================ */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--signal);
}

h1, h2, h3, h4, .h-display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
  font-variation-settings: 'opsz' 144;
}

.h-1 { font-size: clamp(2.4rem, 7vw, 5.5rem); }
.h-2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.h-3 { font-size: clamp(1.4rem, 3vw, 2rem); }
.h-4 { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 500; }

.serif { font-family: var(--font-display); }
.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }
.italic { font-style: italic; }

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 56ch;
}

.body-text { color: var(--ink-dim); line-height: 1.7; }
.body-text p + p { margin-top: 1em; }

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 5;
}

.section { padding: clamp(70px, 12vh, 140px) 0; position: relative; z-index: 5; }
.section-sm { padding: clamp(40px, 8vh, 80px) 0; }
.section-lg { padding: clamp(100px, 18vh, 200px) 0; }

.divider {
  height: 1px;
  background: var(--line);
  margin: 0;
  border: none;
}

/* ============================================
   NAV
   ============================================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(14,14,15,0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { color: var(--ink); }

.brand-mark {
  width: 24px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
}

.brand-mark::before,
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--signal);
  border-radius: 50%;
  animation: brandPulse 3s ease-in-out infinite;
}
.brand-mark::after {
  inset: 6px;
  animation-delay: 0.5s;
}
.brand-mark span {
  position: absolute;
  inset: 10px;
  background: var(--signal);
  border-radius: 50%;
}

@keyframes brandPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.brand em { font-style: italic; color: var(--signal); font-weight: 400; }

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-dim);
  text-decoration: none;
  font-weight: 400;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}

.nav-link:hover, .nav-link.active { color: var(--ink); }

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--signal);
}

.nav-right { display: flex; align-items: center; gap: 16px; }

.lang-pill {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 2px;
  gap: 1px;
}
.lang-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 5px 9px;
  border-radius: 100px;
  transition: all 0.15s var(--ease);
  cursor: pointer;
  background: transparent;
  border: none;
}
.lang-btn.active { background: var(--signal); color: var(--bg); }
.lang-btn:not(.active):hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 11px 22px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  text-decoration: none;
  letter-spacing: -0.01em;
  min-height: 44px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--signal);
  color: var(--bg);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(255,138,0,0.2);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.btn-arrow::after {
  content: '→';
  display: inline-block;
  transition: transform 0.2s var(--ease);
}
.btn-arrow:hover::after { transform: translateX(3px); }

.btn-lg {
  padding: 15px 30px;
  font-size: 1rem;
  min-height: 52px;
}

.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: all 0.25s var(--ease);
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 24px var(--gutter);
  z-index: 99;
  transform: translateY(-110%);
  transition: transform 0.35s var(--ease-out);
  display: none;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu .nav-link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.mobile-menu .nav-link:last-of-type { border-bottom: none; }
.mobile-menu .lang-pill { margin: 16px auto; justify-content: center; width: fit-content; }
.mobile-menu .btn { width: 100%; margin-top: 12px; }

/* ============================================
   HERO RADAR
   ============================================ */

.hero {
  padding: 120px var(--gutter) 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, black 20%, transparent 75%);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 5;
}

.hero-text { position: relative; }

.hero-eyebrow {
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--signal-dim);
  border: 1px solid var(--signal-line);
  padding: 7px 16px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--signal);
  letter-spacing: 0.1em;
}
.hero-eyebrow .live-dot {
  width: 6px;
  height: 6px;
  background: var(--live);
  border-radius: 50%;
  animation: liveDot 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px var(--live);
}
@keyframes liveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
  font-variation-settings: 'opsz' 144;
}
.hero-title em {
  font-style: italic;
  color: var(--signal);
  font-weight: 400;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 52ch;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 32px;
}

.hero-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero-meta-item { display: flex; align-items: center; gap: 6px; }
.hero-meta-item::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--signal);
  border-radius: 50%;
}

/* RADAR VISUAL */
.radar-stage {
  position: relative;
  aspect-ratio: 1;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.radar-stage svg { width: 100%; height: 100%; }

.radar-circle {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
}

.radar-cross {
  stroke: var(--line);
  stroke-width: 1;
}

.radar-sweep {
  transform-origin: center;
  animation: radarSweep 4s linear infinite;
}

@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radar-blip {
  fill: var(--signal);
  opacity: 0;
  animation: blipFlash 4s ease-in-out infinite;
}
.radar-blip.b1 { animation-delay: 0.5s; }
.radar-blip.b2 { animation-delay: 1.2s; }
.radar-blip.b3 { animation-delay: 2.1s; }
.radar-blip.b4 { animation-delay: 2.8s; }
.radar-blip.b5 { animation-delay: 3.4s; }
.radar-blip.b6 { animation-delay: 0.9s; }
.radar-blip.b7 { animation-delay: 1.8s; }

@keyframes blipFlash {
  0%, 90%, 100% { opacity: 0; r: 3; }
  10% { opacity: 1; r: 6; }
  30% { opacity: 0.4; r: 4; }
}

.radar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--ink-muted);
  letter-spacing: 0.1em;
}

/* HERO LIVE TICKER */
.live-ticker {
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  overflow: hidden;
}
.ticker-label {
  color: var(--live);
  font-weight: 600;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ticker-label::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--live);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--live);
}
.ticker-content {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.ticker-track {
  display: inline-block;
  animation: tickerScroll 30s linear infinite;
  padding-left: 100%;
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.ticker-track span { margin-right: 36px; color: var(--ink-dim); }
.ticker-track strong { color: var(--signal); font-weight: 500; }

/* ============================================
   SECTION INTRO
   ============================================ */

.section-intro {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  margin-bottom: 64px;
  align-items: end;
}
.section-intro-left .eyebrow { margin-bottom: 16px; }
.section-intro-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.section-intro-title em { font-style: italic; color: var(--signal); }
.section-intro-right .lead { color: var(--ink-dim); }

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
  padding: 80px var(--gutter) 32px;
  position: relative;
  z-index: 5;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.footer-about p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-top: 16px;
  max-width: 36ch;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 18px;
  font-weight: 600;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-dim);
  padding: 5px 0;
  font-family: var(--font-body);
}
.footer-col a:hover { color: var(--signal); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
}
.footer-bottom a {
  color: var(--ink-muted);
  font-size: 11px;
  font-family: var(--font-mono);
}
.footer-disclaimer {
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 100%;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
}
.footer-disclaimer strong { color: var(--ink-dim); }

/* ============================================
   COOKIE BAR
   ============================================ */

.cookie-bar {
  position: fixed;
  bottom: 16px; left: 16px; right: 16px;
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--signal-line);
  padding: 16px 20px;
  border-radius: 14px;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  flex-wrap: wrap;
}
.cookie-bar.show { display: flex; }
.cookie-bar p { font-size: 0.84rem; color: var(--ink-dim); flex: 1; min-width: 200px; }
.cookie-bar a { color: var(--signal); text-decoration: underline; }

/* ============================================
   STICKY MOBILE CTA
   ============================================ */

.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(14,14,15,0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 12px var(--gutter);
  z-index: 90;
}
.sticky-cta .btn { width: 100%; min-height: 50px; }

/* ============================================
   UTILITIES
   ============================================ */

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.fade-in.in { opacity: 1; transform: translateY(0); }

.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 980px) {
  .hero-content { grid-template-columns: 1fr; gap: 56px; }
  .hero-content .radar-stage { max-width: 360px; order: -1; }
  .section-intro { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .nav-right > .lang-pill, .nav-right > .btn { display: none; }
  .nav-burger { display: flex; }
  .mobile-menu { display: block; }
  .hero { padding: 100px var(--gutter) 60px; min-height: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  body { padding-bottom: 76px; }
  .sticky-cta { display: block; }
  .cookie-bar { bottom: 86px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .radar-sweep { animation: none; }
  .ticker-track { animation: none; }
}
