/* 3D Garage
   Taller de noche: fondo grafito, letras grandes y anchas, y el amarillo de la marca
   como pintura de piso (franjas, marcas y botones). Poco texto, fotos grandes e íconos. */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("../assets/fonts/archivo-var.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../assets/fonts/jetbrains-mono-var.woff2") format("woff2"); }

:root {
  color-scheme: dark;

  /* Color */
  --bg: #121211;            /* fondo general */
  --bg-2: #1a1a18;          /* franjas alternas */
  --bg-3: #252522;          /* tarjetas y fondos de foto */
  --fg: #eeede8;            /* texto */
  --fg-2: #aaa89f;          /* texto secundario */
  --yellow: #ddd06a;        /* amarillo de marca */
  --yellow-2: #e9df8a;
  --ink: #121211;           /* texto sobre amarillo */
  --line: rgba(238, 237, 232, 0.12);
  --line-2: rgba(238, 237, 232, 0.26);

  /* Tipo */
  --f-display: "Archivo", "Arial Black", system-ui, sans-serif;
  --f-text: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* Medidas */
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --header-h: 66px;
  --section: clamp(64px, 8vw, 112px);
  --r: 4px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-text);
  font-size: 1.06rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.95;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.sprite { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 200; padding: 10px 14px; background: var(--yellow); color: var(--ink); font-weight: 700; text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Franja amarilla y negra, como la pintura de piso del taller */
.hazard { height: 14px; background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--ink) 14px 28px); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 24px;
  border: 2px solid transparent; border-radius: var(--r);
  font-family: var(--f-display); font-weight: 800; font-stretch: 110%; font-size: 1rem;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn > span { display: inline-flex; align-items: center; gap: 10px; }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: var(--yellow-2); }
.btn-line { border-color: var(--line-2); color: var(--fg); }
.btn-line:hover { border-color: var(--fg); }
.btn-dark { background: var(--ink); color: var(--yellow); }
.btn-dark:hover { background: #2a2a26; }
.btn-outline-dark { border-color: rgba(18, 18, 17, 0.5); color: var(--ink); }
.btn-outline-dark:hover { border-color: var(--ink); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 0.92rem; }
.btn-xl { min-height: 66px; padding: 0 26px; font-size: 1.15rem; }

/* Cabecera */
.header { position: fixed; inset: 0 0 auto; z-index: 90; padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid transparent; transition: background-color 0.25s, border-color 0.25s; }
.header[data-scrolled], .header[data-open] { background: rgba(18, 18, 17, 0.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.header-bar { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { --iso-top: var(--yellow); display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--fg); text-decoration: none; }
.brand-iso { width: 36px; height: 26px; fill: currentColor; }
.brand-word { width: 108px; height: 18px; fill: currentColor; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { font-weight: 600; font-size: 0.98rem; text-decoration: none; color: var(--fg-2); transition: color 0.15s; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--yellow); padding-bottom: 4px; }
.nav .nav-wa { display: none; }
.menu-btn { display: none; }

/* Inicio */
.hero { padding-top: calc(var(--header-h) + clamp(28px, 4vw, 56px)); padding-bottom: clamp(40px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero-kicker { font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--yellow); margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.4rem, 4.3vw, 4.7rem); }
.hl { position: relative; z-index: 0; display: inline-block; white-space: nowrap; color: var(--ink); padding: 0 0.12em; margin-left: -0.12em; margin-top: 0.08em; }
.hl::before { content: ""; position: absolute; z-index: -1; inset: 0.04em 0 -0.02em; background: var(--yellow); transform: skewX(-8deg); }
.hero-lead { max-width: 30em; margin-top: 26px; font-size: clamp(1.1rem, 1.4vw, 1.3rem); color: var(--fg-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* Tipos de vehículo */
.hero-types { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-types li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-weight: 700; font-size: 0.95rem; }
.hero-types .icon { width: 1.5em; height: 1.5em; color: var(--yellow); }

/* Mosaico de fotos del inicio */
.mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; height: min(calc(100svh - var(--header-h) - 80px), 680px); min-height: 460px; }
.tile { position: relative; display: block; overflow: hidden; border-radius: var(--r); background: var(--bg-3); color: var(--fg); text-decoration: none; }
.tile-tall { grid-row: span 2; }
.tile img, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.tile:hover img, .tile:hover video { transform: scale(1.04); }
.tile-tag { position: absolute; left: 10px; bottom: 10px; padding: 6px 10px; background: rgba(18, 18, 17, 0.85); border-left: 3px solid var(--yellow); border-radius: 2px; font-weight: 700; font-size: 0.9rem; }

/* Cinta de marcas */
.ticker { overflow: hidden; background: var(--yellow); color: var(--ink); }
.ticker-track { display: flex; width: max-content; animation: ticker 50s linear infinite; }
.ticker ul { display: flex; flex: none; }
.ticker li { display: flex; align-items: center; gap: 12px; padding: 16px 34px 16px 0; font-family: var(--f-display); font-weight: 800; font-stretch: 125%; font-size: clamp(1rem, 1.6vw, 1.3rem); white-space: nowrap; }
.ticker .brand-logo { width: 34px; height: 34px; fill: currentColor; }
.ticker li::after { content: ""; width: 8px; height: 8px; margin-left: 22px; background: var(--ink); transform: rotate(45deg); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Secciones */
.section { padding-block: var(--section); }
.section-tight { padding-bottom: var(--section); }
.section-dark-2 { background: var(--bg-2); }
.section-title { font-size: clamp(2rem, 4.2vw, 3.6rem); margin-bottom: clamp(28px, 4vw, 44px); }
.section-lead { max-width: 34em; margin: -18px 0 36px; color: var(--fg-2); font-size: 1.15rem; }
.section-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-row .section-title { margin-bottom: 0; }

/* Encabezado de subpágina */
.page-hero { padding-top: calc(var(--header-h) + clamp(36px, 6vw, 80px)); padding-bottom: clamp(32px, 4vw, 52px); }
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 6.4rem); }
.page-hero p { max-width: 32em; margin-top: 18px; font-size: clamp(1.1rem, 1.4vw, 1.3rem); color: var(--fg-2); }

/* Lo que hacemos */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.service a { display: flex; flex-direction: column; height: 100%; gap: 10px; padding-bottom: 18px; text-decoration: none; border-bottom: 3px solid var(--line); transition: border-color 0.2s; }
.service a:hover { border-color: var(--yellow); }
.service-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r); background: var(--bg-3); margin-bottom: 6px; }
.service-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.service a:hover .service-media img { transform: scale(1.04); }
.service-icon { position: absolute; left: 10px; top: 10px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r); background: var(--yellow); color: var(--ink); }
.service-icon .icon { width: 28px; height: 28px; }
.service-title { font-family: var(--f-display); font-weight: 800; font-stretch: 120%; font-size: 1.5rem; line-height: 1; }
.service-text { color: var(--fg-2); flex: 1; }

