/* =============================================================
   Andrés Salas Salcedo — Ingeniería Estructural
   Sistema de diseño: retícula de plano, grafito y acero.
   ============================================================= */

/* ---------- tokens ---------- */
:root {
  --ink:        #10161c;
  --ink-2:      #3c4a57;
  --ink-3:      #58656f;
  --bg:         #f6f5f2;
  --bg-2:       #ffffff;
  --bg-3:       #eeece7;
  --line:       #d9d5cc;
  --line-2:     #c3bdb1;
  --accent:     #1d5f9e;
  --accent-2:   #2a7fd0;
  --accent-ink: #ffffff;
  --ok:         #2f6b45;
  --ok-bg:      #e3efe6;
  --amber:      #b4762a;

  --radius: 10px;
  --radius-sm: 6px;
  --wrap: 1140px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  --shadow-sm: 0 1px 2px rgb(16 22 28 / .06), 0 2px 8px rgb(16 22 28 / .04);
  --shadow-md: 0 2px 4px rgb(16 22 28 / .06), 0 12px 32px rgb(16 22 28 / .08);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #eef1f4;
    --ink-2:      #b3bec9;
    --ink-3:      #8492a0;
    --bg:         #0d1116;
    --bg-2:       #141a21;
    --bg-3:       #10161c;
    --line:       #253039;
    --line-2:     #33414d;
    --accent:     #4a90d9;
    --accent-2:   #6aa9e8;
    --accent-ink: #08111a;
    --ok:         #7bc79b;
    --ok-bg:      #17301f;
    --amber:      #d9a05b;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-md: 0 2px 4px rgb(0 0 0 / .3), 0 16px 40px rgb(0 0 0 / .45);
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(1rem, .97rem + .15vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -.022em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2.1rem, 1.5rem + 3vw, 3.6rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.7vw, 2.4rem); }
h3 { font-size: 1.115rem; font-weight: 640; }
p  { margin: 0 0 1rem; }
a  { color: inherit; }

img, svg { max-width: 100%; }

[hidden] { display: none !important; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: .82em;
  letter-spacing: .01em;
}

.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

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

/* ---------- botones ---------- */
.btn {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  --btn-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.35rem;
  border: 1px solid var(--btn-line);
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font: inherit; font-size: .95rem; font-weight: 560;
  text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn--primary {
  --btn-bg: var(--accent); --btn-ink: var(--accent-ink); --btn-line: var(--accent);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { --btn-bg: var(--accent-2); --btn-line: var(--accent-2); }
.btn--ghost:hover { --btn-line: var(--accent); color: var(--accent); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--sm { padding: .5rem .9rem; font-size: .86rem; }

@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* ---------- navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }

.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.mark-box { fill: none; stroke: var(--line-2); }
.mark-frame { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.mark-node { fill: var(--accent); }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__text strong { font-size: .96rem; font-weight: 640; letter-spacing: -.01em; }
.brand__text em {
  font-style: normal; font-family: var(--font-mono);
  font-size: .68rem; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase;
}

.nav__menu { display: flex; align-items: center; gap: clamp(.9rem, 2vw, 1.7rem); }
.nav__menu a { text-decoration: none; font-size: .93rem; color: var(--ink-2); }
.nav__menu a:hover { color: var(--ink); }
.nav__menu .btn { color: var(--ink); }

.nav__toggle {
  display: none; width: 42px; height: 38px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.nav__bars, .nav__bars::before, .nav__bars::after {
  display: block; width: 18px; height: 1.6px; background: var(--ink); border-radius: 2px;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav__bars::before, .nav__bars::after { content: ""; position: absolute; }
.nav__bars::before { transform: translateY(-5.5px); }
.nav__bars::after  { transform: translateY(5.5px); }
.nav__toggle[aria-expanded="true"] .nav__bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__bars::before { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars::after  { transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; position: relative; }
  .nav__menu {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-block: 1px solid var(--line);
    padding: .4rem var(--gutter) 1rem;
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav__menu .btn { margin-top: .9rem; border-bottom: 0; justify-content: center; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(2.5rem, 5vw, 5rem) 0 clamp(3rem, 6vw, 5.5rem);
  overflow: hidden;
}
.hero::before {
  /* retícula de plano */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 70% 20%, #000 20%, transparent 78%);
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1.05fr .95fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--ink-3); margin-bottom: 1rem;
}
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.eyebrow__num { color: var(--accent); font-size: .95em; }

.hl {
  position: relative; white-space: nowrap;
}
.hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .12em;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 25%, transparent));
  transform-origin: left; animation: underline .9s .35s var(--ease) both;
}
@keyframes underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.lede { font-size: 1.06rem; color: var(--ink-2); max-width: 54ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 2.2rem; }

.hero__stats {
  display: grid; gap: 1rem 1.6rem; margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  padding-top: 1.4rem; border-top: 1px solid var(--line);
}
.hero__stats dt {
  font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-3); margin-bottom: .25rem;
}
.hero__stats dd { margin: 0; font-size: .87rem; color: var(--ink); }

/* ---------- figura del pórtico ---------- */
.hero__figure { margin: 0; }
.fig__label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  color: var(--ink-3); border-bottom: 1px solid var(--line);
  padding-bottom: .5rem; margin-bottom: .9rem;
}
.fig__tag { color: var(--accent); }
.fig__note { color: var(--ink-3); text-align: right; margin: .6rem 0 0; }
.fig__note b { color: var(--ink-2); font-weight: 600; }

.frame { width: 100%; height: auto; display: block; }
.frame__grid line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 6; }
.frame__levels text { fill: var(--ink-3); font-size: 9.5px; text-anchor: end; letter-spacing: -.02em; }
.frame__ghost path { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 4; opacity: .75; }

