/* ==========================================================================
   Natalie's AI Hardware Co. — dark, futuristic AI-platform theme
   ========================================================================== */

@property --pct {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

:root {
  --bg: #05060c;
  --bg-elevated: #0a0c18;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --surface-solid: #0d1020;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --ink: #eef1fb;
  --ink-soft: #99a0c2;
  --ink-faint: #656b8c;

  --accent-1: #8b5cf6;   /* violet — consumer / primary brand */
  --accent-1-soft: rgba(139, 92, 246, 0.18);
  --accent-2: #22d3ee;   /* cyan — workstation */
  --accent-2-soft: rgba(34, 211, 238, 0.18);
  --accent-3: #fb923c;   /* amber — enterprise */
  --accent-3-soft: rgba(251, 146, 60, 0.18);
  --accent-4: #34d399;   /* emerald — server / success */
  --accent-4-soft: rgba(52, 211, 153, 0.18);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.16);

  --gradient-brand: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(139,92,246,0.16), rgba(34,211,238,0.12));

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.35);
  --ease: cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }

::selection { background: var(--accent-1); color: #fff; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background-image:
    radial-gradient(900px 500px at 12% -8%, rgba(139,92,246,0.16), transparent 60%),
    radial-gradient(800px 450px at 92% 8%, rgba(34,211,238,0.12), transparent 60%),
    linear-gradient(var(--bg), var(--bg));
  background-attachment: fixed;
}

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 0.5em; letter-spacing: -0.01em; font-weight: 700; }
h1 { letter-spacing: -0.02em; }
p { color: var(--ink-soft); }
strong { color: var(--ink); }

code, .mono { font-family: var(--font-mono); }

/* ---------- Grid backdrop (circuit-like texture) ---------- */
.grid-backdrop {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 0%, black 0%, transparent 75%);
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5,6,12,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--gradient-brand);
  color: #05060c; display: flex; align-items: center; justify-content: center;
  font-weight: 800; box-shadow: 0 0 18px rgba(139,92,246,0.55);
}
.brand-text { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }

.main-nav { display: flex; gap: 4px; align-items: center; }
.main-nav a {
  color: var(--ink-soft); font-weight: 500; font-size: 0.88rem;
  padding: 8px 13px; border-radius: 999px; transition: color .15s var(--ease), background .15s var(--ease);
}
.main-nav a:hover { color: #fff; text-decoration: none; background: var(--surface); }
.main-nav a.active { color: #fff; background: var(--surface-strong); }

.nav-toggle {
  display: none; background: var(--surface-strong); border: 1px solid var(--border-strong); color: #fff;
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; font-size: 1.2rem;
  flex-shrink: 0;
}
.nav-toggle:hover { border-color: var(--accent-2); }

@media (max-width: 860px) {
  .main-nav {
    display: none; position: fixed; top: 63px; left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #0a0c18; border-bottom: 1px solid var(--border);
    padding: 10px 16px 16px; z-index: 49; overflow-y: auto;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--gradient-brand); color: #05060c; box-shadow: 0 0 0 rgba(139,92,246,0); }
.btn-primary:hover { box-shadow: 0 6px 28px rgba(139,92,246,0.45); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-strong); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--surface); border-color: var(--accent-2); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

section.section { padding: 56px 0; position: relative; }
section.section h2 { font-size: 1.6rem; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 10px;
}
.section-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.section-intro { color: var(--ink-soft); max-width: 720px; margin-bottom: 30px; font-size: 1.02rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 76px; }
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55;
  animation: float 9s ease-in-out infinite;
}
.hero-orb.o1 { width: 380px; height: 380px; background: var(--accent-1); top: -140px; left: -80px; }
.hero-orb.o2 { width: 320px; height: 320px; background: var(--accent-2); top: -60px; right: -100px; animation-delay: -3s; }
.hero-orb.o3 { width: 260px; height: 260px; background: var(--accent-4); bottom: -160px; left: 40%; animation-delay: -6s; opacity: 0.3; }
@media (max-width: 560px) {
  .hero-orb.o1 { width: 220px; height: 220px; }
  .hero-orb.o2 { width: 200px; height: 200px; }
  .hero-orb.o3 { width: 160px; height: 160px; }
}
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(24px) } }

