/* ============================================================
   Black Star Dynamics — site styles
   Palette pulled from the Shot Solver app theme.
   ============================================================ */

:root {
  --black:         #000000;
  --bg:            #050505;
  --bg-elevated:   #0d0d0d;
  --bg-card:       #121212;
  --border:        #2a2a2a;
  --border-brass:  #5a4a2a;

  --text:          #f5f3ee;
  --text-dim:      #a6a39a;
  --text-faint:    #6b675e;

  --brass:         #c8a460;
  --brass-bright:  #e0c280;
  --brass-dim:     #8e7345;

  --font-display:  'Fraunces', 'Times New Roman', serif;
  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, Menlo, monospace;

  --max-w: 1180px;
  --radius: 4px;
}

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

html { scroll-behavior: smooth; }

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

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

a {
  color: var(--brass);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--brass-bright); }

/* ---------- typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-block;
  margin-bottom: 1rem;
}

.binary {
  font-family: var(--font-mono);
  color: var(--brass-dim);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
}

p { color: var(--text-dim); }

p + p { margin-top: 1rem; }

.lede {
  font-size: 1.15rem;
  color: var(--text);
  max-width: 60ch;
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-text { color: var(--text); }
.brand-text .accent { color: var(--brass); }

.main-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.main-nav a {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.25rem 0;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--brass);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--brass);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--brass);
  color: var(--black);
}
.btn-primary:hover {
  background: var(--brass-bright);
  border-color: var(--brass-bright);
  color: var(--black);
}

.btn-ghost {
  background: transparent;
  color: var(--brass);
}
.btn-ghost:hover {
  background: rgba(200,164,96,0.08);
  color: var(--brass-bright);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 6rem 1.5rem 5rem;
  overflow: hidden;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 30%, rgba(200,164,96,0.10), transparent 75%),
    var(--black);
  z-index: 0;
}

.hero-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}

.hero-logo {
  width: min(820px, 98vw);
  height: auto;
  margin: -5rem auto -4rem;
  mix-blend-mode: lighten;
  filter: drop-shadow(0 0 60px rgba(200,164,96,0.25));
}

.brand-mark,
.footer-brand img {
  mix-blend-mode: lighten;
}

.hero h1 {
  margin-bottom: 1.5rem;
}
.hero h1 .accent { color: var(--brass); }

.hero .lede {
  margin: 0 auto 2.5rem;
  color: var(--text-dim);
  font-size: 1.2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- page header (non-home) ---------- */

.page-header {
  padding: 5rem 1.5rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at top, rgba(200,164,96,0.06), transparent 70%),
    var(--black);
}

.page-header .lede {
  margin: 1rem auto 0;
}

/* ---------- sections ---------- */

section {
  padding: 5rem 1.5rem;
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-head p {
  max-width: 60ch;
  margin: 1rem auto 0;
}

.divider-brass {
  width: 60px;
  height: 2px;
  background: var(--brass);
  margin: 1.5rem auto;
}

/* ---------- product grid ---------- */

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--brass-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(200,164,96,0.06);
}

.product-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--brass-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--brass);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.product-card h3 {
  font-family: var(--font-display);
  margin-bottom: 0.25rem;
}

.product-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.product-card p {
  flex: 1;
  margin-bottom: 1.5rem;
}

.product-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.product-features li {
  font-size: 0.9rem;
  color: var(--text-dim);
  padding: 0.4rem 0 0.4rem 1.25rem;
  position: relative;
  border-top: 1px solid var(--border);
}

.product-features li:first-child { border-top: 0; }

.product-features li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--brass);
  font-size: 0.75rem;
}

.product-meta {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.product-meta .status {
  color: var(--brass);
}

/* ---------- pillars / value strip ---------- */

.pillars {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}

.pillar h3 {
  font-family: var(--font-display);
  color: var(--brass);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.pillar p {
  font-size: 0.95rem;
}

/* ---------- about: split layout ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.split-content h2 { margin-bottom: 1.5rem; }
.split-content p { margin-bottom: 1rem; }

.spec-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.spec-block h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.spec-row:first-of-type { border-top: 0; }
.spec-row .key { color: var(--text-faint); }
.spec-row .val { color: var(--text); font-family: var(--font-mono); font-size: 0.85rem; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: start;
}

.contact-image {
  margin: 0;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.contact-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 720px;
  object-fit: cover;
  object-position: center;
}

.contact-image figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.contact-left {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.contact-left .contact-info { margin-bottom: 0; }

.form-row { margin-bottom: 1.25rem; }

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.5rem;
}

input, textarea, select {
  width: 100%;
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brass);
}

textarea { resize: vertical; min-height: 140px; }

.contact-info h3 {
  font-family: var(--font-display);
  margin-bottom: 0.5rem;
}

.contact-info .info-block {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.contact-info .info-block:first-of-type { border-top: 0; padding-top: 0; }

.contact-info .label-sm {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.35rem;
}

/* ---------- CTA strip ---------- */

.cta-strip {
  background:
    linear-gradient(180deg, rgba(200,164,96,0.04), transparent),
    var(--bg);
  border-top: 1px solid var(--border-brass);
  border-bottom: 1px solid var(--border-brass);
  text-align: center;
}

.cta-strip h2 { margin-bottom: 1.5rem; }
.cta-strip p { max-width: 50ch; margin: 0 auto 2rem; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--black);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand img { width: 28px; height: 28px; }

.footer-brand-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1rem;
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-col a:hover { color: var(--brass); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .split, .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  /* On mobile, always show the headline/description before the spec table,
     even on sections where DOM order puts the spec block first
     (e.g. the alternating Bench & Range layout). */
  .split > .split-content { order: 0; }
  .split > .spec-block    { order: 1; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 1rem;
  }
  .main-nav.open { display: flex; }
  .nav-inner { position: relative; }
  section, .hero { padding: 3.5rem 1.25rem; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}

/* ---------- section dividers (Products page tracks) ---------- */

.section-divider {
  padding-top: 5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--border);
  position: relative;
}

.section-divider::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--brass);
}

.section-divider h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0.75rem 0 1rem;
}

.section-divider .lede {
  font-size: 1.05rem;
}

.section-divider-alt {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

/* ---------- jump links under page header lede ---------- */

.page-header-jump {
  margin-top: 1.75rem;
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.page-header-jump a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brass);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.page-header-jump a:hover {
  border-bottom-color: var(--brass);
}

/* ---------- step number badge (How It Works) ---------- */

.pillar .step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin-bottom: 0.75rem;
}

/* ---------- footer responsive: 4-col → 2-col on tablet, 1-col on phone ---------- */

@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}
