/* GRY Constructora y Mantenimiento
   ---------------------------------------------------------------------------
   Design idea: this company sells PROOF that equipment stayed inside
   tolerance. So the page is built like instrumentation, not like a brochure.
   Every recurring device comes from that one decision:

     - tick rules instead of plain borders (a ruler edge, not a divider)
     - crop-mark brackets on the panels that carry evidence
     - tabular monospace figures for anything measured
     - serial labels (ESP-01) because equipment is catalogued, not listed
     - the serape stripe kept, but promoted to a structural rail: it marks
       the scroll position and the active service, so the one piece of Mexican
       craft in the design does a job instead of decorating

   Fluid everywhere: type, space and layout all scale with the viewport, so
   between the named breakpoints the page still composes rather than stretches.
   --------------------------------------------------------------------------- */

:root {
  --paper:      #f6f2e9;
  --card:       #fffdf8;
  --paper-3:    #ebe4d5;
  --ink:        #101418;
  --panel:      #161b21;
  --panel-2:    #1c222a;
  --line-dark:  #262e37;
  --red:        #a32638;
  --red-2:      #c33349;
  --teal:       #2e8b8b;
  --gold:       #d9a441;
  --green:      #2fa36b;
  --text:       #14181d;
  --muted:      #656d79;
  --muted-2:    #98a2af;
  --line:       #ddd4c2;

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* fluid scale */
  --step--1: clamp(.78rem, .74rem + .18vw, .87rem);
  --step-0:  clamp(.96rem, .92rem + .2vw, 1.06rem);
  --step-1:  clamp(1.1rem, 1.02rem + .4vw, 1.35rem);
  --step-2:  clamp(1.4rem, 1.2rem + .9vw, 2rem);
  --step-3:  clamp(1.85rem, 1.4rem + 2.1vw, 3.1rem);
  --step-4:  clamp(2.2rem, 1.45rem + 3.1vw, 3.65rem);

  --gap: clamp(1rem, .6rem + 1.6vw, 2rem);
  --pad-section: clamp(3.4rem, 2rem + 6vw, 7rem);
  --wrap: 1240px;
  --header-h: 68px;   /* fixed so the hero can be pulled up by exactly this */
  --r: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.62;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--gold); color: var(--ink); }

:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - clamp(1.5rem, 5vw, 4rem), var(--wrap)); margin-inline: auto; }

