@font-face {
    font-family: "Eras EA";
    src: url("/css/fonts/eras-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Rounded EA";
    src: url("/css/fonts/arial-rounded-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --acero-950: #06131f;
    --acero-900: #0a1d30;
    --acero-800: #0e2a45;
    --acero-700: #14395d;
    --acero-600: #1c4f7f;
    --acero-500: #2d6aa3;
    --cielo: #5cb7ee;
    --cielo-claro: #bfe4fa;
    --oro: #f5b82e;
    --oro-claro: #ffd877;
    --oro-hondo: #c98a0a;
    --oro-borde: #7b520a;
    --papel: #f1e8cf;
    --papel-2: #e6d9b6;
    --papel-borde: #b58a43;
    --carta: #fbf5e3;
    --tinta: #14283d;
    --tinta-suave: #4b5f74;
    --texto: #e8f1f9;
    --apagado: #9db8cf;
    --linea: rgba(140, 190, 230, 0.24);
    --ok: #7bd05a;
    --error: #ff8a7c;
    --error-fondo: rgba(160, 36, 24, 0.22);
    --f-display: "Eras EA", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
    --f-num: "Rounded EA", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
    --f-body: "Avenir Next", "Segoe UI", "Helvetica Neue", "Noto Sans", Arial, sans-serif;
    --hdr-h: 64px;
    --radio: 12px;
}

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

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

html.is-locked { overflow: hidden; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--acero-900);
    color: var(--texto);
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

main { flex: 1 0 auto; display: block; min-width: 0; }
main:focus { outline: none; }

img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { flex: none; display: inline-block; vertical-align: middle; }

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip {
    position: fixed;
    left: 12px;
    top: -80px;
    z-index: 300;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--oro);
    color: #2a1a00;
    font-weight: 800;
    text-decoration: none;
}

.skip:focus { top: 12px; }

:focus-visible {
    outline: 3px solid var(--cielo-claro);
    outline-offset: 2px;
}

.wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.h2 {
    margin: 0 0 12px;
    font-family: var(--f-display);
    font-weight: 700;
    font-size: clamp(1.65rem, 1.1rem + 2.2vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-wrap: balance;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 2px solid transparent;
    border-radius: 10px;
    font: 800 0.95rem/1 var(--f-body);
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.08s ease, filter 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.65; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(2px); }

.btn--gold {
    background: linear-gradient(180deg, var(--oro-claro), var(--oro) 55%, var(--oro-hondo));
    border-color: var(--oro-borde);
    color: #3a2300;
    box-shadow: 0 3px 0 var(--oro-borde), 0 8px 18px rgba(0, 0, 0, 0.28);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--gold:hover:not(:disabled) { filter: brightness(1.07); }
.btn--gold:active:not(:disabled) { box-shadow: 0 1px 0 var(--oro-borde), 0 4px 10px rgba(0, 0, 0, 0.28); }
.btn--gold:focus-visible { outline-color: #fff; }

.btn--ghost {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(191, 228, 250, 0.45);
    color: var(--texto);
}

.btn--ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); border-color: rgba(191, 228, 250, 0.75); }

.btn--sm { min-height: 38px; padding: 0 14px; font-size: 0.875rem; border-radius: 9px; }
.btn--lg { min-height: 50px; padding: 0 26px; font-size: 1rem; }
.btn--xl { min-height: 56px; padding: 0 30px; font-size: 1.05rem; border-radius: 12px; }
.btn--block { display: flex; width: 100%; }

.iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(191, 228, 250, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--texto);
    list-style: none;
    transition: background-color 0.15s ease;
}

.iconbtn::-webkit-details-marker { display: none; }
.iconbtn:hover { background: rgba(255, 255, 255, 0.16); }

.hdr {
    position: sticky;
    top: 0;
    z-index: 60;
    flex: none;
    height: var(--hdr-h);
    background: linear-gradient(180deg, #1a4168 0%, #0f2b48 100%);
    border-bottom: 3px solid var(--oro-hondo);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 20px rgba(2, 8, 16, 0.45);
}

.hdr__in {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
    text-decoration: none;
    color: #fff;
}

.brand__crest { width: 38px; height: 38px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55)); }

.brand__name {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-family: var(--f-display);
    font-size: 1.15rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.brand__name i { font-style: normal; color: var(--oro); }

.brand__beta {
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--oro);
    color: #3a2300;
    font: 800 0.62rem/1.3 var(--f-body);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hdr__nav { display: flex; align-items: center; gap: 2px; margin: 0 auto 0 12px; }

.hdr__nav a {
    position: relative;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--cielo-claro);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hdr__nav a:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }

.hdr__nav a[aria-current="page"] { color: #fff; }

.hdr__nav a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 3px;
    border-radius: 2px;
    background: var(--oro);
}

.hdr__end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.hdr__nav + .hdr__end { margin-left: 0; }

.lang {
    display: inline-flex;
    padding: 3px;
    border: 1px solid rgba(191, 228, 250, 0.3);
    border-radius: 10px;
    background: rgba(5, 16, 28, 0.4);
}

.lang a {
    min-width: 34px;
    padding: 5px 8px;
    border-radius: 7px;
    color: var(--cielo-claro);
    font: 800 0.78rem/1.2 var(--f-body);
    letter-spacing: 0.06em;
    text-align: center;
    text-decoration: none;
}

.lang a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.lang a[aria-current="true"] { background: var(--oro); color: #3a2300; }

.hdr__menu { display: none; position: relative; }

.hdr__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: min(300px, calc(100vw - 24px));
    padding: 10px;
    border: 2px solid var(--oro-hondo);
    border-radius: 14px;
    background: var(--acero-800);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
}

.hdr__panel > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 9px;
    color: var(--texto);
    font-weight: 700;
    text-decoration: none;
}

.hdr__panel > a:hover { background: rgba(255, 255, 255, 0.09); }
.hdr__panel > a[aria-current="page"] { background: rgba(245, 184, 46, 0.16); color: var(--oro-claro); }
.hdr__panel-cta { display: grid; gap: 8px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--linea); }

.badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #d63a2f;
    color: #fff;
    font: 800 0.7rem/1 var(--f-body);
}

.foot {
    flex: none;
    background: var(--acero-950);
    border-top: 3px solid var(--oro-hondo);
    color: var(--apagado);
    font-size: 0.9rem;
}

.foot__in {
    display: grid;
    gap: 14px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 24px 44px;
}

.foot__id { display: flex; align-items: center; gap: 12px; color: #fff; font-family: var(--f-display); text-transform: uppercase; letter-spacing: 0.04em; }
.foot__note { margin: 0; max-width: 70ch; }

.foot__beta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--oro-claro); }

.foot__beta b {
    padding: 1px 8px;
    border-radius: 6px;
    background: var(--oro);
    color: #3a2300;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.foot__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 14px; border-top: 1px solid var(--linea); }
.foot__links a { color: var(--cielo-claro); font-weight: 700; text-decoration: none; }
.foot__links a:hover { color: #fff; text-decoration: underline; }
.foot__langs { display: inline-flex; gap: 14px; margin-left: auto; }
.foot__langs a[aria-current="true"] { color: var(--oro-claro); }
.foot__legal { margin: 0; font-size: 0.8rem; color: #6f8aa3; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 5px 12px 5px 5px;
    border: 1px solid rgba(245, 184, 46, 0.5);
    border-radius: 999px;
    background: rgba(245, 184, 46, 0.12);
    color: var(--oro-claro);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
}

.tag b {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--oro);
    color: #3a2300;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.form { display: grid; gap: 0; }
.field { margin: 0 0 14px; }

.field label {
    display: block;
    margin: 0 0 6px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--texto);
}

.input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 2px solid rgba(140, 190, 230, 0.35);
    border-radius: 10px;
    background: #071624;
    color: #fff;
    font: 500 1rem/1.2 var(--f-body);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder { color: #5f7c96; }
.input:hover { border-color: rgba(140, 190, 230, 0.6); }
.input:focus { outline: none; border-color: var(--oro); box-shadow: 0 0 0 4px rgba(245, 184, 46, 0.22); }
.input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 4px rgba(255, 138, 124, 0.16); }
.input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: inset 0 0 0 1000px #0c2338; }

.hint { margin: 6px 0 0; font-size: 0.82rem; color: var(--apagado); }

.err {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 6px 0 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--error);
}

.err::before {
    content: "!";
    flex: none;
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--error);
    color: #3a0903;
    font-size: 0.7rem;
    line-height: 1;
}

.alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 138, 124, 0.55);
    border-radius: 10px;
    background: var(--error-fondo);
    color: #ffd2cb;
    font-size: 0.92rem;
    font-weight: 600;
}

.alert:focus { outline: 3px solid var(--cielo-claro); outline-offset: 2px; }
.alert--ok { border-color: rgba(123, 208, 90, 0.55); background: rgba(70, 140, 50, 0.22); color: #d7f5c8; }

.pw { position: relative; }
.pw .input { padding-right: 88px; }

.pw__toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--cielo-claro);
    font: 700 0.8rem/1 var(--f-body);
}