/* Trabajos */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 2px solid var(--line-2); border-radius: 999px; background: none; cursor: pointer; font-weight: 700; color: var(--fg-2); transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.filters button:hover { border-color: var(--fg); color: var(--fg); }
.filters button[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.filters button .icon { width: 1.35em; height: 1.35em; }
.filters button span { margin-left: 0; opacity: 0.6; font-weight: 600; }
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 18px; }
.work[hidden] { display: none; }
.work-btn { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.work-media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r); background: var(--bg-3); margin-bottom: 8px; }
.work-media img, .work-media video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.work-btn:hover .work-media img, .work-btn:hover .work-media video { transform: scale(1.035); }
.work-badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.badge { padding: 4px 9px; background: rgba(18, 18, 17, 0.85); color: var(--fg); border-radius: 3px; font-weight: 700; font-size: 0.8rem; }
.badge-yellow { background: var(--yellow); color: var(--ink); }
.work-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; background: rgba(18, 18, 17, 0.85); border-radius: 3px; font-size: 0.8rem; font-weight: 600; }
.work-kind { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--yellow); }
.work-title { font-family: var(--f-display); font-weight: 800; font-stretch: 115%; font-size: clamp(1.2rem, 1.6vw, 1.45rem); line-height: 1.05; }
.work-kind .icon { width: 1.5em; height: 1.5em; }
.work-text { display: none; }

/* Visor */
.viewer { width: min(1200px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 0; border-radius: var(--r); background: var(--bg-2); color: var(--fg); overflow: hidden; }
.viewer::backdrop { background: rgba(0, 0, 0, 0.88); }
.viewer[open] { animation: viewer-in 0.25s var(--ease); }
@keyframes viewer-in { from { opacity: 0; transform: translateY(10px); } }
.viewer-inner { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); max-height: calc(100svh - 32px); }
.viewer-stage { position: relative; display: grid; place-items: center; background: #000; min-height: 0; }
.viewer-stage img, .viewer-stage video { width: 100%; height: min(84svh, 820px); object-fit: contain; }
.viewer-nav { position: absolute; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(238, 237, 232, 0.92); color: var(--ink); cursor: pointer; }
.viewer-nav:hover { background: var(--yellow); }
.viewer-nav[hidden] { display: none; }
.viewer-prev { left: 12px; }
.viewer-next { right: 12px; }
.viewer-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.viewer-dots button { width: 28px; height: 5px; padding: 0; border: 0; border-radius: 3px; background: rgba(238, 237, 232, 0.35); cursor: pointer; }
.viewer-dots button[aria-current="true"] { background: var(--yellow); }
.viewer-info { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: clamp(24px, 3.4vw, 44px); overflow-y: auto; }
.viewer-kind { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--yellow); }
.viewer-info h2 { font-size: clamp(1.9rem, 3vw, 2.7rem); padding-right: 44px; }
.viewer-text { color: var(--fg-2); font-size: 1.1rem; }
.spec { width: 100%; margin: 0; border-top: 2px solid var(--line-2); }
.spec div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--fg-2); }
.spec dd { margin: 0; font-weight: 700; }
.viewer-info .btn { margin-top: 6px; }
.viewer-close { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--yellow); color: var(--ink); cursor: pointer; font-size: 1.5rem; line-height: 1; font-weight: 700; }

