/* J & M Auto Repair Inc — production stylesheet, ported from Direction D "The Bench"
   (_design/d/assets/css/d.css). Vanilla CSS. Animated properties are transform /
   opacity / clip-path only. Every motion has a resting state; prefers-reduced-motion
   and the "reduce motion" accessibility control both collapse to it. Font sizes are
   in rem so the "larger text" control scales the whole type system. No inline
   style attributes anywhere (CSP style-src 'self'): spacing helpers live at the end. */

/* Self-hosted fonts (latin subset; Spanish accents are inside U+0000-00FF).
   Bricolage Grotesque is one variable file (opsz 12-96, wdth 75-100, wght 200-800);
   JetBrains Mono is one variable file serving 400 and 500. The fallback faces are
   metric-matched to Arial / Courier New (capsize metrics) to keep font-swap shift small. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url("/assets/fonts/bricolage-latin.a756882d8a.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("/assets/fonts/jetbrains-mono-latin.83c005d49d.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica"); size-adjust: 105.43%; ascent-override: 88.21%; descent-override: 25.61%; line-gap-override: 0%; }
@font-face { font-family: "JetBrains Fallback"; src: local("Courier New"), local("Courier"); size-adjust: 99.98%; ascent-override: 102.02%; descent-override: 30%; line-gap-override: 0%; }

:root {
  --graphite: #16171A;   /* hero ground, near-black, never #000 */
  --graphite-2: #1F2024; /* raised surfaces on the dark ground */
  --bone: #F1EEE6;       /* page ground, warm off-white, never #fff */
  --bone-2: #E8E4DA;     /* alternate band / tile surface */
  --ink: #1A1B1E;        /* text on bone */
  --muted: #5E6068;      /* secondary text on bone (5.6:1) */
  --hair: #D3CFC4;       /* hairlines on bone */
  --hair-dark: #2D2F35;  /* hairlines on graphite */
  --chalk: #E9E6DE;      /* text on graphite */
  --chalk-muted: #9C9EA6;/* secondary on graphite (5.9:1) */
  --accent: #E5620F;     /* hazard orange — CTA plates only, ink text on top */
  --accent-2: #C4520B;   /* pressed state */
  --ok: #2E6B46;
  --err: #A83A22;
  --display: "Bricolage Grotesque", "Bricolage Fallback", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "JetBrains Fallback", "SFMono-Regular", Consolas, monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-snap: cubic-bezier(.7, 0, .2, 1);
  --gutter: clamp(18px, 4vw, 64px);
  --max: 1360px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--display);
  font-variation-settings: "opsz" 14, "wdth" 100;
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bone); padding: 10px 14px; text-decoration: none;
  font-family: var(--mono); font-size: 0.8125rem;
}
.skip:focus { top: 12px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- mono readout labels (from the halide top-left/top-right readouts) ---------- */
.ro {
  font-family: var(--mono); font-size: 0.7188rem; letter-spacing: .08em; text-transform: uppercase;
  line-height: 1.6; color: var(--muted);
}
.ro b { font-weight: 500; color: inherit; }
.ro-dot::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; vertical-align: 1px;
  background: var(--accent);
}