.frame__struct .col,
.frame__struct .beam {
  fill: none;
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
}
.frame__struct .beam { stroke-width: 6; }
.nodes circle { fill: var(--accent); }

.frame__found rect { fill: color-mix(in srgb, var(--ink) 12%, transparent); stroke: var(--ink-2); stroke-width: 1.2; }
.frame__found .hatch { stroke: var(--line-2); stroke-width: 2; stroke-dasharray: 1 5; stroke-linecap: round; }

.frame__force path { stroke: var(--accent); stroke-width: 2; fill: none; }
.frame__force text { fill: var(--accent); font-size: 10px; }
.frame__force marker path, #arrow path { fill: var(--accent); }

/* dibujo inicial de la estructura */
.frame__struct .col, .frame__struct .beam {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: draw 1.1s var(--ease) forwards;
}
.frame__struct .col:nth-of-type(2) { animation-delay: .08s; }
.frame__struct .col:nth-of-type(3) { animation-delay: .16s; }
.frame__struct .beam:nth-of-type(1) { animation-delay: .3s; }
.frame__struct .beam:nth-of-type(2) { animation-delay: .42s; }
.frame__struct .beam:nth-of-type(3) { animation-delay: .54s; }
.nodes circle { opacity: 0; animation: pop .5s .95s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop  { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .frame__struct .col, .frame__struct .beam { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
  .nodes circle { opacity: 1; animation: none; }
  .hl::after { animation: none; }
}

/* ---------- secciones ---------- */
.section { position: relative; padding: clamp(3.2rem, 7vw, 6rem) 0; }
.section--alt { background: var(--bg-3); border-block: 1px solid var(--line); }
.section--contact { padding-bottom: clamp(3.5rem, 7vw, 6.5rem); }

/* marca de eje estructural en el margen */
.section[data-axis]::before {
  content: attr(data-axis);
  position: absolute; left: max(.6rem, calc((100vw - var(--wrap)) / 2 - 2.4rem)); top: clamp(3.2rem, 7vw, 6rem);
  width: 26px; height: 26px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: .7rem; color: var(--ink-3);
  border: 1px solid var(--line-2); border-radius: 50%;
}
@media (max-width: 1080px) { .section[data-axis]::before { display: none; } }

.section__head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__lede { color: var(--ink-2); }

/* ---------- tarjetas de servicio ---------- */
.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
.card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.3rem;
  transition: border-color .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease);
}
.card::after {
  /* línea de cota que aparece al pasar el cursor */
  content: ""; position: absolute; left: 1.4rem; right: 1.4rem; bottom: .85rem; height: 1px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 9px);
  transform: scaleX(0); transform-origin: left; opacity: 0;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card:hover::after { transform: scaleX(1); opacity: .75; }
