:root {
    color-scheme: light;
    --ink: #16243d;
    --muted: #49576d;
    --brand: #1559a4;
    --accent-red: #bd3847;
    --brand-dark: #103e76;
    --line: #d8e3f0;
    --soft: #f2f7fd;
    --shell: 70rem;
    font: 100%/1.6 "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; }
a { color: var(--brand-dark); text-underline-offset: .22em; }
a:hover { color: #082953; }
a:focus-visible, video:focus-visible { outline: 3px solid var(--accent-red); outline-offset: 4px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(2.65rem, 5.8vw, 5.15rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.75rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1rem; }
img { display: block; max-width: 100%; height: auto; }
html { scroll-padding-top: var(--header-height, 6rem); }
[id] { scroll-margin-top: .75rem; }
.shell { width: min(var(--shell), calc(100% - 3rem)); margin-inline: auto; }
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.skip-link { position: absolute; transform: translateY(-200%); padding: .6rem 1rem; background: white; z-index: 11; }
.skip-link:focus { transform: translateY(0); }
.header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: white; }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; min-height: 5rem; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { width: 140px; height: auto; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(.85rem, 3.5vw, 2.2rem); }
.main-nav a, .header-contact { text-decoration: none; font-weight: 650; font-size: .95rem; }
.main-nav a { color: var(--muted); }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--brand-dark); text-decoration: underline; text-decoration-color: var(--accent-red); text-decoration-thickness: 2px; }
.header-contact { padding: .5rem 1rem; border: 1px solid #adc5e1; border-radius: .5rem; }
.hero { color: #fff; background: radial-gradient(ellipse at 74% 42%, #154d85, transparent 62%), #0a1b36; }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: clamp(1.6rem, 5vw, 4.25rem); min-height: 34rem; padding-block: clamp(3.25rem, 9vw, 7rem); }
.hero h1 { margin-bottom: .33em; line-height: 1.045; }
.hero h1 em { position: relative; display: inline-block; color: #83caff; font-style: normal; }
.eyebrow { margin-bottom: 1.25rem; color: #a9d4ff; font-weight: 700; font-size: clamp(1rem, 2vw, 1.25rem); letter-spacing: .035em; }
.hero-description { max-width: 33rem; color: #d8e7f9; font-size: clamp(1.05rem, 1.8vw, 1.24rem); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.65rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; border: 1px solid transparent; border-radius: .5rem; padding: .57rem 1rem; font-weight: 700; text-decoration: none; text-align: center; }
.button-primary { color: #092a50; background: #a2d6ff; }
.button-primary:hover { background: #d2eaff; }
.button-outline { color: #fff; border-color: #85a9d1; }
.button-outline:hover { color: #fff; background: #214c7a; }
.product-preview { margin: 0; min-width: 0; border: 1px solid #486b95; background: #173656; border-radius: .9rem; overflow: hidden; box-shadow: 0 1.5rem 4rem #06151e75; }
.product-preview a { display: block; color: white; text-decoration: none; }
.product-preview a:hover figcaption { text-decoration: underline; }
.product-preview a:focus-visible { outline-offset: -4px; }
.product-preview img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #d5e3f1; }
.preview-bar, figcaption { padding: .65rem .9rem; font-weight: 650; font-size: .9rem; }
.preview-bar { display: flex; align-items: center; gap: .6rem; }
.preview-bar span { width: .64rem; height: .64rem; border-radius: .18rem; background: #ff808c; }
figcaption { color: #a2d6ff; }
.hero-index a { display: flex; justify-content: space-between; gap: .75rem; align-items: center; padding: 1rem; }
.hero-index a + a { border-top: 1px solid #486b95; }
.hero-index a:hover { background: #214c7a; }
.hero-index span { color: #b8d8fa; font-size: .9rem; text-align: right; }
.section-heading { margin-bottom: 2rem; }
.section-heading p, .page-intro p { color: var(--muted); margin-bottom: 0; font-size: 1.08rem; }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.1rem; }
.product { display: flex; flex-direction: column; padding: clamp(1.3rem, 3vw, 1.7rem); border: 1px solid var(--line); border-top: .22rem solid #79a6da; border-radius: .75rem; background: #fff; }
.product p:not(.category), .product li { color: var(--muted); }
.category { align-self: flex-start; margin-bottom: .8rem; padding: .2rem .65rem; border-radius: .35rem; background: #e7f1fd; color: #214d81; font-size: .875rem; font-weight: 700; }
.category-almacen { background: #fbe8ea; color: #862c3d; }
.category-sisconta { background: #e7eef9; color: #274978; }
.category-planillas { background: #e4edfd; color: #324d83; }
.product ul { margin: 0 0 1.3rem; padding-left: 1.2rem; }
.product-links { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.3rem; margin-top: auto; }
.product-links a, .text-link, .contact-links a { font-weight: 700; }
.resource-section { background: var(--soft); border-block: 1px solid var(--line); }
.resource-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.25rem 4rem; padding-block: clamp(2.5rem, 6vw, 4rem); }
.resource-grid h2, .contact h2 { font-size: clamp(1.65rem, 3.3vw, 2.4rem); }
.resource-grid p, .contact p { color: var(--muted); }
.contact p { margin: 0; }
.footer { border-top: 1px solid var(--line); color: var(--muted); background: #f8faff; }
.footer-inner { padding-block: 1rem; flex-wrap: wrap; }
.footer-inner > a:last-child { font-weight: 650; }
.page-intro { padding-block: clamp(2.5rem, 7vw, 4.5rem); border-bottom: 1px solid var(--line); background: var(--soft); }
.page-intro h1, .legal h1 { font-size: clamp(2.4rem, 6vw, 4.3rem); margin-bottom: .75rem; }
.page-intro .text-link, .legal > .text-link { display: inline-block; margin-bottom: 1rem; }
.download-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: clamp(2rem, 6vw, 5rem); }
.download-group { margin-bottom: 2rem; }
.download-group ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.download-item { display: flex; justify-content: space-between; align-items: center; gap: .8rem; border-bottom: 1px solid var(--line); padding: .72rem 0; }
.download-item small { display: block; color: var(--muted); font-size: .875rem; }
.button-small { color: var(--brand-dark); background: #e7f1fd; font-size: .875rem; }
.button-small:hover { background: #d2e5fa; }
.unavailable { color: var(--muted); font-size: .875rem; }
.playlists, .videos { display: grid; align-items: start; gap: clamp(1rem, 3vw, 2rem); }
.playlists { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.videos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.playlist-link, .video { color: var(--ink); border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; }
.playlist-link { text-decoration: none; }
.playlist-link:hover { border-color: var(--brand); }
.playlist-link img, video { width: 100%; aspect-ratio: 16 / 9; background: #182d3d; }
.playlist-link div { padding: 1.1rem; }
.playlist-link p { margin: 0; color: var(--muted); }
.playlist-link h2, .video h2 { font-size: 1.23rem; }
.video h2 { margin: 0; padding: 1.1rem; }
video { display: block; }
.legal { max-width: 48rem; }
.legal h2 { font-size: 1.6rem; }
.legal h3 { margin-top: 1.5em; font-size: 1.3rem; }
@media (max-width: 48rem) {
    .hero-grid, .download-grid { grid-template-columns: 1fr; }
    .hero-grid { min-height: 0; }
    .product-preview { max-width: 35rem; }
}
@media (max-width: 35rem) {
    .shell { width: min(var(--shell), calc(100% - 2rem)); }
    .header-inner { display: grid; grid-template-columns: 1fr auto; gap: .75rem 1rem; padding-block: .85rem; }
    .main-nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; gap: .45rem; }
    .main-nav a { font-size: .875rem; }
    .header-contact { grid-column: 2; grid-row: 1; }
    .resource-grid { grid-template-columns: 1fr; }
    .footer-inner { gap: 1rem; }
}

.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); align-items: start; gap: clamp(1.5rem, 5vw, 4rem); }
.contact-links { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; margin-top: 1rem; }
.contact-form { display: grid; gap: 1rem; padding: clamp(1rem, 3vw, 1.75rem); border: 1px solid var(--line); border-radius: .75rem; background: var(--soft); }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.contact-field { display: grid; gap: .3rem; align-content: start; min-width: 0; }
.contact-field label { font-weight: 650; }
.contact-field input, .contact-field textarea { width: 100%; padding: .6rem .7rem; border: 1px solid #80939b; border-radius: .4rem; color: var(--ink); background: white; font: inherit; }
.contact-field textarea { resize: vertical; }
.contact-field input:focus-visible, .contact-field textarea:focus-visible, .contact-submit:focus-visible { outline: 3px solid var(--accent-red); outline-offset: 2px; }
.contact-field [aria-invalid="true"] { border-color: #a52322; }
.contact-form .contact-caption { margin: 0; color: var(--muted); font-size: .9rem; }
.contact-submit { justify-self: start; color: #fff; background: var(--brand); font: inherit; font-weight: 700; cursor: pointer; }
.contact-submit:hover { background: var(--brand-dark); }
.contact-form .form-notice { margin: 0; padding: .75rem; border-radius: .4rem; font-weight: 650; }
.contact-form .form-success { color: #184671; background: #e0edfd; }
.contact-form .form-error { color: #7c2222; background: #f9e4e1; }
.field-error { color: #7c2222; font-size: .9rem; }
@media (max-width: 48rem) {
    .contact { grid-template-columns: 1fr; }
}
@media (max-width: 35rem) {
    .contact-fields { grid-template-columns: 1fr; }
}

.product.is-highlighted, .product:focus-within {
    border-color: #79a6da;
    box-shadow: 0 .75rem 1.5rem #16243d18;
}
.product.is-highlighted h3, .product:focus-within h3 { color: var(--brand-dark); }
.product-website { color: #fff; background: var(--brand); }
.product-website:hover { color: #fff; background: var(--brand-dark); }

@media (prefers-reduced-motion: no-preference) {
    .product { transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease; }
    .product h3 { transition: color 220ms ease; }
    .product.is-highlighted, .product:focus-within { transform: translateY(-4px); }
}

.hero h1 em canvas { position: absolute; pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    .section-enter { animation: section-enter 750ms cubic-bezier(.2, .65, .3, 1) both; }
}
@keyframes section-enter {
    from { opacity: .3; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.title-word, .title-word > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
    .title-in-view .title-word > span {
        animation: title-letter-in 460ms cubic-bezier(.2,.7,.3,1) var(--letter-delay) backwards;
    }
}
@keyframes title-letter-in {
    from { opacity: .15; transform: translateY(.28em); }
    to { opacity: 1; transform: translateY(0); }
}
