/* ==========================================================================
   FERRETERÍA VIMAR AMATLÁN
   Dirección: Industrial Editorial / Modern Hardware Store
   Paleta: carbón · acero · hueso · naranja (único acento)
   Tipografía: Barlow Condensed (display) · Barlow (texto) · IBM Plex Mono (etiquetas)
   Mobile-first. Sin frameworks.
   ========================================================================== */

/* ---------- 0. Tokens ---------- */
:root {
  --c-ink: #16181b;
  --c-ink-2: #1e2125;
  --c-ink-3: #2a2e33;
  --c-steel: #8b9096;
  --c-steel-2: #b5b9be;
  --c-bone: #ebe7de;
  --c-bone-2: #f4f1ea;
  --c-bone-3: #dfdacd;
  --c-accent: #e8651a;
  --c-accent-deep: #c9500f;
  --c-accent-ink: #a33d08;   /* naranja legible como texto pequeño sobre claro */
  --c-open-dark: #4bd37a;
  --c-open-light: #1f7a3f;

  --f-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --f-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  --max: 1280px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2));
  --sec-y: clamp(4.5rem, 10vw, 8.5rem);
  --header-h: 64px;
  --bar-h: 64px;

  --r: 0px;               /* cantos vivos: señalética, no app */
  --line-w: 1px;
  --t-fast: 160ms;
  --t-med: 320ms;
  --t-slow: 900ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.77, 0, .18, 1);

  /* contexto por defecto: oscuro (header + hero) */
  --bg: var(--c-ink);
  --fg: var(--c-bone);
  --fg-2: var(--c-steel-2);
  --fg-3: var(--c-steel);
  --line: rgba(235, 231, 222, .14);
  --line-strong: rgba(235, 231, 222, .32);
  --acc-text: var(--c-accent);
  --open: var(--c-open-dark);
}

/* contextos de sección */
.section--bone, .section--light {
  --fg: var(--c-ink);
  --fg-2: #474c52;
  --fg-3: #6b7177;
  --line: rgba(22, 24, 27, .16);
  --line-strong: rgba(22, 24, 27, .4);
  --acc-text: var(--c-accent-ink);
  --open: var(--c-open-light);
}
.section--bone { --bg: var(--c-bone); background: var(--c-bone); }
.section--light { --bg: var(--c-bone-2); background: var(--c-bone-2); }
.section--dark { --bg: var(--c-ink); background: var(--c-ink); }
.final {
  --bg: var(--c-accent); --fg: var(--c-ink); --fg-2: rgba(22, 24, 27, .78); --fg-3: rgba(22, 24, 27, .6);
  --line: rgba(22, 24, 27, .28); --line-strong: rgba(22, 24, 27, .6); --acc-text: var(--c-ink);
}

/* ---------- 1. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--fg);
  background: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
}
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
address { font-style: normal; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.section--bone :focus-visible, .section--light :focus-visible { outline-color: var(--c-ink); }
::selection { background: var(--c-accent); color: var(--c-ink); }

.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }
.mono {
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.4;
}
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline; } }
.skip-link {
  position: absolute; top: -200px; left: 1rem; z-index: 1000;
  padding: .75rem 1rem; background: var(--c-accent); color: var(--c-ink); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* textura de concreto: una capa, barata, sutil */
.grain { position: relative; }
.grain::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 .14 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
.grain > * { position: relative; z-index: 1; }