/* ---------- header ---------- */
.hd {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bone) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hair);
}
.hd.on-dark { background: color-mix(in srgb, var(--graphite) 90%, transparent); border-color: var(--hair-dark); color: var(--chalk); }
.hd-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 40px; width: auto; }
.nav { margin-left: auto; display: flex; gap: 22px; }
.nav a { text-decoration: none; font-size: 0.9063rem; font-weight: 500; padding: 8px 0; position: relative; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.hd-actions { display: flex; align-items: center; gap: 12px; }
.lang {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: .1em; text-decoration: none;
  border: 1px solid currentColor; padding: 7px 10px; line-height: 1; min-height: 44px; min-width: 44px; justify-content: center; display: inline-flex; align-items: center;
}
.lang:hover { background: var(--ink); color: var(--bone); }
.hd.on-dark .lang:hover { background: var(--chalk); color: var(--graphite); }
.hd-call { text-decoration: none; font-weight: 600; font-size: 0.9063rem; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.menu-btn { display: none; background: none; border: 1px solid currentColor; color: inherit; width: 44px; height: 44px; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }
.mnav { display: none; border-top: 1px solid var(--hair); padding: 12px 0 18px; }
.hd.on-dark .mnav, .hd.on-dark .mnav a { border-color: var(--hair-dark); }
.mnav a { display: block; padding: 12px 0; text-decoration: none; font-size: 1.0625rem; font-weight: 500; border-bottom: 1px solid var(--hair); }
.hd.is-open .mnav { display: block; }

@media (max-width: 1100px) {
  .nav, .hd-call { display: none; }
  .menu-btn { display: inline-grid; place-items: center; }
}

/* ---------- CTA plates: the halide cut-corner button ---------- */
.plate {
  --cut: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 14px 26px;
  background: var(--accent); color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 0.9375rem; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; border: 0; cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: transform .3s var(--ease-out), background-color .2s;
}
.plate:hover { background: var(--accent-2); transform: translateY(-2px); }
.plate:active { transform: translateY(0); }
.plate.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; clip-path: none; }
.plate.ghost:hover { background: var(--ink); color: var(--bone); }
.plate.ghost.on-dark:hover { background: var(--chalk); color: var(--graphite); }
.plate.ink { background: var(--ink); color: var(--bone); }
.plate.ink:hover { background: #000; background: var(--graphite); }

/* ---------- HERO: the halide-topo shell, subject-swapped ---------- */
.hero {
  position: relative; background: var(--graphite); color: var(--chalk);
  min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto;
  overflow: hidden; isolation: isolate;
}
.hero-rings { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .55; }
.hero-rings circle { fill: none; stroke: var(--hair-dark); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hero-top, .hero-bot { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-block: 22px; }
.hero-bot { align-items: flex-end; padding-block: 28px 34px; }
.hero .ro { color: var(--chalk-muted); }
.hero-top .ro:last-child, .hero-bot .ro { text-align: right; }
.hero-bot .ro { text-align: left; }

.hero-stage { position: relative; z-index: 1; display: grid; align-items: center; min-height: 0; }

/* the plate: a photograph laid on the bench in perspective */
.bench { position: absolute; inset: 0; display: grid; place-items: center; perspective: 1400px; perspective-origin: 50% 40%; z-index: 1; pointer-events: none; }
.plate-3d {
  position: relative; width: min(78vw, 1040px); aspect-ratio: 16 / 9;
  transform: rotateX(56deg) rotateZ(-7deg) translateY(4%);
  transform-style: preserve-3d; will-change: transform;
  transition: transform .9s var(--ease-out);
  box-shadow: 0 60px 120px -40px rgba(0,0,0,.9);
  border: 1px solid #3A3C42;
}
.plate-3d img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08) brightness(.82); }
.plate-3d::after { /* scan sheen, static */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(233,230,222,.08) 50%, transparent 60%);
  pointer-events: none;
}
.plate-3d::before { /* thickness edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; background: #0C0D0F; transform: rotateX(-90deg); transform-origin: top;
}
.js .plate-3d { transform: rotateX(70deg) rotateZ(-7deg) translateY(30%); opacity: 0; }
.js .hero.is-in .plate-3d { transform: rotateX(56deg) rotateZ(-7deg) translateY(4%); opacity: 1; transition: transform 1.4s var(--ease-out), opacity .8s; }
.js .hero.is-in.is-live .plate-3d { transition: none; } /* pointer/scroll drive it after settling */

.hero-copy { position: relative; z-index: 2; padding-block: 8vh 6vh; }
.h1 {
  font-size: clamp(3.5rem, 12.5vw, 11rem); line-height: .88; font-weight: 500; letter-spacing: -.035em;
  font-variation-settings: "opsz" 96, "wdth" 92;
  text-transform: uppercase; color: var(--chalk); mix-blend-mode: normal;
}
.h1 .ln { display: block; overflow: hidden; }
.h1 .ln span { display: block; }
.lead-dark { max-width: 560px; margin-top: 28px; font-size: clamp(1rem, 1.4vw, 1.1875rem); color: var(--chalk-muted); line-height: 1.55; }
.lead-dark b { color: var(--chalk); font-weight: 500; }

/* vertical-cut reveal (the shortlisted kinetic-text shell): clip from the baseline up, with a rise */
.js .cut .ln span { clip-path: inset(0 0 100% 0); transform: translateY(40%); }
.js .is-in .cut .ln span { clip-path: inset(0 0 -10% 0); transform: translateY(0); transition: clip-path .9s var(--ease-out), transform .9s var(--ease-out); }
.js .is-in .cut .ln:nth-child(2) span { transition-delay: .12s; }
.js .is-in .cut .ln:nth-child(3) span { transition-delay: .24s; }
.js .lead-dark, .js .hero-top .ro, .js .hero-bot > * { opacity: 0; transform: translateY(12px); }
.js .is-in .lead-dark, .js .is-in .hero-top .ro, .js .is-in .hero-bot > * { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s var(--ease-out); }
.js .is-in .lead-dark { transition-delay: .45s; }
.js .is-in .hero-bot > * { transition-delay: .6s; }
.js .is-in .hero-bot > *:last-child { transition-delay: .72s; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 900px) {
  .hero { min-height: 92svh; }
  .plate-3d { width: 96vw; }
  .hero-top .ro:last-child { display: none; }
  .hero-bot { flex-direction: column; align-items: stretch; }
  .hero-cta { justify-content: flex-start; }
  .hero-cta .plate { flex: 1 1 auto; }
}

/* ---------- sections on bone ---------- */
.sec { padding-block: clamp(64px, 9vw, 128px); }
.sec-band { background: var(--bone-2); }
.sec-dark { background: var(--graphite); color: var(--chalk); }
.sec-dark .ro { color: var(--chalk-muted); }
.kick { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.kick::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.sec-dark .kick::after { background: var(--hair-dark); }
.h2 { font-size: clamp(2.125rem, 4.6vw, 4rem); font-weight: 500; letter-spacing: -.03em; line-height: 1; max-width: 18ch; font-variation-settings: "opsz" 96, "wdth" 96; }
.h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 600; letter-spacing: -.02em; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.45; max-width: 60ch; color: var(--ink); }
.muted { color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }

/* IO reveals — resting state = visible */
.js .rv { opacity: 0; transform: translateY(18px); }
.js .rv.is-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .8s var(--ease-out); transition-delay: var(--d, 0s); }