.card__icon { width: 40px; height: 40px; margin-bottom: 1rem; display: block; }
.card__icon .s1 { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.card__icon .s2 { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; }
.card__icon .hairline { stroke-width: 1.5; opacity: .45; }
/* la fisura del peritaje se vuelve a propagar al pasar el cursor */
.card__icon .crack { stroke-width: 3; stroke-linejoin: round; }
.card:hover .card__icon .crack { animation: crack .75s var(--ease); }
@keyframes crack { from { stroke-dasharray: 48; stroke-dashoffset: 48; } to { stroke-dasharray: 48; stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .card:hover .card__icon .crack { animation: none; } }
.card p { color: var(--ink-2); font-size: .95rem; }
.card__meta {
  color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em;
  font-size: .68rem; margin: 0; padding-bottom: .4rem;
}
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }

/* ---------- proceso ---------- */
.steps {
  list-style: none; margin: 0 0 clamp(2.5rem, 5vw, 4rem); padding: 0;
  display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  counter-reset: paso;
}
.step {
  position: relative; padding: 1.4rem 1.3rem 1.2rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.step::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 15%, transparent));
  border-radius: var(--radius) 0 0 var(--radius);
}
.step__num { display: block; color: var(--accent); font-size: .78rem; letter-spacing: .1em; margin-bottom: .55rem; }
.step p { color: var(--ink-2); font-size: .94rem; }
.step__time {
  display: inline-block; margin: .3rem 0 0; padding: .18rem .5rem;
  color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; font-size: .7rem;
}

/* ---------- bloque de momentos ---------- */
.moment {
  display: grid; gap: clamp(1.8rem, 4vw, 3rem); align-items: center;
  grid-template-columns: 1fr;
  padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .moment { grid-template-columns: 1fr 1.05fr; } }
.moment p { color: var(--ink-2); }

.checks { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; gap: .55rem; }
.checks li { display: flex; align-items: center; gap: .7rem; color: var(--ink-2); font-size: .82rem; }
.checks i { font-style: normal; color: var(--ink-3); }
.stamp {
  flex: none; display: inline-block; padding: .15rem .5rem;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em;
  color: var(--ok); background: var(--ok-bg);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
  border-radius: 3px; text-transform: uppercase;
}

.moment__fig { margin: 0; }
.diagram { width: 100%; height: auto; display: block; }
.diagram__axis path { stroke: var(--line-2); stroke-width: 1; fill: none; }
.diagram__axis .tick { stroke-width: 1.4; }
.diagram__area {
  fill: color-mix(in srgb, var(--accent) 14%, transparent);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.4s var(--ease);
}
.diagram__line {
  fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 620; stroke-dashoffset: 620;
  transition: stroke-dashoffset 1.4s var(--ease);
}
.diagram.is-visible .diagram__area { clip-path: inset(0 0 0 0); }
.diagram.is-visible .diagram__line { stroke-dashoffset: 0; }
.diagram__beam rect { fill: color-mix(in srgb, var(--ink) 10%, transparent); stroke: var(--ink-2); stroke-width: 1.2; }
.diagram__beam .stir { stroke: var(--ink-3); stroke-width: 1; opacity: 0; transition: opacity .5s var(--ease); }
.diagram.is-visible .diagram__beam .stir { opacity: .85; transition-delay: .9s; }
.diagram__labels text { fill: var(--ink-3); font-size: 9.5px; text-anchor: middle; }

@media (prefers-reduced-motion: reduce) {
  .diagram__area { clip-path: inset(0 0 0 0); transition: none; }
  .diagram__line { stroke-dashoffset: 0; transition: none; }
  .diagram__beam .stir { opacity: .85; transition: none; }
}

