/* =================================================================
   KINGMAKER DATA — Campaign Intelligence Platform
   Aesthetic: Editorial-strategic. Dark base, oxblood accent.
   Sharp serif headlines, refined sans body, mono for data details.
   ================================================================= */

:root {
  /* color — metallic/champagne light scheme with vivid Kingmaker red */
  --bg: #f4f1ea;              /* warm champagne/platinum */
  --bg-alt: #ebe6dc;          /* slightly deeper metallic tint */
  --bg-card: #fbf9f4;         /* near-white card surface */
  --border: rgba(40, 30, 20, 0.10);
  --border-strong: rgba(40, 30, 20, 0.22);
  --text: #1c1a17;            /* near-black charcoal w/ warm undertone */
  --text-mute: #5e574e;       /* warm gray */
  --text-dim: #8c857a;        /* lighter warm gray */

  --accent: #c8202c;          /* vivid Kingmaker red */
  --accent-glow: #e3303d;     /* bright red for hovers */
  --accent-deep: #8c171f;     /* deep red for shadow/depth */
  --gold: #b8945a;            /* metallic gold-leaf accent */

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

  /* layout */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
}

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

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

body {
  background: var(--bg);
  /* subtle metallic gradient adds a touch of warmth/depth without distracting */
  background-image:
    linear-gradient(180deg, #f7f4ee 0%, var(--bg) 60%, #ebe6dc 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color 180ms ease; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* =====================  NAV  ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 241, 234, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  color: var(--accent);
  font-size: 18px;
  transform: translateY(-1px);
}
.logo-text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--text);
}
.logo-text-light { color: var(--text-mute); font-weight: 500; }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  position: relative;
  padding: 4px 0;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
}
.nav-link-login {
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
}
.nav-link-login:hover { border-color: var(--accent); color: var(--accent-glow); }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  width: 32px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.nav-mobile-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  transition: 240ms ease;
}

/* =====================  BUTTONS  ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 200ms cubic-bezier(.2,.7,.3,1);
  white-space: nowrap;
}
.btn-lg { padding: 16px 28px; font-size: 13px; }

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 8px 24px -8px rgba(200, 32, 44, 0.6);
}
.btn-primary:hover {
  background: var(--accent-glow);
  border-color: var(--accent-glow);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px rgba(200, 32, 44, 0.8);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--text);
  background: rgba(40, 30, 20, 0.04);
}

/* =====================  HERO  ===================== */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(40, 30, 20, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 30, 20, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
  pointer-events: none;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200, 32, 44, 0.14) 0%, transparent 60%);
  pointer-events: none;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.meta-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-mute);
  text-transform: uppercase;
}
.meta-divider { width: 24px; height: 1px; background: var(--border-strong); }

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 8.5vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
  font-variation-settings: "opsz" 144;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-glow);
  font-variation-settings: "opsz" 144;
}

.hero-sub {
  max-width: 620px;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--text-mute);
  margin-bottom: 48px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  max-width: 720px;
}
.stat { padding-right: 24px; }
.stat:not(:first-child) {
  padding-left: 24px;
  border-left: 1px solid var(--border);
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  text-transform: uppercase;
}

/* =====================  SECTION HEADS  ===================== */
.section-head { max-width: 760px; margin-bottom: 64px; }
.section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent-glow);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-glow);
}
.section-sub {
  margin-top: 24px;
  font-size: 17px;
  color: var(--text-mute);
  max-width: 620px;
  line-height: 1.6;
}

/* =====================  FEATURES  ===================== */
.features { padding: 120px 0; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.feature-card {
  background: var(--bg);
  padding: 40px 32px;
  transition: background 240ms ease;
  position: relative;
}
.feature-card:hover { background: var(--bg-alt); }
.feature-card:hover .feature-num { color: var(--accent-glow); }

.feature-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 24px;
  transition: color 240ms ease;
}
.feature-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.feature-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-mute);
}

