/* ============================================================
   GunAtlas.ai — Design System v1
   Dark, premium, data-driven. Orange is deliberate and scarce.
   ============================================================ */

:root {
  /* Color tokens */
  --atlas-black: #090D12;
  --deep-graphite: #0F151D;
  --surface: #161E28;
  --surface-2: #1C2634;
  --border: #27313D;
  --orange: #F97316;
  --orange-bright: #FF8A1F;
  --text: #F5F7FA;
  --text-2: #A8B2BF;
  --text-3: #74808E;
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;

  /* Type */
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--atlas-black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.01em; }

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.num { font-variant-numeric: tabular-nums; }

/* ---------- Topo background accent ---------- */
.topo-bg {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.topo-bg svg { position: absolute; top: -10%; right: -5%; width: 900px; opacity: 0.5; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 13, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 19px; letter-spacing: 0.02em; }
.logo .mark { width: 28px; height: 28px; flex: none; }
.logo .ai { color: var(--orange); }

.nav { display: flex; gap: 28px; font-size: 14.5px; color: var(--text-2); font-weight: 500; }
.nav a:hover { color: var(--text); }
.nav .cta {
  color: var(--atlas-black); background: var(--orange);
  padding: 8px 16px; border-radius: 8px; font-weight: 600;
}
.nav .cta:hover { background: var(--orange-bright); color: var(--atlas-black); }

.menu-btn { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 18px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 72px; background: linear-gradient(180deg, var(--deep-graphite) 0%, var(--atlas-black) 100%); overflow: hidden; }
.hero .container { position: relative; z-index: 1; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); max-width: 720px; margin-bottom: 20px; }
.hero .sub { font-size: clamp(16px, 2vw, 19px); color: var(--text-2); max-width: 620px; margin-bottom: 36px; }

.search-box {
  display: flex; max-width: 640px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  transition: border-color .15s;
}
.search-box:focus-within { border-color: var(--orange); }
.search-box input {
  flex: 1; background: none; border: none; outline: none;
  padding: 16px 20px; color: var(--text); font-size: 16px; font-family: var(--font-body);
}
.search-box input::placeholder { color: var(--text-3); }
.search-box button {
  background: var(--orange); color: var(--atlas-black); border: none;
  padding: 0 26px; font-weight: 700; font-size: 15px; cursor: pointer; font-family: var(--font-body);
}
.search-box button:hover { background: var(--orange-bright); }
.hero .hint { margin-top: 14px; font-size: 13.5px; color: var(--text-3); }

/* ---------- Deal radar grid ---------- */
.deal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.deal-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  transition: border-color .15s, transform .15s;
}
.deal-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.deal-card .deal-img {
  height: 116px; border-radius: 10px; margin: -4px -4px 4px;
  background: radial-gradient(ellipse at 60% 40%, var(--surface-2) 0%, var(--deep-graphite) 100%);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.deal-card .deal-img img { max-height: 92%; max-width: 78%; object-fit: contain; }
.deal-card .deal-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.deal-card .deal-cat { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.deal-card h3 { font-size: 15.5px; line-height: 1.35; }
.deal-card .deal-price { font-family: var(--font-head); font-weight: 700; font-size: 24px; color: var(--orange); }
.deal-card .deal-meta { font-size: 12.5px; color: var(--text-3); }
.deal-card .deal-note { font-size: 13px; color: var(--text-2); }
.deal-card .deal-link { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--orange); }
.deal-card .deal-link:hover { color: var(--orange-bright); }
.deal-radar-banner {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 24px;
  background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px; padding: 12px 16px; font-size: 13.5px; color: var(--text-2);
}
@media (max-width: 900px) { .deal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .deal-grid { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { margin-bottom: 36px; }
.section-head h2 { font-size: clamp(24px, 3.2vw, 34px); margin-bottom: 10px; }
.section-head p { color: var(--text-2); max-width: 640px; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }

.alt { background: var(--deep-graphite); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--text-2); }
.card .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--orange); font-size: 18px; }

