/* ============================================================
   ARPIA V2 — clean design system (2026-07-17)
   Editorial light base + dark feature moments.
   Semantics: red = ungoverned, green = governed.
   ============================================================ */

/* ---------- fonts ---------- */
@font-face { font-family: 'ArpiaFont'; src: url('/assets/fonts/Regular-Light.woff') format('woff'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'ArpiaFont'; src: url('/assets/fonts/Regular-Book.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'ArpiaFont'; src: url('/assets/fonts/Regular-Medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'ArpiaFont'; src: url('/assets/fonts/Regular-Bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'ArpiaFont'; src: url('/assets/fonts/Regular-ExtraBold.woff') format('woff'); font-weight: 800; font-style: normal; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  --paper: #F6F4EF;
  --paper-2: #EFECE4;
  --ink: #121212;
  --ink-soft: #4c4c4c;
  --black: #0A0A0A;
  --coal: #141414;
  --white: #FFFFFF;
  --mist: #A8A8A8;
  --line-light: #DEDACF;
  --line-dark: #2A2A2A;
  --red: #D05050;
  --green: #34A854;
  --gold: #D9A441;
  /* compat aliases for legacy inline styles */
  --light-gray: #A8A8A8;
  --border-gray: #2A2A2A;
  --dark-gray: #141414;
  --medium-gray: #2d2d2d;
  --hover-gray: #3d3d3d;
  --off-white: #F6F4EF;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'ArpiaFont', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- reset / base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); font-weight: 400; background: var(--paper); color: var(--ink); line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--ink); color: var(--paper); }

.section-tag { font-size: 0.8rem; letter-spacing: 0.22em; font-weight: 500; color: var(--mist); margin-bottom: 1.2rem; }
.kicker { font-size: 0.8rem; letter-spacing: 0.22em; font-weight: 500; text-transform: uppercase; }

/* ---------- buttons ---------- */
.cta-btn { display: inline-block; padding: 0.85rem 1.9rem; background: var(--ink); color: var(--white) !important; font-size: 0.95rem; font-weight: 500; border-radius: 6px; transition: transform 0.3s var(--ease), background 0.3s; }
.cta-btn:hover { transform: translateY(-2px); background: #000; }
.btn-secondary { display: inline-block; padding: 0.85rem 1.9rem; border: 1px solid var(--ink); color: var(--ink); font-size: 0.95rem; font-weight: 500; border-radius: 6px; transition: background 0.3s, color 0.3s; }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
header .cta-btn, .act-open .cta-btn, .stage-section .cta-btn { background: var(--white); color: var(--ink) !important; }
header .cta-btn:hover, .stage-section .cta-btn:hover { background: var(--paper); }

/* ---------- header (dark bar, works over dark + light) ---------- */
header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(10,10,10,0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-dark); }
header nav { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 2rem; }
header .logo img { width: 118px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 1.9rem; }
.nav-links a { color: #cfcfcf; font-size: 0.92rem; transition: color 0.25s; }
.nav-links a:hover { color: var(--white); }
.nav-right { display: flex; align-items: center; gap: 1.4rem; }
.sign-in-link { color: #cfcfcf; font-size: 0.92rem; }
.sign-in-dropdown { position: relative; }
.sign-in-dropdown-menu { display: none; position: absolute; top: 130%; right: 0; background: var(--coal); border: 1px solid var(--line-dark); border-radius: 8px; min-width: 170px; padding: 0.5rem 0; }
.sign-in-dropdown.active .sign-in-dropdown-menu { display: block; }
.sign-in-dropdown-menu a { display: block; padding: 0.55rem 1.1rem; color: #cfcfcf; font-size: 0.9rem; }
.sign-in-dropdown-menu a:hover { color: var(--white); background: #1d1d1d; }
.solutions-dropdown { position: relative; }
.solutions-menu { position: absolute; top: calc(100% + 10px); left: -1rem; background: var(--coal); border: 1px solid var(--line-dark); border-radius: 10px; min-width: 340px; padding: 0.6rem; opacity: 0; visibility: hidden; transform: translateY(8px); pointer-events: none; transition: opacity 0.18s var(--ease) 0.25s, transform 0.18s var(--ease) 0.25s, visibility 0s linear 0.43s; }
.solutions-menu::before { content: ''; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.solutions-dropdown:hover .solutions-menu { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s, 0s, 0s; }
.solutions-menu-item { display: block; padding: 0.8rem 0.9rem; border-radius: 8px; border-left: 2px solid transparent; transition: background 0.15s, border-color 0.15s; }
.solutions-menu-item:hover { background: rgba(255,255,255,0.08); border-left-color: var(--gold); }
.solutions-menu-item h4 { color: var(--white); font-size: 0.95rem; font-weight: 500; margin: 0; transition: color 0.15s; }
.solutions-menu-item:hover h4 { color: var(--gold); }
.solutions-menu-item p { color: var(--mist); font-size: 0.82rem; margin: 0.15rem 0 0; }
.solutions-menu-divider { height: 1px; background: var(--line-dark); margin: 0.5rem 0.9rem; }
.solutions-menu-footer { display: block; padding: 0.7rem 0.9rem; color: var(--mist); font-size: 0.85rem; }
.solutions-menu-footer:hover { color: var(--white); }
.mobile-menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.mobile-menu-toggle span { width: 22px; height: 2px; background: var(--white); transition: transform 0.3s, opacity 0.3s; }
.mobile-menu-cta { display: none; }

/* ---------- ACT 0: opening (dark) ---------- */
.act-open { position: relative; height: 100svh; background: var(--black); overflow: hidden; display: flex; align-items: center; }
#chaos { position: absolute; inset: 0; width: 100%; height: 100%; }
.act-open-content { position: relative; z-index: 2; padding: 0 7%; max-width: 1440px; margin: 0 auto; width: 100%; }
.open-kicker { color: var(--gold); margin-bottom: 1.6rem; }
.act-open h1 { font-size: clamp(3rem, 7.5vw, 6.2rem); line-height: 1.0; color: var(--white); font-weight: 400; letter-spacing: -0.03em; margin-bottom: 1.4rem; animation: riseIn 1.1s var(--ease) both; }
.open-sub { font-size: clamp(1.25rem, 2.4vw, 1.85rem); color: var(--mist); animation: riseIn 1.1s var(--ease) 0.15s both; }
.open-scroll { position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%); z-index: 2; color: var(--mist); font-size: 0.75rem; letter-spacing: 0.2em; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.open-chevron { width: 11px; height: 11px; border-right: 1.5px solid var(--mist); border-bottom: 1.5px solid var(--mist); transform: rotate(45deg); animation: chevBob 1.6s ease-in-out infinite; }
@keyframes chevBob { 0%,100% { transform: rotate(45deg) translate(0,0); opacity: 0.9; } 50% { transform: rotate(45deg) translate(5px,5px); opacity: 0.35; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

/* ---------- stage: diagram + numbered step list (dark) ---------- */
.stage-section { background: var(--black); }
.stage-runway { position: relative; }
.stage-sticky { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: minmax(340px, 4fr) 6fr; gap: 2rem; align-items: center; max-width: 1440px; margin: 0 auto; padding: 5.5rem 4% 2rem; overflow: hidden; }
.stage-step { height: 88vh; }
.stage-visual { width: 100%; max-width: 700px; justify-self: center; }
.gd { width: 100%; height: auto; display: block; }

.steps-list { display: flex; flex-direction: column; gap: 0.35rem; max-width: 460px; }
.step-item { border-left: 2px solid var(--line-dark); padding: 0.55rem 0 0.55rem 1.4rem; transition: border-color 0.4s; }
.step-item .step-head { display: flex; align-items: baseline; gap: 0.9rem; }
.step-item .step-num { font-size: 0.75rem; color: var(--mist); letter-spacing: 0.12em; min-width: 1.7rem; transition: color 0.4s; }
.step-item h2 { font-size: 1.02rem; font-weight: 500; color: var(--mist); line-height: 1.3; letter-spacing: 0; margin: 0; transition: color 0.4s, font-size 0.45s var(--ease); }
.step-item .step-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.step-item .step-body > div { overflow: hidden; min-height: 0; }
.step-item p { color: #c6c6c6; font-size: 1.18rem; line-height: 1.7; padding: 0.8rem 0 0.3rem; max-width: 470px; }
.step-item .cta-btn { margin: 0.9rem 0 0.4rem; }
.step-item.active { border-color: var(--red); }
.step-item.active .step-num { color: var(--red); }
.step-item.active h2 { color: var(--white); font-size: 1.7rem; }
.step-item.active .step-body { grid-template-rows: 1fr; }
.step-item[data-cap="6"].active { border-color: var(--green); }
.step-item[data-cap="6"].active .step-num { color: var(--green); }

/* ---------- diagram states ---------- */
.gd .gd-edge { stroke: var(--red); stroke-width: 1.6; stroke-dasharray: 7 7; opacity: 0.3; animation: gdMarch 1.1s linear infinite; transition: stroke 0.7s, opacity 0.7s; }
.gd .gd-chip { opacity: 0.45; transition: opacity 0.6s; }
.gd .gd-chip rect { transition: stroke 0.6s; }
.gd .gd-check { opacity: 0; transition: opacity 0.5s; }
.gd .gd-bar { opacity: 0; transform: scaleY(0.65); transform-origin: 328px 325px; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
@keyframes gdMarch { to { stroke-dashoffset: -28; } }
.gd[data-state="0"] .gd-edge { opacity: 0.55; }
.gd[data-state="0"] .gd-chip { opacity: 0.7; }
.gd[data-state="1"] .gd-edge-1, .gd[data-state="2"] .gd-edge-2, .gd[data-state="3"] .gd-edge-3,
.gd[data-state="4"] .gd-edge-4, .gd[data-state="5"] .gd-edge-5 { opacity: 1; stroke-width: 2.2; filter: url(#gdGlow); }
.gd[data-state="1"] .gd-chip-1, .gd[data-state="2"] .gd-chip-2, .gd[data-state="3"] .gd-chip-3,
.gd[data-state="4"] .gd-chip-4, .gd[data-state="5"] .gd-chip-5 { opacity: 1; }
.gd[data-state="1"] .gd-chip-1 rect, .gd[data-state="2"] .gd-chip-2 rect, .gd[data-state="3"] .gd-chip-3 rect,
.gd[data-state="4"] .gd-chip-4 rect, .gd[data-state="5"] .gd-chip-5 rect { stroke: var(--red); }
.gd[data-state="6"] .gd-edge { stroke: var(--green); stroke-dasharray: none; animation: none; opacity: 0.85; }
.gd[data-state="6"] .gd-chip { opacity: 1; }
.gd[data-state="6"] .gd-chip rect { stroke: #3d3d3d; }
.gd[data-state="6"] .gd-bar { opacity: 1; transform: none; filter: url(#gdGlow); }
.gd[data-state="6"] .gd-check { opacity: 1; transition-delay: 0.5s; }

/* ---------- payoff (light editorial) ---------- */
.payoff { background: var(--paper); padding: 9rem 6%; border-top: 1px solid var(--line-light); }
.payoff .section-tag { color: var(--ink-soft); font-size: 0.8rem; letter-spacing: 0.22em; margin-bottom: 1.6rem; font-weight: 500; }
.payoff h2 { color: var(--ink) !important; }
.payoff p { color: var(--ink-soft) !important; }
.payoff [data-count] { color: var(--ink) !important; }
.payoff .payoff-strong { color: var(--ink) !important; font-weight: 500; }

/* ---------- customers (light) ---------- */
.customers-section { background: var(--paper); padding: 3.2rem 0; border-top: 1px solid var(--line-light); overflow: hidden; }
.customers-wrapper { max-width: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.customers-container { display: flex; align-items: center; gap: 4.5rem; width: max-content; animation: marquee 34s linear infinite; }
.customer-logo { height: 36px; width: auto; filter: invert(1); opacity: 0.55; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- testimonial (light editorial) ---------- */
.testimonial-section { background: var(--paper); padding: 7rem 6%; border-top: 1px solid var(--line-light); }
.testimonial-section blockquote p { color: var(--ink) !important; font-size: 1.45rem !important; font-weight: 400 !important; line-height: 1.65 !important; }
.testimonial-section cite { color: var(--ink) !important; }
.testimonial-section cite + span, .testimonial-section span { color: var(--ink-soft) !important; }

/* ---------- footer (dark) ---------- */
footer { background: var(--black); color: var(--mist); padding: 4.5rem 6% 2.5rem; border-top: 1px solid var(--line-dark); }
.footer-content { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 2.4rem; }
.footer-brand img { width: 120px; }
.footer-brand p { font-size: 0.92rem; line-height: 1.6; max-width: 300px; color: var(--mist); }
.footer-section h4 { color: var(--white); font-size: 0.9rem; font-weight: 500; margin-bottom: 1.1rem; letter-spacing: 0.04em; }
.footer-links { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-links a { color: var(--mist); font-size: 0.88rem; transition: color 0.25s; }
.footer-links a:hover { color: var(--white); }
footer .solutions-menu { display: none !important; }
footer .solutions-dropdown { position: static; }
footer .solutions-link { color: var(--mist); font-size: 0.88rem; }
footer .solutions-link:hover { color: var(--white); }
.footer-bottom { max-width: 1440px; margin: 3rem auto 0; padding-top: 1.8rem; border-top: 1px solid var(--line-dark); font-size: 0.82rem; color: #6f6f6f; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-bottom a { color: #9a9a9a; }
.footer-bottom a:hover { color: var(--white); }

/* ---------- scroll reveals ---------- */
.fade-in { opacity: 0; transform: translateY(42px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.fade-in.visible { opacity: 1; transform: none; }
.stagger > * { opacity: 0; transform: translateY(32px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.stagger.visible > * { opacity: 1; transform: none; }
.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.16s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.27s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.38s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.49s; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links { position: fixed; inset: 0; background: var(--black); flex-direction: column; justify-content: center; gap: 1.6rem; transform: translateX(-100%); visibility: hidden; transition: transform 0.4s var(--ease), visibility 0.4s; z-index: 99; }
  body.menu-open .nav-links { transform: none; visibility: visible; }
  .nav-links a { font-size: 1.15rem; }
  .solutions-menu { display: none !important; }
  .mobile-menu-toggle { display: flex; }
  .mobile-menu-cta { display: block; }
  .nav-right .cta-btn { display: none; }
  body.menu-open .mobile-menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
  body.menu-open .mobile-menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .act-open h1 { font-size: 2.55rem; }
  .stage-sticky { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 1rem; padding: 5rem 5% 1.5rem; align-items: start; }
  .stage-visual { max-width: min(92vw, 44svh); margin: 0 auto; order: -1; }
  .steps-list { max-width: 100%; }
  .step-item.active h2 { font-size: 1.2rem; }
  .step-item p { font-size: 0.92rem; }
  .stage-step { height: 78vh; }
  .payoff { padding: 6rem 6%; }
  .footer-content { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) { .footer-content { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .gd .gd-edge { animation: none; }
  .fade-in, .stagger > *, .act-open h1, .open-sub { transition: none; animation: none; opacity: 1; transform: none; }
  .customers-container { animation: none; }
  html { scroll-behavior: auto; }
}

/* act-open: legibilidad del texto sobre el grafo más brillante */
.act-open::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,10,0.9) 22%, rgba(10,10,10,0.5) 55%, rgba(10,10,10,0.08) 82%); z-index: 1; pointer-events: none; }

/* ===== V2 architecture build-up (HTML, deck-faithful) ===== */
.arch { display: flex; flex-direction: column; width: 100%; max-width: 780px; }
.arch-row { display: flex; gap: 10px; }
.arch-card { position: relative; flex: 1; background: #101010; border: 1px solid #333; border-radius: 10px; padding: 0.8rem 0.5rem; text-align: center; opacity: 0.15; transition: opacity 0.65s var(--ease), border-color 0.65s, box-shadow 0.65s; }
.arch-card ion-icon { font-size: 1.4rem; color: var(--gold); margin-bottom: 0.3rem; }
.arch-card-title { font-size: 0.72rem; letter-spacing: 0.08em; font-weight: 600; color: var(--white); }
.arch-card-sub { font-size: 0.62rem; color: var(--mist); margin-top: 0.15rem; }
.arch-logos { display: flex; justify-content: center; align-items: center; gap: 0.55rem; margin-bottom: 0.35rem; min-height: 1.4rem; }
.arch-logos img { height: 16px; width: auto; opacity: 0.9; }
.arch-textmark { font-size: 0.66rem; font-weight: 600; color: #ededed; letter-spacing: 0.02em; }
.arch-wires { display: flex; gap: 10px; height: 26px; }
.arch-wires i { flex: 1; background-image: repeating-linear-gradient(180deg, #555 0 5px, transparent 5px 11px); background-size: 2px 22px; background-repeat: repeat-y; background-position: center top; opacity: 0.12; transition: opacity 0.6s; }
.arch-core { display: flex; flex-direction: column; gap: 10px; border: 1px solid #333; border-radius: 14px; padding: 12px; opacity: 1; transition: border-color 0.7s, box-shadow 0.7s; }
.arch-band { display: flex; align-items: center; justify-content: center; gap: 0.9rem; background: #101010; border: 1px solid #333; border-radius: 10px; padding: 0.65rem 1rem; font-size: 0.78rem; letter-spacing: 0.14em; font-weight: 600; color: var(--white); opacity: 0.15; transition: opacity 0.65s var(--ease), border-color 0.65s; }
.arch-band ion-icon { color: var(--gold); font-size: 1.1rem; }
.arch-gov { flex-direction: column; gap: 0.55rem; letter-spacing: 0.14em; }
.arch-gov-title { color: var(--gold); font-size: 0.72rem; letter-spacing: 0.18em; }
.arch-gov-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.3rem; letter-spacing: 0; font-weight: 400; }
.arch-gov-items span { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.68rem; color: #cfcfcf; }
.arch-gov-items ion-icon { font-size: 0.9rem; }
.arch-chip { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.3rem; background: #101010; border: 1px solid #333; border-radius: 8px; padding: 0.5rem 0.25rem; font-size: 0.66rem; font-weight: 500; color: #e3e3e3; opacity: 0.15; transition: opacity 0.65s var(--ease), border-color 0.65s; }
.arch-chip img { height: 13px; width: auto; }
.arch-chip ion-icon { font-size: 0.85rem; color: var(--gold); }
.gov-dot { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(52,168,84,0.8); opacity: 0; transition: opacity 0.5s; }

/* estados de la construcción */
.gd.on-sys .arch-sys .arch-chip { opacity: 1; border-color: #4a4a4a; }
.gd.on-sys .arch-wires-bottom i { opacity: 0.9; background-image: repeating-linear-gradient(180deg, var(--gold) 0 5px, transparent 5px 11px); animation: wireUp 1.1s linear infinite; }
.gd.on-core .arch-ont, .gd.on-core .arch-gov { opacity: 1; border-color: var(--gold); }
.gd.on-core .arch-core { border-color: #4a4a4a; }
.gd.on-ai .arch-ai .arch-card { opacity: 1; border-color: #4a4a4a; }
.gd.on-ai .arch-wires-top i { opacity: 0.9; background-image: repeating-linear-gradient(180deg, var(--gold) 0 5px, transparent 5px 11px); animation: wireDown 1.1s linear infinite; }
.gd.on-ai .arch-surfaces .arch-card { opacity: 0.4; }
.gd.surf-1 .arch-surfaces .arch-card:nth-child(1), .gd.surf-2 .arch-surfaces .arch-card:nth-child(2),
.gd.surf-3 .arch-surfaces .arch-card:nth-child(3), .gd.surf-4 .arch-surfaces .arch-card:nth-child(4),
.gd.surf-5 .arch-surfaces .arch-card:nth-child(5) { opacity: 1; border-color: var(--gold); box-shadow: 0 0 22px rgba(217,164,65,0.22); }
.gd.surf-1 .arch-surfaces .arch-card:nth-child(1) .gov-dot, .gd.surf-2 .arch-surfaces .arch-card:nth-child(2) .gov-dot,
.gd.surf-3 .arch-surfaces .arch-card:nth-child(3) .gov-dot, .gd.surf-4 .arch-surfaces .arch-card:nth-child(4) .gov-dot,
.gd.surf-5 .arch-surfaces .arch-card:nth-child(5) .gov-dot { opacity: 1; }
.gd.on-all .arch-surfaces .arch-card { opacity: 1; border-color: var(--gold); }
.gd.on-all .arch-surfaces .gov-dot { opacity: 1; }
.gd.on-all .arch-core { border-color: var(--gold); box-shadow: 0 0 34px rgba(217,164,65,0.18); }
.gd.on-all .arch-wires-top i { background-image: repeating-linear-gradient(180deg, var(--green) 0 5px, transparent 5px 11px); }
@keyframes wireUp { to { background-position: center -22px; } }
@keyframes wireDown { to { background-position: center 22px; } }

/* pasos: acento dorado (plataforma); ARPIA final en verde */
.step-item.active { border-color: var(--gold); }
.step-item.active .step-num { color: var(--gold); }
.step-item[data-cap="8"].active { border-color: var(--green); }
.step-item[data-cap="8"].active .step-num { color: var(--green); }
.step-more { display: inline-block; margin: 0.9rem 0 0.3rem; font-size: 1.05rem; font-weight: 500; color: var(--gold); transition: transform 0.25s var(--ease); }
.step-more:hover { transform: translateX(4px); }

@media (max-width: 900px) {
  .arch-card-sub, .arch-gov-items span ion-icon { display: none; }
  .arch-gov-items { gap: 0.3rem 0.8rem; }
  .arch-gov-items span { font-size: 0.6rem; }
  .arch-chip { font-size: 0.58rem; padding: 0.4rem 0.15rem; }
  .arch-card { padding: 0.55rem 0.3rem; }
}
@media (prefers-reduced-motion: reduce) { .arch-wires i { animation: none !important; } }

/* nota bajo la banda de sistemas: los tres modos */
.arch-sys-note { text-align: center; font-size: 0.68rem; letter-spacing: 0.08em; color: var(--gold); margin-top: 0.6rem; opacity: 0; transition: opacity 0.65s var(--ease); }
.gd.on-sys .arch-sys-note { opacity: 0.9; }

/* ===== deep-dive pages (story/*) ===== */
.dp-wrap { max-width: 1100px; margin: 0 auto; padding: 0 5%; }
.dp-hero { background: var(--black); padding: 9.5rem 0 4rem; }
.dp-back { display: inline-block; font-size: 0.85rem; color: var(--mist); margin-bottom: 2.2rem; transition: color 0.25s; }
.dp-back:hover { color: var(--white); }
.dp-hero h1 { color: var(--white); font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.08; font-weight: 400; letter-spacing: -0.02em; margin-bottom: 1.4rem; animation: riseIn 1s var(--ease) both; }
.dp-lead { color: var(--mist); font-size: 1.2rem; line-height: 1.7; max-width: 720px; }
.dp-media-section { background: var(--black); padding: 1rem 0 5rem; }
.dp-content { background: var(--paper); padding: 6rem 0; }
.dp-content-alt { border-top: 1px solid var(--line-light); }
.dp-h2 { color: var(--ink); font-size: 2.3rem; font-weight: 400; letter-spacing: -0.015em; margin-bottom: 2.2rem; }
.dp-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; }
.dp-mode { background: var(--white); border: 1px solid var(--line-light); border-radius: 12px; padding: 2rem 1.8rem; }
.dp-mode ion-icon { font-size: 1.8rem; color: var(--gold); margin-bottom: 1rem; }
.dp-mode h3 { color: var(--ink); font-size: 1.15rem; font-weight: 600; margin-bottom: 0.7rem; }
.dp-mode p { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.65; }
.dp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.dp-list { margin: 0; padding: 0; }
.dp-list li { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.65; padding-left: 1.6rem; position: relative; margin-bottom: 1rem; }
.dp-list li::before { content: "→"; position: absolute; left: 0; color: var(--gold); font-weight: 600; }
.dp-shots { display: flex; flex-direction: column; gap: 1.4rem; }
.dp-cta { background: var(--black); padding: 7rem 0; border-top: 1px solid var(--line-dark); }

/* media placeholders: se intercambian por <video>/<img> reales */
.media-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; border: 1.5px dashed #3d3d3d; border-radius: 14px; background: #0F0F0F; color: var(--mist); }
.media-ph ion-icon { font-size: 2.6rem; color: #555; }
.media-ph-label { font-size: 0.72rem; letter-spacing: 0.16em; color: #7a7a7a; }
.media-ph-hint { font-size: 0.8rem; color: #5c5c5c; }
.media-ph-video { aspect-ratio: 16 / 9; width: 100%; }
.media-ph-shot { aspect-ratio: 16 / 10; border-color: var(--line-light); background: var(--white); }
.media-ph-shot ion-icon { color: #c9c4b6; }
.media-ph-shot .media-ph-label { color: #a09a8a; }

@media (max-width: 900px) {
  .dp-split { grid-template-columns: 1fr; gap: 2.5rem; }
  .dp-hero { padding-top: 7.5rem; }
}

/* ===== dial index (rotates with scroll) ===== */
@media (min-width: 1200px) {
  .stage-sticky { display: grid; grid-template-columns: minmax(340px, 4fr) 6fr; grid-template-rows: 1fr 300px; grid-template-areas: "list visual" "dial dial"; gap: 1rem 2rem; align-items: center; }
  .steps-list { grid-area: list; }
  .stage-visual { grid-area: visual; max-width: 640px; }
  .dial { grid-area: dial; }
  /* en desktop el dial es el indice: la lista muestra solo el paso activo como card */
  .steps-list .step-item { display: none; }
  .steps-list .step-item.active { display: block; border-left: none; padding-left: 0; }
  .steps-list .step-item.active h2 { font-size: 2.2rem; }
}
.dial { position: relative; height: 300px; overflow: hidden; }
.dial-pointer { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid var(--gold); z-index: 3; }
.dial-wheel { position: absolute; top: 38px; left: 50%; width: 1180px; height: 1180px; margin-left: -590px; border-radius: 50%; border: 1px solid var(--line-dark); background: radial-gradient(circle, transparent 62%, rgba(217,164,65,0.04) 74%, transparent 75%); will-change: transform; }
.dial-item { position: absolute; top: 0; left: 50%; width: 160px; margin-left: -80px; height: 590px; transform-origin: 50% 590px; display: flex; flex-direction: column; align-items: center; padding-top: 34px; gap: 0.35rem; color: var(--mist); cursor: pointer; transition: color 0.3s; }
.dial-item:hover { color: #d9d9d9; }
.dial-num { font-size: 0.8rem; letter-spacing: 0.14em; color: inherit; }
.dial-tag { font-size: 1.02rem; font-weight: 600; letter-spacing: 0.1em; color: inherit; white-space: nowrap; }
.dial-item.active { color: var(--white); }
.dial-item.active .dial-num { color: var(--gold); }
.dial-item-final.active .dial-num { color: var(--green); }
.dial-item::after { content: ''; width: 1px; height: 18px; background: var(--line-dark); margin-top: 0.35rem; }
.dial-item.active::after { background: var(--gold); }
.dial-item-final.active::after { background: var(--green); }
@media (max-width: 900px) { .dial { display: none; } }

/* dial: hint de scroll + drag */
.dial { user-select: none; -webkit-user-select: none; }
.dial-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; font-size: 0.68rem; letter-spacing: 0.22em; color: var(--mist); opacity: 0.85; transition: opacity 0.5s var(--ease); pointer-events: none; }
.dial-hint.hide { opacity: 0; }

/* dial: arcos de grupo + START verde */
.dial-groups { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.dial-group-arc { fill: none; stroke: #3a3a3a; stroke-width: 1; }
.dial-group-label { font-size: 15px; letter-spacing: 4px; font-weight: 500; fill: #b09355; font-family: 'ArpiaFont', 'Inter', sans-serif; }
.dial-tag { font-size: 0.95rem; }
.dial-item-final .dial-num { color: var(--green); }
.dial-item-final .dial-tag { color: var(--green); border: 1px solid var(--green); padding: 3px 16px; border-radius: 999px; font-weight: 700; letter-spacing: 0.16em; }
.dial-item-final:hover .dial-tag { background: rgba(52,168,84,0.12); }
.dial-item-final.active .dial-tag { background: var(--green); color: var(--black); }

/* el contenedor del pin no existe en desktop: los hijos entran directo al grid */
.stage-pin { display: contents; }
.mrail { display: none; }

/* ===== medium/small: sin dial giratorio. El diagrama se fija arriba y el riel
   hace de dial linealizado, asi el texto y el visual vuelven a ir juntos ===== */
@media (max-width: 1199px) {
  .dial { display: none !important; }
  .stage-sticky { position: static; height: auto; display: block; padding: 2.5rem 5% 2rem; overflow: visible; }
  .stage-pin { display: block; position: sticky; top: 72px; z-index: 5; background: var(--black); padding: 0.55rem 0 0.15rem; border-bottom: 1px solid var(--line-dark); }
  .stage-visual { max-width: 560px; margin: 0 auto; }
  .steps-list { display: flex; flex-direction: column; gap: 2.4rem; max-width: 640px; margin: 2.4rem auto 0; position: static; }
  .steps-list .step-item { display: block; position: static !important; transform: none !important; opacity: 1 !important; border-left: 2px solid var(--line-dark); padding: 0.4rem 0 0.4rem 1.4rem; scroll-margin-top: calc(var(--pinh, 300px) + 84px); }
  .step-item .step-body { grid-template-rows: 1fr; }
  .step-item h2 { color: var(--white); font-size: 1.45rem; }
  .step-item .step-num { color: var(--mist); }
  .step-item.active { border-color: var(--gold); }
  .step-item.active .step-num { color: var(--gold); }
  .step-item[data-cap="8"].active { border-color: var(--green); }
  .stage-step { display: none; }

  /* diagrama compacto: cabe en el pin y deja de desbordar a lo ancho.
     min-width:0 es lo que arregla el overflow de los flex items. */
  .arch { max-width: 100%; }
  .arch-row, .arch-wires { gap: 5px; }
  .arch-card { min-width: 0; padding: 0.35rem 0.2rem; border-radius: 8px; }
  .arch-card ion-icon { font-size: 1rem; margin-bottom: 0.1rem; }
  .arch-card-title { font-size: 0.55rem; letter-spacing: 0.03em; }
  .arch-card-sub { display: none; }
  .arch-logos { min-height: 0.8rem; gap: 0.22rem; margin-bottom: 0.1rem; }
  .arch-logos img { height: 10px; }
  .arch-textmark { font-size: 0.52rem; }
  .arch-wires { height: 11px; }
  .arch-core { gap: 4px; padding: 5px; border-radius: 10px; }
  .arch-band { min-width: 0; gap: 0.4rem; padding: 0.32rem 0.4rem; font-size: 0.58rem; letter-spacing: 0.06em; }
  .arch-band ion-icon { font-size: 0.9rem; }
  .arch-gov { gap: 0.3rem; }
  .arch-gov-title { font-size: 0.55rem; letter-spacing: 0.12em; }
  .arch-gov-items { gap: 0.15rem 0.55rem; }
  .arch-gov-items span { font-size: 0.53rem; gap: 0.2rem; }
  .arch-gov-items ion-icon { font-size: 0.72rem; }
  .arch-chip { min-width: 0; font-size: 0.52rem; padding: 0.3rem 0.1rem; gap: 0.18rem; }
  .arch-chip img { height: 10px; }
  .arch-chip ion-icon { font-size: 0.7rem; }
  /* detalle secundario fuera: el pin tiene que dejar sitio al texto.
     Se conserva cada fila del diagrama, que es lo que los pasos encienden. */
  .arch-gov-items, .arch-sys-note { display: none; }
  .arch-ai .arch-card ion-icon { display: none; }
  .arch-wires { height: 7px; }

  /* riel: el dial hecho linea. Progreso + paso activo, siempre a la vista */
  .mrail { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0 0.1rem; }
  .mrail-track { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
  .mrail-tick { flex: 1; min-width: 0; height: 12px; padding: 0; background: none; border: none; cursor: pointer; position: relative; }
  .mrail-tick::after { content: ''; position: absolute; left: 0; right: 0; top: 5px; height: 2px; border-radius: 2px; background: var(--line-dark); transition: background 0.35s var(--ease), height 0.25s, top 0.25s; }
  .mrail-tick.done::after { background: #6d5a30; }
  .mrail-tick.active::after { background: var(--gold); height: 3px; top: 4px; }
  .mrail-tick.final.active::after { background: var(--green); }
  .mrail-label { font-size: 0.6rem; letter-spacing: 0.14em; font-weight: 600; color: var(--gold); white-space: nowrap; text-transform: uppercase; }
  .mrail-label.is-final { color: var(--green); }
}

/* hero: la promesa de ganar tras la pregunta */
.open-win { opacity: 1; color: #ffffff; font-size: clamp(1.3rem, 2.1vw, 1.7rem); line-height: 1.55; max-width: 640px; margin-top: 1.6rem; font-weight: 500; text-shadow: 0 2px 18px rgba(0,0,0,0.9), 0 0 4px rgba(0,0,0,0.7); animation: riseIn 1.1s var(--ease) 0.32s both; }
.open-win-brand { color: var(--gold); font-weight: 700; }

/* deep-dive: comparativa semantic layer vs ARPIA ontology */
.dp-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.dp-vs-col { border-radius: 12px; padding: 2rem 1.9rem; }
.dp-vs-col h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 1.2rem; }
.dp-vs-col ul { margin: 0; padding: 0; }
.dp-vs-col li { position: relative; padding-left: 1.7rem; margin-bottom: 0.85rem; font-size: 1.02rem; line-height: 1.55; }
.dp-vs-them { background: var(--paper-2); border: 1px solid var(--line-light); }
.dp-vs-them h3 { color: var(--ink-soft); }
.dp-vs-them li { color: #6d6a61; }
.dp-vs-them li::before { content: "\2013"; position: absolute; left: 0.2rem; color: #a39d8e; }
.dp-vs-us { background: var(--ink); border: 1px solid var(--ink); }
.dp-vs-us h3 { color: var(--gold); }
.dp-vs-us li { color: #e8e8e8; }
.dp-vs-us li::before { content: "\2192"; position: absolute; left: 0; color: var(--gold); font-weight: 600; }
.dp-vs-close { margin-top: 2.2rem; font-size: 1.15rem; line-height: 1.7; color: var(--ink); font-weight: 500; max-width: 760px; }
@media (max-width: 700px) { .dp-vs { grid-template-columns: 1fr; } }

/* step card: fade direccional acompañando el dial */
.steps-list { position: relative; }
.step-item.leave-down, .step-item.leave-up { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }
.step-item.leave-down { animation: stepLeaveDown 0.32s var(--ease) forwards; }
.step-item.leave-up { animation: stepLeaveUp 0.32s var(--ease) forwards; }
.step-item.enter-top { animation: stepEnterTop 0.4s var(--ease); }
.step-item.enter-bottom { animation: stepEnterBottom 0.4s var(--ease); }
@keyframes stepLeaveDown { to { opacity: 0; transform: translateY(30px); } }
@keyframes stepLeaveUp { to { opacity: 0; transform: translateY(-30px); } }
@keyframes stepEnterTop { from { opacity: 0; transform: translateY(-30px); } }
@keyframes stepEnterBottom { from { opacity: 0; transform: translateY(30px); } }
@media (prefers-reduced-motion: reduce) {
  .step-item.leave-down, .step-item.leave-up { display: none !important; animation: none; }
  .step-item.enter-top, .step-item.enter-bottom { animation: none; }
}

/* ===== story overlay: deep-dives encima del escenario ===== */
.story-overlay { position: fixed; inset: 0; z-index: 300; background: var(--paper); opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0.35s; }
.story-overlay.open { opacity: 1; visibility: visible; }
.story-overlay-content { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; transform: translateY(24px); transition: transform 0.45s var(--ease); }
.story-overlay.open .story-overlay-content { transform: none; }
.story-overlay-close { position: absolute; top: 1.1rem; right: 1.3rem; z-index: 310; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--white); font-size: 1.5rem; line-height: 1; display: flex; align-items: center; justify-content: center; transition: transform 0.25s var(--ease); }
.story-overlay-close:hover { transform: rotate(90deg); }
.story-overlay .dp-hero { padding-top: 5.5rem; }
body.overlay-open { overflow: hidden; }

/* hero: el indicador de scroll es un boton al story */
a.open-scroll { cursor: pointer; transition: color 0.25s; }
a.open-scroll:hover { color: var(--white); }
a.open-scroll:hover .open-chevron { border-color: var(--white); }

/* solutions menu: caso destacado */
.solutions-menu-feature { background: rgba(217,164,65,0.08); border: 1px solid rgba(217,164,65,0.3); }
.solutions-menu-feature:hover { background: rgba(217,164,65,0.14); border-left-color: var(--gold); }
.solutions-menu-feature h4 { color: var(--gold); }

/* industry page: link al caso real */
.dp-case-link { display: block; background: var(--ink); border-radius: 12px; padding: 2rem 2.2rem; max-width: 640px; transition: transform 0.25s var(--ease); }
.dp-case-link:hover { transform: translateY(-3px); }
.dp-case-t { display: block; color: var(--white); font-size: 1.25rem; font-weight: 600; margin-bottom: 0.4rem; }
.dp-case-s { display: block; color: var(--mist); font-size: 1rem; margin-bottom: 1rem; }
.dp-case-go { display: inline-block; color: var(--gold); font-weight: 500; }

/* ===== forms (light): contact + partners, via .v2form ===== */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 4rem; align-items: start; }
.contact-form-wrap { max-width: 640px; }
.v2form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.v2form .form-group { margin-bottom: 1.2rem; display: flex; flex-direction: column; }
.v2form label { font-size: 0.85rem; font-weight: 500; color: var(--ink); margin-bottom: 0.45rem; }
.v2form input, .v2form select, .v2form textarea { font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--white); border: 1px solid var(--line-light); border-radius: 8px; padding: 0.75rem 0.9rem; transition: border-color 0.2s, box-shadow 0.2s; }
.v2form input:focus, .v2form select:focus, .v2form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,164,65,0.15); }
.v2form textarea { min-height: 130px; resize: vertical; }
.submit-btn, .contact-submit-btn { width: 100%; margin-top: 0.5rem; padding: 0.95rem 1.9rem; background: var(--ink); color: var(--white); font-size: 1rem; font-weight: 500; border-radius: 8px; cursor: pointer; transition: transform 0.25s var(--ease), background 0.25s; }
.submit-btn:hover { transform: translateY(-2px); background: #000; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.55; margin-top: 1rem; }
.contact-side .dp-list { margin-top: 1.4rem; }
.contact-side .dp-list li { color: var(--ink-soft); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } .v2form .form-row { grid-template-columns: 1fr; } }

/* partners: solicitud de partnership (el mismo .v2form + programas seleccionables) */
.pf-wrap { max-width: 760px; margin: 0 auto; background: var(--white); border: 1px solid var(--line-light); border-radius: 14px; padding: 3rem; }
.pf-head { text-align: center; margin-bottom: 2.6rem; }
.pf-head h2 { color: var(--ink); font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 400; letter-spacing: -0.01em; margin-bottom: 0.7rem; }
.pf-head p { color: var(--ink-soft); max-width: 560px; margin: 0 auto; }
.pf-section + .pf-section { margin-top: 2.4rem; padding-top: 2.2rem; border-top: 1px solid var(--line-light); }
.pf-section-title { font-size: 0.8rem; letter-spacing: 0.18em; font-weight: 600; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 1.3rem; }
.pf-group-label { font-size: 0.85rem; font-weight: 500; color: var(--ink); margin-bottom: 0.9rem; }
.pf-group-label span { color: var(--ink-soft); font-weight: 400; }
.pf-programs { display: flex; flex-direction: column; gap: 0.8rem; }
.pf-program { display: flex; align-items: flex-start; gap: 0.85rem; padding: 1rem 1.1rem; background: var(--paper); border: 1px solid var(--line-light); border-radius: 10px; cursor: pointer; transition: border-color 0.25s, background 0.25s; }
.pf-program:hover { border-color: var(--gold); }
.pf-program input { width: 18px; height: 18px; margin-top: 0.15rem; flex-shrink: 0; accent-color: var(--gold); cursor: pointer; }
.pf-program-text strong { display: block; color: var(--ink); font-size: 0.98rem; font-weight: 600; }
.pf-program-text p { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.55; margin-top: 0.25rem; }
.pf-program:has(input:checked) { border-color: var(--gold); background: rgba(217,164,65,0.07); }
.pf-error { display: none; color: #9b2c2c; background: rgba(208,80,80,0.09); border: 1px solid var(--red); border-radius: 8px; font-size: 0.88rem; padding: 0.7rem 0.9rem; margin-bottom: 1rem; }
.pf-error.show { display: block; }
.pf-status { margin-top: 1rem; font-size: 0.92rem; line-height: 1.55; display: none; }
.pf-status.show { display: block; }
.pf-status.ok { color: #1f7a3d; }
.pf-status.bad { color: #9b2c2c; }
@media (max-width: 640px) { .pf-wrap { padding: 2rem 1.4rem; border-radius: 12px; } }

/* company: timeline */
.timeline { max-width: 820px; }
.tl-item { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; padding: 1.4rem 0; border-top: 1px solid var(--line-light); }
.tl-year { font-size: 1.1rem; font-weight: 700; color: var(--gold); }
.tl-body h3 { color: var(--ink); font-size: 1.15rem; font-weight: 600; margin-bottom: 0.35rem; }
.tl-body p { color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
@media (max-width: 640px) { .tl-item { grid-template-columns: 1fr; gap: 0.3rem; } }

/* ===== Oria — Time Machine stack (scroll-linked 3D) ===== */
.oria-tm { background: var(--paper-2); border-top: 1px solid var(--line-light); }
.oria-runway { position: relative; height: 1360svh; }
.oria-pin { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem; padding: 3.5rem 4% 1.5rem; overflow: hidden; }
.oria-head { text-align: center; max-width: 820px; transform-origin: 50% 50%; will-change: transform; }
.oria-title { color: var(--ink); font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin-bottom: 0.5rem; }
.oria-title span { color: var(--gold); }
.oria-sub { color: var(--ink-soft); font-size: clamp(1rem, 1.7vw, 1.2rem); line-height: 1.35; max-width: 640px; margin: 0 auto; }
.oria-stack { position: relative; width: min(880px, 94vw); height: min(74svh, 680px); perspective: 2000px; }
.tm-card { position: absolute; top: 50%; left: 50%; width: 100%; opacity: 0; pointer-events: none; transform: translate(-50%,-50%); background: var(--white); border: 1px solid var(--line-light); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,0.14); overflow: hidden; will-change: transform, opacity; }
.tm-card .media-ph-video { aspect-ratio: 16/9; border-radius: 0; border-left: none; border-right: none; border-top: none; }
.tm-card-body { padding: 1.6rem 2rem 1.9rem; }
.tm-card-body .oria-mode-icon { font-size: 1.6rem; color: var(--gold); margin-bottom: 0.6rem; }
.tm-card-body h3 { color: var(--ink); font-size: 1.6rem; font-weight: 600; margin-bottom: 0.5rem; }
.tm-card-body p { color: var(--ink-soft); font-size: 1.08rem; line-height: 1.6; max-width: 640px; }
.oria-dots { display: flex; gap: 0.6rem; will-change: opacity; }
.oria-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-light); transition: background 0.3s, transform 0.3s; }
.oria-dots span.on { background: var(--gold); transform: scale(1.3); }
.oria-step { height: 100svh; }

@media (max-width: 820px) {
  .oria-runway { height: auto; }
  .oria-pin { position: static; height: auto; padding: 5rem 6%; gap: 2rem; }
  .oria-stack { position: static; width: 100%; height: auto; display: flex; flex-direction: column; gap: 1.4rem; perspective: none; }
  .tm-card { position: static; transform: none !important; opacity: 1 !important; width: 100%; pointer-events: auto; }
  .oria-dots, .oria-step { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .oria-runway { height: auto; }
  .oria-pin { position: static; height: auto; }
  .oria-stack { position: static; height: auto; display: flex; flex-direction: column; gap: 1.4rem; perspective: none; }
  .tm-card { position: static; transform: none !important; opacity: 1 !important; pointer-events: auto; }
  .oria-step { display: none; }
}

/* ===== video lightbox ===== */
.media-ph-video, [data-video] { cursor: pointer; }
.vmodal { position: fixed; inset: 0; z-index: 10050; background: rgba(5,5,5,0.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 2vmin; }
.vmodal.open { display: flex; animation: vmodalIn 0.3s var(--ease); }
@keyframes vmodalIn { from { opacity: 0; } to { opacity: 1; } }
/* el contenido manda: crece hasta topar con el viewport y conserva su proporcion.
   El marco (borde + esquinas redondeadas) va por fuera con padding, asi las esquinas
   del propio video no recortan lo grabado, que es donde vivia el logo cortado. */
.vmodal-inner { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; }
.vmodal-inner.is-frame { padding: 10px; background: #0d0d0d; border: 1px solid #262626; border-radius: 16px; box-shadow: 0 30px 90px rgba(0,0,0,0.7); }
.vmodal-inner video, .vmodal-img { display: block; max-width: calc(94vw - 28px); max-height: calc(90vh - 28px); width: auto; height: auto; border-radius: 4px; background: #000; }
.vmodal-inner.is-soon { width: min(900px, 90vw); aspect-ratio: 16/9; }
.vmodal-soon { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; border: 1.5px dashed #3d3d3d; border-radius: 10px; background: #0F0F0F; color: var(--mist); }
.vmodal-soon ion-icon { font-size: 3.4rem; color: #555; }
.vmodal-soon p { font-size: 0.8rem; letter-spacing: 0.14em; color: #8a8a8a; }
.vmodal-soon span { font-size: 0.85rem; color: #5c5c5c; }
.vmodal-close { position: fixed; top: 1.1rem; right: 1.2rem; z-index: 10060; width: 46px; height: 46px; border-radius: 50%; background: #141414; border: 1px solid #3a3a3a; box-shadow: 0 6px 22px rgba(0,0,0,0.6); color: #fff; font-size: 1.7rem; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background 0.2s, transform 0.2s; }
.vmodal-close:hover { background: #242424; border-color: #5a5a5a; transform: rotate(90deg); }
.vmodal-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* beat 2: governance hook (dark transition) */
/* gov-beat: intro del dial. Base (movil/tablet) = seccion normal; en desktop se fija y
   hace crossfade con el dial, que solapa esta seccion via margin negativo + z-index. */
.gov-beat { position: relative; background: var(--black); border-top: 1px solid var(--line-dark); min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 6rem 6%; }
.gov-beat-wrap { max-width: 900px; text-align: center; }
.gov-beat h2 { color: var(--white); font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 400; line-height: 1.08; letter-spacing: -0.02em; margin: 1.2rem 0 1.6rem; }
.gov-beat h2 span { color: var(--mist); }
.gov-beat p { color: var(--mist); font-size: clamp(1.05rem, 1.8vw, 1.3rem); line-height: 1.6; max-width: 740px; margin: 0 auto; }
/* la postura es la respuesta a la pregunta: pesa en blanco sobre el resto en gris */
.gov-beat p strong { color: var(--white); font-weight: 500; }
.gov-beat-scroll { display: inline-flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-top: 2.6rem; color: var(--mist); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; opacity: 0.85; transition: opacity 0.4s var(--ease); }
.gov-beat-scroll:hover { opacity: 1; }
.gov-beat-chevron { width: 16px; height: 16px; border-right: 1.5px solid var(--mist); border-bottom: 1.5px solid var(--mist); transform: rotate(45deg); animation: govChev 1.8s var(--ease) infinite; }
@keyframes govChev { 0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; } 50% { transform: rotate(45deg) translate(3px, 3px); opacity: 1; } }
@media (max-width: 900px) { .gov-beat { padding: 4rem 7%; } }
/* desktop: el catch se fija y el stage sube a solaparlo, asi el crossfade ocurre en el mismo lugar.
   -175svh = alto del gov-beat (250svh) menos donde arranca el fade (0.5 * runway de 150svh = 75svh). */
@media (min-width: 1200px) {
  .gov-beat { height: 250svh; min-height: 0; display: block; padding: 0; z-index: 2; will-change: opacity; }
  .gov-beat-sticky { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; justify-content: center; padding: 6rem 6%; will-change: transform; }
  .stage-section { position: relative; z-index: 1; margin-top: -175svh; }
}
/* sin animacion: se cancela el solape y vuelve a ser una seccion normal */
@media (prefers-reduced-motion: reduce) {
  .gov-beat-chevron { animation: none; }
  .gov-beat { height: auto; min-height: 100svh; display: flex; padding: 6rem 6%; }
  .gov-beat-sticky { position: static; height: auto; padding: 0; }
  .stage-section { margin-top: 0; }
}

/* ---------- cookie consent (estilado en el sistema v2, no se carga el css de v1) ---------- */
.cookie-consent-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10000; background: var(--black); border-top: 1px solid var(--line-dark); padding: 1.4rem 5%; transform: translateY(110%); transition: transform 0.5s var(--ease); }
.cookie-consent-banner.show { transform: translateY(0); }
.cookie-consent-content { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cookie-consent-text { flex: 1; min-width: 300px; }
.cookie-consent-text p { margin: 0; color: var(--mist); font-size: 0.95rem; line-height: 1.6; }
.cookie-consent-text a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.cookie-consent-text a:hover { color: var(--gold); }
.cookie-consent-buttons { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.cookie-consent-btn { padding: 0.7rem 1.6rem; border: none; border-radius: 999px; font-family: var(--font); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em; cursor: pointer; transition: background 0.3s var(--ease), color 0.3s var(--ease); }
.cookie-consent-btn-accept { background: var(--white); color: var(--ink); }
.cookie-consent-btn-accept:hover { background: var(--paper); }
.cookie-consent-btn-decline { background: transparent; color: var(--white); border: 1px solid var(--line-dark); }
.cookie-consent-btn-decline:hover { border-color: var(--mist); background: rgba(255,255,255,0.05); }
.cookie-consent-btn-close { background: transparent; border: none; color: var(--mist); font-size: 1.5rem; line-height: 1; padding: 0.3rem 0.5rem; cursor: pointer; transition: color 0.3s; }
.cookie-consent-btn-close:hover { color: var(--white); }
/* el selector de idioma de Weglot es fixed abajo a la izquierda y caeria sobre el banner:
   se le reserva un canal, asi no depende de donde Weglot inyecte su nodo */
.cookie-consent-content { padding-left: 160px; }
@media (max-width: 768px) {
  .cookie-consent-banner { padding: 1.2rem 6% 4.4rem; }
  .cookie-consent-content { flex-direction: column; align-items: stretch; gap: 1.1rem; padding-left: 0; }
  .cookie-consent-buttons { width: 100%; }
  .cookie-consent-btn { flex: 1; text-align: center; }
  .cookie-consent-btn-close { position: absolute; top: 0.6rem; right: 0.9rem; }
}

/* ---------- media real: bloques de video activos + screenshots ---------- */
/* un bloque con archivo deja de ser placeholder: muestra su poster y un play encima */
.media-ph-video.is-live { border-style: solid; border-color: #262626; background-size: cover; background-position: center top; background-repeat: no-repeat; position: relative; overflow: hidden; justify-content: center; }
.media-ph-video.is-live::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,0.15), rgba(10,10,10,0.55)); transition: background 0.35s var(--ease); }
.media-ph-video.is-live:hover::before { background: linear-gradient(180deg, rgba(10,10,10,0.05), rgba(10,10,10,0.35)); }
.media-ph-video.is-live > * { position: relative; z-index: 1; }
.media-ph-video.is-live ion-icon { font-size: 3.4rem; color: var(--white); filter: drop-shadow(0 2px 14px rgba(0,0,0,0.7)); transition: transform 0.35s var(--ease); }
.media-ph-video.is-live:hover ion-icon { transform: scale(1.08); }
.media-ph-video.is-live .media-ph-label { color: var(--white); font-weight: 600; text-shadow: 0 1px 10px rgba(0,0,0,0.8); }
.media-ph-video.is-live .media-ph-hint { color: #d8d8d8; text-shadow: 0 1px 10px rgba(0,0,0,0.9); }
.media-ph-video.is-live:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
/* en las tarjetas del Time Machine el bloque ya tiene su propio marco */
.tm-card .media-ph-video.is-live { border-color: transparent; }

.media-shot { width: 100%; height: auto; display: block; border: 1px solid var(--line-light); border-radius: 14px; background: var(--white); }

/* las capturas se abren en el lightbox: se anuncia con el cursor y un realce al pasar */
.media-shot { cursor: zoom-in; transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.media-shot:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,0.14); }
.media-shot:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- oficinas: siluetas reales (jvectormap/jqvmap) en fila de tres ---------- */
.offices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 880px; margin-top: 2rem; }
.office { text-align: center; color: var(--ink); }
.office-map { width: 100%; height: clamp(88px, 11vw, 150px); display: block; margin: 0 auto 1.1rem; color: var(--ink); }
.office-pin { fill: var(--gold); }
.office h4 { font-size: clamp(0.95rem, 1.5vw, 1.2rem); font-weight: 600; color: var(--ink); margin-bottom: 0.25rem; }
.office p { color: var(--ink-soft); font-size: clamp(0.78rem, 1.1vw, 0.9rem); line-height: 1.4; }
.offices-note { color: var(--ink-soft); font-size: 0.95rem; margin-top: 2.2rem; max-width: 620px; }
/* variante compacta para la columna lateral de contacto */
.offices.is-compact { gap: 1.2rem; max-width: 100%; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line-light); }
.offices.is-compact .office-map { height: clamp(64px, 7vw, 92px); margin-bottom: 0.7rem; }
.offices.is-compact .office h4 { font-size: 0.95rem; }
.offices.is-compact .office p { font-size: 0.76rem; }
@media (max-width: 520px) { .offices { gap: 1rem; } .office p { font-size: 0.72rem; } }