/* =====================  MISSION  ===================== */
.mission {
  padding: 120px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.mission-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
}
.mission-text .section-title { margin-bottom: 32px; }
.mission-lede {
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 20px;
}
.mission-text p {
  color: var(--text-mute);
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.65;
  max-width: 540px;
}
.mission-tag {
  padding: 20px 24px;
  border-left: 2px solid var(--accent);
  background: rgba(200, 32, 44, 0.05);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  color: var(--text) !important;
  margin-bottom: 32px !important;
}

/* mission visual — data card */
.vis-card {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  padding: 28px;
  font-family: var(--font-mono);
  position: relative;
}
.vis-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 24px; height: 24px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}
.vis-card::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 24px; height: 24px;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}
.vis-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  text-transform: uppercase;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.vis-live { color: var(--accent-glow); }
.vis-rows { display: flex; flex-direction: column; gap: 14px; }
.vis-row {
  display: grid;
  grid-template-columns: 140px 1fr 70px;
  gap: 14px;
  align-items: center;
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}
.vis-row span:first-child { font-weight: 500; }
.vis-bar {
  height: 4px;
  background: rgba(40, 30, 20, 0.08);
  position: relative;
  overflow: hidden;
}
.vis-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-glow));
  animation: barFill 1.4s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes barFill {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
.vis-num { color: var(--text); text-align: right; font-weight: 500; }
.vis-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  text-transform: uppercase;
}
.vis-foot-num {
  font-size: 22px;
  color: var(--accent-glow);
  letter-spacing: 0;
}

/* =====================  DASHBOARD  ===================== */
.dashboard-section { padding: 120px 0; }
.dashboard-section .section-head { max-width: 760px; margin: 0 auto 64px; text-align: center; }
.dashboard-section .section-sub { margin-left: auto; margin-right: auto; }

.dashboard-frame {
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(40, 30, 20, 0.18);
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.frame-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.frame-url {
  margin-left: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.frame-img { width: 100%; display: block; }

/* =====================  FIELD  ===================== */
.field {
  padding: 120px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 80px;
  align-items: center;
}
.field-visual {
  position: relative;
  border: 1px solid var(--border-strong);
}
.field-visual img {
  width: 100%;
  display: block;
  filter: saturate(0.85) contrast(1.05);
}
.field-badge {
  position: absolute;
  bottom: 20px; left: 20px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  padding: 14px 18px;
  font-family: var(--font-mono);
}
.field-badge span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--accent-glow);
  margin-bottom: 4px;
}
.field-badge strong {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  color: var(--text);
}
.field-text .section-title { margin-bottom: 28px; }
.field-text p {
  font-size: 16px;
  color: var(--text-mute);
  margin-bottom: 20px;
  line-height: 1.65;
  max-width: 540px;
}
.field-text .btn { margin-top: 16px; }

/* =====================  CTA  ===================== */
.cta {
  padding: 140px 0;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(200, 32, 44, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
.cta-inner {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
}
.cta-mark {
  font-size: 24px;
  color: var(--accent);
  margin-bottom: 32px;
}
.cta h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =====================  FOOTER  ===================== */
.footer {
  padding: 80px 0 32px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer-brand p {
  margin-top: 20px;
  color: var(--text-mute);
  font-size: 15px;
  max-width: 320px;
  line-height: 1.6;
}
.footer-head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent-glow);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  font-size: 14px;
  color: var(--text-mute);
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* =====================  RESPONSIVE  ===================== */
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .mission-grid, .field-grid { grid-template-columns: 1fr; gap: 48px; }
  .field-grid > .field-visual { order: 2; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px var(--gutter);
  }
  .nav-links.open .nav-link {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open .nav-link-login { border: 1px solid var(--border-strong); padding: 12px; margin-top: 8px; }
  .nav-links.open .btn { margin-top: 8px; justify-content: center; }

  .hero { padding: 64px 0 60px; }
  .features, .mission, .dashboard-section, .field, .cta { padding: 80px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .stat { padding: 0; }
  .stat:not(:first-child) { padding: 24px 0 0; border-left: none; border-top: 1px solid var(--border); }

  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .vis-row { grid-template-columns: 110px 1fr 60px; font-size: 10px; }
}
