:root {
    --navy: #0b2c57;
    --blue: #1f4f9e;
    --blue-2: #1678c8;
    --green: #02ad63;
    --orange: #fb7a1b;
    --ink: #14243a;
    --muted: #65758b;
    --line: #e5ebf2;
    --surface: #f5f8fc;
    --white: #fff;
    --shadow: 0 16px 40px rgba(26, 53, 86, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: Inter, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
svg { display: block; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; color: #fff; background: #111; border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 40; min-height: 76px; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(218,227,238,.9); backdrop-filter: blur(14px); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: max-content; text-decoration: none; }
.brand img { width: 68px; height: 56px; object-fit: contain; }
.brand-copy { display: grid; gap: 2px; border-left: 1px solid var(--line); padding-left: 13px; }
.brand-copy strong { color: var(--blue); font-size: .92rem; letter-spacing: .045em; }
.brand-copy small { color: var(--muted); font-size: .69rem; }
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a { padding: 10px 13px; color: #4c5c70; font-size: .86rem; font-weight: 600; text-decoration: none; border-radius: 9px; transition: .2s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--blue); background: #edf5ff; }
.main-nav .nav-action { margin-left: 8px; padding-inline: 16px; color: #fff; background: var(--blue); }
.main-nav .nav-action:hover { color: #fff; background: var(--navy); }
.menu-button { display: none; align-items: center; gap: 8px; padding: 9px 12px; color: var(--navy); background: #edf4fc; border: 0; border-radius: 9px; font: 700 .82rem Inter, sans-serif; }

.hero { position: relative; min-height: 550px; display: grid; align-items: center; color: #fff; background: #082554 url("images/oti-hero.png") center/cover no-repeat; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 80px; background: linear-gradient(transparent, rgba(4,26,58,.24)); pointer-events: none; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,28,65,.93) 0%, rgba(8,44,94,.79) 42%, rgba(7,48,101,.08) 78%); }
.hero-content { position: relative; z-index: 1; padding-block: 78px 88px; }
.hero-copy { max-width: 680px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; color: #aee5ff; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow span { width: 25px; height: 3px; background: var(--orange); border-radius: 4px; }
h1 { max-width: 660px; margin: 0; font-size: clamp(2.35rem, 5vw, 4.45rem); line-height: 1.06; letter-spacing: -.045em; text-wrap: balance; }
.hero-copy > p { max-width: 610px; margin: 24px 0 0; color: #d5e7fb; font-size: 1.06rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; border: 1px solid transparent; border-radius: 10px; font-size: .88rem; font-weight: 700; text-decoration: none; transition: transform .2s, background .2s, border-color .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #0b2c57; background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.button-primary:hover { background: #eaf6ff; }
.button-ghost { color: #fff; border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.09); backdrop-filter: blur(8px); }
.button-ghost:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.65); }
.trust-row { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 31px; color: #c3d7ee; font-size: .76rem; font-weight: 600; }
.trust-row span { display: flex; align-items: center; gap: 7px; }
.trust-row svg { width: 15px; height: 15px; color: #6bd5ff; }
.trust-row i { width: 8px; height: 8px; background: #3bd980; border-radius: 50%; box-shadow: 0 0 0 4px rgba(59,217,128,.15); }

/* Movimiento breve: no cambia la posición de la página ni fuerza el desplazamiento. */
.motion-enabled .hero .eyebrow, .motion-enabled .hero h1, .motion-enabled .hero-copy > p, .motion-enabled .hero-actions, .motion-enabled .trust-row { opacity: 0; transform: translateY(16px); }
.page-ready .hero .eyebrow { animation: revealUp .55s .08s ease-out forwards; }
.page-ready .hero h1 { animation: revealUp .7s .2s cubic-bezier(.2,.7,.2,1) forwards; }
.page-ready .hero-copy > p { animation: revealUp .6s .38s ease-out forwards; }
.page-ready .hero-actions { animation: revealUp .55s .52s ease-out forwards; }
.page-ready .trust-row { animation: revealUp .5s .65s ease-out forwards; }
.motion-enabled .services-section .section-heading, .motion-enabled .services-section .module-card { opacity: 0; transform: translateY(18px); }
.services-section.is-visible .section-heading { animation: revealUp .55s ease-out forwards; }
.services-section.is-visible .module-card { animation: revealCard .5s ease-out forwards; }
.services-section.is-visible .module-card:nth-child(1) { animation-delay: .08s; }
.services-section.is-visible .module-card:nth-child(2) { animation-delay: .14s; }
.services-section.is-visible .module-card:nth-child(3) { animation-delay: .2s; }
.services-section.is-visible .module-card:nth-child(4) { animation-delay: .26s; }
.services-section.is-visible .module-card:nth-child(5) { animation-delay: .32s; }
.services-section.is-visible .module-card:nth-child(6) { animation-delay: .38s; }
.services-section.is-visible .module-card:nth-child(7) { animation-delay: .44s; }
.services-section.is-visible .module-card:nth-child(8) { animation-delay: .5s; }
.services-section.animation-complete .section-heading,
.services-section.animation-complete .module-card { opacity: 1; transform: none; animation: none; }
.services-section.animation-complete .module-card:hover { transform: translateY(-5px); }
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }
@keyframes revealCard { to { opacity: 1; transform: translateY(0) scale(1); } }

/* Secuencia inicial: se activa con JavaScript después de cargar los recursos. */
.services-section { padding: 84px 0 96px; background: var(--surface); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-kicker { display: block; margin-bottom: 8px; color: var(--blue-2); font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: clamp(1.8rem, 4vw, 2.65rem); letter-spacing: -.035em; }
.section-heading p { margin: 9px 0 0; color: var(--muted); }
.search-box { width: min(100%, 310px); min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 15px; color: #8290a2; background: #fff; border: 1px solid #dbe4ee; border-radius: 11px; box-shadow: 0 5px 20px rgba(36,59,86,.04); }
.search-box:focus-within { color: var(--blue); border-color: #80b5e8; box-shadow: 0 0 0 4px rgba(28,112,194,.1); }
.search-box input { width: 100%; padding: 0; color: var(--ink); background: transparent; border: 0; outline: none; font: 500 .86rem Inter, sans-serif; }
.module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.module-card[hidden], .module-grid[hidden], .empty-state[hidden] { display: none !important; }
.module-card { --accent: #2468bb; --soft: #eaf3ff; position: relative; min-height: 260px; display: flex; flex-direction: column; padding: 23px; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 4px 14px rgba(25,55,90,.035); text-decoration: none; overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.module-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
.module-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 35%, white); box-shadow: var(--shadow); }
.module-card:hover::before { transform: scaleX(1); }
.module-card:focus-visible { outline: 3px solid rgba(31,79,158,.3); outline-offset: 3px; }
.module-card.green { --accent: #049b5b; --soft: #e6f8ef; }
.module-card.orange { --accent: #e87517; --soft: #fff1e5; }
.module-card.red { --accent: #d84c4c; --soft: #ffeded; }
.module-card.cyan { --accent: #1689ad; --soft: #e7f7fb; }
.module-card.pink { --accent: #be4f7c; --soft: #fcebf2; }
.module-card.violet { --accent: #6851bd; --soft: #f0edfc; }
.module-card.teal { --accent: #087c78; --soft: #e4f5f4; }
.module-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.module-icon { width: 51px; height: 51px; display: grid; place-items: center; color: var(--accent); background: var(--soft); border-radius: 13px; }
.module-icon svg { width: 25px; height: 25px; }
.module-status { display: flex; align-items: center; gap: 6px; color: #6f7f91; font-size: .66rem; font-weight: 600; }
.module-status i { width: 6px; height: 6px; background: #35b56e; border-radius: 50%; }
.module-card.is-pending .module-status i { background: #e49a31; }
.module-content { display: grid; gap: 10px; margin-top: 23px; }
.module-content strong { color: var(--navy); font-size: 1.04rem; line-height: 1.3; }
.module-content > span { color: var(--muted); font-size: .8rem; line-height: 1.58; }
.module-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 20px; color: var(--accent); font-size: .76rem; font-weight: 700; }
.module-link svg { width: 17px; height: 17px; transition: transform .2s; }
.module-card:hover .module-link svg { transform: translateX(4px); }
.empty-state { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); background: #fff; border: 1px dashed #ccd8e5; border-radius: 16px; text-align: center; }
.empty-state svg { width: 34px; height: 34px; margin-bottom: 4px; color: #8ea3b9; }
.empty-state strong { color: var(--navy); }
.empty-state span { font-size: .84rem; }
.portal-notice { margin-top: 18px; padding: 13px 16px; color: #7a5520; background: #fff8e8; border: 1px solid #f0d7a8; border-radius: 10px; font-size: .78rem; }

.site-footer { color: #516174; background: #fff; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr .65fr; gap: 55px; padding-block: 46px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 76px; height: 65px; object-fit: contain; }
.footer-brand div, .footer-contact, .footer-links { display: grid; align-content: start; gap: 8px; }
.footer-brand strong, .footer-contact strong, .footer-links strong { color: var(--navy); font-size: .84rem; }
.footer-brand span, .footer-contact span, .footer-contact a, .footer-links a { font-size: .74rem; line-height: 1.5; }
.footer-contact a, .footer-links a { color: var(--blue); text-decoration: none; }
.footer-contact a:hover, .footer-links a:hover { text-decoration: underline; }
.footer-bottom { padding: 15px 0; background: #f3f6fa; border-top: 1px solid var(--line); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 20px; font-size: .68rem; }

@media (max-width: 980px) {
    .menu-button { display: inline-flex; }
    .main-nav { position: absolute; top: 76px; left: 0; right: 0; display: none; padding: 12px 20px 18px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 15px 25px rgba(18,45,77,.1); }
    .main-nav.open { display: grid; }
    .main-nav .nav-action { margin-left: 0; text-align: center; }
    .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-main { grid-template-columns: 1.2fr 1fr; }
    .footer-links { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .container { width: min(100% - 28px, 1160px); }
    .site-header, .header-inner { min-height: 68px; }
    .brand img { width: 54px; height: 45px; }
    .brand-copy small { display: none; }
    .main-nav { top: 68px; }
    .hero { min-height: 590px; background-position: 64% center; }
    .hero-overlay { background: linear-gradient(90deg, rgba(5,28,65,.97), rgba(7,42,88,.82)); }
    .hero-content { padding-block: 64px 76px; }
    h1 { font-size: clamp(2.2rem, 12vw, 3.25rem); }
    .hero-copy > p { font-size: .95rem; }
    .hero-actions { display: grid; }
    .button { width: 100%; }
    .trust-row { gap: 14px; }
    .services-section { padding: 66px 0 72px; }
    .section-heading { align-items: stretch; flex-direction: column; }
    .search-box { width: 100%; }
    .module-grid { grid-template-columns: 1fr; }
    .module-card { min-height: 238px; }
    .footer-main { grid-template-columns: 1fr; gap: 30px; }
    .footer-links { grid-column: auto; }
    .footer-bottom .container { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
    .hero .eyebrow, .hero h1, .hero-copy > p, .hero-actions, .trust-row,
    .services-section .section-heading, .services-section .module-card { opacity: 1; transform: none; animation: none !important; }
}
