/* C&P Ingeniería y Construcción — sitio web */

@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ink: #0E1C2A;
  --muted: #56636F;
  --soft: #808B95;
  --navy: #0F2A44;
  --navy-hover: #183B5E;
  --navy-deep: #0A1E31;
  --blue: #1F5C9E;
  --blue-hover: #174A82;
  --steel: #9AADBF;
  --tint: #F3F5F7;
  --tint-2: #E9EDF0;
  --line: #DDE2E6;
  --line-strong: #C3CCD3;
  --ok: #2B7A57;
  --danger: #B23B3B;
  --radius: 2px;
  --radius-sm: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 160ms;
  --container: 1240px;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: clip; background: #fff; color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; list-style: none; }
.no-scroll { overflow: hidden; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon--lg { width: 22px; height: 22px; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--navy); color: #fff; font-weight: 600; }
.skip-link:focus { top: 12px; color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 14.5px; font-weight: 500; line-height: 1; letter-spacing: .005em; white-space: nowrap; cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn--lg { height: 50px; padding: 0 26px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-hover); color: #fff; }
.btn--line { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn--line:hover { background: var(--navy); color: #fff; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--tint-2); color: var(--navy); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn--outline-light:hover { color: #fff; border-color: #fff; }

/* Type */
.label { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--navy); }
.label span { font-weight: 500; letter-spacing: .08em; color: var(--soft); font-variant-numeric: tabular-nums; }
.label span::after { content: ""; display: inline-block; width: 28px; height: 1px; margin-left: 12px; vertical-align: middle; background: var(--line-strong); }
.title { font-size: clamp(2rem, 3.1vw, 2.7rem); font-weight: 500; letter-spacing: -.022em; line-height: 1.12; max-width: 19ch; color: var(--ink); }

/* Header */
.header { position: sticky; top: 0; z-index: 60; background: rgba(255, 255, 255, .98); border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease); }
.header.is-scrolled { border-bottom-color: var(--line); }
.header__bar { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand img { height: 52px; width: auto; }
.nav { margin-inline: auto; }
.nav__list { display: flex; gap: 4px; }
.nav__list a { position: relative; display: block; padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--muted); transition: color var(--dur) var(--ease); }
.nav__list a:hover, .nav__list a.is-active { color: var(--navy); }
.nav__list a.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px; background: var(--navy); }
.nav__mobile { display: none; }
.header__actions { display: flex; align-items: center; }
.header__portal { padding: 6px 14px; font-size: 13.5px; font-weight: 600; color: var(--navy); }
.header__portal + .header__portal { border-left: 1px solid var(--line-strong); }
.header__portal:hover { color: var(--blue); }
.nav-toggle { display: none; width: 44px; height: 44px; margin-right: -10px; border: 0; background: transparent; cursor: pointer; place-items: center; color: var(--ink); }

/* Hero */
.hero { padding: 40px 0 96px; border-bottom: 1px solid var(--line); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; min-height: min(calc(100vh - var(--header-h) - 136px), 760px); }
.hero__kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.hero__kicker strong { font-size: 14px; font-weight: 700; letter-spacing: .14em; color: var(--navy); }
.hero__kicker strong::after { content: ""; display: inline-block; width: 28px; height: 1px; margin-left: 14px; vertical-align: middle; background: var(--line-strong); }
.hero__title { font-size: clamp(2.5rem, 4vw, 3.55rem); font-weight: 500; letter-spacing: -.028em; line-height: 1.07; color: var(--ink); }
.hero__lead { margin: 26px 0 36px; max-width: 31em; font-size: 18px; line-height: 1.6; color: var(--muted); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__facts { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 0 40px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.hero__facts dt { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.hero__facts dd { margin-top: 4px; font-size: 14.5px; font-weight: 500; color: var(--navy); }

/* Home model: decorative, no controls (component styles in viewer.css) */
.stage { --pv-h: clamp(440px, 62vh, 640px); min-width: 0; }
.pv.stage:not(.is-mounted), .stage.is-static { display: grid; place-items: center; min-height: var(--pv-h); border: 0; background: none; }
.stage__fallback { width: min(420px, 70%); }

/* Sections */
.section { padding: 120px 0; }
.section--tint { background: var(--tint); }
.head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: end; margin-bottom: 64px; }
.head__lead { margin: 0; max-width: 34em; font-size: 16.5px; color: var(--muted); }

/* Services */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 88px; align-items: start; }
.split__media { position: sticky; top: calc(var(--header-h) + 32px); }
.split__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.split__media figcaption { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--soft); }
.split__body { padding-top: 8px; }
.service-list { margin-top: 48px; border-bottom: 1px solid var(--line); counter-reset: svc; }
.service-list li { counter-increment: svc; display: grid; grid-template-columns: 48px minmax(0, 230px) minmax(0, 1fr); gap: 24px; align-items: baseline; padding: 26px 0; border-top: 1px solid var(--line); transition: background-color var(--dur) var(--ease); }
.service-list li::before { content: counter(svc, decimal-leading-zero); font-size: 12.5px; font-weight: 500; letter-spacing: .06em; color: var(--soft); font-variant-numeric: tabular-nums; }
.service-list li:first-child { border-top-color: var(--navy); }
.service-list h3 { font-size: 20px; font-weight: 500; letter-spacing: -.012em; color: var(--ink); }
.service-list p { margin: 0; font-size: 15.5px; color: var(--muted); }

/* Projects: one lead project and two secondary entries */
.projects { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 56px; }
.project__media { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--tint-2); }
.project__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) contrast(1.03); transition: transform .6s var(--ease); }
.project:hover .project__media img { transform: scale(1.015); }
.project__meta { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.project h3 { font-size: 21px; font-weight: 500; letter-spacing: -.015em; line-height: 1.25; color: var(--ink); }
.project__scope { margin: 8px 0 14px; font-size: 15px; color: var(--muted); }
.project__status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.project__status::before { content: ""; width: 7px; height: 7px; background: #A3B1BE; }
.project__status.is-live::before { background: var(--blue); }
.project__status.is-done::before { background: var(--ok); }
.project:first-child { grid-row: span 2; }
.project:first-child .project__media { aspect-ratio: 4 / 3; margin-bottom: 26px; }
.project:first-child .project__meta { margin-bottom: 10px; }
.project:first-child h3 { font-size: clamp(1.6rem, 2.3vw, 2rem); letter-spacing: -.02em; }
.project:first-child .project__scope { font-size: 16.5px; }
.project:not(:first-child) { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 24px; align-content: start; padding: 0 0 32px; }
.project:not(:first-child) + .project { padding: 32px 0 0; border-top: 1px solid var(--line); }
.project:not(:first-child) .project__media { grid-row: 1 / -1; aspect-ratio: 1; }
.project:not(:first-child) > :not(.project__media) { grid-column: 2; }
.project:not(:first-child) .project__meta { margin-top: 2px; }
.project:not(:first-child) .project__status { align-self: end; }

.archive { margin-top: 64px; }
.archive > summary { list-style: none; }
.archive > summary::-webkit-details-marker { display: none; }
.archive > summary .icon { transition: transform var(--dur) var(--ease); }
.archive[open] > summary .icon { transform: rotate(180deg); }
.archive__body { margin-top: 48px; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ledger th, .ledger td { padding: 16px 20px 16px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.ledger thead th { padding-top: 0; border-top: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.ledger tbody th { font-weight: 600; color: var(--ink); }
.ledger td { color: var(--muted); }
.ledger tbody tr:first-child > * { border-top-color: var(--navy); }
.ledger tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
.archive__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 64px 0 20px; }
.archive__title { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.filters { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.filter { padding: 6px 0; border: 0; border-bottom: 1px solid transparent; background: none; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.filter:hover { color: var(--ink); }
.filter.is-active { color: var(--navy); border-bottom-color: var(--navy); }
/* Archive: varied rhythm instead of a uniform grid */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 12px; }
.gallery__item:nth-child(7n + 1):not([hidden]) { grid-column: span 2; grid-row: span 2; }
.gallery__btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; aspect-ratio: 1; background: var(--tint-2); }
.gallery__btn img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) contrast(1.03); transition: opacity var(--dur) var(--ease); }
.gallery__btn:hover img { opacity: .88; }
.archive__more { display: flex; justify-content: center; margin-top: 32px; }

/* Editorial composition */
.editorial { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 32px 16px; height: clamp(520px, 52vw, 640px); margin-top: 96px; padding-top: 32px; border-top: 1px solid var(--line-strong); }
.editorial__item { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }
.editorial__item img { flex: 1; min-height: 0; width: 100%; object-fit: cover; border-radius: var(--radius-sm); background: var(--tint-2); filter: saturate(.92) contrast(1.03); transition: opacity var(--dur) var(--ease); }
.editorial__item:hover img { opacity: .9; }
.editorial__item span { flex: none; font-size: 12px; font-weight: 500; letter-spacing: .04em; color: var(--muted); }
.editorial__item--lead { grid-column: 1 / 8; grid-row: 1 / 3; }
.editorial__item--wide { grid-column: 8 / 13; grid-row: 1; }
.editorial__item--a { grid-column: 8 / 11; grid-row: 2; }
.editorial__item--b { grid-column: 11 / 13; grid-row: 2; }
.editorial__caption { margin: 18px 0 0; font-size: 13px; color: var(--soft); }

/* Capabilities */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.pillar { display: flex; flex-direction: column; }
.pillar__media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--tint-2); }
.pillar__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) contrast(1.03); }
.pillar h3 { margin: 26px 0 10px; font-size: 22px; font-weight: 500; letter-spacing: -.015em; color: var(--ink); }
.pillar p { margin: 0 0 20px; font-size: 15.5px; color: var(--muted); }
.pillar .pillar__fact { margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 96px; border-top: 1px solid var(--line); counter-reset: step; }
.process li { counter-increment: step; position: relative; padding: 24px 28px 0 0; font-size: 14.5px; color: var(--muted); }
.process li::before { content: ""; position: absolute; left: 0; top: -1px; width: 40px; height: 1px; background: var(--navy); }
.process strong { display: block; margin-bottom: 6px; font-size: 15.5px; font-weight: 500; color: var(--ink); }
.process strong::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 10px; font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--soft); font-variant-numeric: tabular-nums; }

