* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg: #060607;
    --panel: rgba(15, 15, 17, 0.86);
    --panel-border: rgba(255, 255, 255, 0.12);
    --text: #f5f2ea;
    --muted: rgba(245, 242, 234, 0.68);
    --gold: #d8b46a;
    --gold-soft: rgba(216, 180, 106, 0.16);
    --danger: #ff6b6b;
    --vh: 1vh;
    --topbar-h: 56px;
    color-scheme: dark;
}

html {
    min-height: 100%;
    margin: 0;
    background: #050506;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 20%, rgba(216, 180, 106, 0.18), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.08), transparent 24%),
        linear-gradient(145deg, #020203 0%, #0e0e12 52%, #050506 100%);
    overscroll-behavior-y: none;
}

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

.page {
    min-height: 100vh;
    min-height: 100svh;
    min-height: calc(var(--vh, 1vh) * 100);
    display: grid;
    place-items: center;
    padding: max(22px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

.page::before {
    content: "";
    position: fixed;
    inset: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    border: 1px solid rgba(216, 180, 106, 0.14);
    pointer-events: none;
}

.hero-card {
    width: min(100%, 620px);
    padding: clamp(32px, 7vw, 72px);
    background: var(--panel);
    border: 1px solid var(--panel-border);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    text-align: center;
    position: relative;
    isolation: isolate;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(216, 180, 106, 0.12);
    pointer-events: none;
    z-index: -1;
}

.kicker {
    font-size: 12px;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 20px;
}

h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(64px, 17vw, 134px);
    line-height: 0.86;
    margin: 0;
    font-weight: 400;
    letter-spacing: -0.08em;
}

h1 span {
    color: var(--gold);
    display: inline-block;
}

h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(36px, 9vw, 72px);
    font-weight: 400;
    line-height: 1;
    margin: 0 0 18px;
}

.lead {
    font-size: clamp(18px, 4.5vw, 24px);
    line-height: 1.4;
    margin: 28px auto 8px;
    max-width: 520px;
}

.limit {
    color: var(--muted);
    margin: 0 auto 32px;
    line-height: 1.5;
}

.access-form {
    max-width: 440px;
    margin: 0 auto;
    text-align: left;
}

label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
    line-height: 1.4;
}

input {
    width: 100%;
    min-height: 56px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 0 18px;
    font-size: 16px; /* evita zoom automático no iOS */
    line-height: 1.2;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input::placeholder {
    color: rgba(245, 242, 234, 0.38);
}

input:focus {
    border-color: rgba(216, 180, 106, 0.75);
    box-shadow: 0 0 0 4px var(--gold-soft);
}

button,
.button-link {
    width: 100%;
    min-height: 56px;
    margin-top: 14px;
    border: 0;
    border-radius: 0;
    background: var(--gold);
    color: #0a0804;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-appearance: none;
    appearance: none;
}

button:active,
.button-link:active {
    transform: scale(0.99);
}

@media (hover: hover) and (pointer: fine) {
    button:hover,
    .button-link:hover {
        filter: brightness(1.08);
        transform: translateY(-1px);
    }
}

.error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 12px;
    line-height: 1.4;
}

.footnote {
    margin-top: 30px;
    color: rgba(245, 242, 234, 0.46);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    line-height: 1.6;
}

.transmission {
    min-height: min(430px, calc(var(--vh, 1vh) * 80));
    display: grid;
    align-content: center;
    justify-items: center;
}

.pulse {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 1px solid rgba(216, 180, 106, 0.55);
    position: relative;
    margin-bottom: 24px;
}

.pulse::before,
.pulse::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1px solid rgba(216, 180, 106, 0.38);
    animation: pulse 1.6s infinite;
}

.pulse::after {
    animation-delay: 0.8s;
}

@keyframes pulse {
    from {
        transform: scale(1);
        opacity: 0.85;
    }
    to {
        transform: scale(1.9);
        opacity: 0;
    }
}

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

.guest-name {
    color: var(--gold);
    font-size: clamp(22px, 6vw, 34px);
    margin: 0 0 12px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.small {
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

.access-body {
    width: 100%;
    height: 100vh;
    height: 100svh;
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
    background: #050506;
    position: fixed;
    inset: 0;
}

.access-shell {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    background: #050506;
}

.access-topbar {
    min-height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 16px;
    background: #0b0b0d;
    color: var(--text);
    border-bottom: 1px solid rgba(216, 180, 106, 0.18);
    font-size: 13px;
    line-height: 1.35;
}

.access-topbar strong {
    letter-spacing: 0.14em;
    min-width: 0;
}

.access-topbar span {
    color: var(--gold);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 44vw;
    text-align: right;
}

.access-frame-wrap {
    position: relative;
    min-height: 0;
    background: #fff;
    padding-bottom: env(safe-area-inset-bottom);
}

.access-frame {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    display: block;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.access-fallback {
    position: absolute;
    inset: auto 16px calc(18px + env(safe-area-inset-bottom)) 16px;
    z-index: 10;
    display: none;
    padding: 18px;
    background: rgba(5, 5, 6, 0.9);
    border: 1px solid rgba(216, 180, 106, 0.24);
    color: var(--text);
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.access-fallback.is-visible {
    display: block;
}

.access-fallback p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}

.access-fallback .button-link {
    min-height: 50px;
    margin-top: 0;
    font-size: 12px;
}

@media (max-width: 640px) {
    :root {
        --topbar-h: 50px;
    }

    .page {
        padding: max(16px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
        align-items: center;
    }

    .page::before {
        inset: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    }

    .hero-card {
        padding: 34px 22px;
    }

    .hero-card::after {
        inset: 10px;
    }

    .kicker {
        letter-spacing: 0.24em;
        font-size: 11px;
    }

    h1 {
        font-size: clamp(68px, 23vw, 100px);
    }

    .lead {
        margin-top: 24px;
    }

    .footnote {
        letter-spacing: 0.11em;
        font-size: 11px;
    }

    .access-topbar {
        padding: 9px 12px;
        font-size: 11px;
        gap: 10px;
    }

    .access-topbar strong {
        letter-spacing: 0.09em;
    }

    .access-topbar span {
        max-width: 38vw;
    }
}

@media (max-width: 360px) {
    .hero-card {
        padding: 30px 18px;
    }

    h1 {
        font-size: clamp(58px, 21vw, 84px);
    }

    .lead {
        font-size: 17px;
    }

    button,
    .button-link,
    input {
        min-height: 54px;
    }
}

/* Versão Cloudflare-compatible: página de lançamento sem iframe */
.access-launch-body {
    min-height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
}

.access-launch-page {
    min-height: calc(var(--vh, 1vh) * 100);
}

.access-launch {
    max-width: 520px;
    text-align: center;
}

.access-launch h2 {
    margin-top: 16px;
}

.access-launch .button-link {
    margin-top: 24px;
}

.mini-note {
    margin: 14px 0 0;
    font-size: 12px;
    color: rgba(245, 238, 220, 0.55);
}