/* ---------- proyectos ---------- */
.projects { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.project {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.project:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.project__art {
  background:
    linear-gradient(color-mix(in srgb, var(--accent) 6%, transparent), transparent),
    var(--bg-3);
  border-bottom: 1px solid var(--line);
  padding: 1.2rem;
}
.project__art svg { display: block; width: 100%; height: auto; }
.iso path { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.project:hover .iso path { stroke: var(--accent); }
.project__body { padding: 1.2rem 1.3rem 1.35rem; }
.project__data { margin: .8rem 0 0; display: grid; gap: .35rem; }
.project__data > div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dotted var(--line); padding-bottom: .3rem; }
.project__data dt { color: var(--ink-3); }
.project__data dd { margin: 0; color: var(--ink-2); text-align: right; }
@media (prefers-reduced-motion: reduce) { .project:hover { transform: none; } }

/* ---------- respaldo ---------- */
.trust { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .trust { grid-template-columns: 1.25fr .75fr; } }

.deliverables { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.deliverables li {
  position: relative; padding-left: 2.1rem; color: var(--ink-2); font-size: .96rem;
}
.deliverables li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 12px; height: 12px; border: 2px solid var(--accent); border-radius: 2px;
  background: linear-gradient(135deg, transparent 45%, var(--accent) 45%);
}
.deliverables b { color: var(--ink); font-weight: 620; }

.credentials {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem; box-shadow: var(--shadow-sm);
}
.credentials__title {
  margin: 0 0 1rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .12em; font-size: .7rem;
}
.credentials dl { margin: 0; display: grid; gap: .75rem; }
.credentials dt {
  font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-3);
}
.credentials dd { margin: .1rem 0 0; font-size: .9rem; }
.credentials__note {
  margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--ink-3);
}

/* ---------- contacto ---------- */
.contact { display: grid; gap: clamp(1.8rem, 4vw, 3rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1fr; } }

.contact__direct { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: .9rem; }
.contact__direct li { display: grid; gap: .15rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.contact__label { color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; }
.contact__value { font-size: 1rem; color: var(--ink); text-decoration: none; }
a.contact__value:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.form {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.4rem; display: grid; gap: 1rem; box-shadow: var(--shadow-sm);
}
.field { display: grid; gap: .35rem; }
.field label {
  font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .09em; color: var(--ink-3);
}
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: .7rem .8rem; width: 100%;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field input:user-invalid { border-color: var(--amber); }
.form__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .2rem; }
.form__note { margin: 0; font-size: .8rem; color: var(--ink-3); }
.form__note.is-error { color: var(--amber); }

/* ---------- pie ---------- */
.footer { background: var(--bg-3); border-top: 1px solid var(--line); padding: 2.4rem 0; }
.footer__inner { display: grid; gap: 1.2rem; }
@media (min-width: 780px) { .footer__inner { grid-template-columns: 1fr auto; align-items: center; } }
.footer__name { margin: 0; font-size: .95rem; }
.footer__reg { color: var(--ink-3); margin: .2rem 0 0; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer__links a { font-size: .88rem; color: var(--ink-2); text-decoration: none; }
.footer__links a:hover { color: var(--accent); }
.footer__legal {
  grid-column: 1 / -1; margin: 0; padding-top: 1.2rem; border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--ink-3);
}

/* ---------- aparición al hacer scroll ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* =============================================================
   PORTAL DE CLIENTES
   ============================================================= */
.portal-body { background: var(--bg); }
.portal { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 5rem); min-height: 64vh; }

