/* ============================================================
   style.css
   ------------------------------------------------------------
   HOW THIS FILE IS ORGANISED (search for these headers):
     1. DESIGN TOKENS   — every colour, font, and spacing value
                           lives here. Change a value once, it
                           updates the whole site.
     2. RESET & BASE     — sensible defaults for every element
     3. LAYOUT HELPERS   — reusable containers/sections
     4. NAV
     5. HERO
     6. TRUST BAR
     7. ABOUT
     8. BUILDS (product cards / spec sheets) + builds teaser + callout
     9. HOW IT WORKS
     10. SERVICES (repairs)
     11. TESTIMONIALS
     12. SUPPORT (FAQ + contact)
     13. FOOTER
     14. RESPONSIVE (small screens)

   You almost never need to touch anything below section 1 just
   to restyle the site — try changing the tokens first.
   ============================================================ */


/* ---------- 1. DESIGN TOKENS ---------------------------------- */
:root {
  /* Surfaces — a graphite/blue-black base, like a PCB substrate */
  --color-bg: #0f1214;
  --color-surface: #171b1e;
  --color-surface-raised: #1d2226;
  --color-border: #2a3034;

  /* Text */
  --color-text: #edeae3;       /* warm off-white, pairs with copper */
  --color-text-muted: #8b9296;

  /* Accent — heatsink copper. Used sparingly: CTAs, links, prices */
  --color-accent: #c9793d;
  --color-accent-soft: #e3a374;

  /* Status dots on build cards */
  --color-status-stock: #4fa98f;   /* in stock */
  --color-status-order: #c9793d;   /* built to order */
  --color-status-sold: #6b7176;    /* sold out */

  /* Feedback */
  --color-danger: #c75450;

  /* Type */
  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5.5rem;

  /* Shape */
  --radius: 6px;
  --border: 1px solid var(--color-border);

  /* Layout */
  --content-width: 1120px;
}


/* ---------- 2. RESET & BASE ------------------------------------ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

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

button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* Visible keyboard focus everywhere — accessibility floor */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-accent-soft);
  outline-offset: 3px;
}


/* ---------- 3. LAYOUT HELPERS ----------------------------------- */
.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section { padding: var(--space-xl) 0; }

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-lg);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: var(--space-xs);
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin-bottom: var(--space-xs);
}

.section-head p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--color-accent);
  color: #14100c;
}
.btn-primary:hover { background: var(--color-accent-soft); }

.btn-ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent-soft); }


/* ---------- 4. NAV ----------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 18, 20, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav-brand span { color: var(--color-accent); }

.nav-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  font-size: 0.92rem;
}

.nav-links a { color: var(--color-text-muted); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--color-text); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
}


/* ---------- 5. HERO ------------------------------------------------ */
.hero {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
  /* Faint schematic/graph-paper grid — nods to spec sheets & blueprints
     without leaning on the generic dark+neon-accent look. */
  background-image:
    linear-gradient(rgba(237, 234, 227, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 234, 227, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  background-position: center top;
}

.hero::after {
  /* fade the grid out toward the bottom so it doesn't fight with content */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, var(--color-bg) 92%);
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }

/* Two columns on wide screens (text + visual panel) so the hero
   actually uses the width of a desktop screen instead of sitting
   as one narrow centred column with empty space either side. */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.hero-inner { max-width: 620px; }

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  margin-bottom: var(--space-sm);
}

.hero h1 em {
  font-style: normal;
  color: var(--color-accent);
}

.hero p.lede {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-bottom: var(--space-md);
}

.hero-actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; }

/* Visual panel on the right of the hero (desktop only — hidden on
   narrow screens where the two-column grid stacks anyway and this
   would just repeat spec info already on the cards below). Styled
   like a datasheet card rather than a photo, so it looks deliberate
   even before real product photography exists. */
.hero-panel {
  display: none;
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  position: relative;
}
@media (min-width: 900px) {
  .hero-panel { display: block; }
}
.hero-panel-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}
.hero-panel-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
  text-align: right;
}


/* ---------- 6. TRUST BAR -------------------------------------------- */
.trust-bar-section {
  padding: var(--space-md) 0;
  border-bottom: var(--border);
}

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  justify-content: space-between;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.trust-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text);
}

.trust-sub {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* ---------- 7. ABOUT ------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}
@media (min-width: 800px) {
  .about-grid { grid-template-columns: 0.8fr 1.2fr; }
}

.about-media {
  aspect-ratio: 4 / 5;
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  text-align: center;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.about-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

.about-content p {
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-sm);
}

.about-name {
  font-family: var(--font-mono);
  color: var(--color-text) !important;
  font-size: 0.85rem;
}


/* ---------- 8. BUILDS (product cards / spec sheets) --------------- */

/* Callout box used for the "Before you order" notice on builds.html
   (and reused as a generic notice box on the legal placeholder
   pages). Deliberately visible, not fine print. */
