/* ============================================
   styles.css — Fortex Security Landing Page
   PR2: tokens, layout, typography, a11y, motion
   ============================================ */

/* 2.1 — Brand Tokens (design map) + supplementary */
:root {
  --brand-obsidian: #070a12;
  --brand-graphite: #0c111d;
  --brand-steel: #98a2b5;
  --brand-silver: #eef1f6;
  --brand-blue: #2e6fe8;
  --brand-blue-deep: #1d4fb8;
  --bg-panel-2: #111827;
  --bg-elev: #141c2c;
  --line: rgba(150, 170, 210, 0.14);
  --line-strong: rgba(150, 170, 210, 0.28);
  --steel-100: #eef1f6;
  --steel-300: #c3cad8;
  --steel-400: #98a2b5;
  --steel-500: #707c92;
  --blue-300: #7cb1ff;
  --blue-glow: rgba(46, 111, 232, 0.45);
  --amber-400: #e8b24e;
  --status-success: #4ee08b;
  --status-error: #f87171;
  --radius: 14px;
  --maxw: 1180px;
  --ff-display: 'Rajdhani', sans-serif;
  --ff-body: 'IBM Plex Sans', sans-serif;
  --ff-mono: 'JetBrains Mono', monospace;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--brand-obsidian); color: var(--steel-300); font-family: var(--ff-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
section { position: relative; }
::selection { background: var(--brand-blue); color: #fff; }

/* 2.3 — Typography */
h1, h2, h3, h4, h5 { font-family: var(--ff-display); color: var(--steel-100); margin: 0; letter-spacing: .01em; font-weight: 700; text-transform: uppercase; }
h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.06; }
h2 { font-size: clamp(27px, 3.3vw, 38px); line-height: 1.1; }
h3 { font-size: 22px; letter-spacing: 0; text-transform: none; line-height: 1.2; }

/* Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; }
.section-alt { background: var(--brand-graphite); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 660px; margin: 0 0 50px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head p { color: var(--steel-400); font-size: 16px; margin-top: 14px; }
.section-cta { margin-top: 40px; text-align: center; }

/* Eyebrow + dot */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ff-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-300); border: 1px solid var(--line-strong); background: rgba(46, 111, 232, .08); padding: 7px 14px 7px 10px; border-radius: 999px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--status-success); box-shadow: 0 0 0 0 rgba(78, 224, 139, .6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(78, 224, 139, .55); } 70% { box-shadow: 0 0 0 8px rgba(78, 224, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(78, 224, 139, 0); } }

/* Buttons — 2.2: 44px touch targets, primary CTA uses --brand-blue */
.btn { font-family: var(--ff-display); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 14.5px; display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; min-height: 44px; }
.btn-primary { background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-deep)); color: #fff; box-shadow: 0 10px 30px -10px var(--blue-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px var(--blue-glow); }
.btn-sm { padding: 10px 18px; font-size: 13px; }

/* Navigation */
header { position: sticky; top: 0; z-index: 50; background: rgba(7, 10, 18, .78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 20px; padding: 14px 28px; max-width: var(--maxw); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand { flex: 0 0 auto; }
.brand img { height: 40px; width: auto; }
.brand-name { font-family: var(--ff-display); font-weight: 700; letter-spacing: .06em; color: var(--steel-100); font-size: 19px; text-transform: uppercase; }
.brand-name span { color: var(--blue-300); }
.nav-links { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(12px, 1.8vw, 24px); margin: 0; }
.nav-links a { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; color: var(--steel-400); font-family: var(--ff-mono); font-weight: 500; transition: color .15s ease; }
.nav-links a:hover { color: var(--blue-300); }
.nav-cta { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; cursor: pointer; min-height: 44px; min-width: 44px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--steel-100); margin: 4px 0; }

/* 2.2 — Responsive: mobile-first breakpoints */
@media (max-width: 980px) {
  .nav-links { position: fixed; inset: 64px 0 auto 0; background: var(--brand-graphite); flex-direction: column; align-items: flex-start; gap: 0; border-bottom: 1px solid var(--line); transform: translateY(-140%); transition: transform .25s ease; padding: 10px 28px 20px; }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
}

@media (min-width: 981px) and (max-width: 1120px) {
  .nav { padding-inline: 20px; gap: 14px; }
  .brand-name { font-size: 17px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 10.5px; }
  .nav-cta .btn { padding-inline: 14px; font-size: 12px; }
}

/* Hero */
.hero { position: relative; padding: 88px 0 0; overflow: hidden; background: var(--brand-obsidian); }
.hero-media { position: absolute; inset: 0; z-index: 0; background: var(--brand-obsidian); }
.hero-media-img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; opacity: .55; }
.hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 10, 18, .55), rgba(7, 10, 18, .85) 70%, var(--brand-obsidian) 96%), linear-gradient(90deg, rgba(7, 10, 18, .8), transparent 55%); pointer-events: none; }

