/* ============================================================
   KD PC BUILDS AND REPAIRS — Stylesheet
   ------------------------------------------------------------
   DESIGN TOKENS live at the top of this file inside :root.
   To re-theme the whole site, change values here only.
   ============================================================ */

:root {
  /* ---- Color: strict black & white with grayscale structure ---- */
  --ink:        #0a0a0a;   /* page background */
  --ink-2:      #121212;   /* raised panel / card background */
  --ink-3:      #1c1c1c;   /* card border / hairlines on dark */
  --paper:      #fafaf8;   /* inverted panel background (white) */
  --paper-2:    #ececea;   /* inverted panel secondary */
  --white:      #f5f5f3;   /* primary text on dark */
  --white-dim:  #b3b3b0;   /* secondary text on dark */
  --white-mute: #6f6f6c;   /* tertiary text / placeholders on dark */
  --black-text: #0a0a0a;   /* primary text on light */
  --black-dim:  #4a4a48;   /* secondary text on light */
  --line:       #2a2a28;   /* hairline dividers on dark */
  --line-soft:  #1a1a18;

  /* ---- Type ---- */
  --font-display: "Space Grotesk", "Archivo", sans-serif;
  --font-body:    "Inter", -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", "IBM Plex Mono", monospace;

  /* ---- Layout ---- */
  --container: 1180px;
  --gutter: 24px;
  --radius: 2px; /* near-sharp corners: technical, spec-sheet feel */

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.5s;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------- Typography ---------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--white);
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.25rem; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--white);
  display: inline-block;
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head p { margin-top: 14px; font-size: 1.05rem; }
.section-head.center { margin-inline: auto; text-align: center; }

section { padding: 110px 0; position: relative; }
section.tight { padding: 90px 0; }

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--white);
  border-radius: var(--radius);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--white);
  color: var(--ink);
}
.btn-primary:hover { background: transparent; color: var(--white); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--white);
}
.btn-ghost:hover { background: var(--white); color: var(--ink); transform: translateY(-2px); }

.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------------- Header ---------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .mark {
  width: 30px; height: 30px;
  border: 1px solid var(--white);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.logo small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--white-mute);
  font-weight: 400;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--white-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s var(--ease);
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--white); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--white);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-phone {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--white-dim);
}

.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: flex-end;
}
.nav-toggle span {
  width: 100%; height: 1px;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), width 0.3s var(--ease);
}
.nav-toggle span:nth-child(2) { width: 70%; }
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); width: 100%; }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); width: 100%; }

/* ---------------- Hero ---------------- */
.hero {
  padding: 168px 0 110px;
  position: relative;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 46px 46px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 75%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 75%, transparent 100%);
}
.hero .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-copy .eyebrow { margin-bottom: 22px; }
.hero-copy h1 { margin-bottom: 22px; }
.hero-copy .lede {
  font-size: 1.12rem;
  max-width: 480px;
  margin-bottom: 38px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-meta {
  display: flex;
  gap: 34px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--white-mute);
  border-top: 1px solid var(--line);
  padding-top: 20px;
  flex-wrap: wrap;
}
.hero-meta strong { color: var(--white); display: block; font-family: var(--font-display); font-size: 1rem; margin-bottom: 2px;}

/* ---- Hero diagram (signature element): spec-sheet callout tower ---- */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.diagram {
  width: 100%;
  max-width: 420px;
  height: auto;
}
.diagram-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  fill: var(--white-dim);
  letter-spacing: 0.02em;
}
.diagram-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--ink);
}
.diagram-line { stroke: var(--white-mute); stroke-width: 1; }
.diagram-tower { stroke: var(--white-dim); fill: none; stroke-width: 1.1; }
.diagram-fill { fill: var(--ink-2); }
.diagram-dot { fill: var(--white); }
.diagram-chip { stroke: var(--line); fill: none; }

/* ---------------- Services ---------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card {
  background: var(--ink);
  padding: 38px 32px;
  transition: background 0.3s var(--ease);
}
.service-card:hover { background: var(--ink-2); }
.service-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--white-mute);
  margin-bottom: 22px;
  display: block;
}
.service-icon {
  width: 40px; height: 40px;
  margin-bottom: 22px;
  color: var(--white);
}
.service-icon svg { width: 100%; height: 100%; }
.service-card h3 { margin-bottom: 10px; }
.service-card p { font-size: 0.95rem; margin-bottom: 20px; }
.service-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--white-mute);
  padding-bottom: 3px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.service-link:hover { border-color: var(--white); color: var(--white); }

/* ---------------- Builds process ---------------- */
.process-rail {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 70px;
}
.process-step {
  padding: 30px 22px;
  border-right: 1px solid var(--line);
  position: relative;
}
.process-step:last-child { border-right: none; }
.process-step .step-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--white-mute);
  display: block;
  margin-bottom: 14px;
}
.process-step h4 { font-size: 1rem; margin-bottom: 8px; }
.process-step p { font-size: 0.86rem; }