.callout {
  border: 1px solid var(--color-accent);
  background: rgba(201, 121, 61, 0.08);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}
.callout-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}
.callout p { color: var(--color-text); max-width: 70ch; }
.callout a { color: var(--color-accent-soft); text-decoration: underline; }

/* Homepage teaser section (replaces a full builds grid there) */
.builds-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
}
.builds-teaser .section-head p { max-width: 56ch; }

.builds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.build-card {
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.build-card:hover { border-color: var(--color-border); transform: translateY(-2px); }

.build-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-sm) 0;
}

.build-card-top h3 {
  font-size: 1.2rem;
}

.build-tier {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot-color, var(--color-status-stock));
}

.build-media {
  margin: var(--space-sm);
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  background: var(--color-surface-raised);
  border: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.build-media img { width: 100%; height: 100%; object-fit: cover; }
.build-media svg { width: 38%; height: 38%; opacity: 0.35; }

.build-body { padding: 0 var(--space-sm) var(--space-sm); display: flex; flex-direction: column; flex: 1; }

.build-blurb {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

/* The spec table is the signature detail of each card — laid out
   like a parts datasheet: label / value rows in monospace. */
.spec-table {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-top: var(--border);
  margin-bottom: var(--space-sm);
}
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--color-border);
}
.spec-row:last-child { border-bottom: none; }
.spec-label { color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.7rem; }
.spec-value { color: var(--color-text); text-align: right; }

.build-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-top: var(--space-sm);
}

.build-price-row { display: flex; align-items: center; }

.build-price {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--color-text);
}

.build-cta-primary {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* The PayPal button is the secondary action, visually smaller and
   below the primary "ask first" button — see render.js for why. */
.build-cta-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  border-top: 1px dashed var(--color-border);
  padding-top: var(--space-xs);
  margin-top: 0.15rem;
}

.secondary-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* PayPal injects its own button here — this just reserves space. */
.paypal-slot { min-width: 120px; min-height: 40px; }


/* ---------- 9. HOW IT WORKS ---------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.step {
  border-top: 2px solid var(--color-accent);
  padding-top: var(--space-sm);
}

.step-index {
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-size: 0.85rem;
  display: block;
  margin-bottom: var(--space-xs);
}

.step h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.step p { color: var(--color-text-muted); font-size: 0.92rem; }


/* ---------- 10. SERVICES (repairs) ----------------------------------- */
.services-list { border-top: var(--border); }

.service-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-md);
  align-items: start;
  padding: var(--space-sm) 0;
  border-bottom: var(--border);
}

.service-name { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 0.2rem; }
.service-desc { color: var(--color-text-muted); font-size: 0.9rem; max-width: 46ch; }
.service-note { color: var(--color-text-muted); font-size: 0.78rem; margin-top: 0.2rem; }

.service-price {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  white-space: nowrap;
  align-self: center;
}


/* ---------- 11. TESTIMONIALS ------------------------------------------ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}

.testimonial-card {
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.testimonial-quote {
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.8rem;
}
.testimonial-author span:first-child { font-family: var(--font-display); color: var(--color-text); }
.testimonial-detail { color: var(--color-text-muted); font-family: var(--font-mono); font-size: 0.75rem; }


/* ---------- 12. SUPPORT (FAQ + contact) -------------------------------- */
.support-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: start;
}

.faq-item {
  border-bottom: var(--border);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-sm) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-icon {
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-size: 1rem;
  transition: transform 0.15s ease;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }

.faq-item p {
  color: var(--color-text-muted);
  padding-bottom: var(--space-sm);
  max-width: 56ch;
}

.contact-card {
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.contact-info {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.contact-info a { color: var(--color-text); }
.contact-info a:hover { color: var(--color-accent-soft); }

.field { margin-bottom: var(--space-sm); }

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--color-surface-raised);
  border: var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  color: var(--color-text);
}
.field input:focus,
.field textarea:focus { border-color: var(--color-accent); }

.field textarea { resize: vertical; min-height: 100px; }

.form-note {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

.form-status {
  font-size: 0.85rem;
  margin-top: var(--space-sm);
}


/* ---------- 13. FOOTER --------------------------------------------------- */
footer {
  border-top: var(--border);
  padding: var(--space-lg) 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-row + .footer-row {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: var(--border);
  font-size: 0.78rem;
}

.footer-legal-links { display: flex; gap: var(--space-md); flex-wrap: wrap; }
.footer-legal-links a:hover { color: var(--color-accent-soft); }

.footer-row a:hover { color: var(--color-accent-soft); }


/* ---------- 14. RESPONSIVE ------------------------------------------------ */
@media (max-width: 860px) {
  .support-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root { --space-xl: 3.5rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: var(--border);
    flex-direction: column;
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-sm);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .steps { grid-template-columns: 1fr; }

  .service-row { grid-template-columns: 1fr; }
  .service-price { justify-self: start; }
}
