/* ==========================================================================
   Mutual APREPA — Sistema visual institucional
   Tokens alineados a la escala de Tailwind CSS (slate + blue-600).
   Para cambiar el color de acento, editar solo --accent-*.
   ========================================================================== */

:root {
    /* Neutros (slate) */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* Acento (blue) */
    --accent-50: #eff6ff;
    --accent-100: #dbeafe;
    --accent-500: #3b82f6;
    --accent-600: #2563eb;
    --accent-700: #1d4ed8;
    --accent-ring: rgba(59, 130, 246, 0.2);   /* ring-blue-500/20 */

    /* Estados */
    --success-50: #ecfdf5;
    --success-600: #059669;
    --success-700: #047857;
    --danger-50: #fef2f2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;

    /* Marca */
    --brand-green: #6a9a48;

    /* Superficies */
    --bg: var(--slate-50);
    --surface: #ffffff;
    --border: rgba(226, 232, 240, 0.8);       /* border-slate-200/80 */

    /* Forma y profundidad */
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;                       /* rounded-xl */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --dur: 200ms;

    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --header-h: 64px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--slate-700);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'cv11', 'ss01';
}

h1, h2, h3, h4, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

a {
    color: var(--accent-600);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}
a:hover { color: var(--accent-700); }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid var(--accent-500);
    outline-offset: 2px;
}

[hidden] { display: none !important; }

.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;
}

.skip-link {
    position: absolute; left: 16px; top: -48px; z-index: 100;
    padding: 8px 14px; border-radius: var(--radius-md);
    background: var(--slate-900); color: #fff; font-size: 0.875rem;
    transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
@media (min-width: 640px) { .container { padding: 0 24px; } }

/* --------------------------------------------------------------------------
   Tipografía y encabezados de sección
   -------------------------------------------------------------------------- */
.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-600);
}
.eyebrow--light { color: var(--accent-100); }

.section-title {                       /* text-xl font-semibold text-slate-900 */
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--slate-900);
}
@media (min-width: 768px) {
    .section-title { font-size: 1.5rem; line-height: 2rem; }
}

.section-subtitle {                    /* text-sm text-slate-500 */
    margin-top: 6px;
    max-width: 62ch;
    font-size: 0.875rem;
    line-height: 1.5rem;
    color: var(--slate-500);
}

.section { padding: 56px 0; }
.section--alt {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) { .section { padding: 80px 0; } }

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
                color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.btn--sm { height: 34px; padding: 0 12px; font-size: 0.8125rem; }

.btn--primary { background: var(--accent-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-700); color: #fff; }

.btn--secondary { background: var(--surface); color: var(--slate-700); border-color: var(--slate-300); box-shadow: var(--shadow-sm); }
.btn--secondary:hover { background: var(--slate-50); color: var(--slate-900); border-color: var(--slate-400); }

.btn--ghost-light { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid transparent; border-radius: var(--radius-md);
    background: transparent; color: var(--slate-600); cursor: pointer;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--slate-100); color: var(--slate-900); }

/* --------------------------------------------------------------------------
   Barra superior + cabecera
   -------------------------------------------------------------------------- */
.topbar {
    background: var(--slate-900);
    color: var(--slate-300);
    font-size: 0.8125rem;
}
.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
}
.topbar__contact { display: flex; gap: 20px; }
.topbar a { display: inline-flex; align-items: center; gap: 8px; color: var(--slate-300); }
.topbar a:hover { color: #fff; }
.topbar__social { display: flex; gap: 16px; }
@media (max-width: 639px) {
    .topbar__contact a:nth-child(2) span { display: none; }
}

.header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--dur) var(--ease);
}
.header.is-scrolled { box-shadow: var(--shadow-sm); }
.header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--slate-900); }
.brand:hover { color: var(--slate-900); }
.brand__mark {
    display: grid; place-items: center;
    width: 34px; height: 34px;
    border-radius: var(--radius-md);
    background: var(--brand-green);
    color: #fff; font-weight: 700; font-size: 1rem;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.02em; color: var(--slate-900); }
.brand__sub { font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--slate-500); }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: 4px; }
.nav__link {
    display: inline-flex; align-items: center;
    height: 36px; padding: 0 12px;
    border-radius: var(--radius-md);
    font-size: 0.875rem; font-weight: 500;
    color: var(--slate-600);
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__link:hover { background: var(--slate-100); color: var(--slate-900); }
.nav__link.is-active { background: var(--accent-50); color: var(--accent-700); }

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 40px; height: 40px;
    border: 1px solid var(--slate-200); border-radius: var(--radius-md);
    background: var(--surface); color: var(--slate-700);
    cursor: pointer;
    transition: background-color var(--dur) var(--ease);
}
.menu-toggle:hover { background: var(--slate-100); }

