:root {
    --navy-950: #020a11;
    --navy-900: #061b2c;
    --navy-800: #0b2f4c;
    --navy-700: #0f3a5c;
    --peach: #dcab7c;
    --peach-deep: #c98f69;
    --cream: #fffaf6;
    --ink: #0b2f4c;
    --muted: #6f5f53;
    --soft: #8a7a6d;
    --line: #e8ddd2;
    --error: #a83a2b;
    --sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --text-serif: 'Lora', Georgia, 'Times New Roman', serif;
    --pad-x: clamp(24px, 4.2vw, 64px);
    --portal-header-height: 68px;
}

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

[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--peach);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

img,
svg {
    display: block;
}

a {
    color: inherit;
}

::selection {
    background: var(--navy-800);
    color: var(--cream);
}

.re-page {
    min-height: 100vh;
    min-height: 100svh;
    padding-top: var(--portal-header-height);
    display: flex;
    flex-direction: column;
    background: var(--peach);
}

.re-main {
    flex: 1 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    min-height: 720px;
}

/* ------------------------------------------------------------------
   Columna editorial
------------------------------------------------------------------ */
.re-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(28px, 3vw, 44px) var(--pad-x) 0;
    background:
        radial-gradient(70% 55% at 8% 0%, rgba(217, 161, 124, 0.1), transparent 62%),
        linear-gradient(108deg, var(--navy-950) 0%, var(--navy-900) 42%, var(--navy-800) 100%);
}

.re-copy {
    margin-top: 0;
    animation: re-rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.re-title {
    margin: 0;
    color: #fff;
    font-family: var(--serif);
    font-size: clamp(52px, 6.1vw, 94px);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.018em;
    text-wrap: balance;
}

.re-title > span {
    display: block;
    white-space: nowrap;
}

.re-title__year {
    display: inline;
    white-space: nowrap;
}

.re-badge {
    display: inline-block;
    margin: clamp(16px, 2.4vh, 28px) 0 0;
    padding: 12px 18px 11px;
    background: var(--peach);
    color: #fff;
    font-size: clamp(9px, 0.7vw, 11px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.34em;
    text-transform: uppercase;
}

.re-lead {
    margin: clamp(14px, 2.2vh, 24px) 0 0;
    max-width: 15.5em;
    color: var(--peach);
    font-family: var(--text-serif);
    font-size: clamp(18px, 1.8vw, 27px);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.005em;
}

.re-visual {
    position: relative;
    flex: 1 1 auto;
    min-height: 240px;
    margin: clamp(20px, 3.2vh, 36px) calc(var(--pad-x) * -1) 0;
    overflow: hidden;
    isolation: isolate;
    background: var(--navy-800);
}

.re-visual__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 36%;
}

.re-visual__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(3, 14, 24, 0.5) 0%,
        rgba(3, 14, 24, 0.08) 24%,
        rgba(3, 14, 24, 0) 48%,
        rgba(5, 24, 40, 0.58) 78%,
        rgba(7, 30, 50, 0.98) 100%
    );
}

.re-date {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    display: grid;
    grid-template-columns: auto auto auto;
    justify-content: start;
    align-items: center;
    column-gap: clamp(16px, 1.8vw, 28px);
    min-width: min(78%, 570px);
    padding: clamp(13px, 2vh, 22px) clamp(58px, 6vw, 90px) clamp(13px, 2vh, 22px) var(--pad-x);
    background: var(--navy-800);
    clip-path: polygon(0 0, 100% 0, calc(100% - clamp(46px, 5vw, 76px)) 100%, 0 100%);
}