.hero-inner { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border-strong);
  padding: 7px 16px; border-radius: 999px; font-size: 0.8rem; color: var(--ink-soft);
  margin-bottom: 22px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-4); box-shadow: 0 0 8px var(--accent-4); }

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  max-width: 820px;
  background: linear-gradient(135deg, #fff 40%, #b9c2e6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 .grad { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--ink-soft); max-width: 620px; font-size: 1.12rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 34px; margin-top: 56px; flex-wrap: wrap; }
.hero-stat .n { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: #fff; }
.hero-stat .l { font-size: 0.8rem; color: var(--ink-faint); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--surface), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.card h3 { font-size: 1.08rem; color: #fff; }
.card-link { display: block; color: inherit; position: relative; }
.card-link:hover { text-decoration: none; }
a.card:hover, .card-link:hover .card, .card.hoverable:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(139,92,246,0.15);
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid var(--border-strong);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.badge-consumer { color: var(--accent-1); background: var(--accent-1-soft); }
.badge-consumer::before { background: var(--accent-1); box-shadow: 0 0 6px var(--accent-1); }
.badge-workstation { color: var(--accent-2); background: var(--accent-2-soft); }
.badge-workstation::before { background: var(--accent-2); box-shadow: 0 0 6px var(--accent-2); }
.badge-enterprise { color: var(--accent-3); background: var(--accent-3-soft); }
.badge-enterprise::before { background: var(--accent-3); box-shadow: 0 0 6px var(--accent-3); }
.badge-server { color: var(--accent-4); background: var(--accent-4-soft); }
.badge-server::before { background: var(--accent-4); box-shadow: 0 0 6px var(--accent-4); }

.tier-icon { display: block; filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5)); }

/* ---------- Spec table ---------- */
.spec-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.spec-table th, .spec-table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.spec-table th { width: 220px; color: var(--ink-soft); font-weight: 600; font-size: 0.88rem; }
.spec-table td { color: var(--ink); }
.spec-explain { color: var(--ink-faint); font-size: 0.85rem; margin-top: 4px; }

/* ---------- Tooltip ---------- */
.tt { position: relative; display: inline-block; }
.tt-trigger {
  background: none; border: none; padding: 0; margin: 0;
  color: inherit; font: inherit; cursor: help; border-bottom: 1px dashed var(--ink-faint);
  white-space: nowrap;
}
.tt-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--gradient-brand); color: #05060c; font-size: 10px; font-weight: 800;
  vertical-align: middle; margin-left: 3px;
}
.tt-bubble {
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s var(--ease), transform .15s var(--ease);
  position: absolute; z-index: 30; bottom: 130%; left: 0;
  width: 290px; max-width: 74vw;
  background: #10142a; color: #dfe3f7; padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 10px; font-size: 0.85rem; line-height: 1.55;
  box-shadow: 0 10px 32px rgba(0,0,0,0.5);
}
.tt.open .tt-bubble, .tt:hover .tt-bubble { opacity: 1; visibility: visible; transform: translateY(0); }
@media (hover: none) { .tt:hover .tt-bubble { opacity: 0; visibility: hidden; } }

/* ---------- Bar chart ---------- */
.bar-chart { margin: 20px 0; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 110px; align-items: center; gap: 14px; margin-bottom: 12px; }
.bar-label { font-size: 0.85rem; color: var(--ink-soft); }
.bar-track { background: var(--surface-strong); border-radius: 999px; height: 10px; overflow: hidden; border: 1px solid var(--border); }
.bar-fill {
  height: 100%; border-radius: 999px; min-width: 3px; width: 0;
  transition: width 1s var(--ease);
  box-shadow: 0 0 12px currentColor;
}
.bar-value { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; text-align: right; color: var(--ink); }
@media (max-width: 640px) { .bar-row { grid-template-columns: 96px 1fr 84px; gap: 8px; } }