/* HUD frame — reticle corners + scan sweep, layered over the operational photography */
.hud-corner { position: absolute; width: 26px; height: 26px; border: 2px solid var(--blue-300); opacity: .5; z-index: 1; }
.hud-tl { top: 16px; left: 16px; border-right: none; border-bottom: none; }
.hud-tr { top: 16px; right: 16px; border-left: none; border-bottom: none; }
.hud-bl { bottom: 16px; left: 16px; border-right: none; border-top: none; }
.hud-br { bottom: 16px; right: 16px; border-left: none; border-top: none; }
.hud-scan { position: absolute; left: 6%; right: 6%; height: 2px; top: 10%; background: linear-gradient(90deg, transparent, var(--blue-300), transparent); opacity: 0; z-index: 1; animation: hud-scan 4s ease-in-out infinite; }
@keyframes hud-scan { 0% { top: 10%; opacity: 0; } 12% { opacity: .65; } 50% { top: 88%; opacity: .35; } 88% { opacity: .65; } 100% { top: 10%; opacity: 0; } }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 65% 20%, black, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 65% 20%, black, transparent 75%); opacity: .5; pointer-events: none; z-index: 1; }
.hero-inner { position: relative; z-index: 2; padding-bottom: 64px; }
.hero-copy { max-width: 760px; }
.hero h1 { margin: 20px 0; }
.hero h1 .blue { color: var(--blue-300); }
.hero p.lead { font-size: 17.5px; color: var(--steel-400); max-width: 560px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }

/* Trust points (#confianza) */
.trust-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.trust-point { background: linear-gradient(160deg, var(--bg-elev), var(--bg-panel-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; transition: border-color .2s ease, transform .2s ease; }
.trust-point:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.tp-num { font-family: var(--ff-mono); color: var(--blue-300); font-size: 13px; }
.trust-point h3 { font-size: 18px; margin: 14px 0 8px; text-transform: none; letter-spacing: 0; line-height: 1.25; }
.trust-point p { margin: 0; font-size: 14px; color: var(--steel-400); }

/* Client logos carousel (infinite marquee, duplicated track) */
.clients-strip { padding: 56px 0; background: var(--brand-graphite); border-bottom: 1px solid var(--line); }
.clients-label { text-align: center; font-family: var(--ff-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--steel-500); margin: 0 0 34px; }
.clients-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); }
.clients-track { display: flex; align-items: center; gap: 20px; width: max-content; animation: clients-marquee 42s linear infinite; }
.clients-marquee:hover .clients-track { animation-play-state: paused; }
.client-logo { flex: none; width: 188px; aspect-ratio: 16 / 9; background: #FEFEFE; border: 1px solid rgba(238, 241, 246, .14); border-radius: 16px; padding: 6px 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; filter: grayscale(45%); opacity: .88; transition: filter .25s ease, opacity .25s ease, transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.client-logo:hover { filter: grayscale(0%); opacity: 1; transform: translateY(-3px) scale(1.02); border-color: var(--brand-blue); box-shadow: 0 10px 24px -14px var(--blue-glow); }
.client-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }

@keyframes clients-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (max-width: 640px) {
  .client-logo { width: 148px; padding: 6px 8px; }
}