.builds-categories {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.build-tag {
  border: 1px solid var(--line);
  padding: 20px 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--white-dim);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.build-tag:hover { border-color: var(--white); color: var(--white); }

.builds-cta {
  margin-top: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 1px solid var(--line);
  padding: 34px;
  flex-wrap: wrap;
}
.builds-cta p { max-width: 480px; margin: 0; color: var(--white-dim); }

/* ---------------- Repairs ---------------- */
.repairs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.repair-item {
  background: var(--ink);
  padding: 26px 30px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.repair-item .mark-x {
  font-family: var(--font-mono);
  color: var(--white-mute);
  font-size: 0.85rem;
  padding-top: 3px;
}
.repair-item h4 { font-size: 1rem; margin-bottom: 6px; }
.repair-item p { font-size: 0.88rem; margin: 0; }

/* ---------------- Why choose us ---------------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 30px;
}
.why-item .eyebrow { margin-bottom: 14px; font-size: 0.7rem; }
.why-item h4 { font-size: 1.02rem; margin-bottom: 8px; }
.why-item p { font-size: 0.88rem; }

/* ---------------- Testimonials ---------------- */
.testimonial-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--white-mute);
  border: 1px dashed var(--line);
  padding: 12px 16px;
  margin-bottom: 44px;
  display: inline-block;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.testimonial-card {
  border: 1px solid var(--line);
  padding: 32px 28px;
}
.testimonial-quote {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--white);
  margin-bottom: 22px;
  line-height: 1.5;
}
.testimonial-author {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--white-mute);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* ---------------- About ---------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: start;
}
.about-panel {
  border: 1px solid var(--line);
  padding: 34px;
}
.about-panel .eyebrow { margin-bottom: 18px; }
.about-list li {
  font-size: 0.94rem;
  color: var(--white-dim);
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 12px;
}
.about-list li:first-child { border-top: none; }
.about-list li::before {
  content: ">";
  font-family: var(--font-mono);
  color: var(--white-mute);
}

/* ---------------- FAQ ---------------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--white);
}
.faq-question .q-icon {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--white-mute);
  transition: transform 0.3s var(--ease);
  flex-shrink: 0;
}
.faq-item[aria-expanded="true"] .q-icon,
.faq-question[aria-expanded="true"] .q-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
}
.faq-answer p {
  padding: 0 4px 24px;
  font-size: 0.95rem;
  max-width: 640px;
}

/* ---------------- Contact / Quote form ---------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
}
.contact-info .eyebrow { margin-bottom: 20px; }
.contact-info h2 { margin-bottom: 18px; }
.contact-info p { margin-bottom: 34px; max-width: 420px; }

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 34px;
}
.contact-detail a, .contact-detail span {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--white);
  display: block;
}
.contact-detail .label {
  font-size: 0.72rem;
  color: var(--white-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  font-family: var(--font-mono);
}

.form-panel {
  border: 1px solid var(--line);
  padding: 40px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white-mute);
  margin-bottom: 9px;
}
.field .req { color: var(--white); }
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--white);
  padding: 13px 14px;
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--white);
  outline: none;
}
.field textarea { resize: vertical; min-height: 110px; }
.field .error-msg {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--white);
  margin-top: 7px;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--white); }
.field.has-error .error-msg { display: block; }

fieldset.field {
  border: none;
  padding: 0;
}
.radio-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 8px; }
.radio-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--white-dim);
  letter-spacing: 0;
}
.radio-row input { width: auto; accent-color: var(--white); }

.form-success {
  display: none;
  border: 1px solid var(--white);
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-align: center;
}
.form-success.show { display: block; }
.form-panel.submitted form { display: none; }

/* ---------------- Sticky mobile CTA ---------------- */
.sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  display: none;
  border-top: 1px solid var(--line);
  background: var(--ink);
}
.sticky-cta-row { display: grid; grid-template-columns: 1fr 1fr; }
.sticky-cta a {
  padding: 16px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sticky-cta .call { color: var(--white); border-right: 1px solid var(--line); }
.sticky-cta .quote { background: var(--white); color: var(--ink); }

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; max-width: 280px; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white-mute);
  margin-bottom: 18px;
}
.footer-col li { margin-bottom: 12px; }
.footer-col a { font-size: 0.92rem; color: var(--white-dim); transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }
.footer-social { display: flex; gap: 14px; margin-top: 18px; }
.footer-social a {
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  transition: border-color 0.2s, color 0.2s;
}
.footer-social a:hover { border-color: var(--white); color: var(--white); }

.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--white-mute);
}
.footer-bottom a { color: var(--white-mute); }
.footer-bottom a:hover { color: var(--white); }

/* ---------------- Reveal-on-scroll ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ================= Responsive ================= */
@media (max-width: 1024px) {
  .services-grid, .repairs-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .process-rail { grid-template-columns: repeat(3, 1fr); }
  .process-step:nth-child(3) { border-right: none; }
  .builds-categories { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 20px; }
  .diagram { max-width: 300px; }
}

@media (max-width: 780px) {
  section { padding: 80px 0; }
  .nav-links { display: none; }
  .nav-phone { display: none !important; }
  .nav-toggle { display: flex; }
  .services-grid, .repairs-grid, .why-grid { grid-template-columns: 1fr; }
  .process-rail { grid-template-columns: 1fr; }
  .process-step { border-right: none; border-bottom: 1px solid var(--line); }
  .process-step:last-child { border-bottom: none; }
  .builds-categories { grid-template-columns: repeat(2, 1fr); }
  .builds-cta { flex-direction: column; align-items: flex-start; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .sticky-cta { display: block; }
  body { padding-bottom: 54px; }

  /* mobile nav panel */
  .nav-links.mobile-open {
    display: flex;
    position: fixed;
    top: 78px; left: 0; right: 0; bottom: 0;
    background: var(--ink);
    flex-direction: column;
    padding: 34px var(--gutter);
    gap: 26px;
    align-items: flex-start;
    overflow-y: auto;
  }
  .nav-links.mobile-open a { font-size: 1.2rem; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}