/* Technology */
.tech {
  background:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--navy-deep);
  color: #fff;
  overflow-x: clip;
}
.tech .label { color: #fff; }
.tech .label span { color: var(--steel); }
.tech .label span::after { background: rgba(255, 255, 255, .25); }
.tech .title { color: #fff; max-width: 20ch; }
.tech .head__lead { color: #A9B8C6; }
/* Product mockup. The 3D entrance (--in-*) settles to an untransformed state so the screen captures render at full sharpness. */
.devices { position: relative; perspective: 2600px; padding: 0 0 72px; }
.device {
  --in-x: 0px; --in-y: 0px; --in-r: 0deg;
  margin: 0; overflow: hidden; box-shadow: 0 32px 64px -24px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  transform: translate3d(var(--in-x), var(--in-y), 0) rotateY(var(--in-r));
  transition: opacity .7s var(--ease), transform 1.1s cubic-bezier(.16, .8, .24, 1);
}
.devices.is-settled .device { transform: none; transition: none; }
.js .devices:not(.is-in) .device { opacity: 0; }
.js .devices:not(.is-in) .device--browser { --in-y: 48px; --in-r: 3deg; }
.js .devices:not(.is-in) .device--phone { --in-x: 40px; --in-y: 40px; --in-r: -4deg; }
.device--phone { transition-delay: .2s; }

.device__screen { --tour: 0%; position: relative; overflow: hidden; }
.device__screen img { width: 100%; display: block; transition: transform 1.6s cubic-bezier(.45, 0, .25, 1); }
.device:hover .device__screen img { transform: translateY(var(--tour)); transition-duration: 3.2s; }
.devices.is-in .device__screen img { animation: screen-tour 7s cubic-bezier(.45, 0, .25, 1) 1.4s 1 both; }
.devices.is-in .device--phone .device__screen img { animation-delay: 2s; }
.devices.is-toured .device__screen img { animation: none; }
@keyframes screen-tour {
  0%, 14% { transform: translateY(0); }
  48%, 64% { transform: translateY(var(--tour)); }
  100% { transform: translateY(0); }
}

.device--browser { width: 84%; border-radius: 4px; background: #fff; transform-origin: 30% 50%; }
.device--browser .device__screen { aspect-ratio: 16 / 10; --tour: -50%; }
.device__chrome { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #E8ECEF; border-bottom: 1px solid #D5DCE1; }
.device__chrome span { width: 8px; height: 8px; border-radius: 50%; background: #C3CCD3; }
.device__chrome p { margin: 0 auto; padding: 2px 48px; border-radius: 2px; background: #fff; font-size: 11px; font-weight: 500; color: var(--muted); transform: translateX(-22px); }
.device--phone { position: absolute; right: 0; bottom: 0; width: 21%; padding: 7px; border-radius: 30px; background: #15283A; }
.device--phone .device__screen { aspect-ratio: 390 / 844; border-radius: 22px; --tour: -43.7%; }
.tech__kicker { margin: 64px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--steel); }
.tech__roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 20px; }
.tech__roles > div { padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .2); }
.tech__roles dt { display: flex; align-items: baseline; gap: 12px; font-size: 19px; font-weight: 500; letter-spacing: -.01em; color: #fff; }
.tech__roles dt span { font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--steel); font-variant-numeric: tabular-nums; }
.tech__roles dd { margin-top: 8px; font-size: 15px; color: #A9B8C6; }
.access { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 72px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .14); }
.access p { margin: 0; font-size: 16px; color: #C9D4DE; }
.access__links { display: flex; flex-wrap: wrap; gap: 12px; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 88px; align-items: start; }
.about__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); filter: saturate(.92) contrast(1.03); }
.about__lead { margin: 26px 0 0; max-width: 32em; font-size: 20px; line-height: 1.5; color: var(--ink); }
.about__data { margin-top: 40px; border-bottom: 1px solid var(--line); }
.about__data > div { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.about__data > div:first-child { border-top-color: var(--navy); }
.about__data dt { font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); padding-top: 2px; }
.about__data dd { font-size: 15.5px; color: var(--ink); }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 88px; align-items: start; }
.contact__lead { margin: 22px 0 36px; max-width: 30em; font-size: 16.5px; color: var(--muted); }
.contact-list { border-bottom: 1px solid var(--line-strong); }
.contact-list > div { padding: 16px 0; border-top: 1px solid var(--line-strong); }
.contact-list > div:first-child { border-top-color: var(--navy); }
.contact-list dt { font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.contact-list dd { margin-top: 4px; font-size: 16px; color: var(--ink); line-height: 1.5; }
.contact-list dd a { color: var(--ink); }
.contact-list dd a:hover { color: var(--blue); }
.contact-list dd a[target] { font-size: 14px; color: var(--blue); }
.form { padding: 40px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--navy); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.field__opt { margin-left: 4px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: #fff;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 42, 68, .1); }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: var(--danger); }
.field__error { font-size: 12.5px; color: var(--danger); }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn[type="submit"] { margin-top: 6px; }
.form__status { margin: 16px 0 0; font-size: 14px; }
.form__status:empty { display: none; }
.form__status.is-ok { padding: 12px 14px; background: #E9F3EE; color: #1F6B4A; }
.form__status.is-error { padding: 12px 14px; background: #F8EDED; color: #9C3232; }

/* Footer */
.footer { padding: 72px 0 32px; background: var(--navy-deep); color: #A9B8C6; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; }
.footer__brand img { height: 40px; width: auto; margin-bottom: 18px; }
.footer__brand p { max-width: 300px; margin: 0; font-size: 14px; color: #A9B8C6; }
.footer__col ul { display: grid; gap: 10px; }
.footer__col li, .footer__col a { font-size: 14px; color: #A9B8C6; }
.footer__col a:hover { color: #fff; }
.footer__legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: #7F92A4; }
.footer__legal p { margin: 0; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(8, 20, 32, .92); padding: 40px 80px; }
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; max-width: min(1100px, 100%); }
.lightbox__figure img { max-height: 78vh; width: auto; margin: 0 auto; }
.lightbox__figure figcaption { margin-top: 12px; text-align: center; color: rgba(255, 255, 255, .8); font-size: 14px; }
.lightbox__close, .lightbox__nav { position: absolute; width: 46px; height: 46px; border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--radius); background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .1); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(8px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1180px) {
  .header__bar { gap: 16px; }
  .nav__list a { padding: 8px 9px; font-size: 13.5px; }
  .nav__list a.is-active::after { left: 9px; right: 9px; }
  .header__portal { padding: 6px 10px; font-size: 13px; }
  .hero__grid { gap: 40px; }
  .split, .about, .contact { gap: 56px; }
  .service-list li { grid-template-columns: 40px minmax(0, 190px) minmax(0, 1fr); gap: 18px; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: grid; }
  .header__portal { display: none; }
  .header__actions { margin-left: auto; }
  .nav {
    position: fixed; left: 0; right: 0; top: var(--header-h); margin: 0; padding: 12px 24px 24px;
    background: #fff; border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all var(--dur) var(--ease);
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a { padding: 13px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav__list a.is-active::after { display: none; }
  .nav__mobile { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }

  .hero { padding: 32px 0 72px; }
  .hero__grid { grid-template-columns: 1fr; min-height: 0; gap: 40px; }
  .hero__copy { max-width: 640px; }
  .hero__facts { margin-top: 32px; }
  .stage { --pv-h: clamp(400px, 52vh, 520px); margin-top: -24px; }

  .section { padding: 88px 0; }
  .head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 44px; }
  .split, .about, .contact { grid-template-columns: 1fr; gap: 44px; }
  .split__media { position: static; }
  .split__media img { aspect-ratio: 16 / 10; }
  .split__media, .about__media { max-width: 640px; }
  .split__body { padding-top: 0; }
  .projects { gap: 0 32px; }
  .pillars { gap: 24px; }
  .editorial { height: clamp(440px, 60vw, 560px); margin-top: 72px; }
  .devices { padding-bottom: 60px; }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .projects { grid-template-columns: 1fr; }
  .project:first-child { grid-row: auto; padding-bottom: 40px; }
  .project:first-child .project__media { aspect-ratio: 16 / 10; }
  .project:not(:first-child) { padding: 28px 0; border-top: 1px solid var(--line); }
  .project:not(:first-child) + .project { padding: 28px 0 0; }
  .pillars { grid-template-columns: 1fr; gap: 44px; }
  .pillar__media { aspect-ratio: 16 / 10; }
  .editorial { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; height: auto; gap: 24px 12px; margin-top: 56px; }
  .editorial__item { grid-column: auto; grid-row: auto; }
  .editorial__item img { flex: none; aspect-ratio: 1; }
  .editorial__item--lead { grid-column: 1 / -1; }
  .editorial__item--lead img { aspect-ratio: 16 / 10; }
  .editorial__item--wide { grid-column: 1 / -1; }
  .editorial__item--wide img { aspect-ratio: 16 / 9; }
  .devices { padding-bottom: 48px; perspective: none; }
  .device--browser { width: 100%; }
  .device--phone { width: 30%; border-radius: 24px; padding: 6px; }
  .device--phone .device__screen { border-radius: 19px; }
  .tech__roles { grid-template-columns: 1fr; gap: 0; }
  .tech__roles > div { padding: 18px 0; }
  .tech__roles dt { font-size: 17px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery__item:nth-child(7n + 1):not([hidden]) { grid-column: span 2; grid-row: span 2; }
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger th, .ledger td { display: block; }
  .ledger tr { padding: 16px 0; border-top: 1px solid var(--line); }
  .ledger tbody tr:first-child { border-top-color: var(--navy); }
  .ledger tbody tr:last-child { border-bottom: 1px solid var(--line); }
  .ledger th, .ledger td, .ledger tbody tr:last-child > * { padding: 0; border: 0; }
  .ledger tbody th { margin-bottom: 4px; }
  .ledger td { font-size: 14px; }
}

@media (max-width: 720px) {
  :root { --header-h: 68px; }
  .container { width: min(100% - 32px, var(--container)); }
  .brand img { height: 42px; }
  .device__chrome p { display: none; }
  .nav { padding: 8px 16px 20px; }
  .nav__mobile { grid-template-columns: 1fr; }
  .hero { padding: 24px 0 56px; }
  .hero__kicker { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 22px; font-size: 11px; letter-spacing: .14em; }
  .hero__kicker strong::after { display: none; }
  .hero__title { font-size: clamp(2.15rem, 9vw, 2.6rem); }
  .hero__lead { margin: 20px 0 28px; font-size: 16.5px; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .hero__facts { grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .stage { --pv-h-sm: 330px; margin-top: -16px; }
  .section { padding: 64px 0; }
  .title { font-size: clamp(1.75rem, 7.4vw, 2.2rem); }
  .head { margin-bottom: 36px; }
  .service-list { margin-top: 32px; }
  .service-list li { grid-template-columns: 32px minmax(0, 1fr); gap: 4px 12px; padding: 18px 0; }
  .service-list li p { grid-column: 2; }
  .service-list h3 { font-size: 18px; }
  .project:not(:first-child) { grid-template-columns: minmax(0, 38%) minmax(0, 1fr); column-gap: 16px; }
  .project h3 { font-size: 18px; }
  .archive { margin-top: 44px; }
  .archive > summary { width: 100%; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .editorial { gap: 20px 8px; }
  .process { grid-template-columns: 1fr; margin-top: 56px; row-gap: 22px; }
  .access { margin-top: 48px; }
  .access__links, .access__links .btn { width: 100%; }
  .about__lead { font-size: 17.5px; }
  .about__data > div { grid-template-columns: 1fr; gap: 4px; }
  .form { padding: 24px 20px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .form .btn[type="submit"] { width: 100%; }
  .footer { padding-top: 56px; }
  .footer__top { grid-template-columns: 1fr; gap: 28px; }
  .lightbox { padding: 20px; }
  .lightbox__nav { top: auto; bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .devices:not(.is-in) .device { opacity: 1; --in-x: 0px; --in-y: 0px; --in-r: 0deg; }
  .device__screen img { animation: none !important; }
}
