/* ==========================================================================
   Electro Fix — prospect concept
   Workbench meets café. Espresso / crema / steam white / teal, humanist type.
   ========================================================================== */

:root {
  /* Palette — proposed demo direction (no verified brand colours) */
  --espresso: #2b1d16;
  --espresso-2: #3a2a22;
  --roast: #4b372c;
  --crema: #e8c9a0;
  --crema-soft: #f4e6d2;
  --steam: #fbf7f2;
  --teal: #0f7f81;          /* button-safe teal */
  --teal-dark: #0b6365;
  --teal-bright: #14a3a5;
  --metal: #c9b7a2;

  --text: #2b1d16;
  --text-soft: #67564a;
  --on-dark: #fbf3e8;
  --on-dark-soft: #d4c2ad;
  --line: #e7dacb;
  --focus: #0f7f81;

  --font-display: "Optima", "Candara", "Segoe UI", "Gill Sans", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;

  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --section: clamp(4rem, 9vw, 7rem);

  --radius: 8px;
  --radius-card: 18px;
  --container: 71.25rem;
  --container-wide: 85rem;
  --header-h: 4.25rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--steam);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 var(--space-2); }

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

.wrap { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.wrap--wide { width: min(100% - 2.5rem, var(--container-wide)); }

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--espresso);
  color: var(--on-dark);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.icon {
  width: 1.15em; height: 1.15em;
  fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: var(--space-2);
}
.eyebrow--crema { color: var(--crema); }

.part-tag {
  display: inline-block;
  padding: .12rem .5rem;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--teal-dark);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 2.9rem;
  padding: .7rem 1.3rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: 700 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--lg { min-height: 3.4rem; padding: .85rem 1.6rem; font-size: 1.05rem; }
.btn--teal { background: var(--teal); color: #fff; }
.btn--teal:hover { background: var(--teal-dark); }
.btn--crema { background: var(--crema-soft); color: var(--espresso); border-color: var(--crema); }
.btn--crema:hover { background: var(--crema); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 242, .95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  margin-right: auto;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.4rem; height: 2.4rem;
  border-radius: 8px;
  background: var(--espresso);
  flex: none;
}
.brand-mark svg { width: 1.8rem; height: 1.8rem; }
.brand-mark svg path { fill: var(--crema); }
.brand-mark svg .handle { fill: none; stroke: var(--crema); stroke-width: 2; }
.brand-mark svg .bolt { fill: none; stroke: var(--teal-bright); stroke-width: 2; stroke-linecap: round; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; }
.brand-sub { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .06em; color: var(--text-soft); margin-top: .25rem; }

.site-nav { display: none; }
.site-nav ul { display: flex; gap: var(--space-4); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--teal-bright); }

.header-call { padding-inline: .9rem; min-height: 2.6rem; }
.header-call span { display: none; }

@media (min-width: 30rem) {
  .header-call span { display: inline; }
}
@media (min-width: 60rem) {
  .site-nav { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(36rem 24rem at 80% 30%, rgba(232, 201, 160, .45), transparent 70%),
    var(--steam);
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
  overflow: hidden;
}
.hero-grid { display: grid; gap: var(--space-6); align-items: center; }
.tag-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-soft);
  margin-bottom: var(--space-3);
}
.hero h1 { max-width: 14ch; margin-bottom: var(--space-3); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.22rem); color: var(--text-soft); max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: var(--space-4) 0 var(--space-3); }

.open-status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-soft);
  margin: 0;
}
.open-status::before {
  content: "";
  width: .65rem; height: .65rem;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}