@media (max-width: 1023px) {
    .nav, .header__cta { display: none; }
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* Drawer móvil */
.drawer-overlay {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
}
.drawer-overlay.is-open { opacity: 1; }

.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; flex-direction: column;
    width: min(320px, 85vw);
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 250ms var(--ease), visibility 0s linear 250ms;
}
.drawer.is-open { transform: translateX(0); visibility: visible; transition: transform 250ms var(--ease); }
.drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-h); padding: 0 16px;
    border-bottom: 1px solid var(--border);
}
.drawer__list { padding: 12px; display: grid; gap: 2px; }
.drawer__link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-md);
    font-size: 0.9375rem; font-weight: 500; color: var(--slate-700);
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.drawer__link i { width: 18px; text-align: center; color: var(--slate-400); transition: color var(--dur) var(--ease); }
.drawer__link:hover { background: var(--slate-100); color: var(--slate-900); }
.drawer__link.is-active { background: var(--accent-50); color: var(--accent-700); }
.drawer__link.is-active i { color: var(--accent-600); }
.drawer__foot {
    margin-top: auto; padding: 16px;
    display: grid; gap: 10px;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}
.drawer__foot a { display: flex; align-items: center; gap: 10px; color: var(--slate-600); }
.drawer__foot i { color: var(--slate-400); }

body.is-locked { overflow: hidden; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    color: #fff;
    background:
        linear-gradient(100deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.78) 55%, rgba(15, 23, 42, 0.55) 100%),
        url('img/hero-banner.jpg') center / cover no-repeat,
        var(--slate-900);
}
.hero__inner { padding: 72px 16px 120px; }
@media (min-width: 640px) { .hero__inner { padding: 96px 24px 140px; } }
.hero__title {
    max-width: 20ch;
    font-size: 2rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
}
@media (min-width: 768px) { .hero__title { font-size: 3rem; } }
.hero__desc {
    max-width: 56ch;
    margin-top: 16px;
    font-size: 1rem;
    color: var(--slate-300);
}
@media (min-width: 768px) { .hero__desc { font-size: 1.125rem; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* --------------------------------------------------------------------------
   Tarjetas
   -------------------------------------------------------------------------- */
.card {                                  /* bg-white rounded-xl shadow-sm border-slate-200/80 */
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* KPIs */
.kpis { position: relative; margin-top: -64px; z-index: 1; }
.kpi-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 479px) { .kpi-grid { grid-template-columns: 1fr; } }

.kpi { padding: 20px; transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.kpi:hover { box-shadow: var(--shadow-md); border-color: var(--slate-300); }
.kpi__head { display: flex; align-items: center; justify-content: space-between; }
.kpi__label { font-size: 0.875rem; font-weight: 500; color: var(--slate-500); }
.kpi__icon {
    display: grid; place-items: center;
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    background: var(--accent-50); color: var(--accent-600);
    font-size: 0.9375rem;
}
.kpi__value {
    margin-top: 12px;
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--slate-900);
    font-variant-numeric: tabular-nums;
}
.kpi__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-top: 8px;
    font-size: 0.8125rem; color: var(--slate-500);
}

/* Pills y tags */
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    height: 22px; padding: 0 8px;
    border-radius: 999px;
    font-size: 0.75rem; font-weight: 500;
    white-space: nowrap;
}
.pill--success { background: var(--success-50); color: var(--success-700); }
.pill--neutral { background: var(--slate-100); color: var(--slate-600); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success-600); }

.tag {
    display: inline-flex; align-items: center;
    height: 24px; padding: 0 8px;
    border: 1px solid var(--slate-200); border-radius: 6px;
    background: var(--slate-50);
    font-size: 0.75rem; font-weight: 500; color: var(--slate-600);
}

