/* ============ Chips & Solder — black / gold / copper, modern ============ */

:root {
  --bg: #0b0a08;
  --bg-alt: #121110;
  --bg-card: #171412;
  --bg-inset: #0d0b0a;
  --border: #2e2822;
  --border-soft: #24201b;
  --text: #f2efe8;
  --text-muted: #a8a096;
  --accent: #d4b36a;        /* logo gold */
  --accent-strong: #e3c880;
  --accent-soft: rgba(212, 179, 106, .12);
  --copper: #b07c45;        /* logo copper */
  --copper-soft: rgba(176, 124, 69, .35);
  --radius: 12px;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

section { scroll-margin-top: 104px; }
img { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; }
.section-title, .hero h1, .cta-band h2 { text-wrap: balance; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; }

/* ============ Buttons ============ */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease, transform .08s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #161310; font-weight: 700; }
/* compact utility button for in-row actions (waitlist etc.) */
.btn-inline { padding: 7px 13px; font-size: .88rem; }
.btn-primary:hover { background: var(--accent-strong); color: #161310; }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============ Nav ============ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  background: rgba(11, 10, 8, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-brand { display: flex; align-items: center; gap: 18px; }
.nav-logo { display: inline-flex; }
.nav-logo img { display: block; width: auto; }
/* 1px gap + 7px padding keeps the visual rhythm while making each icon a ~31px tap target */
.nav-socials, .footer-socials { display: flex; align-items: center; gap: 1px; }
.nav-socials { padding-left: 18px; border-left: 1px solid var(--border); }
.nav-socials a, .footer-socials a { display: inline-flex; padding: 7px; color: var(--text-muted); }
.nav-socials a:hover, .footer-socials a:hover { color: var(--accent); }
.nav-socials svg, .footer-socials svg { width: 17px; height: 17px; }
.nav-wordmark em { color: var(--copper); font-style: normal; }

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-cta { flex-shrink: 0; }
.nav-links a:not(.btn) { color: var(--text-muted); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links a.active:not(.btn) { color: var(--accent); font-weight: 600; }

/* subpage headers + CTA band */
.page-head { padding: 72px 0 10px; }
.page-head .section-sub { margin-bottom: 6px; }
.section-tight { padding-top: 42px; }

.cta-band { background: var(--accent-soft); border-top: 1px solid var(--copper-soft); border-bottom: 1px solid var(--copper-soft); padding: 58px 24px; text-align: center; }
.cta-band h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 3.2vw, 1.9rem); margin: 0 0 10px; }
.cta-band p { color: var(--text-muted); margin: 0 auto 24px; max-width: 520px; }

/* ============ Hero ============ */

.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("/assets/hero-mobile.webp");
  background-size: cover;
  background-position: center center;
}
@media (min-width: 700px) {
  .hero-bg { background-image: url("/assets/hero.webp"); background-position: center center; }
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 50% 30%, transparent 30%, rgba(11, 10, 8, .55) 100%),
    linear-gradient(180deg, rgba(11, 10, 8, .6) 0%, rgba(11, 10, 8, .38) 40%, rgba(11, 10, 8, .96) 100%);
}

.hero-inner { position: relative; max-width: 1080px; margin: 0 auto; padding: 88px 24px 72px; }
.hero-kicker {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.12;
  font-weight: 700;
  margin: 0 0 20px;
  max-width: 640px;
}
.hero-sub { max-width: 560px; color: #d8d2c6; font-size: 1.1rem; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }

.hero-badges { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; }
.hero-badges li {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #cfc8ba;
  white-space: nowrap;
}
.hero-badges li + li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--copper);
  margin: 0 16px;
  vertical-align: 1px;
}

/* ============ Sections ============ */

.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

.section-title { font-size: clamp(1.5rem, 3.4vw, 2.05rem); font-weight: 700; text-align: center; margin: 0; }
.section-sub { text-align: center; color: var(--text-muted); max-width: 640px; margin: 14px auto 44px; }

.grid-3, .grid-4 { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .15s ease;
}
.card:hover { border-color: var(--border); }
.card-plain:hover { border-color: var(--border-soft); }