/* ---------- SERVICES: bento grid ---------- */
.bento {
  display: grid; gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(140px, auto);
}
.tile {
  position: relative; background: var(--bone); border: 1px solid var(--hair);
  padding: clamp(20px, 2.4vw, 32px); display: flex; flex-direction: column; gap: 12px;
  transition: transform .45s var(--ease-out), box-shadow .45s;
  min-height: 100%;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -36px rgba(26,27,30,.45); }
.tile .ico { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tile .num { font-family: var(--mono); font-size: 0.7188rem; letter-spacing: .1em; color: var(--muted); position: absolute; top: 18px; right: 20px; }
.tile h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); font-weight: 600; letter-spacing: -.02em; margin-top: auto; }
.tile p { color: var(--muted); margin: 0; font-size: 0.9688rem; }
.tile .acts { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-top: 2px; font-size: 0.9063rem; }
.tile .acts a, .tile .acts button { min-height: 44px; display: inline-flex; align-items: center; background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; font-weight: 500; }
.tile .acts button.is-set { text-decoration: none; }
.tile .acts button.is-set::before { content: "\2713\00a0"; }
.tile.svc-mech { grid-column: span 4; grid-row: span 2; }
.tile.svc-coll { grid-column: span 5; }
.tile.svc-pdr  { grid-column: span 3; grid-row: span 2; }
.tile.t-hours  { grid-column: span 3; }
.tile.t-lang   { grid-column: span 2; background: var(--ink); color: var(--bone); border-color: var(--ink); }
.tile.t-lang p { color: var(--chalk-muted); }
.tile.t-lang .big { font-size: 2.5rem; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.tile.t-lang .big s { text-decoration: none; opacity: .35; }
.tile.t-where { grid-column: span 4; }
.tile.t-warr  { grid-column: span 8; }
.tile .hrs { font-family: var(--mono); font-size: 0.7813rem; line-height: 1.7; }
.tile .hrs li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--hair); }
@media (max-width: 1000px) {
  .tile.svc-mech, .tile.svc-coll, .tile.svc-pdr, .tile.t-hours, .tile.t-lang, .tile.t-where, .tile.t-warr { grid-column: span 6; grid-row: auto; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile.svc-mech, .tile.svc-coll, .tile.svc-pdr, .tile.t-hours, .tile.t-lang, .tile.t-where, .tile.t-warr { grid-column: auto; }
}

/* ---------- PDR: sticky-scroll reveal ---------- */
.steps-wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 96px); align-items: start; }
.steps { display: grid; gap: 0; position: relative; }
.step { padding: clamp(36px, 6vh, 72px) 0 clamp(36px, 6vh, 72px) 44px; border-top: 1px solid var(--hair-dark); position: relative; min-height: 46vh; display: flex; flex-direction: column; justify-content: center; transition: opacity .5s; }
.step:last-child { border-bottom: 1px solid var(--hair-dark); }
.step .idx { position: absolute; left: 0; top: calc(50% - 10px); font-family: var(--mono); font-size: 0.75rem; color: var(--chalk-muted); }
.step h3 { font-size: clamp(1.5rem, 2.6vw, 2.125rem); font-weight: 500; letter-spacing: -.02em; margin-bottom: 12px; }
.step p { color: var(--chalk-muted); max-width: 46ch; margin: 0; }
.js .steps.is-tracking .step { opacity: .32; }
.js .steps.is-tracking .step.is-active { opacity: 1; }
.rail { position: absolute; left: 22px; top: 0; bottom: 0; width: 1px; background: var(--hair-dark); }
.rail i { position: absolute; left: -3px; top: 0; width: 7px; height: 7px; background: var(--accent); transform: translateY(var(--y, 0)); transition: transform .6s var(--ease-out); }
.panel { position: sticky; top: 92px; aspect-ratio: 1; max-height: calc(100vh - 140px); background: var(--graphite-2); border: 1px solid var(--hair-dark); display: grid; overflow: hidden; }
.panel .vis { grid-area: 1 / 1; display: grid; place-items: center; padding: 8%; opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .55s ease, transform .7s var(--ease-out); }
.panel .vis.is-on { opacity: 1; transform: none; }
.panel .vis svg { width: 100%; height: auto; max-height: 100%; stroke: var(--chalk); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.panel .vis .lbl { position: absolute; left: 20px; bottom: 16px; font-family: var(--mono); font-size: 0.7188rem; letter-spacing: .1em; text-transform: uppercase; color: var(--chalk-muted); }
.panel .vis .lbl b { color: var(--accent); font-weight: 500; }
.step .vis-inline { display: none; }
@media (max-width: 900px) {
  .steps-wrap { grid-template-columns: 1fr; }
  .panel { display: none; }
  .step { min-height: 0; padding-block: 32px; }
  .step .vis-inline { display: block; margin-top: 18px; max-width: 200px; }
  .step .vis-inline svg { width: 100%; stroke: var(--chalk); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
  .js .steps.is-tracking .step { opacity: 1; }
}

/* ---------- EVIDENCE: immersive scroll gallery (scattered, depth-parallax) ---------- */
.scatter { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 60px; gap: 12px; }
.shot { position: relative; overflow: hidden; background: var(--bone-2); border: 1px solid var(--hair); will-change: transform; }
.shot img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.85) contrast(1.05); transition: filter .6s; }
.shot:hover img { filter: grayscale(0); }
.shot figcaption { position: absolute; left: 10px; bottom: 8px; font-family: var(--mono); font-size: 0.6563rem; letter-spacing: .08em; text-transform: uppercase; color: var(--chalk); background: rgba(22,23,26,.78); padding: 4px 7px; }
.s1 { grid-column: 1 / span 4;  grid-row: 1 / span 7; }
.s2 { grid-column: 5 / span 5;  grid-row: 2 / span 5; }
.s3 { grid-column: 10 / span 3; grid-row: 1 / span 4; }
.s4 { grid-column: 2 / span 3;  grid-row: 9 / span 4; }
.s5 { grid-column: 6 / span 3;  grid-row: 8 / span 5; }
.s6 { grid-column: 10 / span 3; grid-row: 6 / span 5; }
@media (max-width: 720px) {
  .scatter { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 44px; }
  .s1 { grid-column: 1 / span 3; grid-row: 1 / span 6; }
  .s2 { grid-column: 4 / span 3; grid-row: 2 / span 4; }
  .s3 { grid-column: 1 / span 2; grid-row: 8 / span 3; }
  .s4 { grid-column: 3 / span 4; grid-row: 7 / span 4; }
  .s5 { grid-column: 1 / span 3; grid-row: 12 / span 4; }
  .s6 { grid-column: 4 / span 3; grid-row: 12 / span 3; }
}
.facts { display: grid; gap: 0; border-top: 1px solid var(--hair); }
.facts li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); font-size: 0.9688rem; }
.facts li .ro { padding-top: 3px; }
@media (max-width: 520px) { .facts li { grid-template-columns: 1fr; gap: 4px; } }
.soon { display: inline-block; font-family: var(--mono); font-size: 0.75rem; letter-spacing: .06em; border: 1px dashed var(--hair); padding: 8px 12px; color: var(--muted); }