/* Features */
.feature { padding: 24px; transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.feature:hover { box-shadow: var(--shadow-md); border-color: var(--slate-300); }
.feature--row { display: flex; gap: 16px; align-items: flex-start; }
.feature__icon {
    display: grid; place-items: center; flex: none;
    width: 40px; height: 40px;
    margin-bottom: 16px;
    border: 1px solid var(--accent-100);
    border-radius: var(--radius-md);
    background: var(--accent-50); color: var(--accent-600);
}
.feature--row .feature__icon { margin-bottom: 0; }
.feature__title { font-size: 1rem; font-weight: 600; color: var(--slate-900); }
.feature__text { margin-top: 6px; font-size: 0.875rem; line-height: 1.5rem; color: var(--slate-500); }

/* Paneles */
.panel { padding: 20px; }
.panel + .panel { margin-top: 16px; }
@media (min-width: 640px) { .panel { padding: 24px; } }
.panel__head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.panel__title { font-size: 1rem; font-weight: 600; color: var(--slate-900); }
.panel__subtitle { margin-top: 2px; font-size: 0.875rem; color: var(--slate-500); }
.panel__foot {
    margin: 0 -20px -20px;
    padding: 12px 20px;
    border-top: 1px solid var(--slate-100);
    font-size: 0.8125rem; color: var(--slate-500);
}
@media (min-width: 640px) { .panel__foot { margin: 0 -24px -24px; padding: 12px 24px; } }

/* Personas */
.board { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.board .person {
    padding: 12px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.board .person:hover { border-color: var(--slate-300); background: var(--slate-50); }

.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person__name { font-size: 0.875rem; font-weight: 500; color: var(--slate-900); }
.person__role { font-size: 0.8125rem; color: var(--slate-500); }
.avatar {
    display: grid; place-items: center; flex: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    font-size: 0.75rem; font-weight: 600; color: var(--slate-600);
}

/* --------------------------------------------------------------------------
   Tabla
   -------------------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar > label { flex: 1 1 200px; }

.table-wrap {
    margin: 0 -20px;
    border-top: 1px solid var(--slate-200);
    overflow-x: auto;
}
@media (min-width: 640px) { .table-wrap { margin: 0 -24px; } }

.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
    padding: 10px 20px;
    background: var(--slate-50);
    border-bottom: 1px solid var(--slate-200);
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.04em; text-transform: uppercase;
    text-align: left; color: var(--slate-500);
    white-space: nowrap;
}
.table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-600);
    vertical-align: middle;
}
@media (min-width: 640px) { .table th, .table td { padding-left: 24px; padding-right: 24px; } }
.table tbody tr { transition: background-color var(--dur) var(--ease); }
.table tbody tr:hover { background: var(--slate-50); }
.table tbody tr:last-child td { border-bottom: 0; }
.table__right { text-align: right !important; }

/* Tabla apilada en móvil */
@media (max-width: 639px) {
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { padding: 12px 20px; border-bottom: 1px solid var(--slate-100); }
    .table tbody tr:last-child { border-bottom: 0; }
    .table td { padding: 0; border: 0; }
    .table td + td { margin-top: 6px; padding-left: 48px; }
    .table td.table__right { text-align: left !important; }
    .table td[data-label="Cargo"] { font-size: 0.8125rem; color: var(--slate-500); }
}

/* Estado vacío */
.empty {
    display: flex; flex-direction: column; align-items: center;
    padding: 48px 16px;
    text-align: center;
}
.empty__icon {
    display: grid; place-items: center;
    width: 48px; height: 48px; margin-bottom: 12px;
    border-radius: 50%;
    background: var(--slate-100); color: var(--slate-400);
    font-size: 1.125rem;
}
.empty__title { font-size: 0.9375rem; font-weight: 600; color: var(--slate-900); }
.empty__text { margin: 4px 0 16px; font-size: 0.875rem; color: var(--slate-500); }

/* --------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */
.input {
    display: block;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-size: 0.875rem;
    color: var(--slate-900);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input::placeholder { color: var(--slate-400); }
.input:hover { border-color: var(--slate-400); }
.input:focus {                            /* focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 */
    outline: none;
    border-color: var(--accent-500);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
.input[aria-invalid="true"] { border-color: var(--danger-500); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); }

.select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    cursor: pointer;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 120px; }

.input-icon { position: relative; display: block; }
.input-icon i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    font-size: 0.8125rem; color: var(--slate-400); pointer-events: none;
}
.input-icon .input { padding-left: 34px; }

.form { display: grid; gap: 20px; align-content: start; }
.form__row { display: grid; gap: 20px; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.label { font-size: 0.875rem; font-weight: 500; color: var(--slate-700); }
.label__opt { font-weight: 400; color: var(--slate-400); }
.field__hint { font-size: 0.75rem; color: var(--slate-400); text-align: right; }
.field__error { font-size: 0.8125rem; color: var(--danger-600); }
.field__error:empty { display: none; }

.form__actions {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--slate-100);
}
.form__status { margin-right: auto; font-size: 0.875rem; }
.form__status.is-success { color: var(--success-700); }
.form__status.is-error { color: var(--danger-600); }

/* Contacto */
.contact-grid { display: grid; gap: 16px; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 2fr 3fr; align-items: start; } }
.contact-side .panel__title { margin-bottom: 16px; }

.info-list { display: grid; gap: 14px; }
.info-list dt {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--slate-500);
}
.info-list dt i { width: 14px; color: var(--slate-400); }
.info-list dd { margin-top: 2px; padding-left: 22px; font-size: 0.9375rem; color: var(--slate-900); }

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */
.cta {
    display: grid; gap: 24px;
    padding: 28px;
    border-left: 4px solid var(--accent-600);
}
@media (min-width: 900px) {
    .cta { grid-template-columns: 1fr auto; align-items: center; padding: 36px 40px; }
}
.checklist { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 0.875rem; color: var(--slate-600); }
.checklist li { display: inline-flex; align-items: center; gap: 8px; }
.checklist i { color: var(--success-600); }
.cta__actions { display: grid; gap: 8px; justify-items: start; }
@media (min-width: 900px) { .cta__actions { justify-items: end; } }
.cta__note { font-size: 0.8125rem; color: var(--slate-500); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { background: var(--slate-900); color: var(--slate-400); font-size: 0.875rem; }
.footer__inner {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
    padding-top: 40px; padding-bottom: 32px;
}
.footer__brand .brand__name { color: #fff; }
.footer__brand p { margin-top: 6px; max-width: 40ch; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__links a { color: var(--slate-300); }
.footer__links a:hover { color: #fff; }
.footer__legal {
    padding-top: 16px; padding-bottom: 24px;
    border-top: 1px solid var(--slate-800);
    font-size: 0.8125rem; color: var(--slate-500);
}

/* --------------------------------------------------------------------------
   Modal de envío por correo
   -------------------------------------------------------------------------- */
.modal {
    width: min(480px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
    color: var(--slate-700);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(8px) scale(0.97);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
                overlay var(--dur) allow-discrete, display var(--dur) allow-discrete;
}
.modal[open] { opacity: 1; transform: none; }
@starting-style { .modal[open] { opacity: 0; transform: translateY(8px) scale(0.97); } }
.modal::backdrop { background: rgba(15, 23, 42, 0.45); }
.modal__inner { display: grid; gap: 20px; padding: 24px; }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal__head .icon-btn { margin: -8px -8px 0 0; }
.modal__notice {
    display: flex; gap: 10px; align-items: baseline;
    padding: 12px 14px;
    border: 1px solid var(--accent-100);
    border-radius: var(--radius-md);
    background: var(--accent-50);
    font-size: 0.875rem; color: var(--slate-700);
}
.modal__notice i { color: var(--accent-600); }

.mail-options { display: grid; gap: 8px; }
.mail-option {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    color: var(--slate-900);
    transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.mail-option:hover { border-color: var(--accent-500); background: var(--accent-50); color: var(--slate-900); }
.mail-option:focus-visible { outline: none; border-color: var(--accent-500); box-shadow: 0 0 0 3px var(--accent-ring); }
.mail-option__icon {
    display: grid; place-items: center; flex: none;
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    background: var(--slate-100); color: var(--slate-600);
}
.mail-option__title { display: block; font-size: 0.875rem; font-weight: 600; }
.mail-option__text { display: block; font-size: 0.8125rem; color: var(--slate-500); }

.copy-row { display: flex; gap: 8px; }
.copy-row .input { flex: 1; min-width: 0; }

/* --------------------------------------------------------------------------
   Toast (estado offline)
   -------------------------------------------------------------------------- */
.toast {
    position: fixed; left: 50%; bottom: 20px; z-index: 70;
    display: flex; align-items: center; gap: 10px;
    max-width: calc(100vw - 32px);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    background: var(--slate-900); color: #fff;
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(-50%);
}

/* --------------------------------------------------------------------------
   Áreas institucionales — expansión inmersiva ("layout morphing")
   Estados (en .areas):
     · sin .has-active  → vista general: 4 paneles iguales con resumen
     · .has-active      → el panel .is-active domina el contenedor; el resto
                          se contrae (opacity .4 / scale .95) como foco
   Escritorio anima flex-grow; móvil anima height.
   -------------------------------------------------------------------------- */
.areas-shell {
    padding: 8px;
    border: 1px solid var(--slate-800);
    border-radius: 1rem;                                   /* rounded-2xl */
    background: #020617;                                   /* slate-950 */
    box-shadow: var(--shadow-lg);
}

.areas {
    --x-ease: cubic-bezier(0.16, 1, 0.3, 1);               /* ease-out "expo" orgánico */
    --x-dur: 700ms;
    display: flex;
    gap: 8px;
    height: 560px;
}

.area {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--radius-lg);
    background: var(--slate-900);
    transform-origin: center;
    transition: flex-grow var(--x-dur) var(--x-ease),
                height var(--x-dur) var(--x-ease),
                opacity var(--x-dur) var(--x-ease),
                transform var(--x-dur) var(--x-ease),
                box-shadow var(--x-dur) var(--x-ease);
}
.area.is-active { flex-grow: 5; box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.7); }
.areas.has-active .area:not(.is-active) { opacity: 0.4; transform: scale(0.95); }
.areas.has-active .area:not(.is-active):hover,
.areas.has-active .area:not(.is-active):focus-within { opacity: 0.85; transform: scale(0.97); }

/* Imagen + degradado */
.area__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1000ms var(--x-ease), filter var(--x-dur) var(--x-ease);
}
#area-cementerio .area__img { object-position: center 75%; }
.areas.has-active .area:not(.is-active) .area__img { filter: grayscale(0.5); }

.area__shade {                                             /* from-slate-950/80 via-slate-950/30 to-transparent */
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.8) 0%, rgba(2, 6, 23, 0.3) 50%, transparent 100%);
}
.area__shade::after {                                      /* refuerzo de contraste en el panel abierto */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.65) 0%, rgba(2, 6, 23, 0.2) 55%, transparent 80%);
    opacity: 0;
    transition: opacity var(--x-dur) var(--x-ease);
}
.area.is-active .area__shade::after { opacity: 1; }