.re-date__weekday {
    color: #fff;
    font-size: clamp(10px, 0.85vw, 12px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    white-space: nowrap;
}

.re-date__day {
    color: #fff;
    font-family: var(--text-serif);
    font-size: clamp(54px, 4.8vw, 72px);
    font-weight: 400;
    line-height: 1;
    position: relative;
    top: -3px;
    font-variant-numeric: lining-nums;
    font-feature-settings: "lnum" 1;
}

.re-date__month {
    color: #fff;
    font-size: clamp(10.5px, 0.9vw, 13px);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.re-meta {
    position: absolute;
    z-index: 2;
    right: var(--pad-x);
    bottom: clamp(20px, 3.4vh, 36px);
    left: var(--pad-x);
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 28px);
    color: #fff;
}

.re-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(12px, 0.95vw, 14px);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.re-meta__icon {
    width: clamp(22px, 2vw, 28px);
    height: clamp(22px, 2vw, 28px);
    flex: none;
}

.re-meta__time {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.15;
}

.re-meta__divider {
    width: 1px;
    height: 38px;
    flex: none;
    background: rgba(255, 255, 255, 0.38);
}

/* ------------------------------------------------------------------
   Formulario
------------------------------------------------------------------ */
.re-form-panel {
    scroll-margin-top: calc(var(--portal-header-height) + 12px);
    display: flex;
    align-items: stretch;
    padding: clamp(24px, 3vw, 42px) clamp(20px, 3vw, 44px);
    background:
        radial-gradient(85% 60% at 75% 12%, rgba(255, 255, 255, 0.1), transparent 65%),
        var(--peach);
}

.re-card {
    flex: 1 1 auto;
    width: 100%;
    max-width: 620px;
    max-height: 900px;
    margin: 0 auto;
    padding: clamp(30px, 3.2vw, 54px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--cream);
    border-radius: clamp(26px, 2.2vw, 38px);
    box-shadow:
        0 42px 90px rgba(66, 33, 12, 0.18),
        0 1px 0 rgba(255, 255, 255, 0.7) inset;
    animation: re-rise 0.7s 0.08s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.re-eyebrow {
    margin: 0 0 12px;
    color: #b07755;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.re-card__title {
    margin: 0 0 14px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(38px, 3.2vw, 52px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.012em;
}

.re-card__text {
    margin: 0 0 clamp(24px, 3vh, 32px);
    max-width: 38ch;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.6;
}

.re-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.re-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.re-label {
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.re-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.re-input::placeholder {
    color: #b1a396;
}

.re-input:hover {
    border-color: #d8c9ba;
}

.re-input:focus {
    outline: none;
    border-color: var(--navy-800);
    box-shadow: 0 0 0 3px rgba(11, 47, 76, 0.12);
}

.re-field.is-invalid .re-input {
    border-color: var(--error);
    background: #fff8f5;
}

.re-field.is-invalid .re-input:focus {
    box-shadow: 0 0 0 3px rgba(168, 58, 43, 0.12);
}

.re-error {
    display: none;
    margin: 0;
    color: var(--error);
    font-size: 12px;
    line-height: 1.4;
}

.re-field.is-invalid .re-error {
    display: block;
}

.re-honeypot {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.re-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    margin-top: 9px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--navy-800);
    color: #fff;
    font-family: var(--sans);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.re-submit:hover {
    background: var(--navy-700);
    box-shadow: 0 10px 24px rgba(11, 47, 76, 0.2);
}

.re-submit:active {
    transform: translateY(1px);
}

.re-submit:focus-visible {
    outline: 2px solid var(--navy-800);
    outline-offset: 3px;
}

.re-submit[disabled] {
    cursor: wait;
    opacity: 0.8;
    box-shadow: none;
}

.re-submit__arrow {
    width: 19px;
    height: 19px;
    transition: transform 0.2s ease;
}

.re-submit:hover .re-submit__arrow {
    transform: translateX(3px);
}

.re-submit__spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: re-spin 0.7s linear infinite;
}

.re-submit.is-loading .re-submit__spinner {
    display: block;
}

.re-submit.is-loading .re-submit__arrow {
    display: none;
}

.re-form__status {
    margin: 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fbe9e5;
    color: #8f2f20;
    font-size: 13px;
    line-height: 1.45;
}

.re-form__note {
    margin: 5px 0 0;
    color: var(--soft);
    font-size: 11.5px;
    line-height: 1.55;
    text-align: center;
}

.re-form__note a {
    color: var(--muted);
    text-underline-offset: 2px;
}

.re-form__note a:hover {
    color: var(--ink);
}

/* ------------------------------------------------------------------
   Confirmación
------------------------------------------------------------------ */
.re-success {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    animation: re-rise 0.45s ease both;
}

.re-success[hidden] {
    display: none !important;
}

.re-success__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 22px;
    border-radius: 50%;
    background: rgba(217, 161, 124, 0.24);
    color: var(--navy-800);
}

.re-success__icon svg {
    width: 27px;
    height: 27px;
}

.re-success .re-card__text {
    margin-bottom: 26px;
}

.re-success__reset {
    padding: 0 0 3px;
    border: 0;
    border-bottom: 1px solid rgba(11, 47, 76, 0.35);
    background: none;
    color: var(--navy-800);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.re-success__reset:hover {
    border-bottom-color: var(--navy-800);
}

/* ------------------------------------------------------------------
   Franja inferior
------------------------------------------------------------------ */
.re-footer {
    flex: none;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: clamp(7px, 1vw, 14px);
    min-height: clamp(64px, 8.2vh, 82px);
    padding: 13px 24px max(15px, env(safe-area-inset-bottom));
    background: var(--peach);
    color: var(--navy-800);
    font-size: clamp(9px, 0.75vw, 11px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.re-footer strong {
    font-family: var(--serif);
    font-size: clamp(32px, 3vw, 44px);
    font-weight: 400;
    line-height: 0.8;
    letter-spacing: 0;
}

.re-footer span:last-child {
    white-space: nowrap;
}

/* ------------------------------------------------------------------
   Ajustes
------------------------------------------------------------------ */
@keyframes re-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 1080px) {
    .re-main {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.94fr);
    }

    .re-title {
        font-size: clamp(50px, 6.6vw, 78px);
    }

    .re-lead {
        font-size: clamp(17px, 1.8vw, 21px);
    }

    .re-card {
        padding: 34px;
    }
}

@media (max-width: 900px) {
    .re-main {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .re-hero {
        padding-bottom: 0;
    }

    .re-copy {
        margin-top: 30px;
    }

    .re-title {
        font-size: clamp(52px, 10.5vw, 86px);
    }

    .re-lead {
        max-width: 18em;
        font-size: clamp(18px, 2.4vw, 23px);
    }

    .re-visual {
        min-height: clamp(270px, 46vw, 350px);
        margin-top: 30px;
    }

    .re-form-panel {
        padding: 24px 20px 28px;
    }

    .re-card {
        width: 100%;
        max-width: 640px;
        max-height: none;
        min-height: 0;
        padding: 32px 28px;
        border-radius: 26px;
    }

    .re-footer {
        min-height: 70px;
    }
}

@media (max-width: 600px) {
    :root {
        --pad-x: 22px;
    }

    .re-title {
        font-size: clamp(45px, 13.4vw, 64px);
        line-height: 1;
    }

    .re-badge {
        margin-top: 18px;
        padding: 10px 14px;
        font-size: 8.5px;
        letter-spacing: 0.25em;
    }

    .re-lead {
        margin-top: 16px;
        font-size: 16px;
        line-height: 1.45;
    }

    .re-visual {
        min-height: 318px;
        margin-top: 24px;
    }

    .re-date {
        min-width: 91%;
        column-gap: 10px;
        padding-top: 14px;
        padding-bottom: 14px;
        padding-right: 52px;
        clip-path: polygon(0 0, 100% 0, calc(100% - 38px) 100%, 0 100%);
    }

    .re-date__weekday {
        font-size: 8.5px;
        letter-spacing: 0.16em;
    }

    .re-date__day {
        font-size: 46px;
        top: -2px;
    }

    .re-date__month {
        font-size: 9px;
        letter-spacing: 0.15em;
    }

    .re-meta {
        right: 18px;
        bottom: 17px;
        left: 18px;
        gap: 12px;
    }

    .re-meta__item {
        gap: 8px;
        font-size: 10.5px;
        letter-spacing: 0.04em;
    }

    .re-meta__icon {
        width: 20px;
        height: 20px;
    }

    .re-meta__divider {
        height: 28px;
    }

    .re-form-panel {
        padding: 16px 14px 20px;
    }

    .re-card {
        padding: 28px 20px;
        border-radius: 22px;
    }

    .re-card__title {
        font-size: 36px;
    }

    .re-card__text {
        font-size: 13.5px;
        margin-bottom: 22px;
    }

    .re-form {
        gap: 13px;
    }

    .re-input {
        height: 49px;
        font-size: 16px;
    }

    .re-submit {
        min-height: 51px;
        font-size: 13.5px;
    }

    .re-footer {
        min-height: 64px;
        flex-wrap: wrap;
        gap: 6px;
        padding: 12px 14px max(12px, env(safe-area-inset-bottom));
        font-size: 9px;
        letter-spacing: 0.14em;
        text-align: center;
    }

    .re-footer strong {
        font-size: 30px;
    }
}

@media (max-width: 370px) {
    .re-footer {
        letter-spacing: 0.1em;
    }

    .re-meta__item {
        font-size: 9.5px;
    }
}

@media (min-width: 901px) and (max-height: 820px) {
    .re-main {
        min-height: 640px;
    }

    .re-title {
        font-size: clamp(46px, 5.2vw, 68px);
    }

    .re-copy {
        margin-top: 24px;
    }

    .re-badge {
        margin-top: 18px;
        padding: 9px 14px;
    }

    .re-lead {
        margin-top: 14px;
        font-size: clamp(16px, 1.4vw, 19px);
    }

    .re-visual {
        min-height: 190px;
        margin-top: 22px;
    }

    .re-form-panel {
        padding: 18px 24px;
    }

    .re-card {
        padding: 28px 34px;
    }

    .re-card__title {
        font-size: 38px;
    }

    .re-card__text {
        margin-bottom: 18px;
    }

    .re-form {
        gap: 10px;
    }

    .re-input {
        height: 46px;
    }

    .re-submit {
        min-height: 48px;
    }

    .re-form__note {
        margin-top: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}