/* ---------- 2. Botones y enlaces ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .75rem;
  min-height: 48px; padding: .85rem 1.35rem;
  font-family: var(--f-body); font-weight: 600; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
  border: var(--line-w) solid transparent; border-radius: var(--r);
  transition: background var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease, transform var(--t-fast) ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.btn .arrow { transition: transform var(--t-med) var(--ease-out); }
.btn:hover .arrow { transform: translateX(5px); }
.btn:active { transform: translateY(1px); }
.btn--lg { min-height: 56px; padding: 1rem 1.6rem; font-size: .95rem; }
.btn--sm { min-height: 40px; padding: .6rem 1rem; font-size: .8rem; }
.btn--sm svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }

.btn--accent { background: var(--c-accent); color: var(--c-ink); border-color: var(--c-accent); }
.btn--accent:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn--dark { background: var(--c-ink); color: var(--c-bone); border-color: var(--c-ink); }
.btn--dark:hover { background: var(--c-bone); color: var(--c-ink); border-color: var(--c-bone); }
.btn--outline { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn--outline:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--f-mono); font-size: .76rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--acc-text); padding: .5rem 0; min-height: 44px;
}
.link-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; transition: transform var(--t-med) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

.icon-btn {
  display: grid; place-items: center; width: 48px; height: 48px;
  border: var(--line-w) solid var(--line-strong); color: var(--fg);
  transition: background var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.icon-btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn:disabled:hover { background: transparent; color: var(--fg); border-color: var(--line-strong); }

/* ---------- 3. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--c-ink); color: var(--c-bone);
  border-bottom: var(--line-w) solid var(--line);
  transition: transform var(--t-med) var(--ease-out);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: .65rem; }
.logo__mark { width: 14px; height: 14px; background: var(--c-accent); flex: none; }
.logo__word { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
.logo__meta { font-family: var(--f-mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1.15; color: var(--c-steel); padding-left: .65rem; border-left: var(--line-w) solid var(--line); }

.site-header__actions { display: flex; align-items: center; gap: .5rem; }
.site-header__actions .btn--accent { display: none; }

.menu-btn {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; padding: 0 .25rem 0 .75rem;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
}
.menu-btn__icon { position: relative; width: 28px; height: 28px; display: block; }
.menu-btn__icon i { position: absolute; left: 4px; right: 4px; height: 2px; background: currentColor; transition: transform var(--t-med) var(--ease-io), top var(--t-med) var(--ease-io); }
.menu-btn__icon i:nth-child(1) { top: 10px; }
.menu-btn__icon i:nth-child(2) { top: 16px; }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:nth-child(1) { top: 13px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:nth-child(2) { top: 13px; transform: rotate(-45deg); }

/* nav móvil: panel a pantalla completa bajo el header */
.site-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 190;
  background: var(--c-ink); color: var(--c-bone);
  padding: 1.5rem var(--gutter) 2rem;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 480ms var(--ease-io), visibility 0s linear 480ms;
}
.site-nav.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 480ms var(--ease-io), visibility 0s; }
.site-nav__list { display: flex; flex-direction: column; }
.site-nav__list li { border-top: var(--line-w) solid var(--line); }
.site-nav__list li:last-child { border-bottom: var(--line-w) solid var(--line); }
.site-nav__list a {
  display: flex; align-items: baseline; gap: 1rem; padding: 1rem 0;
  font-family: var(--f-display); font-weight: 700; font-size: clamp(2rem, 8vw, 2.75rem); line-height: 1; text-transform: uppercase; letter-spacing: .01em;
  transform: translateY(16px); opacity: 0;
  transition: transform 420ms var(--ease-out), opacity 420ms ease, color var(--t-fast) ease;
}
.site-nav.is-open .site-nav__list a { transform: none; opacity: 1; }
.site-nav.is-open .site-nav__list li:nth-child(1) a { transition-delay: 120ms; }
.site-nav.is-open .site-nav__list li:nth-child(2) a { transition-delay: 170ms; }
.site-nav.is-open .site-nav__list li:nth-child(3) a { transition-delay: 220ms; }
.site-nav.is-open .site-nav__list li:nth-child(4) a { transition-delay: 270ms; }
.site-nav.is-open .site-nav__list li:nth-child(5) a { transition-delay: 320ms; }
.site-nav__list a span { font-family: var(--f-mono); font-size: .72rem; font-weight: 500; letter-spacing: .1em; color: var(--c-accent); }
.site-nav__list a:hover, .site-nav__list a.is-active { color: var(--c-accent); }
.site-nav__extra { display: grid; gap: .5rem; color: var(--c-steel); }
.site-nav__phone { font-family: var(--f-display); font-weight: 700; font-size: 1.75rem; color: var(--c-bone); }