/* Disparador: resumen (vista general) y pestaña vertical (contraído) */
.area__trigger {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    border: 0;
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition: opacity 300ms var(--x-ease);
}
.area__trigger:focus-visible { outline: 2px solid #fff; outline-offset: -4px; border-radius: var(--radius-lg); }
.area.is-active .area__trigger { opacity: 0; pointer-events: none; }

.area__index {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    font-variant-numeric: tabular-nums;
    transition: opacity 300ms var(--x-ease);
}
.areas.has-active .area:not(.is-active) .area__index { opacity: 0; }

.area__icon {
    display: grid; place-items: center; flex: none;
    width: 40px; height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background-color 300ms var(--x-ease), border-color 300ms var(--x-ease);
}

.area__summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 230px;                      /* ancho fijo: no se re-acomoda mientras el panel cambia de tamaño */
    transition: opacity 400ms var(--x-ease), transform var(--x-dur) var(--x-ease);
}
.area__summary .area__icon { margin-bottom: 10px; }
.area__summary-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.area__summary-text { font-size: 0.875rem; color: var(--slate-300); }
.area__more {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 10px;
    font-size: 0.8125rem; font-weight: 600;
    color: var(--accent-100);
    transition: opacity 500ms var(--x-ease), transform 500ms var(--x-ease);
}
.area__more i { font-size: 0.75rem; transition: transform 300ms var(--x-ease); }
.areas.has-active .area:not(.is-active) .area__summary { opacity: 0; transform: translateY(12px); }