.card h3 { margin: 14px 0 8px; font-size: 1.04rem; }
.card p { margin: 0; color: var(--text-muted); font-size: .93rem; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card-icon svg { width: 24px; height: 24px; }

.fineprint { color: var(--text-muted); font-size: .88rem; text-align: center; margin-top: 26px; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .95rem; }

/* ============ Steps with circuit-trace connector ============ */

.steps {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  position: relative;
  /* trace spans node-center to node-center (10% → 90% of width) at y=15px;
     26px node starting at top 2px centers on the same line */
  background-image: linear-gradient(90deg, var(--copper) 0 100%);
  background-repeat: no-repeat;
  background-size: 80% 2px;
  background-position: 50% 15px;
}
.steps li { position: relative; padding-top: 44px; }
.steps li::before {
  /* numbered node, centered on its column */
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--copper);
  box-shadow: 0 0 0 3px var(--bg-alt);
}
.step-num {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  line-height: 26px;
  text-align: center;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
}
/* node fill must match the section it sits on (steps appear on both bg and bg-alt bands) */
.section:not(.section-alt) .steps li::before { background: var(--bg); box-shadow: 0 0 0 3px var(--bg); }
.steps h3 { font-size: .98rem; margin: 0 0 8px; }
.steps p { color: var(--text-muted); font-size: .87rem; margin: 0; }

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--copper-soft);
  border-radius: var(--radius);
  padding: 24px;
}
.callout h3 { margin: 0 0 8px; font-size: 1rem; }
.callout p { margin: 0; color: var(--text-muted); }

/* ============ Wizard ============ */

.pause-banner {
  background: var(--accent-soft);
  border: 1px solid var(--copper-soft);
  border-left: 3px solid var(--copper);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: .92rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.pause-banner strong { color: var(--text); }

.wizard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-soft);
}
.wizard-progress li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 10px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-right: 1px solid var(--border-soft);
  background: var(--bg-inset);
}
.wizard-progress li b { font-weight: 700; }
.wizard-progress li:last-child { border-right: 0; }
.wizard-progress li.is-active {
  color: var(--text);
  background: var(--bg-card);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.wizard-progress li.is-done { color: var(--accent); }

.wizard-body { padding: 30px 28px 26px; }
.wizard-body h3 { margin: 0 0 20px; font-size: 1.2rem; }
.step-hint { color: var(--text-muted); font-size: .9rem; margin: -12px 0 20px; }

.choice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.choice-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.visual-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .12s ease;
  font-family: var(--font-body);
}
.visual-card:hover { border-color: var(--accent); }
.visual-card img {
  width: 100%;
  height: 132px;
  object-fit: contain;
  display: block;
}
.visual-label {
  display: block;
  font-size: .93rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}
.choice-arrow { color: var(--accent); font-weight: 700; }


.repair-list { display: grid; gap: 10px; }
.repair-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease;
}
.repair-item:hover { border-color: var(--border); }
.repair-item.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.repair-item input { width: 19px; height: 19px; accent-color: var(--accent); }
.repair-item .r-name { font-weight: 600; }
.repair-item .r-note { display: block; color: var(--text-muted); font-size: .82rem; font-weight: 400; margin-top: 2px; }
.repair-item .r-price {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  text-align: right;
}
.repair-item.is-out { opacity: .75; cursor: default; }
.repair-item.is-out:hover { border-color: var(--border); }
.repair-item.is-out .r-name { color: var(--text-muted); }
.repair-item.is-out .r-note { color: var(--copper); }
.ok-note { color: #4ade80 !important; }

.waitlist-form { display: flex; gap: 8px; flex-wrap: wrap; grid-column: 2 / -1; }
/* compact Turnstile widget is ~120px tall; reserving it avoids the row jumping when it renders */
.ts-inline { flex-basis: 100%; margin-top: 4px; min-height: 122px; }
.waitlist-form input {
  flex: 1;
  min-width: 170px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  /* never below 16px: iOS Safari zooms the viewport on focus otherwise */
  font-size: max(.92rem, 16px);
  padding: 9px 12px;
}
.waitlist-form input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.repair-item .r-price.diag {
  color: var(--copper);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid var(--copper-soft);
  border-radius: 3px;
  padding: 4px 8px;
}
.r-few {
  display: block;
  font-family: var(--font-body);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--copper);
}