.pw__toggle:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

.meter { display: flex; gap: 5px; margin-top: 8px; }
.meter span { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); transition: background-color 0.2s ease; }
.meter[data-score="1"] span:nth-child(-n+1) { background: #e0564a; }
.meter[data-score="2"] span:nth-child(-n+2) { background: #f0a91a; }
.meter[data-score="3"] span:nth-child(-n+3) { background: #b4d63e; }
.meter[data-score="4"] span:nth-child(-n+4) { background: var(--ok); }

.spin {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(58, 35, 0, 0.3);
    border-top-color: #3a2300;
    border-radius: 50%;
    animation: ea-spin 0.7s linear infinite;
}

@keyframes ea-spin { to { transform: rotate(360deg); } }

.au-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 16px;
    border: 0;
    background: transparent;
    color: var(--texto);
    overflow-y: auto;
}

.au-dialog[open] { display: flex; }
.au-dialog::backdrop { background: rgba(3, 10, 18, 0.82); backdrop-filter: blur(3px); }

.au__wrap {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    width: 100%;
    max-width: 900px;
    margin: auto;
    overflow: hidden;
    border: 3px solid var(--oro-hondo);
    border-radius: 18px;
    background: var(--acero-800);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.au__close { position: absolute; top: 12px; right: 12px; z-index: 3; }

.au__art { position: relative; min-height: 100%; background: #1a0d08; }
.au__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }

.au__art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(4, 12, 22, 0.94) 100%);
}

.au__art-cap { position: absolute; left: 18px; right: 18px; bottom: 18px; z-index: 1; display: grid; gap: 4px; }
.au__art-cap strong { font-family: var(--f-display); font-size: 1.2rem; color: var(--oro-claro); line-height: 1.15; }
.au__art-cap span { font-size: 0.85rem; color: var(--texto); }

.au__card { padding: 28px 36px 24px; min-width: 0; }

.au__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 36px 18px 0;
    padding: 4px;
    border-radius: 12px;
    background: rgba(4, 12, 22, 0.55);
}

.au__tabs a {
    padding: 11px 10px;
    border-radius: 9px;
    color: var(--cielo-claro);
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.au__tabs a:hover { background: rgba(255, 255, 255, 0.08); }

.au__tabs a[aria-selected="true"] {
    background: linear-gradient(180deg, var(--oro-claro), var(--oro) 60%, var(--oro-hondo));
    color: #3a2300;
    box-shadow: 0 2px 0 var(--oro-borde);
}

.au__h { margin: 0 0 14px; font-family: var(--f-display); font-size: 1.5rem; line-height: 1.15; color: #fff; }
.au__note { margin: 12px 0 0; font-size: 0.85rem; color: var(--apagado); text-align: center; }
.au__switch { margin: 18px 0 0; font-size: 0.92rem; color: var(--apagado); text-align: center; }
.au__switch a { color: var(--oro-claro); font-weight: 800; }

.au-inline { display: block; }
.au-inline .au__h { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.au-inline .au__wrap { margin: 0 auto; }

.toasts {
    position: fixed;
    top: calc(var(--hdr-h) + 14px);
    right: 14px;
    z-index: 250;
    display: grid;
    gap: 8px;
    width: min(380px, calc(100vw - 28px));
    pointer-events: none;
}

.toast {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 2px solid var(--oro-hondo);
    border-radius: 12px;
    background: var(--acero-800);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    pointer-events: auto;
    animation: ea-toast 0.25s ease both;
}

.toast--error { border-color: #d65a4b; }
.toast--ok { border-color: #5aa83d; }

@keyframes ea-toast {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
    .hdr__nav { display: none; }
    .hdr__menu { display: block; }
    .hdr__end { margin-left: auto; }
}

@media (max-width: 760px) {
    .au-dialog { padding: 10px; }
    .au__wrap { grid-template-columns: minmax(0, 1fr); }
    .au__art { display: none; }
    .au__card { padding: 24px 20px 22px; }
    .au__tabs { margin-right: 44px; }
    .hdr__signup { display: none; }
}

@media (max-width: 480px) {
    :root { --hdr-h: 58px; }
    .hdr__in { gap: 10px; padding: 0 12px; }
    .brand__name, .brand__beta { display: none; }
    .wrap { padding: 0 18px; }
    .au__tabs { margin-right: 0; }
    .au__close { top: 8px; right: 8px; }
    .au__card { padding-top: 54px; }
    .foot__langs { margin-left: 0; }
    .toasts { right: 10px; left: 10px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
    .spin { animation: none; border-top-color: rgba(58, 35, 0, 0.3); }
}