/* ---------- 4. Hero ---------- */
.hero { background: var(--c-ink); color: var(--c-bone); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero__grid { position: relative; display: grid; gap: 2.5rem; padding-top: clamp(2.5rem, 7vw, 5rem); }
.hero__copy { display: flex; flex-direction: column; }

.hero__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; color: var(--c-steel); margin-bottom: 1.75rem; }
.hero__kicker > span:first-child { color: var(--c-accent); }
.hero__kicker > span:nth-child(2)::before { content: ""; display: inline-block; width: 1.5rem; height: 1px; background: var(--c-steel); vertical-align: middle; margin-right: .75rem; }
.hero__status { display: inline-flex; align-items: center; gap: .45rem; }
.hero__status:empty { display: none; }
.hero__status::before { content: ""; width: 7px; height: 7px; background: currentColor; }
.hero__status.is-open { color: var(--c-open-dark); }
.hero__status.is-closed { color: var(--c-steel); }

.hero__title {
  font-family: var(--f-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.9rem, 12vw, 7rem); line-height: .9; letter-spacing: -.012em;
  margin-bottom: 1.5rem;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .04em; margin-bottom: -.04em; }
.hero__title .line > span { display: block; transform: translateY(110%); }
.hero__title .accent { color: var(--c-accent); }
.hero__lead { font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: var(--c-steel-2); max-width: 46ch; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 2.5rem; }

.hero__specs { display: grid; border-top: var(--line-w) solid var(--line); }
.hero__specs > div { padding: .9rem 0; border-bottom: var(--line-w) solid var(--line); display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.hero__specs dt { color: var(--c-steel); }
.hero__specs dd { font-weight: 600; font-size: .95rem; text-align: right; }

.hero__media { position: relative; margin-inline: calc(var(--gutter) * -1); }
.hero__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-ink-2); }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.hero__tag {
  position: absolute; left: 0; bottom: 0;
  display: flex; gap: 1rem; align-items: center;
  background: var(--c-bone); color: var(--c-ink); padding: .7rem 1rem .7rem .9rem;
  border-left: 4px solid var(--c-accent);
}
.hero__tag span:first-child { color: var(--c-accent-ink); }
.hero__vertical { display: none; }

/* entrada coreografiada: solo cuando las fuentes están listas */
.is-loaded .hero__title .line > span { animation: rise 900ms var(--ease-io) forwards; }
.is-loaded .hero__title .line:nth-child(1) > span { animation-delay: 80ms; }
.is-loaded .hero__title .line:nth-child(2) > span { animation-delay: 170ms; }
.is-loaded .hero__title .line:nth-child(3) > span { animation-delay: 260ms; }
.hero__kicker, .hero__lead, .hero__actions, .hero__specs { opacity: 0; }
.is-loaded .hero__kicker { animation: fade 600ms ease 60ms forwards; }
.is-loaded .hero__lead { animation: fade 600ms ease 520ms forwards; }
.is-loaded .hero__actions { animation: fade 600ms ease 640ms forwards; }
.is-loaded .hero__specs { animation: fade 600ms ease 760ms forwards; }
.hero__img { clip-path: inset(0 0 100% 0); }
.hero__img img { transform: scale(1.08); }
.is-loaded .hero__img { animation: unclip 1100ms var(--ease-io) 300ms forwards; }
.is-loaded .hero__img img { animation: settle 1600ms var(--ease-out) 300ms forwards; }
.hero__tag { opacity: 0; }
.is-loaded .hero__tag { animation: fade 500ms ease 1200ms forwards; }
.no-js .hero__kicker, .no-js .hero__lead, .no-js .hero__actions, .no-js .hero__specs, .no-js .hero__tag { opacity: 1; }
.no-js .hero__title .line > span { transform: none; }
.no-js .hero__img { clip-path: none; }
.no-js .hero__img img { transform: none; }