/* ---------- ESTIMATE form ---------- */
.form-wrap { background: var(--bone); border: 1px solid var(--hair); padding: clamp(22px, 3vw, 40px); position: relative; }
.form-tag { position: absolute; top: -12px; left: 20px; background: var(--ink); color: var(--bone); font-family: var(--mono); font-size: 0.6875rem; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.f { display: flex; flex-direction: column; gap: 6px; }
.f.full { grid-column: 1 / -1; }
.f label { font-size: 0.875rem; font-weight: 600; }
.f label small { font-weight: 400; color: var(--muted); }
.f input, .f select, .f textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bone);
  border: 1px solid var(--hair); border-radius: 0; padding: 12px 14px; min-height: 48px; width: 100%;
}
.f textarea { min-height: 120px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.f.has-err input, .f.has-err select, .f.has-err textarea { border-color: var(--err); }
.f .msg { font-size: 0.8125rem; color: var(--err); min-height: 0; }
.f .msg:empty { display: none; }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; }
.form-foot .alt { color: var(--muted); font-size: 0.9375rem; margin: 0; }
.form-foot .alt a { color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.status { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--hair); display: none; font-size: 0.9375rem; }
.status.is-on { display: block; }
.status.ok { border-color: var(--ok); color: var(--ok); }
.status.err { border-color: var(--err); color: var(--err); }
.status.busy { color: var(--muted); }
.status.busy::before { content: ""; display: inline-block; width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; margin-right: 10px; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.form[data-state="submitting"] .plate { opacity: .6; pointer-events: none; }

/* ---------- CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cbox { border: 1px solid var(--hair); padding: 22px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; min-height: 150px; transition: transform .4s var(--ease-out); }
a.cbox:hover { transform: translateY(-3px); background: var(--bone); }
.cbox b { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; }
.cbox span { color: var(--muted); font-size: 0.9063rem; }
.cbox .ro { margin-bottom: auto; }
.hours { font-family: var(--mono); font-size: 0.8125rem; }
.hours tr td { padding: 6px 0; border-bottom: 1px dashed var(--hair); }
.hours td:last-child { text-align: right; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--hair); }
.faq details:last-child { border-bottom: 1px solid var(--hair); }
.faq summary { cursor: pointer; padding: 18px 0; font-size: 1.125rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--muted); transition: transform .3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; max-width: 70ch; }

/* ---------- FOOTER: flip-links, glitch-flip to the other language ---------- */
.ft { background: var(--graphite); color: var(--chalk); padding-block: clamp(56px, 8vw, 110px) 32px; }
.flips { display: flex; flex-direction: column; align-items: flex-start; }
.flip {
  position: relative; display: block; text-decoration: none;
  font-size: clamp(2.5rem, 8.6vw, 7.75rem); line-height: .96; font-weight: 800; letter-spacing: -.04em; text-transform: uppercase;
  font-variation-settings: "opsz" 96, "wdth" 90;
  color: var(--chalk); padding: 2px 0; overflow: visible;
}
.js .flip { display: inline-grid; }
.flip .a, .flip .b { grid-area: 1 / 1; display: grid; }
.flip .b { color: var(--accent); }
.flip .a span, .flip .b span { grid-area: 1 / 1; display: block; white-space: nowrap; }
.flip .a span:nth-child(1), .flip .b span:nth-child(1) { clip-path: inset(-2% -20% 66% -20%); }
.flip .a span:nth-child(2), .flip .b span:nth-child(2) { clip-path: inset(33% -20% 33% -20%); }
.flip .a span:nth-child(3), .flip .b span:nth-child(3) { clip-path: inset(66% -20% -2% -20%); }
.flip .a span, .flip .b span { transition: transform .32s var(--ease-snap), opacity .32s; }
.flip .b span { opacity: 0; }
.flip .b span:nth-child(1) { transform: translateX(14%); }
.flip .b span:nth-child(2) { transform: translateX(-12%); }
.flip .b span:nth-child(3) { transform: translateX(9%); }
.flip:hover .a span:nth-child(1), .flip:focus-visible .a span:nth-child(1) { transform: translateX(-12%); opacity: 0; transition-delay: 0s; }
.flip:hover .a span:nth-child(2), .flip:focus-visible .a span:nth-child(2) { transform: translateX(10%);  opacity: 0; transition-delay: .05s; }
.flip:hover .a span:nth-child(3), .flip:focus-visible .a span:nth-child(3) { transform: translateX(-7%);  opacity: 0; transition-delay: .1s; }
.flip:hover .b span, .flip:focus-visible .b span { transform: translateX(0); opacity: 1; }
.flip:hover .b span:nth-child(1), .flip:focus-visible .b span:nth-child(1) { transition-delay: .08s; }
.flip:hover .b span:nth-child(2), .flip:focus-visible .b span:nth-child(2) { transition-delay: .14s; }
.flip:hover .b span:nth-child(3), .flip:focus-visible .b span:nth-child(3) { transition-delay: .2s; }
.ft-logo { display: block; width: min(360px, 100%); height: auto; }
.ft:not(.ft-slim) .ft-logo { margin-top: 56px; }
.ft-slim .ft-logo { margin-bottom: 28px; }
.ft-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--hair-dark); font-size: 0.875rem; color: var(--chalk-muted); }
.ft-meta a { color: var(--chalk); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.ft-meta .lnk { display: flex; flex-direction: column; align-items: flex-start; margin: 0 0 1em; }
.ft-legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--hair-dark); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-family: var(--mono); font-size: 0.7188rem; letter-spacing: .08em; text-transform: uppercase; color: var(--chalk-muted); }
.ft-legal p { margin: 0; }
.ft-legal .credit a { color: var(--chalk); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.ft-legal .credit a:hover, .ft-legal .credit a:focus-visible { text-decoration: underline; }
.ft-meta a:hover { text-decoration: underline; }
.ft-meta .ro { color: var(--chalk-muted); }
@media (max-width: 1000px) { .ft-meta { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ft-meta { grid-template-columns: 1fr; } }

/* ---------- mobile call bar ---------- */
.callbar { display: none; }
@media (max-width: 900px) {
  body { padding-bottom: 68px; }
  .callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hair-dark); border-top: 1px solid var(--hair-dark); }
  .callbar a { display: grid; place-items: center; min-height: 56px; background: var(--graphite); color: var(--chalk); text-decoration: none; font-weight: 600; font-size: 0.9375rem; }
  .callbar a:last-child { background: var(--accent); color: var(--ink); }
}

