﻿:root {
    --navy: #0d1b2e;
    --navy-mid: #1a2e47;
    --navy-light: #243c5c;
    --gold: #c9a84c;
    --gold-light: #e2c97e;
    --gold-dim: rgba(201,168,76,0.15);
    --cream: #f4f0e8;
    --cream-dark: #e8e2d6;
    --white: #ffffff;
    --text: #2c2c2c;
    --muted: #6b6b6b;
    --border: #d4cfc5;
    --error: #c0392b;
    --error-bg: #fdf0ee;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Lato', sans-serif;
    background: var(--navy);
    color: var(--white);
    overflow-x: hidden;
}

    /* ── WATERMARK BG ── */
    body::before {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 0;
        background-image: repeating-linear-gradient( -30deg, transparent, transparent 60px, rgba(201,168,76,0.025) 60px, rgba(201,168,76,0.025) 61px );
        pointer-events: none;
    }

    /* ── RADIAL GLOW ── */
    body::after {
        content: '';
        position: fixed;
        top: -20%;
        left: 50%;
        transform: translateX(-50%);
        width: 900px;
        height: 600px;
        background: radial-gradient(ellipse, rgba(201,168,76,0.07) 0%, transparent 65%);
        pointer-events: none;
        z-index: 0;
    }

/* ── LAYOUT ── */
.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── HEADER ── */
header {
    text-align: center;
    padding: 48px 24px 36px;
    border-bottom: 1px solid rgba(201,168,76,0.2);
    animation: fadeDown 0.7s ease both;
}

.eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}

header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
}

.gold-rule {
    width: 40px;
    height: 2px;
    background: var(--gold);
    margin: 16px auto 0;
}

/* ── MAIN ── */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px 60px;
}

.welcome-wrap {
    width: 100%;
    max-width: 500px;
    animation: fadeUp 0.8s 0.15s ease both;
}

/* ── CARD ── */
.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(201,168,76,0.2), 0 32px 80px rgba(0,0,0,0.45);
}

/* ── CARD TOP BAND ── */
.card-band {
    background: var(--navy-mid);
    padding: 28px 32px 24px;
    border-bottom: 1px solid rgba(201,168,76,0.2);
    text-align: center;
    position: relative;
}

    .card-band::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
    }

/* Lock icon */
.lock-wrap {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    background: rgba(201,168,76,0.1);
    border: 1.5px solid rgba(201,168,76,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .lock-wrap svg {
        width: 22px;
        height: 22px;
        stroke: var(--gold);
        fill: none;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.card-band h2 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 6px;
}

.card-band p {
    font-size: 12.5px;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

/* ── FORM AREA ── */
.card-body {
    padding: 28px 32px 32px;
}

.field-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

.token-hint {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.55;
}

    .token-hint strong {
        color: var(--text);
    }

/* Token input group */
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.token-input {
    flex: 1;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--cream);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    outline: none;
}

    .token-input::placeholder {
        letter-spacing: 1px;
        font-weight: 400;
        text-transform: none;
        color: #bbb;
    }

    .token-input:focus {
        border-color: var(--gold);
        background: var(--white);
        box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
    }

    .token-input.error {
        border-color: var(--error);
        background: var(--error-bg);
        box-shadow: 0 0 0 3px rgba(192,57,43,0.08);
    }

.btn-enter {
    padding: 13px 22px;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .btn-enter:hover {
        background: var(--navy-light);
    }

    .btn-enter:active {
        background: var(--navy-mid);
    }

    .btn-enter svg {
        width: 14px;
        height: 14px;
        stroke: var(--gold);
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* Error message */
.error-msg {
    display: none;
    font-size: 12.5px;
    color: var(--error);
    margin-top: 8px;
    align-items: center;
    gap: 6px;
}

    .error-msg.visible {
        display: flex;
    }

    .error-msg svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        stroke: var(--error);
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* ── DIVIDER ── */
.or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 18px;
}

    .or-divider::before,
    .or-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--cream-dark);
    }

    .or-divider span {
        font-size: 11px;
        color: var(--muted);
        letter-spacing: 1.5px;
        text-transform: uppercase;
    }

/* ── SMS NOTICE ── */
.sms-notice {
    background: var(--cream);
    border: 1px solid var(--cream-dark);
    border-radius: 6px;
    padding: 16px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.sms-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

    .sms-icon svg {
        width: 16px;
        height: 16px;
        stroke: var(--gold);
        fill: none;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.sms-notice p {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

    .sms-notice p strong {
        color: var(--navy);
    }

    .sms-notice p span {
        color: var(--muted);
        font-size: 12px;
        display: block;
        margin-top: 3px;
    }

/* ── LOADING STATE ── */
.btn-enter.loading .btn-text {
    display: none;
}

.btn-enter .spinner {
    display: none;
}

.btn-enter.loading .spinner {
    display: block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ── BELOW CARD ── */
.help-text {
    text-align: center;
    margin-top: 24px;
    font-size: 12.5px;
    color: rgba(255,255,255,0.35);
    line-height: 1.7;
    animation: fadeUp 0.8s 0.3s ease both;
}

    .help-text a {
        color: var(--gold);
        text-decoration: none;
        font-weight: 700;
    }

        .help-text a:hover {
            color: var(--gold-light);
        }

/* ── FOOTER ── */
footer {
    text-align: center;
    padding: 20px;
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(255,255,255,0.06);
    animation: fadeUp 0.8s 0.4s ease both;
}

    footer strong {
        color: rgba(201,168,76,0.5);
    }

/* ── ANIMATIONS ── */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── SHAKE ANIMATION (on error) ── */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

.shake {
    animation: shake 0.4s ease;
}

@media (max-width: 480px) {
    header {
        padding: 36px 20px 28px;
    }

    .card-band {
        padding: 24px 20px 20px;
    }

    .card-body {
        padding: 22px 20px 26px;
    }

    .input-group {
        flex-direction: column;
    }

    .btn-enter {
        width: 100%;
        justify-content: center;
    }
}