/* Category tiles */
.cat-tile {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 24px; transition: border-color .15s, transform .15s;
}
.cat-tile:hover { border-color: var(--orange); transform: translateY(-2px); }
.cat-tile .cat-icon { font-size: 26px; margin-bottom: 14px; }
.cat-tile h3 { font-size: 17px; margin-bottom: 6px; }
.cat-tile p { font-size: 13.5px; color: var(--text-3); }
.cat-tile .soon {
  position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 600;
  color: var(--text-3); background: var(--surface-2); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 20px;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
}
.badge-sample { background: rgba(59, 130, 246, 0.12); color: var(--info); border: 1px solid rgba(59, 130, 246, 0.35); }
.badge-success { background: rgba(34, 197, 94, 0.12); color: var(--success); border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-warn { background: rgba(245, 158, 11, 0.12); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-muted { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }

/* ---------- Comparison table ---------- */
.offer-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.offer-table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.offer-table td { padding: 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.offer-table tr:last-child td { border-bottom: none; }
.offer-table .price { font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.offer-table .best .price { color: var(--orange); }
.offer-table .retailer { font-weight: 600; }
.offer-table .ship { color: var(--text-2); font-size: 13.5px; }
.btn-out {
  display: inline-block; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); padding: 8px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  transition: all .15s; white-space: nowrap;
}
.btn-out:hover { border-color: var(--orange); color: var(--orange); }
.best .btn-out { background: var(--orange); border-color: var(--orange); color: var(--atlas-black); }
.best .btn-out:hover { background: var(--orange-bright); color: var(--atlas-black); }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; }

/* ---------- Product page ---------- */
.breadcrumbs { font-size: 13px; color: var(--text-3); padding: 20px 0 0; }
.breadcrumbs a:hover { color: var(--text-2); }
.product-head { padding: 28px 0 8px; }
.product-head h1 { font-size: clamp(24px, 3.4vw, 34px); margin: 6px 0 10px; }
.product-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 13.5px; color: var(--text-3); }
.price-summary { display: flex; align-items: baseline; gap: 14px; margin: 22px 0 6px; flex-wrap: wrap; }
.price-summary .big { font-family: var(--font-head); font-size: 40px; font-weight: 700; color: var(--orange); }
.price-summary .label { color: var(--text-2); font-size: 14px; }

.spec-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.spec-list div { background: var(--surface); padding: 14px 18px; }
.spec-list dt { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.spec-list dd { font-size: 14.5px; font-weight: 600; }

/* Price chart */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.chart-card .chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.chart-card .chart-head h3 { font-size: 16px; }
.chart-stats { display: flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.chart-stats .stat .v { font-family: var(--font-head); font-weight: 700; font-size: 17px; }
.chart-stats .stat .k { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Alert / email capture ---------- */
.alert-box {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px;
}
.alert-box h3 { font-size: 20px; margin-bottom: 8px; }
.alert-box p { color: var(--text-2); font-size: 14.5px; margin-bottom: 20px; }
.email-form { display: flex; gap: 10px; max-width: 480px; flex-wrap: wrap; }
.email-form input[type="email"] {
  flex: 1; min-width: 220px; background: var(--atlas-black); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; color: var(--text); font-size: 15px; font-family: var(--font-body); outline: none;
}
.email-form input[type="email"]:focus { border-color: var(--orange); }
.email-form button {
  background: var(--orange); color: var(--atlas-black); border: none; border-radius: 8px;
  padding: 12px 22px; font-weight: 700; font-size: 15px; cursor: pointer; font-family: var(--font-body);
}
.email-form button:hover { background: var(--orange-bright); }
.consent-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--text-3); max-width: 480px; }
.consent-row input { margin-top: 3px; accent-color: var(--orange); }
.form-msg { margin-top: 12px; font-size: 14px; display: none; }
.form-msg.ok { color: var(--success); display: block; }
.form-msg.err { color: var(--error); display: block; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Steps ---------- */
.step { display: flex; gap: 18px; }
.step .n {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; color: var(--orange); font-size: 15px;
}
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--text-2); }

/* ---------- Prose pages ---------- */
.prose { max-width: 760px; padding: 56px 0 80px; }
.prose h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.prose .lede { color: var(--text-2); font-size: 17px; margin-bottom: 36px; }
.prose h2 { font-size: 22px; margin: 40px 0 12px; }
.prose h3 { font-size: 17px; margin: 28px 0 10px; }
.prose p { color: var(--text-2); margin-bottom: 16px; }
.prose ul { color: var(--text-2); margin: 0 0 16px 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.prose .callout { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--orange); border-radius: 8px; padding: 18px 20px; margin: 24px 0; font-size: 14.5px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--deep-graphite); padding: 56px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; font-size: 14px; color: var(--text-2); }
.footer-grid li a:hover { color: var(--text); }
.footer-brand p { color: var(--text-3); font-size: 13.5px; margin-top: 12px; max-width: 300px; }
.footer-legal { border-top: 1px solid var(--border); padding-top: 24px; font-size: 12.5px; color: var(--text-3); line-height: 1.7; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .nav.open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; background: var(--deep-graphite);
    border-bottom: 1px solid var(--border); padding: 20px 24px; gap: 18px;
  }
  .menu-btn { display: block; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .hero { padding: 64px 0 52px; }
  .price-summary .big { font-size: 32px; }
}