@keyframes rise { to { transform: translateY(0); } }
@keyframes fade { to { opacity: 1; } }
@keyframes unclip { to { clip-path: inset(0 0 0 0); } }
@keyframes settle { to { transform: scale(1); } }

/* cinta métrica */
.ruler {
  position: relative; height: 44px; overflow: hidden;
  background: var(--c-bone); color: var(--c-ink);
  border-top: var(--line-w) solid var(--c-bone-3);
}
.ruler__track { position: absolute; left: 0; top: 0; height: 100%; width: 4000px; will-change: transform; }
/* tres capas de marcas: cada 100px (alta), 50px (media), 10px (corta) */
.ruler__ticks {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, var(--c-ink) 0 1px, transparent 1px),
    linear-gradient(90deg, var(--c-ink) 0 1px, transparent 1px),
    linear-gradient(90deg, var(--c-ink) 0 1px, transparent 1px);
  background-size: 100px 28px, 50px 16px, 10px 9px;
  background-position: 0 100%, 0 100%, 0 100%;
  background-repeat: repeat-x;
}
.ruler__nums { position: absolute; left: 4px; top: 5px; display: flex; color: var(--c-ink); font-size: .62rem; }
.ruler__nums span { width: 100px; flex: none; }

/* ---------- 5. Secciones ---------- */
.section { position: relative; padding: var(--sec-y) 0; color: var(--fg); }
.section--rule { padding-top: 0; }
.section--rule::before { content: ""; display: block; width: min(100% - var(--gutter) * 2, var(--max)); margin: 0 auto calc(var(--sec-y) * .7); border-top: var(--line-w) solid var(--line); }
.section--tight-b { padding-bottom: calc(var(--sec-y) * .6); }

.sec-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.sec-head__index {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding-top: .8rem; border-top: var(--line-w) solid var(--line-strong);
  color: var(--fg-3); margin-bottom: 1.5rem;
}
.sec-head__index > span:first-child { color: var(--acc-text); }
.sec-head__note { display: none; margin-left: auto; }
.sec-head__title {
  font-family: var(--f-display); font-weight: 700; line-height: .98; letter-spacing: -.005em;
  font-size: clamp(2.3rem, 7vw, 4.25rem); max-width: 18ch;
}
.sec-head__lead { color: var(--fg-2); font-size: 1.05rem; max-width: 42ch; margin-top: 1.25rem; }

/* revelado discreto: solo títulos y figuras clave */
.js .sec-head__title { opacity: 0; transform: translateY(18px); transition: opacity 700ms ease, transform 700ms var(--ease-out); }
.js .sec-head__title.is-in { opacity: 1; transform: none; }
/* el recorte va en el hijo: Chrome tiene en cuenta clip-path al medir la intersección
   y un contenedor recortado al 100 % nunca se reportaría visible */
.js .reveal-clip > img, .js .reveal-clip > iframe { clip-path: inset(0 0 100% 0); transition: clip-path var(--t-slow) var(--ease-io), filter var(--t-med) ease; }
.js .reveal-clip.is-in > img, .js .reveal-clip.is-in > iframe { clip-path: inset(0 0 0 0); }