/* ---------- Gauges ---------- */
.gauge-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.gauge {
  --pct: 0;
  border-radius: 50%;
  background: conic-gradient(var(--gauge-color, var(--accent-1)) calc(var(--pct) * 1%), rgba(255,255,255,0.07) 0);
  display: flex; align-items: center; justify-content: center;
  transition: --pct 1.1s var(--ease), background 1.1s var(--ease);
}
.gauge-inner {
  width: 76%; height: 76%; border-radius: 50%; background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  border: 1px solid var(--border);
}
.gauge-value { font-family: var(--font-mono); font-weight: 700; font-size: 0.95rem; color: #fff; }
.gauge-label { font-size: 0.72rem; color: var(--ink-faint); text-align: center; }

/* ---------- Cluster diagram ---------- */
.cluster-svg { width: 100%; max-width: 440px; display: block; margin: 16px auto; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 0.9rem; color: var(--ink); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: 0.95rem; font-family: inherit;
  background: var(--surface-solid); color: var(--ink);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--ink-faint); }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-2-soft);
}
.form-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 20px) center, calc(100% - 15px) center; background-size: 6px 6px; background-repeat: no-repeat; }
.error-box { background: var(--danger-soft); border: 1px solid var(--danger); color: #ffd7dd; padding: 13px 17px; border-radius: var(--radius-sm); margin-bottom: 20px; }

/* ---------- Tables ---------- */
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
table.data-table th { color: var(--ink-soft); font-weight: 600; background: var(--surface); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; }
table.data-table tr:hover td { background: var(--surface); }

/* ---------- Callouts ---------- */
.callout {
  border-left: 3px solid var(--accent-1);
  background: var(--accent-1-soft);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 22px 0;
  font-size: 0.92rem;
}
.callout strong { color: #fff; }
.callout.info { border-color: var(--accent-2); background: var(--accent-2-soft); }
.callout.warn { border-color: var(--accent-3); background: var(--accent-3-soft); }
.callout.success { border-color: var(--accent-4); background: var(--accent-4-soft); }
.callout-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; margin-bottom: 6px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Stat tiles ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; }
@media (max-width: 800px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  text-align: center;
}
.stat-tile .stat-value { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: #fff; }
.stat-tile .stat-label { font-size: 0.78rem; color: var(--ink-faint); margin-top: 6px; }

/* ---------- Steps ---------- */
.step-list { counter-reset: step; list-style: none; padding: 0; }
.step-list li { position: relative; padding-left: 46px; margin-bottom: 18px; font-size: 0.96rem; }
.step-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gradient-brand); color: #05060c; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
  box-shadow: 0 0 16px rgba(139,92,246,0.4);
}

/* ---------- Path cards ---------- */
.path-card { text-align: center; padding: 38px 26px; }
.path-card .tier-icon { margin: 0 auto 16px; }

/* ---------- Source list ---------- */
.source-list { font-size: 0.85rem; color: var(--ink-faint); list-style: none; padding: 0; }
.source-list a { word-break: break-all; }
.source-list li { padding: 6px 0; border-bottom: 1px dashed var(--border); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-elevated); color: var(--ink-faint); padding: 34px 0; margin-top: 60px; border-top: 1px solid var(--border); }
.site-footer p { margin: 5px 0; font-size: 0.88rem; }
.site-footer .fine-print { font-size: 0.76rem; color: var(--ink-faint); max-width: 820px; }
.site-footer strong { color: #fff; }

/* ---------- Pills / filters ---------- */
.pill-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.pill-nav a {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--ink-soft); font-size: 0.86rem; background: var(--surface); transition: all .15s var(--ease);
}
.pill-nav a.active { background: var(--gradient-brand); color: #05060c; border-color: transparent; font-weight: 600; }
.pill-nav a:hover { text-decoration: none; border-color: var(--accent-2); color: #fff; }

.model-select-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 28px; }
.model-select-form .form-field { margin-bottom: 0; min-width: 280px; flex: 1; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-faint); }

/* ---------- Comparison page ---------- */
.compare-picker { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin-bottom: 10px; }
@media (max-width: 700px) { .compare-picker { grid-template-columns: 1fr; } }
.compare-check {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 0.88rem; cursor: pointer; transition: border-color .15s var(--ease);
}
.compare-check:hover { border-color: var(--border-strong); }
.compare-check input { accent-color: var(--accent-1); }
.compare-check.checked { border-color: var(--accent-1); background: var(--accent-1-soft); }
.compare-table-wrap { overflow-x: auto; }
table.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; }
table.compare-table th, table.compare-table td { padding: 14px; border-bottom: 1px solid var(--border); font-size: 0.9rem; text-align: left; }
table.compare-table th.row-label { color: var(--ink-soft); font-weight: 600; width: 160px; }
table.compare-table thead th { color: #fff; font-size: 0.95rem; background: var(--surface); }
.compare-winner { color: var(--accent-4); font-weight: 700; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Misc ---------- */
.divider-glow { height: 1px; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); margin: 8px 0 40px; }
.kicker-icon { display: inline-flex; }