.area__tab {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 300ms var(--x-ease), transform var(--x-dur) var(--x-ease);
}
.area__label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}
.areas.has-active .area:not(.is-active) .area__tab {
    opacity: 1;
    transform: translate(-50%, 0);
    transition-delay: 200ms;
}

/* Micro-interacciones con cursor (no se aplican en pantallas táctiles) */
@media (hover: hover) and (pointer: fine) {
    .area:hover .area__img { transform: scale(1.05); }
    .area__trigger:hover .area__icon { background: var(--accent-600); border-color: var(--accent-500); }
    .area__more { opacity: 0; transform: translateY(8px); }
    .area:hover .area__more,
    .area__trigger:focus-visible .area__more { opacity: 1; transform: translateY(0); }
    .area__trigger:hover .area__more i { transform: translateX(4px); }
}

/* Contenido expandido */
.area__body {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 250ms var(--x-ease), visibility 0s linear 250ms;
}
.area.is-active .area__body {
    opacity: 1;
    visibility: visible;
    transition: opacity 400ms var(--x-ease) 150ms, visibility 0s;
}
.area__content { width: min(560px, 100%); }

@keyframes area-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes area-pop {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}
/* "backwards": la animación solo rige al entrar, así los :hover posteriores funcionan */
.area.is-active .area__content > :not(.area__actions) { animation: area-fade-up 700ms var(--x-ease) backwards; }
.area.is-active .area__content > :nth-child(1) { animation-delay: 250ms; }
.area.is-active .area__content > :nth-child(2) { animation-delay: 310ms; }
.area.is-active .area__content > :nth-child(3) { animation-delay: 370ms; }
.area.is-active .area__content > :nth-child(4) { animation-delay: 430ms; }
.area.is-active .area__actions .btn { animation: area-fade-up 600ms var(--x-ease) backwards; }   /* translate-y-2 → 0 */
.area.is-active .area__actions .btn:nth-child(1) { animation-delay: 520ms; }
.area.is-active .area__actions .btn:nth-child(2) { animation-delay: 600ms; }
.area.is-active .area__close { animation: area-pop 500ms var(--x-ease) 350ms backwards; }

