/* GSM PHONE REPAIR — style.css
   Mobile-first. Breakpoints: 480 / 768 / 1024. */

:root {
  /* Color */
  --c-bench: #1F5C63;        /* ESD mat teal */
  --c-bench-deep: #174850;
  --c-paper: #F6F9F9;        /* cool white */
  --c-glass: #DCE9EA;        /* glass mist */
  --c-ink: #14262A;
  --c-ink-soft: #3E5559;
  --c-steel: #8A9A9C;
  --c-solder: #F2A516;       /* single accent */
  --c-solder-deep: #C98506;
  --c-white: #FFFFFF;
  --c-line: #C9D6D7;
  --c-crack: #FFFFFF;
  --c-focus: #F2A516;

  /* Type */
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-0: 0.875rem;
  --fs-1: 1rem;
  --fs-2: 1.125rem;
  --fs-3: 1.375rem;
  --fs-4: 1.75rem;
  --fs-5: 2.25rem;
  --fs-6: 2.625rem;
  --lh-body: 1.6;
  --lh-tight: 1.08;

  /* Spacing */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --gutter: 1.25rem;
  --container: 72rem;
  --header-h: 4rem;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Shadows */
  --sh-part: 0 18px 30px -14px rgba(20, 38, 42, 0.45);
  --sh-plate: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 20px 40px -20px rgba(0, 0, 0, 0.5);
  --sh-header: 0 1px 0 var(--c-line);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 160ms;
  --t-med: 320ms;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s-4)); }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--fs-1);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--f-display);
  line-height: var(--lh-tight);
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -3rem;
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  background: var(--c-ink);
  color: var(--c-white);
  border-radius: var(--r-sm);
  text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: var(--s-3) var(--s-5);
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  font: 600 var(--fs-1)/1.2 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.button-primary { background: var(--c-solder); color: var(--c-ink); }
.button-primary:hover { background: var(--c-solder-deep); }
.button-ghost { border-color: var(--c-ink); color: var(--c-ink); background: transparent; }
.button-ghost:hover { background: var(--c-ink); color: var(--c-paper); }
.button-on-dark { border-color: var(--c-paper); color: var(--c-paper); }
.button-on-dark:hover { background: var(--c-paper); color: var(--c-bench-deep); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-paper);
  box-shadow: var(--sh-header);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: var(--s-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  text-decoration: none;
}
.brand-mark {
  width: 14px;
  height: 24px;
  border: 2.5px solid var(--c-ink);
  border-radius: 4px;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 6px;
  background: var(--c-solder);
  border-radius: 1px;
}
.brand-name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--fs-1);
  letter-spacing: 0.01em;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--r-sm);
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-ink);
  border-radius: 2px;
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--c-paper);
  border-bottom: 1px solid var(--c-line);
  display: none;
}
.site-nav.is-open { display: block; }
.nav-list {
  display: flex;
  flex-direction: column;
  padding: var(--s-2) var(--gutter) var(--s-5);
}
.nav-list a {
  display: block;
  padding: var(--s-3) 0;
  font-weight: 500;
  text-decoration: none;
}
.nav-list a:hover { color: var(--c-bench); }
.nav-list .nav-cta {
  margin-top: var(--s-3);
  text-align: center;
  background: var(--c-ink);
  color: var(--c-paper);
  border-radius: var(--r-pill);
}
.nav-list .nav-cta:hover { background: var(--c-bench); color: var(--c-paper); }