.open-status.is-open { color: #1b7a55; }
.open-status.is-open::before { background: #2aa774; box-shadow: 0 0 0 4px rgba(42, 167, 116, .18); }
.open-status.is-closed { color: #9b3d22; }
.open-status.is-closed::before { background: #d0603c; }

/* Exploded machine */
.exploded { margin: 0; justify-self: center; width: min(100%, 30rem); text-align: center; }
.exploded svg { width: 100%; height: auto; overflow: visible; }
.part, .body .front { transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .4s ease; transform-box: view-box; }
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  fill: var(--teal-dark);
  opacity: 0;
  transition: opacity .3s ease .2s;
}
.part--tank, .part--pump, .part--heater, .part--board { opacity: 0; }
.exploded.is-exploded .part { opacity: 1; }
.exploded.is-exploded .label { opacity: 1; }
.exploded.is-exploded .body .front { opacity: .25; }
.exploded.is-exploded .part--tank { transform: translate(-62px, 0); }
.exploded.is-exploded .part--pump { transform: translate(-58px, -58px); }
.exploded.is-exploded .part--heater { transform: translate(64px, -58px); }
.exploded.is-exploded .part--board { transform: translate(0, -96px); }
.exploded.is-exploded .part--porta { transform: translate(34px, 26px); }
.exploded.is-exploded .part--tray { transform: translate(0, 34px); }

.explode-btn {
  margin-top: var(--space-3);
  padding: .55rem 1.1rem;
  border: 2px solid var(--espresso);
  border-radius: 999px;
  background: transparent;
  color: var(--espresso);
  font: 700 .95rem/1.2 var(--font-body);
  cursor: pointer;
}
.explode-btn:hover { background: var(--espresso); color: var(--on-dark); }

@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 1.15fr 1fr; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-head { max-width: 44rem; margin-bottom: var(--space-6); }

/* Repairs */
.repairs { background: #fff; border-block: 1px solid var(--line); }
.repair-grid { display: grid; gap: var(--space-3); }
.repair {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--steam);
  border: 1px solid var(--line);
}
.repair .part-tag { margin-bottom: var(--space-2); }
.repair p { color: var(--text-soft); margin: 0; }
.repair--feature { background: var(--espresso); color: var(--on-dark); border-color: var(--espresso); }
.repair--feature p { color: var(--on-dark-soft); }
.repair--feature .part-tag { color: var(--crema); }

@media (min-width: 52rem) {
  .repair-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* Parts */
.parts { background: var(--espresso-2); color: var(--on-dark); }
.parts-grid { display: grid; gap: var(--space-6); }
.parts-lede { color: var(--on-dark-soft); max-width: 32rem; }
.parts-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.parts-steps li {
  padding: var(--space-3);
  border-radius: 12px;
  background: var(--roast);
  border-left: 4px solid var(--teal-bright);
}
.parts-steps .part-tag { color: var(--crema); margin-bottom: .6rem; }
.parts-steps h3 { margin-bottom: .3rem; }
.parts-steps p { color: var(--on-dark-soft); margin: 0; }

@media (min-width: 48rem) {
  .parts-steps { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 64rem) {
  .parts-grid { grid-template-columns: 1fr 1.4fr; gap: var(--space-8); align-items: start; }
}

/* Visit */
.visit-grid { display: grid; gap: var(--space-4); align-items: start; }
.address { font-style: normal; font-size: 1.25rem; font-weight: 600; margin-bottom: var(--space-3); }
.visit-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.ticket {
  position: relative;
  padding: var(--space-4);
  border-radius: 12px;
  background: #fff;
  border: 1px dashed var(--metal);
}
.ticket::before, .ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px; height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--steam);
  border: 1px dashed var(--metal);
}
.ticket::before { left: -10px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -10px; clip-path: inset(0 50% 0 0); }
.ticket h3 { font-size: 1.2rem; }
.ticket .open-status { margin-bottom: var(--space-2); }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: .45rem 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.hours td { text-align: right; font-family: var(--font-mono); font-size: .92rem; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 800; color: var(--teal-dark); }
.checklist { margin: 0; padding: 0; list-style: none; counter-reset: c; }
.checklist li {
  counter-increment: c;
  position: relative;
  padding: .5rem 0 .5rem 2.4rem;
  border-top: 1px solid var(--line);
}
.checklist li::before {
  content: counter(c, decimal-leading-zero);
  position: absolute;
  left: 0; top: .55rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  color: var(--teal-dark);
}

@media (min-width: 52rem) {
  .visit-grid { grid-template-columns: 1fr 1fr; }
  .visit-main { grid-column: 1 / -1; }
}
@media (min-width: 72rem) {
  .visit-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .visit-main { grid-column: auto; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--espresso);
  color: var(--on-dark-soft);
  padding: var(--space-8) 0 calc(var(--space-4) + 4.5rem);
  font-size: .95rem;
}
.footer-inner {
  display: grid;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(251, 243, 232, .14);
}
.footer-brand { display: flex; gap: .8rem; align-items: flex-start; }
.footer-brand .brand-mark { background: var(--roast); }
.footer-brand p { margin: 0; }
.footer-brand strong { color: var(--on-dark); }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.disclosure { margin: var(--space-3) 0 0; font-size: .8rem; opacity: .75; }

@media (min-width: 48rem) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
  .site-footer { padding-bottom: var(--space-4); }
}

/* ---------- Mobile call bar ---------- */
.call-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(251, 247, 242, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.call-bar .btn { width: 100%; }
.call-bar .btn span { font-weight: 500; opacity: .9; }
@media (min-width: 48rem) {
  .call-bar { display: none; }
}

/* ---------- Copied-number toast (desktop) ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 1.5rem;
  z-index: 70;
  max-width: calc(100% - 2rem);
  padding: .8rem 1.2rem;
  background: var(--espresso);
  color: var(--on-dark);
  border-left: 6px solid var(--teal-bright);
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45);
  transform: translate(-50%, 1rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 47.99rem) {
  .toast { bottom: 5.5rem; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