.demo-banner {
  background: color-mix(in srgb, var(--amber) 12%, var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  padding: .85rem 1rem; margin: 0 0 clamp(1.8rem, 4vw, 2.8rem);
  font-size: .86rem; color: var(--ink-2);
}
.demo-banner strong { color: var(--ink); }
.demo-banner code {
  font-family: var(--font-mono); font-size: .92em;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  padding: .05rem .3rem; border-radius: 3px;
}

/* ---------- acceso ---------- */
.access {
  display: grid; gap: clamp(1.8rem, 4vw, 3.5rem); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .access { grid-template-columns: 1.05fr .95fr; } }
.access h1 { font-size: clamp(1.8rem, 1.4rem + 2vw, 2.7rem); }
.access__points { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .7rem; }
.access__points li { position: relative; padding-left: 1.7rem; color: var(--ink-2); font-size: .95rem; }
.access__points li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 10px; height: 10px; border: 2px solid var(--accent); border-radius: 2px;
}
.access__form { align-self: start; }
.access__title { margin: 0 0 .4rem; font-size: 1.1rem; }

/* ---------- panel ---------- */
.dash__head {
  display: grid; gap: 1.2rem; align-items: end;
  padding-bottom: 1.4rem; margin-bottom: clamp(1.8rem, 4vw, 2.6rem);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 780px) { .dash__head { grid-template-columns: 1fr auto; } }
.dash__head h1 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem); margin-bottom: .35rem; }
.dash__meta { color: var(--ink-3); margin: 0; }
.dash__contact { text-align: left; }
.dash__contact p { color: var(--ink-3); margin: 0 0 .5rem; }
@media (min-width: 780px) { .dash__contact { text-align: right; } }

.dash__section {
  color: var(--ink-3); text-transform: uppercase; letter-spacing: .12em;
  font-size: .7rem; font-weight: 600; margin: 0 0 1rem;
}

/* ---------- barra de estado ---------- */
.progress {
  list-style: none; margin: 0 0 clamp(2.2rem, 5vw, 3.2rem); padding: 0;
  display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.progress__step { position: relative; padding: 0 1rem 0 0; }
.progress__step::before {
  content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px;
  background: var(--line);
}
.progress__step.is-done::before { background: var(--accent); }
.progress__step.is-current::before {
  background: linear-gradient(90deg, var(--accent) 45%, var(--line) 45%);
}
.progress__dot {
  position: relative; z-index: 1; display: block;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line);
}
.progress__step.is-done .progress__dot { background: var(--accent); border-color: var(--accent); }
.progress__step.is-current .progress__dot {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.progress__num { display: block; color: var(--ink-3); margin: .8rem 0 .2rem; font-size: .68rem; letter-spacing: .1em; }
.progress__body { display: grid; gap: .15rem; padding-right: .8rem; }
.progress__body strong { font-size: .96rem; font-weight: 620; }
.progress__detail { color: var(--ink-3); font-size: .84rem; }
.progress__state {
  justify-self: start; margin-top: .35rem; padding: .12rem .45rem;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink-3); font-size: .66rem;
}
.progress__step.is-done .progress__state { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.progress__step.is-current .progress__state { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* ---------- documentos ---------- */
.docs { display: grid; gap: .7rem; }
.doc {
  display: grid; gap: .5rem 1rem; align-items: center;
  grid-template-columns: auto 1fr auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .95rem 1.1rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.doc:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.doc--old { opacity: .62; }
.doc__type {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  color: var(--ink-3); font-size: .62rem; letter-spacing: .06em;
}
.doc__body { display: grid; gap: .15rem; min-width: 0; }
.doc__name { font-size: .97rem; font-weight: 600; }
.doc__meta { color: var(--ink-3); }
.doc__state {
  padding: .12rem .5rem; border-radius: 3px; font-size: .64rem;
  letter-spacing: .09em; text-transform: uppercase; white-space: nowrap;
}
.doc__state.is-live { color: var(--ok); background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--ok) 32%, transparent); }
.doc__state.is-old  { color: var(--ink-3); border: 1px solid var(--line); }
.doc__action { white-space: nowrap; }
@media (max-width: 640px) {
  .doc { grid-template-columns: auto 1fr; }
  .doc__state { grid-column: 2; justify-self: start; }
  .doc__action { grid-column: 1 / -1; justify-content: center; }
}

.dash__legal {
  margin: 1.8rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--ink-3);
}