/* ---------- inner pages ---------- */
.page-hero { background: var(--graphite); color: var(--chalk); padding-block: clamp(48px, 8vw, 110px) clamp(40px, 6vw, 80px); }
.hero.is-page { min-height: 0; display: block; }
.page-hero .h1 { font-size: clamp(2.75rem, 8.5vw, 7.5rem); }
.page-hero .lead-dark { margin-top: 22px; }
.crumbs { font-family: var(--mono); font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--chalk-muted); margin-bottom: 26px; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--chalk); }
.prose { max-width: 66ch; }
.prose p { color: var(--ink); }
.prose ul { list-style: disc; padding-left: 20px; margin-bottom: 1em; }
.prose li { margin-bottom: .35em; }
.side { border: 1px solid var(--hair); padding: 24px; position: sticky; top: 90px; display: grid; gap: 14px; }
.side .plate { width: 100%; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair figure { margin: 0; position: relative; }
.pair img { filter: grayscale(.6); }
.pair figcaption { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 8px; }
.note { border-left: 2px solid var(--accent); padding: 4px 0 4px 14px; color: var(--muted); font-size: 0.9063rem; }
.center-page { min-height: 70vh; display: grid; place-items: center; text-align: left; padding-block: 60px; }
.center-page .h1 { font-size: clamp(4rem, 16vw, 13.75rem); }

/* ---------- reduced motion: everything at rest ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .plate-3d, .js .hero.is-in .plate-3d { transform: rotateX(56deg) rotateZ(-7deg) translateY(4%) !important; opacity: 1 !important; transition: none !important; }
  .js .cut .ln span, .js .lead-dark, .js .hero-top .ro, .js .hero-bot > *, .js .rv { clip-path: none !important; opacity: 1 !important; transform: none !important; transition: none !important; }
  .js .steps.is-tracking .step { opacity: 1; }
  .panel .vis { transition: none; }
  .rail i { transition: none; }
  .shot { transform: none !important; }
  .tile, .cbox, .plate, .flip .a span, .flip .b span, .nav a::after { transition: none !important; }
  .flip:hover .a span, .flip:focus-visible .a span { opacity: 1; transform: none; }
  .flip:hover .b span, .flip:focus-visible .b span { opacity: 0; }
  .flip:hover, .flip:focus-visible { color: var(--accent); }
  .status.busy::before { animation: none; }
}

/* ---------- "reduce motion" accessibility control: same resting state as the media query ---------- */
html.a11y-motion { scroll-behavior: auto; }
.a11y-motion .plate-3d, .a11y-motion .hero.is-in .plate-3d { transform: rotateX(56deg) rotateZ(-7deg) translateY(4%) !important; opacity: 1 !important; transition: none !important; }
.a11y-motion .cut .ln span, .a11y-motion .lead-dark, .a11y-motion .hero-top .ro, .a11y-motion .hero-bot > *, .a11y-motion .rv, .a11y-motion .hero-copy { clip-path: none !important; opacity: 1 !important; transform: none !important; transition: none !important; }
.a11y-motion .steps.is-tracking .step { opacity: 1; }
.a11y-motion .panel .vis, .a11y-motion .rail i { transition: none; }
.a11y-motion .shot { transform: none !important; }
.a11y-motion .tile, .a11y-motion .cbox, .a11y-motion .plate, .a11y-motion .flip .a span, .a11y-motion .flip .b span, .a11y-motion .nav a::after { transition: none !important; }
.a11y-motion .flip:hover .a span, .a11y-motion .flip:focus-visible .a span { opacity: 1; transform: none; }
.a11y-motion .flip:hover .b span, .a11y-motion .flip:focus-visible .b span { opacity: 0; }
.a11y-motion .flip:hover, .a11y-motion .flip:focus-visible { color: var(--accent); }

/* ---------- other accessibility controls (persisted by the inline boot script) ---------- */
html.a11y-text { font-size: 118.75%; }
.a11y-underline a, .a11y-underline .tile .acts button { text-decoration: underline !important; text-underline-offset: 3px; }
html.a11y-contrast { --muted: #2A2B2F; --chalk-muted: #E9E6DE; --hair: #8F8A7E; --hair-dark: #6B6E76; }
.a11y-contrast .shot img, .a11y-contrast .plate-3d img { filter: grayscale(1) contrast(1.2); }
.a11y-contrast :focus-visible { outline-width: 3px; }

.a11y-btn {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: .1em; text-transform: uppercase;
  background: none; color: inherit; border: 1px solid transparent; min-height: 44px; min-width: 44px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.a11y-btn svg { width: 18px; height: 18px; flex: none; }
.a11y-btn:hover, .a11y-btn[aria-expanded="true"] { border-color: currentColor; }
.a11y-panel { background: var(--graphite-2); color: var(--chalk); border-bottom: 1px solid var(--hair-dark); padding-block: 22px 26px; }
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 4px; }
.a11y-panel .ro { color: var(--chalk-muted); margin: 0 0 16px; }
.a11y-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.a11y-opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--hair-dark); cursor: pointer; font-size: 0.9375rem; }
.a11y-opt input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.a11y-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.a11y-foot button { font: inherit; font-size: 0.875rem; background: none; color: var(--chalk); border: 1px solid var(--hair-dark); min-height: 44px; padding: 0 16px; cursor: pointer; }
.a11y-foot button:hover { border-color: var(--chalk); }
.a11y-foot a { color: var(--chalk); font-size: 0.875rem; min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 900px) { .a11y-opts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .a11y-opts { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .a11y-btn { padding: 0; } .a11y-btn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* ---------- mobile drawer extras ---------- */
.mnav .mnav-legal { display: flex; flex-wrap: wrap; gap: 0 20px; padding-top: 6px; }
.mnav .mnav-legal a { border: 0; font-family: var(--mono); font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--chalk-muted); min-height: 44px; display: inline-flex; align-items: center; padding: 0; }
.mnav a[aria-current="page"] { color: var(--accent); }

/* ---------- pictures inside the D image frames ---------- */
.plate-3d picture, .shot picture, .pair picture, .fig picture { display: block; width: 100%; height: 100%; }
.pair img { width: 100%; height: auto; }

/* ---------- estimate form = WhatsApp composer ----------
   Without JS: the native GET form shows one prefilled "text" box (the only named
   control) and opens wa.me. With JS (.js on <html>): the structured fields show,
   site.js composes the Spanish message and opens the wa.me URL itself. */
.form .composed { display: none; }
.js .form .composed { display: grid; }
.js .form .f-text { display: none; }
.form .f-text textarea { min-height: 160px; }
.form .hint { font-size: 0.8125rem; color: var(--muted); margin: 0; }
.form-noscript { margin: 0 0 14px; font-size: 0.875rem; color: var(--muted); }
.status a { color: inherit; font-weight: 600; }
.status.ok { color: var(--ink); border-color: var(--ok); }

/* ---------- service pages ---------- */
.fig { margin: 0; }
.fig img { width: 100%; height: auto; filter: grayscale(.6); }
.fig figcaption { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 8px; }
.prose .proc { display: grid; gap: 0; border-top: 1px solid var(--hair); margin: 0 0 1em; padding: 0; list-style: none; }
.proc li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--hair); margin: 0; }
.proc li svg { width: 96px; height: 96px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; background: var(--bone-2); border: 1px solid var(--hair); }
.proc h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 6px; }
.proc .idx { font-family: var(--mono); font-size: 0.7188rem; letter-spacing: .1em; color: var(--muted); display: block; margin-bottom: 4px; }
.proc p { margin: 0; color: var(--muted); }
@media (max-width: 420px) { .proc li { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; } .proc li svg { width: 64px; height: 64px; } }
@media (max-width: 900px) { .side { position: static; } }

