/* Alinea Signature — páginas legales públicas */

@font-face {
    font-family: "Vanguard CF";
    src: url("/fonts/Vanguard-CF/Demo_Fonts/Fontspring-DEMO-vanguardcf-medium.otf") format("opentype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vanguard CF";
    src: url("/fonts/Vanguard-CF/Demo_Fonts/Fontspring-DEMO-vanguardcf-bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #02261e;
    --ink-rgb: 2, 38, 30;
    --muted: #3d5c54;
    --lime: #dafc92;
    --teal: #89c9c9;
    --on-accent: #02261e;
    --bg: #F2F7F9;
    --panel: rgba(255, 255, 255, 0.78);
    --panel-border: rgba(2, 38, 30, 0.08);
    --field: rgba(255, 255, 255, 0.88);
    --tile: rgba(2, 38, 30, 0.045);
    --tile-hover: rgba(2, 38, 30, 0.06);
    --menu: #ffffff;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "Vanguard CF", "Avenir Next Condensed", "Franklin Gothic Medium", "Arial Narrow", sans-serif;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e8f4f0;
    --ink-rgb: 232, 244, 240;
    --muted: #9bb5ae;
    --bg: #0b1412;
    --panel: rgba(12, 22, 20, 0.72);
    --panel-border: rgba(232, 244, 240, 0.12);
    --field: rgba(8, 16, 14, 0.72);
    --tile: rgba(232, 244, 240, 0.06);
    --tile-hover: rgba(232, 244, 240, 0.08);
    --menu: #121c1a;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

body {
    min-height: 100svh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

button,
a,
input {
    font-family: inherit;
}

button {
    appearance: none;
    border: 0;
    background: none;
    cursor: pointer;
    color: inherit;
}

.sky {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(90% 70% at 18% 88%, rgba(137, 201, 201, 0.16) 0%, transparent 58%),
        linear-gradient(120deg, color-mix(in srgb, var(--teal) 12%, var(--bg)) 0%, var(--bg) 62%);
}

.shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(32px + env(safe-area-inset-bottom, 0px));
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100%, 1080px);
    margin: 0 auto 18px;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    text-decoration: none;
    flex-shrink: 0;
}

.brand img {
    width: 34px;
    height: 27px;
    object-fit: contain;
}

.brand .theme-logo-dark {
    display: none;
}

html[data-theme="dark"] .brand .theme-logo-light {
    display: none;
}

html[data-theme="dark"] .brand .theme-logo-dark {
    display: block;
}

.brand-word {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-size: 15px;
    letter-spacing: -0.035em;
    line-height: 1;
}

.brand-word strong {
    font-weight: 700;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.lang-switch {
    position: relative;
}

.lang-toggle,
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 180ms ease, background-color 180ms ease;
}

.theme-toggle {
    width: 36px;
    padding: 0;
    justify-content: center;
}

.lang-toggle:hover,
.lang-switch.is-open .lang-toggle,
.theme-toggle:hover {
    color: var(--ink);
    background: var(--tile-hover);
}

.lang-toggle svg,
.theme-toggle svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.lang-toggle span {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.theme-toggle svg {
    display: none;
}

html[data-theme="light"] .theme-icon-moon,
html[data-theme="dark"] .theme-icon-sun {
    display: block;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    display: none;
    min-width: 128px;
    padding: 4px;
    border-radius: 12px;
    background: var(--menu);
    border: 1px solid var(--panel-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.lang-switch.is-open .lang-menu {
    display: block;
}

.lang-menu button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    text-align: left;
}

.lang-menu button:hover,
.lang-menu button.is-active {
    color: var(--ink);
    background: var(--tile-hover);
}

.lang-menu button.is-active::after {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--ink);
}

.stage {
    width: min(100%, 1080px);
    margin: 0 auto;
    display: grid;
    gap: 22px;
    flex: 1;
}

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legal-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--panel-border);
    background: var(--panel);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.legal-nav a:hover {
    color: var(--ink);
}

.legal-nav a.is-active {
    color: var(--on-accent);
    background: var(--lime);
    border-color: transparent;
}

html[data-theme="dark"] .legal-nav a.is-active {
    color: #02261e;
}

.card {
    padding: 28px 22px 32px;
    border-radius: 28px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(28px) saturate(1.25);
    -webkit-backdrop-filter: blur(28px) saturate(1.25);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 24px 80px rgba(0, 0, 0, 0.12);
}

.kicker {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.card h1 {
    margin: 0 0 18px;
    font-family: var(--font-display);
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.updated {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

article {
    margin-top: 28px;
}

[data-lang-block] {
    display: none;
}

html[lang="en"] [data-lang-block="en"],
html[lang="es"] [data-lang-block="es"] {
    display: block;
}

article h2 {
    margin: 32px 0 10px;
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.03em;
}

article h2:first-child {
    margin-top: 0;
}

article h3 {
    margin: 22px 0 8px;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

article p,
article li {
    font-size: 15px;
    line-height: 1.65;
    color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

article p {
    margin: 0 0 12px;
}

article ul,
article ol {
    margin: 0 0 14px;
    padding-left: 1.2em;
}

article li + li {
    margin-top: 6px;
}

article a {
    color: var(--ink);
    font-weight: 600;
    text-underline-offset: 3px;
}

article strong {
    font-weight: 650;
}

.note {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--tile);
    border: 1px solid var(--panel-border);
}

.note p {
    margin: 0;
}

.legal-table-wrap {
    overflow-x: auto;
    margin: 0 0 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 560px;
}

th,
td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--panel-border);
}

th {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 650;
}

.legal-foot {
    width: min(100%, 1080px);
    margin: 22px auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 18px;
    font-size: 13px;
    color: var(--muted);
}

.legal-foot a {
    color: inherit;
    text-decoration: none;
}

.legal-foot a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (min-width: 800px) {
    .shell {
        padding-left: 32px;
        padding-right: 32px;
    }

    .card {
        padding: 40px 48px 48px;
    }
}