/* ---------- Hero ---------- */
.hero { padding-block: var(--s-7) var(--s-8); }
.hero-inner { display: grid; gap: var(--s-7); }
.hero-location {
  font-weight: 600;
  color: var(--c-bench);
  margin-bottom: var(--s-4);
}
.hero h1 {
  font-size: var(--fs-6);
  font-weight: 800;
  max-width: 16ch;
  text-wrap: balance;
}
.hero-lead {
  margin-top: var(--s-5);
  font-size: var(--fs-2);
  color: var(--c-ink-soft);
  max-width: 38ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

/* Exploded device */
.device {
  margin: 0;
  padding: var(--s-5) var(--s-4) var(--s-4);
  background: var(--c-bench);
  border-radius: var(--r-lg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}
.device-svg { width: 100%; height: auto; margin-inline: auto; max-width: 26rem; overflow: visible; }

.part { transition: transform var(--t-med) var(--ease); transform-box: fill-box; }
.part.is-active { transform: translateY(-10px); }

.board-base { fill: #2B7A62; stroke: #1B5443; stroke-width: 2; }
.board-chip { fill: var(--c-ink); }
.board-chip-small { fill: #33474B; }
.board-trace { fill: none; stroke: #D8B45A; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.board-dot { fill: #D8B45A; }

.battery-frame { fill: #C7D3D4; stroke: #9AABAD; stroke-width: 2; }
.battery-cell { fill: #2C3E42; }
.battery-level { fill: var(--c-solder); }
.battery-plus { stroke: var(--c-glass); stroke-width: 5; stroke-linecap: round; fill: none; }

.phone-body { fill: var(--c-ink); }
.phone-glass { fill: #3C6E75; }
.phone-notch { fill: var(--c-ink); }
.crack {
  fill: none;
  stroke: var(--c-crack);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.part.is-active .board-base { stroke: var(--c-solder); stroke-width: 4; }
.part.is-active.part-battery .battery-frame { stroke: var(--c-solder); stroke-width: 4; }
.part.is-active .phone-body { stroke: var(--c-solder); stroke-width: 4; }

/* The one orchestrated moment: glass "heals" once on load */
.is-ready .crack {
  stroke-dasharray: 120;
  stroke-dashoffset: 0;
  animation: heal 900ms var(--ease) 700ms forwards;
}
.is-ready .phone-glass { animation: glass-clear 900ms var(--ease) 900ms forwards; }
@keyframes heal {
  to { stroke-dashoffset: 120; opacity: 0; }
}
@keyframes glass-clear {
  to { fill: #4E8C94; }
}

.device-caption {
  display: flex;
  justify-content: space-between;
  gap: var(--s-2);
  margin-top: var(--s-4);
}
.device-label {
  flex: 1;
  text-align: center;
  padding: var(--s-1) var(--s-2);
  font-size: var(--fs-0);
  font-weight: 600;
  color: var(--c-glass);
  border: 1px solid rgba(220, 233, 234, 0.35);
  border-radius: var(--r-pill);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.device-label.is-active { background: var(--c-solder); color: var(--c-ink); border-color: var(--c-solder); }

/* ---------- Sections shared ---------- */
.repairs,
.process,
.visit,
.contact { padding-block: var(--s-8); }

.section-head { margin-bottom: var(--s-6); max-width: 40rem; }
.section-head h2 { font-size: var(--fs-5); font-weight: 700; }
.section-head p { margin-top: var(--s-3); color: var(--c-ink-soft); }

/* ---------- Repairs ---------- */
.repair-list { border-top: 2px solid var(--c-ink); }
.repair {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-5) var(--s-3);
  border-bottom: 1px solid var(--c-line);
  border-left: 4px solid transparent;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  cursor: default;
}
.repair.is-active { background: var(--c-white); border-left-color: var(--c-solder); }
.repair-title { font-size: var(--fs-3); font-weight: 700; }
.repair-signs { color: var(--c-ink-soft); max-width: 60ch; }
.repair-fix { font-weight: 600; max-width: 60ch; }

/* ---------- Process ---------- */
.process { background: var(--c-glass); }
.steps { display: grid; gap: var(--s-5); counter-reset: step; }
.step {
  counter-increment: step;
  position: relative;
  padding-left: 3.5rem;
}
.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  font: 800 var(--fs-2)/1 var(--f-display);
  color: var(--c-paper);
  background: var(--c-bench);
  border-radius: 50%;
}
.step-title { font-size: var(--fs-2); font-weight: 700; margin-bottom: var(--s-1); }
.step p { color: var(--c-ink-soft); max-width: 40ch; }

/* ---------- Visit ---------- */
.visit { background: var(--c-bench-deep); color: var(--c-paper); }
.visit-inner { display: grid; gap: var(--s-7); align-items: center; }
.visit-copy h2 { font-size: var(--fs-5); font-weight: 700; }
.visit-address {
  margin-block: var(--s-4);
  font-family: var(--f-display);
  font-size: var(--fs-3);
  font-weight: 500;
  line-height: 1.3;
}
.visit-copy p { color: var(--c-glass); max-width: 40ch; margin-bottom: var(--s-5); }

.visit-plate {
  justify-self: start;
  display: grid;
  padding: var(--s-5) var(--s-6);
  background: var(--c-bench);
  border: 3px solid var(--c-paper);
  border-radius: var(--r-md);
  box-shadow: var(--sh-plate);
  line-height: 1;
}
.plate-number { font: 800 5rem/0.9 var(--f-display); letter-spacing: -0.04em; }
.plate-street { font: 700 var(--fs-3)/1.2 var(--f-display); margin-top: var(--s-2); }
.plate-suite {
  margin-top: var(--s-3);
  justify-self: start;
  padding: var(--s-1) var(--s-3);
  background: var(--c-solder);
  color: var(--c-ink);
  font-weight: 600;
  font-size: var(--fs-0);
  border-radius: var(--r-sm);
}

/* ---------- Contact ---------- */
.contact-inner { display: grid; gap: var(--s-6); }
.contact-copy h2 { font-size: var(--fs-5); font-weight: 700; }
.contact-copy p { margin-top: var(--s-3); color: var(--c-ink-soft); max-width: 42ch; }
.contact-copy a { color: var(--c-bench); font-weight: 600; overflow-wrap: anywhere; }

.contact-form {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-5);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
}
.field { display: grid; gap: var(--s-2); margin: 0; padding: 0; border: 0; min-width: 0; }
.field label,
.field legend { font-weight: 600; font-size: var(--fs-0); padding: 0; }
.field legend { margin-bottom: var(--s-2); }
.field input[type="text"],
.field textarea {
  width: 100%;
  padding: var(--s-3);
  font: inherit;
  color: var(--c-ink);
  background: var(--c-paper);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-sm);
  transition: border-color var(--t-fast) var(--ease);
}
.field input[type="text"]:focus,
.field textarea:focus { border-color: var(--c-bench); outline: none; box-shadow: 0 0 0 3px rgba(31, 92, 99, 0.2); }
.field textarea { resize: vertical; min-height: 7rem; }
.field .is-invalid { border-color: #B3261E; }

.choices { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-block;
  padding: var(--s-2) var(--s-4);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-pill);
  font-size: var(--fs-0);
  font-weight: 500;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.choice input:checked + span { background: var(--c-ink); color: var(--c-paper); border-color: var(--c-ink); }
.choice input:focus-visible + span { outline: 3px solid var(--c-focus); outline-offset: 2px; }

.form-status { min-height: 1.5em; font-size: var(--fs-0); color: var(--c-ink-soft); }
.form-status.is-error { color: #B3261E; }
.contact-form .button { width: 100%; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-ink);
  color: var(--c-glass);
  padding-block: var(--s-7) var(--s-5);
  font-size: var(--fs-0);
}
.footer-inner { display: grid; gap: var(--s-6); }
.footer-brand .brand-name { color: var(--c-paper); font-size: var(--fs-2); }
.footer-brand p { margin-top: var(--s-2); max-width: 32ch; }
.legal { margin: 0; display: grid; gap: var(--s-3); }
.legal-row { display: grid; gap: 0.125rem; }
.legal dt { color: var(--c-steel); }
.legal dd { margin: 0; color: var(--c-paper); word-break: break-word; }
.legal a { color: var(--c-solder); }
.copyright {
  padding-top: var(--s-5);
  border-top: 1px solid rgba(220, 233, 234, 0.15);
  color: var(--c-steel);
}

/* ---------- 480 ---------- */
@media (min-width: 480px) {
  :root { --gutter: 1.5rem; --fs-6: 3rem; }
  .contact-form .button { width: auto; justify-self: start; }
  .legal-row { grid-template-columns: 11rem 1fr; gap: var(--s-4); }
}

/* ---------- 768 ---------- */
@media (min-width: 768px) {
  :root { --gutter: 2rem; --fs-5: 2.75rem; --fs-6: 3.5rem; --header-h: 4.5rem; }

  .nav-toggle { display: none; }
  .site-nav { position: static; display: block; background: none; border: 0; }
  .nav-list { flex-direction: row; align-items: center; gap: var(--s-5); padding: 0; }
  .nav-list a { padding: var(--s-2) 0; }
  .nav-list .nav-cta { margin-top: 0; padding: var(--s-2) var(--s-5); }

  .repair {
    grid-template-columns: 14rem 1fr 1fr;
    gap: var(--s-6);
    align-items: start;
    padding-inline: var(--s-4);
  }

  .steps { grid-template-columns: repeat(2, 1fr); gap: var(--s-6); }

  .visit-inner { grid-template-columns: 1.3fr 1fr; }
  .visit-plate { justify-self: center; }

  .footer-inner { grid-template-columns: 1fr 2fr; }
  .copyright { grid-column: 1 / -1; }
}

/* ---------- 1024 ---------- */
@media (min-width: 1024px) {
  :root { --fs-6: 4.25rem; --fs-5: 3rem; }
  .hero { padding-block: var(--s-8) var(--s-9); }
  .hero-inner { grid-template-columns: 1.1fr 1fr; align-items: center; gap: var(--s-8); }
  .repairs,
  .process,
  .visit,
  .contact { padding-block: var(--s-9); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .step { padding-left: 0; padding-top: 3.5rem; }
  .contact-inner { grid-template-columns: 1fr 1.2fr; align-items: start; gap: var(--s-8); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
  .part.is-active { transform: none; }
}