/* Segments */
.segments { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .6); }
.segment-row { display: grid; grid-template-columns: 90px 200px 1fr 1fr; gap: 0; border-bottom: 1px solid var(--line); transition: background .2s ease; }
.segment-row:last-child { border-bottom: none; }
.segment-row:nth-child(even) { background: var(--bg-panel-2); }
.segment-row:hover { background: var(--bg-elev); }
.segment-row--priority { background: linear-gradient(90deg, rgba(46, 111, 232, .08), transparent 72%); }
.segment-row--priority .seg-num { color: var(--steel-100); }
.segment-row--priority .seg-main h3 { font-size: 24px; }
.segment-row--priority .seg-side { border-left-color: rgba(124, 177, 255, .28); }
.seg-num { padding: 34px 0 34px 28px; font-family: var(--ff-mono); color: var(--blue-300); font-size: 13px; letter-spacing: .08em; display: flex; align-items: flex-start; }
.seg-media { margin: 20px 0 20px 4px; border-radius: 10px; overflow: hidden; position: relative; background: var(--bg-elev); border: 1px solid var(--line); }
.seg-media picture { position: absolute; inset: 0; }
.seg-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.seg-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(7, 10, 18, .55)); pointer-events: none; }
.seg-main { padding: 34px 24px; }
.seg-main h3 { font-size: 22px; letter-spacing: 0; text-transform: none; margin-bottom: 10px; }
.seg-main p { margin: 0; font-size: 14.5px; color: var(--steel-400); max-width: 420px; }
.seg-side { padding: 34px 28px; display: flex; flex-direction: column; justify-content: center; gap: 18px; border-left: 1px solid var(--line); }
.seg-tag { font-family: var(--ff-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--steel-500); }
.seg-bullet { font-size: 13.5px; line-height: 1.55; color: var(--steel-300); display: flex; gap: 10px; margin-top: -6px; }
.seg-bullet::before { content: '\2014'; color: var(--blue-300); flex: none; }
.seg-side .btn { margin-top: 4px; align-self: flex-start; }

@media (max-width: 1080px) {
  .segment-row { grid-template-columns: 74px 150px 1fr 1fr; }
}

@media (max-width: 820px) {
  .segment-row { grid-template-columns: 1fr; }
  .seg-num { padding: 22px 24px 0; }
  .seg-media { margin: 4px 24px 0; aspect-ratio: 16 / 9; }
  .seg-main { padding: 14px 24px 18px; }
  .seg-side { border-left: none; border-top: 1px solid var(--line); padding: 18px 24px; }
  .trust-points { grid-template-columns: 1fr; }
}