/* data / label typography: the whole instrument feeling lives here */
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.label {
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.dark .label { color: var(--muted-2); }

/* tick rule: a ruler edge, used wherever a plain <hr> would have gone */
.tickrule {
  height: 11px;
  background-image:
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--text) 1px, transparent 1px);
  background-size: 11px 6px, 55px 11px;
  background-repeat: repeat-x;
  background-position: bottom left;
  opacity: .5;
}
.dark .tickrule { background-image: linear-gradient(90deg,#39424d 1px,transparent 1px), linear-gradient(90deg,#6c7988 1px,transparent 1px); opacity: .8; }

/* crop marks: four corner brackets. Marks the panels that carry evidence. */
.bracket { position: relative; }
.bracket::before, .bracket::after {
  content: ""; position: absolute; width: 15px; height: 15px; pointer-events: none;
  border: 2px solid var(--red);
}
.bracket::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.bracket::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.serape {
  height: 6px; flex: none;
  background: repeating-linear-gradient(90deg,
    var(--red) 0 30px, var(--gold) 30px 52px, var(--teal) 52px 74px,
    var(--ink) 74px 88px, var(--paper-3) 88px 102px);
}

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  transition: background .3s, border-color .3s, color .3s;
}
/* Over the hero the bar is glass, not paper: the video runs behind it and the
   page starts at the top of the frame instead of under a strip. app.js drops
   this class the moment the hero leaves, so the bar never floats over
   paper-coloured content with white text on it. */
.site-header.over-hero {
  background: transparent; border-bottom-color: transparent; color: #fff;
  backdrop-filter: none;
}
.site-header.over-hero .brand-name { color: #fff; }
.site-header.over-hero .brand-sub { color: var(--gold); }   /* --red is near-invisible on the footage */
.site-header.over-hero .nav a { color: #e8edf2; }
.site-header.over-hero .nav a::after { background: var(--gold); }
.site-header.over-hero .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45); }
.site-header.over-hero .btn-whatsapp { box-shadow: 0 2px 14px rgba(0,0,0,.28); }
.site-header.over-hero .btn-ghost:hover { box-shadow: inset 0 0 0 1.5px #fff; background: rgba(255,255,255,.1); }
.site-header.over-hero .nav-toggle i { background: #fff; }
.site-header.over-hero .brand-mark { background-image: url("brand/gry-mark-light.png"); }
/* menu down: the bar lands, whatever the scroll position */
.site-header.over-hero.nav-open {
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  border-bottom-color: var(--line); color: var(--text);
  backdrop-filter: blur(12px) saturate(1.2);
}
.site-header.over-hero.nav-open .brand-name { color: var(--text); }
.site-header.over-hero.nav-open .nav a { color: var(--text); }
.site-header.over-hero.nav-open .nav-toggle i { background: var(--text); }
.site-header.over-hero.nav-open .brand-mark { background-image: url("brand/gry-mark.png"); }
/* scroll progress, drawn in the serape palette: the ornament reports position */
.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--red), var(--gold) 40%, var(--teal) 75%, var(--red));
  transition: width .08s linear;
}
.header-inner { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 2rem); height: calc(var(--header-h) - 1px); }

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
/* The mark is a recovered raster, not a vector: see scripts/extract-logo.py.
   It is a background rather than an <img> so the reversed version can be
   swapped by a class when the header turns to glass over the hero video,
   where the mark's black outlines would disappear into the footage. */
.brand-mark {
  width: 38px; height: 38px; flex: none;
  background: url("brand/gry-mark.png") center / contain no-repeat;
}
.brand-name { font-weight: 700; font-size: clamp(.92rem, .85rem + .3vw, 1.02rem); letter-spacing: -.01em; line-height: 1.1; }
/* The header has a fixed height so the hero can be pulled up behind it by
   exactly that much, so this line must never wrap: two lines would push the
   bar open and break the alignment. It is tracked tighter on small screens
   instead of being shortened, because the full wording is the client's. */
.brand-sub {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--red); margin-top: .18rem;
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .brand-sub { font-size: .5rem; letter-spacing: .07em; }
}

.nav { display: flex; gap: clamp(.9rem, 1.8vw, 1.7rem); align-items: center; }
.nav a {
  text-decoration: none; font-size: .9rem; font-weight: 500; position: relative; padding: .35rem 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--red); transition: right .22s cubic-bezier(.4,0,.2,1);
}
.nav a:hover::after, .nav a.active::after { right: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-weight: 650; font-size: .93rem; line-height: 1.2;
  padding: .8rem 1.25rem; border: 0; border-radius: var(--r); cursor: pointer;
  text-decoration: none; transition: transform .14s, background .16s, box-shadow .16s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.22); }