.area__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid; place-items: center;
    width: 40px; height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    transition: background-color 300ms var(--x-ease), transform 300ms var(--x-ease);
}
.area__close:hover { background: rgba(255, 255, 255, 0.2); transform: rotate(90deg); }
.area__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.area__badge {
    display: inline-flex; align-items: center; gap: 8px;
    height: 28px; padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.75rem; font-weight: 500;
}
.area__title {
    margin-top: 14px;
    font-size: 2rem;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.area__desc {
    margin-top: 10px;
    max-width: 48ch;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--slate-200);
}
.area__meta {
    display: flex; flex-wrap: wrap; gap: 8px 18px;
    margin-top: 16px;
    font-size: 0.8125rem;
    color: var(--slate-300);
}
.area__meta li { display: inline-flex; align-items: center; gap: 8px; }
.area__meta i { color: var(--accent-100); }
.area__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.area__actions .btn { transition: transform 300ms var(--x-ease), background-color var(--dur) var(--ease), box-shadow 300ms var(--x-ease); }
.area__actions .btn:hover { transform: translateY(-2px); }
.area__actions .btn--primary:hover { box-shadow: 0 10px 20px -6px rgba(37, 99, 235, 0.6); }
.area__actions .btn:active { transform: translateY(0) scale(0.98); }

.btn--glass {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.btn--glass:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* Móvil: pila vertical, se anima la altura */
@media (max-width: 767px) {
    .areas { flex-direction: column; height: auto; }
    .area { flex: none; height: 148px; }
    .area.is-active { height: 520px; }
    .areas.has-active .area:not(.is-active) { height: 64px; transform: scale(0.97); }

    .area__trigger { padding: 18px; }
    .area__index { position: absolute; top: 16px; right: 18px; }
    .area__summary {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 14px;
        row-gap: 2px;
        align-items: center;
        width: 100%;
        margin-top: auto;
    }
    .area__summary .area__icon { grid-row: span 2; margin: 0; }
    .area__summary-title { font-size: 1.125rem; }
    .area__more { display: none; }

    .area__tab {
        inset: 0;
        left: 0;
        bottom: 0;
        flex-direction: row;
        gap: 12px;
        padding: 0 18px;
        transform: translateY(8px);
    }
    .areas.has-active .area:not(.is-active) .area__tab { transform: none; }
    .area__tab .area__icon { width: 34px; height: 34px; }
    .area__label { writing-mode: horizontal-tb; transform: none; }

    .area__body { padding: 22px; }
    .area__close { top: 12px; right: 12px; }
    .area__title { font-size: 1.5rem; }
    .area__desc { font-size: 0.875rem; }
}

/* --------------------------------------------------------------------------
   Accesibilidad: movimiento reducido
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