/* ---------- legal / long-form pages ---------- */
.legal { max-width: 72ch; }
.legal h2 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 600; letter-spacing: -.02em; margin: 2em 0 .6em; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink); }
.legal ul { list-style: disc; padding-left: 20px; margin-bottom: 1em; }
.legal li { margin-bottom: .4em; }
.legal a { color: var(--ink); }

/* ---------- 404 ---------- */
.center-page .hero-cta { justify-content: flex-start; margin-top: 28px; }
.ft.ft-slim { padding-block: 32px; }
.ft.ft-slim .ft-meta { margin-top: 0; padding-top: 0; border: 0; }

/* ---------- spacing helpers (replace D's inline style attributes; CSP style-src 'self') ---------- */
.d1 { --d: .06s; } .d2 { --d: .1s; } .d3 { --d: .12s; } .d4 { --d: .18s; } .d5 { --d: .22s; } .d6 { --d: .26s; } .d7 { --d: .3s; }
.mb-16 { margin-bottom: 16px; } .mb-18 { margin-bottom: 18px; } .mb-36 { margin-bottom: 36px; } .mb-40 { margin-bottom: 40px; } .mb-48 { margin-bottom: 48px; }
.mt-12 { margin-top: 12px; } .mt-20 { margin-top: 20px; } .mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; } .mt-56 { margin-top: 56px; } .m-0 { margin: 0; }
.small { font-size: 0.9063rem; }
.pdr-note { margin-top: 32px; max-width: 60ch; color: var(--chalk-muted); }
.pdr-note a { color: var(--chalk); }

/* ---------- narrow phones: keep the oversized display type inside the viewport ---------- */
@media (max-width: 480px) {
  .h1 { font-size: clamp(2.5rem, 14.3vw, 3.5rem); }
  .page-hero .h1 { font-size: clamp(2.25rem, 11.5vw, 3.25rem); }
  .center-page .h1 { font-size: clamp(3rem, 16vw, 4rem); }
  .flip { font-size: clamp(2rem, 10.5vw, 2.5rem); }
  .hd-in { gap: 12px; }
  .brand img { height: 32px; }
  .hd-actions { gap: 8px; }
}

/* composer hint spans the grid */
.grid2 > .full { grid-column: 1 / -1; }

/* ---------- 44px touch targets (house rule) on the D elements that were smaller ---------- */
.skip { min-height: 44px; display: inline-flex; align-items: center; }
.brand { min-height: 44px; padding-block: 8px; }
.nav a { min-width: 44px; justify-content: center; }
.js .flip { min-height: 44px; align-content: center; }
.ft-meta a { min-width: 44px; }
.cbox a { display: inline-flex; align-items: center; min-height: 44px; }