.btn-primary:hover { background: var(--red-2); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.dark .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px var(--line-dark); }
.dark .btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--muted-2); }
.btn-wa { background: #25d366; color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.btn-wa:hover { background: #1ebe5d; }
.btn-lg { padding: .95rem 1.5rem; font-size: 1rem; }

.header-cta { display: flex; gap: .55rem; align-items: center; }

/* Boton de WhatsApp de la casa, identico al de neuronprocess.com:
   #25d366, radio 30px, padding .75rem 2rem, peso 700, gap .6rem. */
.btn-whatsapp {
  display: inline-flex; align-items: center; gap: .6rem; flex: none;
  background: #25d366; color: #fff;
  border-radius: 30px; padding: .75rem 2rem;
  font-family: var(--sans); font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: background .2s, transform .2s;
}
.btn-whatsapp:hover { background: #1ebe5d; color: #fff; transform: translateY(-2px); }
/* Entre 901 y ~1080 px el nav todavia no colapsa y el boton a tamano completo
   se sale del ancho util. Se aprieta, no se encoge el texto. */
@media (max-width: 1080px) {
  .btn-whatsapp { padding: .7rem 1.2rem; font-size: .9rem; gap: .45rem; }
  .btn-whatsapp svg { width: 17px; height: 17px; }
}
/* 901-960: cabe el glifo y la palabra, no la frase completa */
@media (max-width: 960px) {
  .wa-long { display: none; }
}
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .55rem; }
.nav-toggle i { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: .22s; }
.nav-toggle[aria-expanded="true"] i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- hero ----------------
   Full-bleed video behind the type. Three things make that readable instead
   of the usual muddy stock-video banner:

     1. the scrim is DIRECTIONAL. It is heavy on the side the text sits on and
        opens up on the side the fan sits on, so the subject survives instead
        of being flattened under an even wash of black
     2. the engineering mesh sits ON TOP of the video, which ties the footage
        to the rest of the page instead of letting it float as a photo
     3. the text is sized and weighted for a moving backdrop: no thin weights,
        no small grey captions over the busiest part of the frame
   --------------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ink); color: #f2f5f8;
  margin-top: calc(-1 * var(--header-h));          /* run the footage behind the bar */
  padding: calc(var(--header-h) + clamp(4rem, 3rem + 5vw, 7rem)) 0 clamp(4rem, 2rem + 6vw, 7rem);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
/* Without scripting no clip is ever chosen and the video stays empty, so the
   default still carries the hero on its own. */