/* Services */
.service-grid { display: grid; gap: 18px; }
.service-grid--flat { grid-template-columns: repeat(3, 1fr); }
.service-card { position: relative; background: linear-gradient(160deg, var(--bg-elev), var(--bg-panel-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.service-card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 20px 40px -28px rgba(0, 0, 0, .7); }
.service-card h3 { font-size: 18px; margin: 0 0 8px; text-transform: none; letter-spacing: 0; line-height: 1.25; }
.service-card p { margin: 0; font-size: 14px; color: var(--steel-400); }
.service-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(46, 111, 232, .1); border: 1px solid var(--line-strong); margin-bottom: 16px; }
.service-icon svg { width: 22px; height: 22px; stroke: var(--blue-300); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) {
  .service-grid--flat { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .service-grid--flat { grid-template-columns: 1fr; }
}

/* Testimonials (#testimonios) */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.testimonial-card { margin: 0; min-height: 238px; background: linear-gradient(160deg, var(--bg-elev), var(--bg-panel-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; display: flex; flex-direction: column; gap: 18px; transition: border-color .2s ease, transform .2s ease; }
.testimonial-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.testimonial-card p { margin: 0; font-size: 14.5px; color: var(--steel-300); line-height: 1.6; }
.testimonial-card footer { margin-top: auto; padding: 16px 0 0; background: transparent; border-top: 1px solid var(--line); font-family: var(--ff-mono); font-size: 11.5px; line-height: 1.5; letter-spacing: .05em; text-transform: uppercase; color: var(--steel-500); }

@media (max-width: 820px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}

/* Monitoring flow (#monitoreo) */
.monitor-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 28px; max-height: 420px; }
.monitor-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.monitor-flow { display: flex; align-items: stretch; gap: 6px; }
.monitor-step { flex: 1; background: linear-gradient(160deg, var(--bg-elev), var(--bg-panel-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 20px; text-align: center; transition: border-color .2s ease, transform .2s ease; }
.monitor-step:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.monitor-icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(46, 111, 232, .1); border: 1px solid var(--blue-glow); margin: 0 auto 16px; }
.monitor-icon svg { width: 24px; height: 24px; stroke: var(--blue-300); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.monitor-step h3 { font-size: 16.5px; margin: 0 0 6px; text-transform: none; letter-spacing: 0; }
.monitor-step p { margin: 0; font-size: 13px; color: var(--steel-400); }
.monitor-arrow { flex: none; align-self: center; width: 28px; height: 1px; background: var(--line-strong); position: relative; }
.monitor-arrow::after { content: ''; position: absolute; right: -1px; top: 50%; width: 6px; height: 6px; border-top: 1px solid var(--blue-300); border-right: 1px solid var(--blue-300); transform: translateY(-50%) rotate(45deg); }

@media (max-width: 900px) {
  .monitor-flow { flex-direction: column; }
  .monitor-arrow { width: 1px; height: 20px; align-self: center; }
  .monitor-arrow::after { right: 50%; top: auto; bottom: -1px; transform: translateX(50%) rotate(135deg); }
}

/* Live reference badge (#riesgo) */
.live-badge { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-family: var(--ff-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel-500); }

/* 2.4 — Risk timeline: CSS-only :checked fallback */
.risk-panel { background: linear-gradient(160deg, var(--bg-elev), var(--brand-graphite)); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px; box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .6); }
.rt-radio { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.risk-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 20px 4px; }
.risk-tab { font-family: var(--ff-mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--steel-400); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 16px; cursor: pointer; transition: all .18s ease; min-height: 44px; display: inline-flex; align-items: center; }
.risk-tab:hover { border-color: var(--blue-300); color: var(--blue-300); }
.risk-body { display: none; padding: 28px 28px 32px; }
.risk-headline { font-family: var(--ff-display); font-size: 20px; color: var(--steel-100); text-transform: none; letter-spacing: 0; margin-bottom: 6px; }
.risk-sub { font-size: 13.5px; color: var(--steel-500); margin-bottom: 26px; }
.risk-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.risk-block { border-radius: 8px; padding: 16px 12px; background: var(--bg-panel-2); border: 1px solid var(--line); text-align: center; transition: all .25s ease; }
.rb-label { font-family: var(--ff-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel-500); display: block; }
.rb-state { font-size: 12.5px; margin-top: 8px; color: var(--steel-400); display: block; }
.risk-high { background: rgba(232, 178, 78, .1); border-color: rgba(232, 178, 78, .5); }
.risk-high .rb-label { color: var(--amber-400); }
.risk-high .rb-state { color: #f0d09a; font-weight: 600; }

/* :checked → highlight active tab + show matching panel */
#rt-empresas:checked ~ .risk-tabs [for="rt-empresas"],
#rt-condominios:checked ~ .risk-tabs [for="rt-condominios"],
#rt-negocios:checked ~ .risk-tabs [for="rt-negocios"],
#rt-eventos:checked ~ .risk-tabs [for="rt-eventos"] {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}
#rt-empresas:checked ~ .panel-empresas,
#rt-condominios:checked ~ .panel-condominios,
#rt-negocios:checked ~ .panel-negocios,
#rt-eventos:checked ~ .panel-eventos {
  display: block;
}

@media (max-width: 640px) {
  .risk-track { grid-template-columns: repeat(2, 1fr); }
}

/* Process */
.process { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .6); }
.process-step { padding: 28px 24px; border-right: 1px solid var(--line); background: var(--bg-panel-2); transition: background .2s ease; }
.process-step:hover { background: var(--bg-elev); }
.process-step:last-child { border-right: none; }
.step-num { font-family: var(--ff-mono); color: var(--blue-300); font-size: 12.5px; letter-spacing: .08em; }
.process-step h3 { font-size: 16.5px; margin: 12px 0 8px; text-transform: none; letter-spacing: 0; }
.process-step p { font-size: 13.5px; color: var(--steel-400); margin: 0; }

@media (max-width: 900px) { .process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } .process-step { border-right: none; border-bottom: 1px solid var(--line); } }

/* FAQ (details/summary — native no-JS) */
.faq { max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; align-items: center; font-family: var(--ff-display); font-size: 16.5px; color: var(--steel-100); letter-spacing: .01em; text-transform: none; min-height: 44px; }
.faq-plus { font-family: var(--ff-mono); font-size: 18px; color: var(--blue-300); transition: transform .25s ease; flex: none; margin-left: 20px; }
.faq-item[open] .faq-plus { transform: rotate(45deg); }
.faq-a { padding: 0 0 22px; }
.faq-a p { margin: 0; font-size: 14px; color: var(--steel-400); max-width: 680px; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 15px; max-width: 720px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-size: 12px; font-family: var(--ff-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--steel-500); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea { width: 100%; background: var(--bg-panel-2); border: 1px solid var(--line-strong); border-radius: 8px; padding: 11px 14px; color: var(--steel-100); font-family: var(--ff-body); font-size: 14px; min-height: 44px; }
.form-group textarea { resize: vertical; min-height: 90px; }

/* 2.5 — Focus-visible rings + form error styles */
:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 3px; }
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 1px; border-color: var(--blue-300); }

.error-msg { font-size: 12px; color: var(--status-error); min-height: 0; display: block; }
.error-msg:not(:empty) { margin-top: 4px; min-height: 16px; }
.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] { border-color: var(--status-error); }
.form-group input.error,
.form-group select.error,
.form-group textarea.error { border-color: var(--status-error); }