.wizard-total {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--copper-soft);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.wizard-total .amt { font-family: var(--font-display); font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 28px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-inset);
}
.wizard-crumb { color: var(--text-muted); font-size: .85rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.form-grid label { display: grid; gap: 7px; font-size: .9rem; font-weight: 600; color: var(--text-muted); }
.form-grid .opt { font-weight: 400; color: var(--text-muted); }
.form-grid input, .form-grid textarea {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
}
.form-grid input:focus, .form-grid textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.span-2 { grid-column: span 2; }

.liquid-q {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.liquid-title { margin: 0 0 10px; font-size: .93rem; font-weight: 600; color: var(--text); }
.req { color: var(--copper); }
.liquid-opts { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.liquid-opts label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .93rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.liquid-opts input { accent-color: var(--accent); width: 17px; height: 17px; }
.liquid-note { margin: 10px 0 0; font-size: .8rem; color: var(--text-muted); }

.quote-summary {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 22px;
  background: var(--bg-inset);
}
.quote-summary h4 { margin: 0 0 10px; font-size: .92rem; color: var(--accent); }
.quote-summary ul { margin: 0 0 10px; padding-left: 20px; color: var(--text-muted); font-size: .92rem; }
.quote-summary .sum-total { font-weight: 700; color: var(--text); }

.ts-slot { margin: 0 0 18px; min-height: 65px; }

.submit-status { margin: 14px 0 0; font-size: .95rem; min-height: 1.4em; }
.submit-status.ok { color: #4ade80; }
.submit-status.err { color: #f87171; }

.wizard-result { text-align: center; padding: 20px 0; }
.wizard-result .big { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; margin: 0 0 10px; }
.wizard-result .ticket { font-size: .95rem; color: var(--accent); font-weight: 700; margin-bottom: 22px; }
.wizard-result .next { text-align: left; max-width: 560px; margin: 0 auto 26px; color: var(--text-muted); }
.wizard-result .next ol { padding-left: 22px; }
.wizard-result .next li { margin-bottom: 8px; }

/* ============ FAQ ============ */

.faq {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--bg-card);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 17px 22px;
  font-weight: 600;
  font-family: var(--font-display);
  list-style: none;
  position: relative;
  padding-right: 46px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
}
.faq[open] summary::after { content: "–"; }
.faq p { margin: 0; padding: 0 22px 18px; color: var(--text-muted); }

/* ============ Reveal on show ============ */

/* elements toggled via [hidden] (wizard steps, status result) fade up when shown */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .wizard-step:not([hidden]),
  .wizard-result:not([hidden]),
  .wizard-total:not([hidden]),
  .result:not([hidden]) { animation: rise-in .3s ease; }
  .faq[open] p { animation: rise-in .22s ease; }
}

/* ============ Footer ============ */

.footer { border-top: 1px solid var(--border-soft); background: var(--bg-alt); padding: 44px 0 calc(28px + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-brand { text-align: center; }
.footer-brand .footer-wordmark { display: block; margin: 0 auto 12px; }
.footer-brand .fineprint { max-width: 300px; margin: 0 auto; }
.footer-col { display: grid; gap: 8px; align-content: start; align-items: start; }
.footer-col h4 {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
}
.footer-col a { color: var(--text-muted); text-decoration: none; font-size: .92rem; }
.footer-col a:hover { color: var(--text); }
.footer-col .fineprint { margin: 0; text-align: left; }
.footer-socials { margin-top: 2px; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.footer-bottom .fineprint { margin: 0; }

/* ============ Responsive ============ */

@media (max-width: 940px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; background-image: none; gap: 14px; }
  .steps li { padding: 16px 16px 2px 44px; border-top: 1px solid var(--border-soft); }
  .steps li:first-child { border-top: 0; }
  .steps li::before { top: 14px; left: 0; transform: none; }
  .step-num { top: 14px; left: 0; transform: none; }
  /* separators between badges land at line starts when the list wraps — drop them */
  .hero-badges li + li::before { display: none; }
  .hero-badges { row-gap: 8px; }
}

/* ---- compact two-row nav: [logo · socials · quote] / [links] ---- */
@media (max-width: 979px) {
  .nav { flex-wrap: wrap; row-gap: 8px; padding: 10px 16px 12px; }
  .nav-brand { order: 1; flex: 1 1 auto; min-width: 0; gap: 14px; }
  .nav-cta { order: 2; padding: 9px 16px; font-size: .95rem; line-height: 1.2; }
  .nav-logo img { height: 46px; width: auto; }
  .nav-socials { border-left: 0; padding-left: 0; margin-left: auto; }
  .nav-links {
    order: 3;
    flex-basis: 100%;
    gap: 8px 14px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  /* auto margins instead of justify-content: center — keeps the row centered
     when it fits and scrollable end-to-end when it doesn't */
  .nav-links a:first-child { margin-left: auto; }
  .nav-links a:last-child { margin-right: auto; }
  .nav-links a:not(.btn) { font-size: .9rem; white-space: nowrap; }
}

@media (max-width: 559px) {
  .nav-socials { display: none; }  /* still available in the footer */
  .nav { padding-left: 12px; padding-right: 12px; }
  .nav-links { gap: 6px 10px; }
  .nav-links a:not(.btn) { font-size: .88rem; }
}

@media (max-width: 700px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: repeat(2, 1fr); }
  .choice-list { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .wizard-body { padding: 24px 18px; }
  .wizard-nav { padding: 12px 18px; }
  .wizard-progress li span { display: none; }
  .nav-links a[href="/"] { display: none; }
  .hero-inner { padding: 64px 24px 64px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}