html:not(.js) .hero-bg {
  background-image: url("media/hero-ventilacion-poster.jpg");
  background-size: cover; background-position: 62% 50%;
}
.hero-bg video {
  width: 100%; height: 100%; object-fit: cover;
  /* set per clip by the chooser in index.html. A custom property, not an
     inline object-position, so the phone override below still wins. */
  object-position: var(--hero-obj, 62% 50%);
  display: block; filter: saturate(.9) contrast(1.06);
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(14,17,21,.96) 0%, rgba(14,17,21,.9) 34%,
                            rgba(14,17,21,.58) 58%, rgba(14,17,21,.3) 100%),
    linear-gradient(to top, rgba(14,17,21,.85) 0%, rgba(14,17,21,0) 38%);
}
.hero-mesh {
  position: absolute; inset: 0; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 70% at 18% 40%, #000 10%, transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }

.eyebrow { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.3rem; }
.eyebrow .bars { display: flex; gap: 2px; }
.eyebrow .bars i { width: 3px; height: 13px; display: block; }
.eyebrow span { font-family: var(--mono); font-size: .68rem; letter-spacing: .17em; text-transform: uppercase; font-weight: 500; color: #d7dee6; }

h1 {
  font-size: var(--step-4); line-height: 1.02; letter-spacing: -.035em;
  font-weight: 700; margin: 0 0 1.3rem; text-wrap: balance; color: #fff;
  text-shadow: 0 2px 26px rgba(8,10,13,.55);
}
h1 em { font-style: normal; color: #ff8294; }   /* --red lifted until it carries on dark */
/* On a moving backdrop a filled highlight turns to mud, so the band became a
   gold rule under the phrase: same emphasis, nothing competing behind it. */
/* Underline drawn as a background edge, cloned per line fragment. An
   absolutely positioned pseudo-element takes its box from the FIRST fragment
   of a wrapped inline, so at 390 px it underlined the word "lo" and nothing
   else. This version is identical at every width. */
h1 .band {
  display: inline; background: none;
  background-image: linear-gradient(to top, var(--gold) 0 3px, transparent 3px);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding-bottom: .08em;
}

.lede { font-size: var(--step-1); color: #d2dae2; max-width: 34rem; margin: 0 0 1.9rem; line-height: 1.52; }
.lede strong { color: #fff; font-weight: 650; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 2.2rem; }
.hero .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); backdrop-filter: blur(4px); }
.hero .btn-ghost:hover { box-shadow: inset 0 0 0 1.5px #fff; background: rgba(255,255,255,.08); }

.creds { display: grid; gap: 0; border-top: 1px solid rgba(255,255,255,.18); max-width: 38rem; }
.cred {
  display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: center;
  padding: .72rem 0; border-bottom: 1px solid rgba(255,255,255,.18); font-size: var(--step--1);
}
.cred b { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; color: var(--gold); }
.cred span { font-weight: 500; color: #dde4eb; }

/* the honesty label and the pause control, kept out of the headline's way */
.hero-credit {
  position: absolute; right: clamp(1.5rem, 5vw, 4rem); bottom: clamp(1rem, 2vw, 1.6rem);
  display: flex; align-items: center; gap: .8rem; z-index: 2;
}
.hero-credit .label { color: rgba(255,255,255,.72); font-size: .58rem; text-align: right; }
.vtoggle {
  flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(6px); transition: background .16s;
}
.vtoggle:hover { background: rgba(255,255,255,.3); }
.vtoggle svg { width: 13px; height: 13px; fill: currentColor; }

/* ---------------- instrument panel (the signature) ---------------- */
.instrument {
  background: var(--panel); color: #eef2f6; border-radius: var(--r);
  box-shadow: 0 24px 60px -18px rgba(16,20,24,.5); overflow: hidden;
  display: flex; flex-direction: column;
}
.inst-head { display: flex; align-items: center; gap: .7rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line-dark); }
.inst-head .label { color: var(--muted-2); margin-right: auto; }
.pill {
  display: inline-flex; align-items: center; gap: .45rem; font-family: var(--mono);
  font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
  padding: .32rem .65rem; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--green) 18%, transparent); color: #6fe0a8;
}
.pill .led { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 70%, transparent); }
.pill .led.on { animation: led 2.4s ease-out infinite; }
@keyframes led { 0% { box-shadow: 0 0 0 0 color-mix(in srgb,var(--green) 65%,transparent); } 70%,100% { box-shadow: 0 0 0 7px transparent; } }

.chart { position: relative; padding: 1rem 1.1rem .4rem; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis-y { position: absolute; left: 1.1rem; top: 1rem; font-family: var(--mono); font-size: .58rem; color: #5d6773; }

.readouts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-dark); }
.readout { padding: .95rem 1.1rem; border-right: 1px solid var(--line-dark); }
.readout:last-child { border-right: 0; }
.readout .label { font-size: .58rem; color: #5d6773; }
.readout b { display: block; font-family: var(--mono); font-size: clamp(1.05rem, .9rem + .6vw, 1.45rem); font-weight: 600; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.readout.u b { color: #eef2f6; } .readout.t b { color: #5fd0cf; } .readout.g b { color: var(--gold); }
.readout small { font-family: var(--mono); font-size: .6rem; color: #5d6773; }

.inst-foot { padding: .8rem 1.1rem; border-top: 1px solid var(--line-dark); font-family: var(--mono); font-size: .62rem; color: #5d6773; display: flex; justify-content: space-between; gap: 1rem; }



/* the icon itself is swapped in app.js: a pause glyph and a play glyph are
   different paths, not one path CSS can bend into the other */

/* ---------------- evidence block (Método) ---------------- */
.evidence { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: clamp(2rem,4vw,4rem); align-items: center; }
.evidence h3 { font-size: var(--step-2); line-height: 1.12; letter-spacing: -.025em; margin: .8rem 0 .9rem; font-weight: 700; }
.evidence p { color: var(--muted-2); margin: 0; max-width: 34rem; }

/* ---------------- sections ---------------- */
section { padding: var(--pad-section) 0; position: relative; }
.dark { background: var(--ink); color: #eef2f6; }
.dark h2, .dark h3 { color: #fff; }

.shead { max-width: 54rem; margin-bottom: clamp(2rem, 4vw, 3.4rem); }
.shead.center { margin-inline: auto; text-align: center; }
.shead .label { display: block; margin-bottom: .9rem; color: var(--red); }
.dark .shead .label { color: var(--gold); }
h2 { font-size: var(--step-3); line-height: 1.06; letter-spacing: -.03em; margin: 0 0 1rem; font-weight: 700; text-wrap: balance; }
.shead p { color: var(--muted); font-size: var(--step-1); margin: 0; line-height: 1.5; max-width: 42rem; }
.shead.center p { margin-inline: auto; }
.dark .shead p { color: var(--muted-2); }

/* ---------------- bitácora: the service index ---------------- */
.bitacora {
  display: grid;
  grid-template-columns: minmax(230px, 310px) minmax(0, 1fr);
  grid-template-rows: repeat(5, min-content) 1fr;   /* index stays compact; the panel absorbs the slack */
  gap: 0 clamp(1.5rem, 3vw, 3.5rem);
  align-items: start; align-content: start;
}

.rail-item {
  grid-column: 1; display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center;
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--sans); color: var(--text);
  padding: 1rem .6rem 1rem 1rem; border-bottom: 1px solid var(--line);
  position: relative; transition: background .18s;
}
.rail-item:first-of-type { border-top: 1px solid var(--line); }
.rail-item::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--red); transform: scaleY(0); transform-origin: top; transition: transform .26s cubic-bezier(.4,0,.2,1);
}
.rail-item[aria-selected="true"]::before, .rail-item[aria-expanded="true"]::before { transform: scaleY(1); }
.rail-item:hover { background: color-mix(in srgb, var(--paper-3) 55%, transparent); }
.rail-item .n { font-family: var(--mono); font-size: .7rem; color: var(--muted); letter-spacing: .06em; }
.rail-item .t { font-weight: 600; font-size: var(--step-0); line-height: 1.25; }
.rail-item .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .26s; }
.rail-item[aria-selected="true"] .n { color: var(--red); }
.rail-item[aria-selected="true"] .t { color: var(--red); }

.rail-panel { grid-column: 2; grid-row: 1 / -1; }
.rail-panel[hidden] { display: none; }
/* Without scripting the rail buttons do nothing, so every panel has to stand
   open: hidden content with no way to reveal it is content that is gone. It
   is not enough to un-hide them, because every panel is placed in the SAME
   grid cell and they would simply stack on top of one another. The layout
   drops to the accordion's single column, with all five open. */
html:not(.js) .rail-panel[hidden] { display: block; }
html:not(.js) .bitacora { display: block; }
html:not(.js) .rail-item { grid-column: auto; }
html:not(.js) .rail-panel { grid-column: auto; grid-row: auto; }
html:not(.js) .rail-item .chev { display: none; }
html:not(.js) .rail-item { cursor: default; }

.spec { background: var(--card); border-radius: var(--r); padding: clamp(1.3rem, 2.4vw, 2.2rem); box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(16,20,24,.4); }
.spec-top { display: flex; flex-wrap: wrap; gap: 1rem; align-items: baseline; justify-content: space-between; margin-bottom: .4rem; }
.spec h3 { font-size: var(--step-2); line-height: 1.12; letter-spacing: -.02em; margin: 0; font-weight: 700; }
.spec-id { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; color: #fff; background: var(--ink); padding: .3rem .6rem; border-radius: 3px; }
.spec > p { color: var(--muted); margin: .7rem 0 1.5rem; max-width: 46rem; }

.spec-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.spec-list li { display: grid; grid-template-columns: auto 1fr; gap: .9rem; padding: .85rem 0; border-top: 1px dashed var(--line); align-items: start; }
.spec-list li:last-child { border-bottom: 1px dashed var(--line); }
.spec-list .k { font-family: var(--mono); font-size: .66rem; color: var(--muted); letter-spacing: .1em; padding-top: .22rem; }
.spec-list .v { font-size: var(--step--1); line-height: 1.55; }
.spec-list .v b { font-weight: 650; display: block; margin-bottom: .1rem; font-size: var(--step-0); }

.spec-foot { margin-top: 1.6rem; padding-top: 1.1rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.spec-norm { font-family: var(--mono); font-size: .68rem; color: var(--muted); letter-spacing: .06em; }

/* ---------------- procedure timeline ---------------- */
.procedure { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
.proc-rail { position: absolute; left: 0; right: 0; top: 26px; height: 2px; background: var(--line-dark); }
.proc-rail i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--gold), var(--teal)); transition: width 1.1s cubic-bezier(.4,0,.2,1); }
.step { position: relative; padding-top: 62px; }
.step::before {
  content: ""; position: absolute; top: 18px; left: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--line-dark); transition: border-color .4s, background .4s;
}
.step.lit::before { border-color: var(--gold); background: var(--gold); }
.step .n { position: absolute; top: 0; left: 0; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; color: var(--muted-2); }
.step h3 { font-size: var(--step-1); margin: 0 0 .55rem; font-weight: 650; letter-spacing: -.015em; }
.step p { margin: 0; font-size: var(--step--1); color: var(--muted-2); line-height: 1.58; }

/* ---------------- gallery ---------------- */
/* Five tiles, not four or six, so the grid is explicit rather than auto-fit:
   the first one spans two columns and the row below carries the other three.
   auto-fit would leave a single stretched orphan on the second row. */
.gallery { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: start; }
@media (min-width: 720px)  { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px)  { .gallery .wide { grid-column: span 2; } }
.gallery figure { margin: 0; background: var(--card); border-radius: var(--r); overflow: hidden; }
/* height:auto is load-bearing. The img carries width/height attributes so the
   browser reserves the box before the file arrives, but those attributes map
   to CSS height, which beats aspect-ratio: without this the tiles render at
   the file's pixel height and the grid rows go square. */
.gallery img { aspect-ratio: 3/2; object-fit: cover; width: 100%; height: auto; display: block; }
.gallery figcaption { padding: .85rem 1rem; font-size: var(--step--1); color: var(--muted); }
.gallery figcaption b { display: block; color: var(--ink); font-weight: 600; margin-bottom: .2rem; }
.gallery .where { display: block; margin-top: .45rem; font-family: var(--mono); font-size: .72rem;
                  letter-spacing: .04em; text-transform: uppercase; color: var(--muted); opacity: .8; }
.slot {
  grid-column: 1 / -1; padding: clamp(2.2rem, 5vw, 3.6rem); text-align: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 11px, color-mix(in srgb, var(--line) 55%, transparent) 11px 22px),
    var(--paper-3);
  border-radius: var(--r);
}
.slot b { display: block; font-size: var(--step-1); margin-bottom: .55rem; }
.slot p { color: var(--muted); margin: 0 auto; max-width: 34rem; font-size: var(--step--1); }

/* ---------------- coverage ---------------- */
.coverage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.radar { width: 100%; max-width: 460px; margin-inline: auto; }
.radar circle.ring { fill: none; stroke: var(--line-dark); stroke-width: 1; }
.radar .sweep { transform-origin: 50% 50%; animation: sweep 9s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.radar .node { transition: r .3s; }

.corridors { display: grid; gap: 0; }
.corridor { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line-dark); }
.corridor:first-child { border-top: 1px solid var(--line-dark); }
.corridor .dot { width: 9px; height: 9px; border-radius: 50%; }
.corridor .nm { font-weight: 550; font-size: var(--step--1); }
.corridor .sec { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; text-align: right; }

.terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--gap); margin: 2.2rem 0; }
.term h4 { margin: 0 0 .4rem; font-size: var(--step-0); font-weight: 650; display: flex; align-items: center; gap: .5rem; }
.term h4 .k { font-family: var(--mono); font-size: .62rem; color: var(--gold); letter-spacing: .1em; }
.term p { margin: 0; font-size: var(--step--1); color: var(--muted-2); line-height: 1.55; }