/* Popup form */
body.modal-open { overflow: hidden; }
.popup-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; background: rgba(3, 5, 10, .82); }
.popup-overlay[hidden] { display: none; }
.popup-dialog { width: min(100%, 760px); min-width: 0; max-height: calc(100vh - 48px); overflow-y: auto; background: linear-gradient(160deg, var(--bg-elev), var(--brand-graphite)); border: 1px solid var(--line-strong); border-radius: 18px; padding: 34px; box-shadow: 0 28px 80px rgba(0, 0, 0, .55); }
.popup-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.popup-header > div { min-width: 0; }
.popup-header .eyebrow { margin-bottom: 16px; }
.popup-header h2 { max-width: 600px; }
.popup-header p { max-width: 560px; margin: 12px 0 0; color: var(--steel-400); }
.popup-close { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; color: var(--steel-300); background: transparent; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; }
.popup-close:hover { color: var(--steel-100); border-color: var(--blue-300); }
.popup-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.popup-form { max-width: none; }
.popup-form .form-group { min-width: 0; }

@media (max-width: 600px) {
  .popup-overlay { align-items: flex-start; padding: 12px; }
  .popup-dialog { max-height: calc(100vh - 24px); padding: 24px 18px; border-radius: 14px; }
  .popup-header { gap: 12px; margin-bottom: 22px; }
  .popup-header h2 { font-size: clamp(24px, 8vw, 32px); }
  .popup-header p { font-size: 14px; }
  .popup-form input,
  .popup-form select { font-size: 16px; }
}

@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}

/* CTA banner */
.cta-banner { background: radial-gradient(ellipse at 30% 30%, rgba(46, 111, 232, .22), transparent 60%), linear-gradient(135deg, var(--bg-elev), var(--bg-panel-2)); border: 1px solid var(--line-strong); border-radius: 20px; padding: 52px 44px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.cta-banner h2 { font-size: clamp(22px, 2.8vw, 30px); max-width: 460px; line-height: 1.16; }
.cta-banner p { color: var(--steel-400); max-width: 520px; margin: 0; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 52px 0 26px; background: var(--brand-graphite); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 36px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 13px; color: var(--steel-500); max-width: 270px; }
.footer-col h5 { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--steel-500); margin: 0 0 15px; font-weight: 600; }
.footer-col a { display: block; font-size: 13.5px; color: var(--steel-400); margin-bottom: 10px; transition: color .15s ease; }
.footer-col a:hover { color: var(--blue-300); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--steel-500); font-family: var(--ff-mono); }

@media (max-width: 800px) {
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 32px; }
}

/* 2.7 — Pause offscreen loops (JS toggles via IntersectionObserver) */
.gpu-idle { animation-play-state: paused; }

/* Scroll reveal (base — JS adds .in) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* 2.6 — Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .clients-track { animation: none; }
}