/* ---------- 6. Catálogo (02) ---------- */
.catalog { border-top: var(--line-w) solid var(--line-strong); }
.cat { border-bottom: var(--line-w) solid var(--line); }
.cat__h { font: inherit; margin: 0; }
.cat__btn {
  position: relative; width: 100%; text-align: left;
  display: grid; grid-template-columns: auto 1fr auto; column-gap: 1rem; align-items: center;
  padding: 1.1rem 0; min-height: 64px;
}
.cat__btn::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c-accent);
  transform: scaleY(0); transform-origin: top; transition: transform var(--t-med) var(--ease-io);
}
.cat__num { color: var(--fg-3); width: 2.2rem; }
.cat__name {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 5.5vw, 2.4rem); line-height: 1; text-transform: uppercase; letter-spacing: .005em;
  transition: transform var(--t-med) var(--ease-out), color var(--t-fast) ease;
}
.cat__hint { grid-column: 2; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); margin-top: .35rem; }
.cat__plus { grid-column: 3; grid-row: 1 / span 2; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; transition: transform var(--t-med) var(--ease-io); }
.cat.is-active .cat__btn::before { transform: scaleY(1); }
.cat.is-active .cat__name { color: var(--acc-text); }
.cat.is-active .cat__plus { transform: rotate(45deg); }
.cat__btn:hover .cat__name { transform: translateX(6px); }
.cat__body { position: relative; padding: .25rem 0 1.75rem calc(2.2rem + 1rem); }
.cat__big { display: none; }
.cat__desc { color: var(--fg-2); max-width: 48ch; margin-bottom: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.chips li {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .4rem .6rem; border: var(--line-w) solid var(--line); color: var(--fg-2);
}
.catalog__foot { color: var(--fg-3); margin-top: 1.5rem; max-width: 60ch; }

/* ---------- 7. Fichas por proyecto (03) ---------- */
.projects { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: var(--edge); }
.projects::-webkit-scrollbar { display: none; }
.projects:focus-visible { outline-offset: -2px; }
.projects__track { display: flex; gap: 1px; width: max-content; background: var(--line); border: var(--line-w) solid var(--line); }
.job {
  scroll-snap-align: start; scroll-margin-inline-start: var(--edge);
  width: min(82vw, 330px); flex: none;
  background: var(--c-bone-2); color: var(--c-ink);
  padding: 1.35rem 1.35rem 1.6rem; display: flex; flex-direction: column;
  transition: background var(--t-fast) ease;
}
.job:hover { background: #fbf9f4; }
.job__code { display: flex; justify-content: space-between; color: #6b7177; padding-bottom: .9rem; border-bottom: var(--line-w) solid var(--line); margin-bottom: 1.25rem; }
.job__code span:first-child { color: var(--c-accent-ink); }
.job__title { font-family: var(--f-display); font-weight: 700; font-size: 2rem; line-height: .98; text-transform: uppercase; margin-bottom: .75rem; }
.job__desc { color: #474c52; font-size: .95rem; margin-bottom: 1.25rem; }
.job__label { color: #6b7177; margin-bottom: .5rem; margin-top: auto; }
.job__list li { position: relative; padding: .4rem 0 .4rem 1.1rem; border-top: var(--line-w) solid var(--line); font-size: .95rem; font-weight: 500; }
.job__list li::before { content: ""; position: absolute; left: 0; top: .95rem; width: 6px; height: 6px; background: var(--c-accent); }
.job--cta { background: var(--c-ink); color: var(--c-bone); --bg: var(--c-ink); --fg: var(--c-bone); }
.job--cta:hover { background: var(--c-ink-2); }
.job--cta .job__code { color: var(--c-steel); border-color: rgba(235, 231, 222, .14); }
.job--cta .job__code span:first-child { color: var(--c-accent); }
.job--cta .job__desc { color: var(--c-steel-2); }
.job--cta .btn { margin-top: auto; align-self: flex-start; }
.projects__nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; }
.projects__hint { color: var(--fg-3); }
.projects__btns { display: flex; gap: .5rem; }

/* ---------- 8. Por qué aquí (04) ---------- */
.why { display: grid; gap: 3rem; }
.why__side .sec-head__title { margin-bottom: 1.25rem; }
.why__text { color: var(--fg-2); max-width: 46ch; margin-bottom: 2rem; }
.why__poster { position: relative; max-width: 420px; }
.why__poster img { width: 100%; }
.why__poster figcaption { margin-top: .75rem; color: var(--fg-3); }
.reasons { border-top: var(--line-w) solid var(--line-strong); }
.reason { display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; padding: 1.5rem 0; border-bottom: var(--line-w) solid var(--line); }
.reason__num { color: var(--acc-text); padding-top: .4rem; }
.reason h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.5rem, 4.5vw, 2rem); line-height: 1.02; margin-bottom: .5rem; }
.reason p { color: var(--fg-2); max-width: 52ch; }

/* ---------- 9. Pasos (05) ---------- */
.steps { display: grid; border-top: var(--line-w) solid var(--line-strong); }
.step { position: relative; padding: 1.5rem 0 1.75rem 3.25rem; border-bottom: var(--line-w) solid var(--line); }
.step::before { content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 1.5rem; background: var(--c-accent); }
.step__num { position: absolute; left: 0; top: 2rem; color: var(--fg-3); }
.step h3 { font-family: var(--f-display); font-weight: 700; font-size: 2rem; line-height: 1; text-transform: uppercase; margin-bottom: .5rem; }
.step p { color: var(--fg-2); max-width: 32ch; }
.steps__cta { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; margin-top: 2.5rem; }
.steps__cta .mono { color: var(--fg-3); }

/* ---------- 10. Ubicación (06) ---------- */
.place { display: grid; gap: 1.5rem; }
.place__map { position: relative; aspect-ratio: 4 / 3; min-height: 320px; border: var(--line-w) solid var(--line); background: var(--c-bone-3); }
.place__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); transition: filter var(--t-med) ease; }
.place__map:hover iframe { filter: none; }
.place__card {
  --bg: var(--c-ink); --fg: var(--c-bone); --fg-2: var(--c-steel-2); --fg-3: var(--c-steel);
  --line: rgba(235, 231, 222, .14); --line-strong: rgba(235, 231, 222, .32); --acc-text: var(--c-accent); --open: var(--c-open-dark);
  background: var(--c-ink); color: var(--c-bone); padding: .5rem 1.5rem 1.5rem;
}
.place__row { padding: 1.1rem 0; border-bottom: var(--line-w) solid var(--line); }
.place__k { color: var(--c-accent); margin-bottom: .5rem; display: flex; align-items: center; gap: .75rem; }
.place__phone { font-family: var(--f-display); font-weight: 700; font-size: 2rem; line-height: 1; display: inline-block; transition: color var(--t-fast) ease; }
.place__phone:hover { color: var(--c-accent); }
.place__note { color: var(--c-steel); font-size: .9rem; margin-top: .25rem; }
.hours { width: 100%; font-size: .98rem; }
.hours th { font-family: var(--f-mono); font-weight: 500; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; text-align: left; color: var(--c-steel); padding: .35rem 1rem .35rem 0; white-space: nowrap; }
.hours td { padding: .35rem 1rem .35rem 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours__dash { color: var(--c-steel); }
.place__actions { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; padding-top: 1.5rem; }
.status { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.status:empty { display: none; }
.status::before { content: ""; width: 7px; height: 7px; background: currentColor; }
.status--open { color: var(--open); }
.status--closed { color: var(--fg-3); }

/* ---------- 11. CTA final (07) ---------- */
.final { position: relative; background: var(--c-accent); color: var(--c-ink); padding: var(--sec-y) 0; overflow: hidden; }
.final::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .12 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.final__grid { position: relative; display: grid; gap: 2rem; }
.sec-head__index--onaccent { border-color: rgba(22, 24, 27, .5); color: rgba(22, 24, 27, .7); }
.final__title { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(3rem, 13vw, 8rem); line-height: .9; letter-spacing: -.015em; }
.final__actions { display: flex; flex-direction: column; gap: .75rem; }

/* ---------- 12. Footer ---------- */
.footer { background: var(--c-ink); color: var(--c-steel-2); border-top: var(--line-w) solid var(--line); }
.footer__grid { display: grid; gap: 2rem; padding: 3rem 0 2.5rem; }
.footer__brand p { max-width: 36ch; margin-top: 1rem; font-size: .95rem; }
.footer__col { display: grid; gap: .4rem; align-content: start; padding-top: 1rem; border-top: var(--line-w) solid var(--line); }
.footer__k { color: var(--c-accent); margin-bottom: .5rem; }
.footer__col a { display: inline-block; padding: .2rem 0; transition: color var(--t-fast) ease; }
.footer__col a:hover { color: var(--c-bone); }
.footer__links li a { display: block; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding: 1.25rem 0 1.5rem; border-top: var(--line-w) solid var(--line); color: var(--c-steel); }

/* ---------- 13. Barra fija móvil ---------- */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 180;
  display: flex; height: calc(var(--bar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: var(--line-w) solid rgba(22, 24, 27, .2);
  transform: translateY(0); transition: transform var(--t-med) var(--ease-out);
}
.sticky-bar.is-hidden { transform: translateY(110%); }
.sticky-bar__wa {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .7rem;
  background: var(--c-accent); color: var(--c-ink);
  font-weight: 600; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase;
}
.sticky-bar__wa svg { width: 22px; height: 22px; fill: currentColor; }
.sticky-bar__wa:active { background: var(--c-accent-deep); }
.sticky-bar__call { width: var(--bar-h); display: grid; place-items: center; background: var(--c-ink); color: var(--c-bone); border-left: var(--line-w) solid rgba(235, 231, 222, .2); }
.sticky-bar__call svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ==========================================================================
   Breakpoints (progresivos)
   ========================================================================== */
@media (min-width: 640px) {
  .hero__actions { flex-direction: row; }
  .hero__specs { grid-template-columns: repeat(3, 1fr); border-bottom: var(--line-w) solid var(--line); }
  .hero__specs > div { flex-direction: column; gap: .35rem; border-bottom: 0; padding-right: 1rem; }
  .hero__specs > div + div { border-left: var(--line-w) solid var(--line); padding-left: 1rem; }
  .hero__specs dd { text-align: left; }
  .sec-head__note { display: inline; }
  .steps { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .steps__cta { flex-direction: row; align-items: center; gap: 1.5rem; }
  .final__actions { flex-direction: row; flex-wrap: wrap; }
  .place__actions { flex-direction: row; align-items: center; gap: 1.5rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (min-width: 960px) {
  :root { --header-h: 76px; --bar-h: 0px; }
  body { padding-bottom: 0; }
  .sticky-bar { display: none; }

  /* header: nav en línea */
  .menu-btn { display: none; }
  .site-header__actions .btn--accent { display: inline-flex; }
  .site-nav {
    position: static; inset: auto; padding: 0; background: transparent; clip-path: none; visibility: visible;
    flex-direction: row; align-items: center; transition: none;
  }
  .site-nav__list { flex-direction: row; gap: 2rem; }
  .site-nav__list li, .site-nav__list li:last-child { border: 0; }
  .site-nav__list a {
    font-family: var(--f-body); font-weight: 500; font-size: .92rem; text-transform: none; letter-spacing: 0;
    padding: .5rem 0; gap: .5rem; opacity: 1; transform: none; position: relative; color: var(--c-steel-2);
  }
  .site-nav__list a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--c-accent); transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease-out); }
  .site-nav__list a:hover, .site-nav__list a.is-active { color: var(--c-bone); }
  .site-nav__list a:hover::after, .site-nav__list a.is-active::after { transform: scaleX(1); }
  .site-nav__list a span { font-size: .62rem; }
  .site-nav__extra { display: none; }

  /* hero: dos columnas, foto a sangre por la derecha */
  .hero__grid {
    width: auto; margin: 0; padding: clamp(3rem, 6vw, 5.5rem) 0 0 var(--edge);
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); column-gap: clamp(2rem, 5vw, 5rem); align-items: stretch;
  }
  .hero__copy { padding-bottom: clamp(3rem, 6vw, 5rem); justify-content: center; }
  .hero__title { font-size: clamp(3.6rem, 6.4vw, 6.2rem); }
  .hero__media { margin: 0; display: flex; }
  .hero__img { aspect-ratio: auto; flex: 1; min-height: 620px; }
  .hero__tag { left: auto; right: 0; bottom: 2.5rem; border-left: 0; border-right: 4px solid var(--c-accent); padding: .8rem 1.1rem; }
  .hero__vertical {
    display: block; position: absolute; left: -2.6rem; top: 0; bottom: auto;
    writing-mode: vertical-rl; transform: rotate(180deg); color: var(--c-steel); white-space: nowrap;
  }
  .hero__specs { max-width: 620px; }

  .sec-head--split { display: grid; grid-template-columns: 1fr minmax(0, .8fr); align-items: end; column-gap: 4rem; }
  .sec-head--split .sec-head__lead { margin-top: 0; justify-self: end; padding-bottom: .4rem; }

  /* catálogo: índice a la izquierda, panel fijo a la derecha */
  .catalog { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(2.5rem, 5vw, 5rem); border-top: 0; }
  .cat { display: contents; }
  .cat__h { grid-column: 1; border-bottom: var(--line-w) solid var(--line); }
  .cat:first-child .cat__h { border-top: var(--line-w) solid var(--line-strong); }
  .cat__btn { padding: 1.35rem 0 1.35rem 1.25rem; min-height: 96px; }
  .cat__plus { display: none; }
  .cat__btn::after { content: ""; grid-column: 3; width: 10px; height: 10px; background: var(--c-accent); opacity: 0; transform: scale(.4); transition: opacity var(--t-fast) ease, transform var(--t-med) var(--ease-out); }
  .cat.is-active .cat__btn::after { opacity: 1; transform: scale(1); }
  .cat__body {
    grid-column: 2; grid-row: 1 / span 6; align-self: start;
    position: sticky; top: calc(var(--header-h) + 2rem);
    padding: 2rem 0 2rem 2.5rem; border-left: var(--line-w) solid var(--line-strong); min-height: 420px;
  }
  .cat__big {
    display: block; position: absolute; right: 0; top: -1.25rem; font-family: var(--f-display); font-weight: 800;
    font-size: 11rem; line-height: 1; letter-spacing: -.04em; color: var(--fg); opacity: .06; pointer-events: none; text-transform: none;
  }
  .cat__desc { font-size: 1.1rem; margin-bottom: 1.5rem; }
  .cat__body[hidden] { display: none; }
  .cat__body:not([hidden]) { animation: panel 420ms var(--ease-out); }
  @keyframes panel { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  .catalog__foot { margin-top: 2.5rem; }

  .job { width: 360px; padding: 1.6rem 1.6rem 1.9rem; }

  .why { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(3rem, 6vw, 6rem); align-items: start; }
  .why__side { position: sticky; top: calc(var(--header-h) + 2rem); }
  .reason { grid-template-columns: 3.5rem 1fr; padding: 2rem 0; }
  .reason p { font-size: 1.05rem; }

  .steps { grid-template-columns: repeat(4, 1fr); column-gap: 2rem; border-top: 0; }
  .step { padding: 1.5rem 0 0; border-top: var(--line-w) solid var(--line-strong); border-bottom: 0; }
  .step::before { top: -1px; height: 10px; width: 2px; }
  .step__num { position: static; display: block; margin-bottom: 1.25rem; }
  .step h3 { font-size: 2.4rem; }

  .place { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 1.5rem; align-items: stretch; }
  .place__map { aspect-ratio: auto; min-height: 520px; }
  .place__card { padding: .75rem 2rem 2rem; }

  .final__grid { grid-template-columns: 1fr auto; align-items: end; column-gap: 3rem; }
  .final__actions { justify-content: flex-end; padding-bottom: .5rem; }

  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; column-gap: 2rem; padding: 4rem 0 3rem; }
  .footer__brand { grid-column: auto; }
}

@media (min-width: 1200px) {
  .hero__title { font-size: clamp(4rem, 6.6vw, 7rem); }
  .cat__name { font-size: 2.6rem; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  .hero__title .line > span { transform: none; }
  .hero__kicker, .hero__lead, .hero__actions, .hero__specs, .hero__tag { opacity: 1; }
  .hero__img { clip-path: none; }
  .hero__img img { transform: none; }
  .js .sec-head__title { opacity: 1; transform: none; }
  .js .reveal-clip > img, .js .reveal-clip > iframe { clip-path: none; }
  .ruler__track { transform: none !important; }
}