/* Pasos simples */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps li { position: relative; padding: 26px; background: var(--bg-2); border-radius: var(--r); border-top: 4px solid var(--yellow); }
.step-icon { position: absolute; right: 22px; top: 22px; color: var(--yellow); }
.step-icon .icon { width: 54px; height: 54px; }
.step-n { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 18px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; }
.steps h3 { font-size: 1.45rem; font-stretch: 115%; margin-bottom: 8px; }
.steps p { color: var(--fg-2); }

/* Cómo trabajamos */
.story { padding-bottom: var(--section); }
.story-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.story-media { position: sticky; top: calc(var(--header-h) + 20px); aspect-ratio: 4 / 5; max-height: calc(100svh - var(--header-h) - 40px); overflow: hidden; border-radius: var(--r); background: var(--bg-3); }
.story-media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s var(--ease); }
.story-media > .is-on { opacity: 1; }
.story-step { min-height: 60svh; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding-block: 24px; border-top: 1px solid var(--line-2); opacity: 0.4; transition: opacity 0.35s; }
.story-step.is-on { opacity: 1; }
.story-step h2 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
.story-step p { max-width: 28em; color: var(--fg-2); font-size: 1.2rem; }
.story-badge { display: flex; align-items: center; gap: 12px; color: var(--yellow); }
.story-badge .icon { width: 40px; height: 40px; }
.story-step .step-n { margin-bottom: 0; }
.story-step .step-media { display: none; }

/* Materiales */
.materials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.materials > li { padding: 24px; background: var(--bg-3); border-radius: var(--r); }
.mat-name { font-family: var(--f-display); font-weight: 800; font-stretch: 125%; font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1; color: var(--yellow); margin-bottom: 10px; }
.mat-use { font-weight: 700; margin-bottom: 16px; }
.mat-rates { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.mat-rates li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; color: var(--fg-2); font-size: 0.95rem; }
.mat-rates .icon { width: 22px; height: 22px; color: var(--fg); }
.rate { display: flex; gap: 4px; }
.rate i { width: 22px; height: 8px; border-radius: 1px; background: var(--line-2); }
.rate i.on { background: var(--yellow); }

/* Cotizar */
.send-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.send-tiles li { display: flex; flex-direction: column; gap: 18px; padding: 26px; background: var(--bg-2); border-radius: var(--r); border-top: 4px solid var(--yellow); }
.send-tiles .icon { width: 56px; height: 56px; color: var(--yellow); }
.send-tiles p { font-family: var(--f-display); font-weight: 800; font-stretch: 112%; font-size: 1.35rem; line-height: 1.1; }
.send-tiles p span { font-family: var(--f-text); font-weight: 500; font-stretch: 100%; font-size: 1rem; color: var(--fg-2); }
.faq { max-width: 860px; border-top: 2px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--bg-3); font-weight: 400; font-size: 1.3rem; transition: transform 0.2s var(--ease), background-color 0.2s, color 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--yellow); color: var(--ink); }
.faq details p { padding: 0 0 22px; max-width: 40em; color: var(--fg-2); font-size: 1.1rem; }