/* ---------------- contact ---------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); gap: clamp(2rem, 4vw, 3.6rem); align-items: start; }
.vcard { background: var(--card); border-radius: var(--r); padding: clamp(1.3rem, 2.4vw, 1.9rem); }
.person { display: flex; gap: 1rem; align-items: center; padding-bottom: 1.1rem; }
.avatar { width: 54px; height: 54px; border-radius: var(--r); background: var(--red); color: #fff; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 1.1rem; flex: none; }
.person b { display: block; font-size: var(--step-0); line-height: 1.25; }
.person .role { color: var(--red); font-weight: 600; font-size: var(--step--1); }
.person .org { color: var(--muted); font-size: var(--step--1); }

.clist { list-style: none; padding: 0; margin: 0; }
.clist li { display: grid; grid-template-columns: auto 1fr; gap: .85rem; align-items: center; padding: .85rem 0; border-top: 1px dashed var(--line); }
.clist a { text-decoration: none; font-weight: 550; }
.clist a:hover { color: var(--red); }
.clist .ci { width: 34px; height: 34px; border-radius: var(--r); display: grid; place-items: center; background: var(--paper-3); }
.clist .ci svg { width: 16px; height: 16px; }
.clist .sub { display: block; font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }

.form-card { background: var(--card); border-radius: var(--r); padding: clamp(1.4rem, 2.6vw, 2.3rem); }
.form-card h3 { margin: 0 0 .4rem; font-size: var(--step-2); letter-spacing: -.02em; font-weight: 700; }
.form-card > p { margin: 0 0 1.7rem; color: var(--muted); font-size: var(--step--1); }
.frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field label { font-family: var(--mono); font-size: .64rem; letter-spacing: .13em; text-transform: uppercase; color: #4d555f; }
.field .req { color: var(--red); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: var(--step-0); color: var(--text); width: 100%;
  padding: .78rem .85rem; border: 0; box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--r); background: var(--paper); transition: box-shadow .16s, background .16s;
}
.field textarea { resize: vertical; min-height: 118px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--teal);
}
.field input:user-invalid { box-shadow: inset 0 0 0 2px var(--red); }
.factions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: .8rem; margin-top: 1.4rem; }
.fnote { margin: 1.1rem 0 0; font-size: .78rem; color: var(--muted); display: grid; grid-template-columns: auto 1fr; gap: .5rem; align-items: start; }
.fstatus { margin-top: 1rem; padding: .85rem 1rem; border-radius: var(--r); font-size: var(--step--1); display: none; }
.fstatus.ok { display: block; background: color-mix(in srgb, var(--green) 14%, #fff); color: #15694a; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 35%, transparent); }
.fstatus.err { display: block; background: color-mix(in srgb, var(--red) 9%, #fff); color: #8e2130; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 30%, transparent); }

/* ---------------- footer ---------------- */
.site-footer { background: var(--ink); color: #c3cad3; padding: clamp(2.6rem, 5vw, 4rem) 0 2rem; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--gap); align-items: start; }
.fgrid b { color: #fff; font-size: var(--step-1); display: block; letter-spacing: -.02em; }
.ftag { color: var(--gold); font-size: var(--step--1); margin-top: .35rem; font-weight: 550; }
.fchips { display: flex; flex-wrap: wrap; gap: .5rem; }
.fchip { font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; padding: .45rem .7rem; border-radius: 3px; background: var(--panel-2); color: #aeb7c2; }
.fbottom { margin-top: 2.4rem; padding-top: 1.3rem; border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-family: var(--mono); font-size: .66rem; color: #79828d; letter-spacing: .04em; }

/* ---------------- mobile action bar ---------------- */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: none;
  grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line);
  box-shadow: 0 -6px 24px rgba(16,20,24,.16);
  padding-bottom: env(safe-area-inset-bottom);
}
.actionbar a { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .95rem; font-weight: 650; font-size: .92rem; text-decoration: none; }
.actionbar .call { background: var(--card); color: var(--text); }
.actionbar .wa { background: #25d366; color: #fff; }  /* mismo verde de la casa */

/* Trampa del formulario: fuera de pantalla, no display:none, porque hay
   bots que saltan lo que esta oculto con display. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------- reveal ---------------- */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------------- responsive ----------------
   Three real compositions, not one stretched: desktop (index + spec pane),
   tablet (accordion, full width), phone (accordion + fixed action bar). */
@media (max-width: 1080px) {
  /* One column: the type takes the frame and the scrim turns vertical, dark
     where the words are and opening toward the bottom so the fan still reads. */
  .hero-grid { grid-template-columns: 1fr; }
  .hero-scrim {
    background:
      linear-gradient(to bottom, rgba(14,17,21,.93) 0%, rgba(14,17,21,.88) 46%,
                                 rgba(14,17,21,.55) 74%, rgba(14,17,21,.42) 100%);
  }
  .hero-bg video { object-position: 50% 42%; }
  .hero { padding-bottom: clamp(7rem, 6rem + 10vw, 11rem); }
  .hero-credit { left: clamp(1.5rem, 5vw, 4rem); right: clamp(1.5rem, 5vw, 4rem); justify-content: flex-end; }
  .evidence { grid-template-columns: 1fr; }
  .coverage, .contact-grid { grid-template-columns: 1fr; }
  .procedure { grid-template-columns: 1fr 1fr; }
  .proc-rail { display: none; }
  .step { padding-top: 46px; }
}
@media (max-width: 900px) {
  .nav, .header-cta .btn, .header-cta .btn-whatsapp { display: none; }
  .nav-toggle { display: block; }
  .site-header { position: sticky; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: .5rem clamp(1.5rem,5vw,4rem) 1.2rem;
  }
  .nav.open a { padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
  .nav.open a::after { display: none; }

  /* bitácora collapses to a true accordion: each panel follows its own header */
  .bitacora { display: block; }
  .rail-item { grid-column: auto; }
  .rail-panel { grid-column: auto; grid-row: auto; }
  .rail-item .chev { transform: rotate(0deg); }
  .rail-item[aria-expanded="true"] .chev { transform: rotate(180deg); }
  .spec { background: transparent; box-shadow: none; padding: 1.2rem 1rem 2rem; }
  .spec-top { margin-bottom: 0; }
}
@media (max-width: 620px) {
  .procedure { grid-template-columns: 1fr; }
  .actionbar { display: grid; }
  body { padding-bottom: 60px; }
  .readout { padding: .7rem .6rem; }
  .readout .label { font-size: .52rem; letter-spacing: .1em; }
  .readout b { font-size: 1rem; }
  .inst-head { flex-wrap: wrap; }
  .inst-foot { font-size: .56rem; }
  .spec-list li { grid-template-columns: 1fr; gap: .25rem; }
  .corridor { grid-template-columns: auto 1fr; }
  .corridor .sec { grid-column: 2; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* No motion: the chosen clip's own poster frame stands in for the loop, so
     the video element stays visible and simply never plays (app.js does not
     call play, and there is no autoplay attribute). Hiding it here would hide
     the poster with it, which is the bug this replaced. */
  .vtoggle { display: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .rv { opacity: 1; transform: none; }
}