/* Cierre */
.closer { background: var(--yellow); color: var(--ink); }
.closer-inner { padding-block: clamp(56px, 8vw, 104px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 28px 56px; align-items: center; }
.closer h2 { font-size: clamp(2.4rem, 6vw, 5.4rem); }
.closer p { margin-top: 16px; font-size: 1.25rem; font-weight: 600; }
.closer-actions { display: grid; gap: 10px; }
.closer-actions .btn { justify-content: space-between; }

/* Pie */
.footer { background: #0b0b0a; color: var(--fg-2); padding-block: 48px calc(32px + env(safe-area-inset-bottom, 0px)); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.6fr)); gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer-brand { --iso-top: var(--yellow); }
.footer-brand svg { width: 200px; height: auto; fill: var(--fg); }
.footer-brand p { margin-top: 16px; max-width: 24em; }
.footer h3 { font-family: var(--f-text); font-stretch: 100%; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-2); margin-bottom: 14px; }
.footer ul { display: grid; gap: 8px; }
.footer-icons li, .footer-icons a { display: inline-flex; align-items: center; gap: 10px; }
.footer-icons .icon { color: var(--yellow); }
.footer a { color: var(--fg); text-decoration: none; }
.footer a:hover { color: var(--yellow); }
.footer-host { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; font-size: 0.9rem; }
.footer-host a { text-decoration: underline; text-underline-offset: 3px; }

/* WhatsApp flotante (celular) */
.wa-float { display: none; }

/* --- Responsive --- */
@media (max-width: 1080px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .materials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .menu-btn { display: grid; place-items: center; width: 46px; height: 46px; margin-right: -10px; border: 0; background: none; cursor: pointer; }
  .menu-lines, .menu-lines::before, .menu-lines::after { display: block; width: 24px; height: 2.5px; background: currentColor; transition: transform 0.25s var(--ease), background-color 0.2s; }
  .menu-lines { position: relative; }
  .menu-lines::before, .menu-lines::after { content: ""; position: absolute; left: 0; }
  .menu-lines::before { top: -8px; }
  .menu-lines::after { top: 8px; }
  .menu-btn[aria-expanded="true"] .menu-lines { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-lines::before { transform: translateY(8px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-lines::after { transform: translateY(-8px) rotate(-45deg); }
  .nav {
    position: fixed; left: 0; right: 0; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
    background: var(--bg); overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0s 0.2s;
  }
  /* el desenfoque convierte la cabecera en contenedor del menú fijo: se quita con el menú abierto */
  .header[data-open] { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
  .header[data-open] .nav { visibility: visible; opacity: 1; transform: none; transition: opacity 0.2s, transform 0.2s var(--ease); }
  .nav a:not(.btn) { padding: 18px 0; border-bottom: 1px solid var(--line-2); font-family: var(--f-display); font-weight: 800; font-stretch: 120%; font-size: 1.9rem; line-height: 1; color: var(--fg); }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--yellow); padding-bottom: 18px; }
  .nav .nav-wa { display: flex; margin-top: 22px; }
  .header-cta { display: none; }

  .hero-grid { grid-template-columns: 1fr; }
  .mosaic { height: auto; min-height: 0; aspect-ratio: 1 / 1; }
  .send-tiles { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr; }
  .story-media { display: none; }
  .story-step { min-height: 0; opacity: 1; padding-block: 28px; }
  .story-step .step-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r); background: var(--bg-3); margin-bottom: 6px; }
  .story-step .step-media img, .story-step .step-media video { width: 100%; height: 100%; object-fit: cover; }
  .steps { grid-template-columns: 1fr; }
  .closer-inner { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .viewer-inner { grid-template-columns: 1fr; overflow-y: auto; }
  .viewer-stage img, .viewer-stage video { height: 56svh; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  body { font-size: 1.04rem; }
  .mosaic { gap: 8px; aspect-ratio: 4 / 4.4; }
  .tile-tag { left: 6px; bottom: 6px; font-size: 0.8rem; padding: 5px 8px; }
  .step-icon .icon { width: 44px; height: 44px; }
  .send-tiles li { flex-direction: row; align-items: center; padding: 20px; }
  .send-tiles .icon { width: 44px; height: 44px; }
  .hero h1 { font-size: clamp(1.9rem, 8.6vw, 3.4rem); }
  .hero-actions .btn { flex: 1 1 100%; }
  .services { gap: 24px 10px; }
  .service-title { font-size: 1.12rem; }
  .service-text { font-size: 0.92rem; }
  .service-icon { left: 6px; top: 6px; width: 38px; height: 38px; }
  .service-icon .icon { width: 22px; height: 22px; }
  .works { gap: 26px 10px; }
  .work-title { font-size: 1.05rem; }
  .work-count { display: none; }
  .materials { grid-template-columns: 1fr; gap: 10px; }
  .section-row .btn { width: 100%; }
  .closer-actions .btn { font-size: 1.05rem; }
  .footer-top { grid-template-columns: 1fr; }

  .viewer { width: 100vw; max-width: 100vw; height: 100svh; max-height: 100svh; border-radius: 0; }
  .viewer-inner { display: block; max-height: 100svh; height: 100svh; overflow-y: auto; }
  .viewer-stage { display: block; }
  .viewer-info { padding: 22px 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .viewer-info .btn { width: 100%; }
  .viewer-nav { width: 44px; height: 44px; }

  .wa-float {
    position: fixed; z-index: 80; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px;
    background: var(--yellow); color: var(--ink); border-radius: var(--r); text-decoration: none;
    font-family: var(--f-display); font-weight: 800; font-stretch: 110%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s var(--ease), opacity 0.3s;
  }
  .wa-float:not([data-visible]) { transform: translateY(150%); opacity: 0; pointer-events: none; }
}

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