/* GATE — Brand stylesheet
   Palette + type system mirrored from the iOS app's Theme.swift */

:root {
    /* Colors */
    --gate-bg: #0E1525;
    --gate-surface: #141C2E;
    --gate-elevated: #1A2338;
    --gate-cream: #EDE8DC;
    --gate-cream-muted: rgba(237, 232, 220, 0.55);
    --gate-steel: #7A90A6;
    --gate-sand: #C4B396;
    --gate-sand-subtle: rgba(196, 179, 150, 0.15);
    --gate-glass: rgba(255, 255, 255, 0.03);
    --gate-border: rgba(196, 179, 150, 0.12);
    --gate-border-emph: rgba(196, 179, 150, 0.22);
    --gate-gold: #D9B866;

    /* Spacing */
    --xs: 4px;
    --sm: 8px;
    --md: 16px;
    --lg: 24px;
    --xl: 32px;
    --xxl: 48px;

    /* Type */
    --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--gate-bg);
    color: var(--gate-cream);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Subtle radial atmosphere behind hero */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, var(--gate-sand-subtle) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

/* Layout */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 var(--lg);
    position: relative;
    z-index: 1;
}

.container-narrow {
    max-width: 720px;
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-color: rgba(14, 21, 37, 0.72);
    border-bottom: 1px solid var(--gate-border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.28em;
    color: var(--gate-cream);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: var(--xl);
}

.nav-links a {
    font-family: var(--body);
    font-size: 14px;
    color: var(--gate-cream-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--gate-cream);
}

/* Hero */
.hero {
    text-align: center;
    padding: 120px 0 100px;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gate-sand);
    margin-bottom: var(--lg);
}

.hero h1 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(48px, 9vw, 96px);
    line-height: 1.02;
    letter-spacing: -0.01em;
    color: var(--gate-cream);
    margin-bottom: var(--lg);
}

.hero .lede {
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--gate-cream-muted);
    max-width: 560px;
    margin: 0 auto var(--xl);
    line-height: 1.6;
}

.cta-row {
    display: flex;
    gap: var(--md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    font-family: var(--body);
    font-weight: 500;
    font-size: 15px;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--gate-sand);
    color: var(--gate-bg);
    border: 1px solid var(--gate-sand);
}

.btn-primary:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.btn-ghost {
    background-color: transparent;
    color: var(--gate-cream);
    border: 1px solid var(--gate-border-emph);
}

.btn-ghost:hover {
    border-color: var(--gate-sand);
    color: var(--gate-sand);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-label {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gate-sand);
    margin-bottom: var(--md);
    text-align: center;
}

.section-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.1;
    color: var(--gate-cream);
    text-align: center;
    margin-bottom: var(--xxl);
}

/* Feature cards */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--lg);
}

.card {
    background-color: var(--gate-glass);
    border: 1px solid var(--gate-border);
    border-radius: 20px;
    padding: var(--xl);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.card:hover {
    border-color: var(--gate-border-emph);
    transform: translateY(-2px);
}

.card .icon {
    display: block;
    width: 30px;
    height: 30px;
    margin-bottom: var(--md);
    color: var(--gate-sand);
}

.card .icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Golden Ticket card — gold accent */
.card:last-child .icon {
    color: var(--gate-gold);
}

.card h3 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 24px;
    color: var(--gate-cream);
    margin-bottom: var(--sm);
}

.card p {
    font-size: 15px;
    color: var(--gate-cream-muted);
    line-height: 1.6;
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--xl);
    counter-reset: step;
}

.step {
    text-align: center;
}

.step .num {
    font-family: var(--mono);
    font-size: 14px;
    letter-spacing: 0.2em;
    color: var(--gate-sand);
    margin-bottom: var(--md);
}

.step h3 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 22px;
    margin-bottom: var(--sm);
}

.step p {
    font-size: 15px;
    color: var(--gate-cream-muted);
}

/* FAQ */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--gate-border);
}

.faq-item summary {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 22px;
    color: var(--gate-cream);
    padding: var(--lg) 0;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--md);
    transition: color 0.2s ease;
}

.faq-item summary:hover {
    color: var(--gate-sand);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-family: var(--mono);
    font-weight: 400;
    font-size: 24px;
    color: var(--gate-sand);
    transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item .answer {
    padding: 0 0 var(--lg);
    color: var(--gate-cream-muted);
    font-size: 16px;
    line-height: 1.7;
    max-width: 640px;
}

/* Legal / content pages */
.content-page {
    padding: 80px 0 120px;
}

.content-page h1 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(40px, 7vw, 64px);
    line-height: 1.05;
    margin-bottom: var(--sm);
}

.content-page .updated {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gate-steel);
    margin-bottom: var(--xxl);
}

.content-page h2 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 28px;
    color: var(--gate-cream);
    margin: var(--xl) 0 var(--md);
}

.content-page p,
.content-page li {
    color: var(--gate-cream-muted);
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: var(--md);
}

.content-page ul {
    padding-left: var(--lg);
    margin-bottom: var(--md);
}

.content-page li {
    margin-bottom: var(--sm);
}

.content-page a {
    color: var(--gate-sand);
    text-decoration: none;
    border-bottom: 1px solid var(--gate-border-emph);
    transition: border-color 0.2s ease;
}

.content-page a:hover {
    border-color: var(--gate-sand);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--lg);
    margin-top: var(--xl);
}

.contact-card {
    background-color: var(--gate-glass);
    border: 1px solid var(--gate-border);
    border-radius: 20px;
    padding: var(--xl);
}

.contact-card h3 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 22px;
    margin-bottom: var(--sm);
}

.contact-card p {
    color: var(--gate-cream-muted);
    font-size: 15px;
    margin-bottom: var(--md);
}

.contact-card a {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--gate-sand);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    border-top: 1px solid var(--gate-border);
    padding: var(--xxl) 0;
    margin-top: var(--xxl);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--lg);
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.28em;
    color: var(--gate-cream);
}

.footer-tagline {
    font-size: 14px;
    color: var(--gate-steel);
    margin-top: var(--xs);
}

.footer-links {
    display: flex;
    gap: var(--lg);
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 14px;
    color: var(--gate-cream-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--gate-sand);
}

.footer-copy {
    width: 100%;
    margin-top: var(--lg);
    font-size: 13px;
    color: var(--gate-steel);
}

/* Responsive */
@media (max-width: 640px) {
    .nav-links {
        gap: var(--md);
    }
    .nav-links a {
        font-size: 13px;
    }
    .hero {
        padding: 80px 0 60px;
    }
    section {
        padding: 56px 0;
    }
}

/* ============================================================
   Waitlist widget (hero)
   ============================================================ */
.waitlist {
    max-width: 560px;
    margin: var(--xl) 0 var(--md);
}
.wl-fields {
    display: flex;
    gap: var(--sm);
    flex-wrap: wrap;
}
.wl-fields input[type="email"],
.wl-select-wrap {
    flex: 1 1 180px;
    min-width: 0;
}
.wl-fields input[type="email"],
.wl-fields select {
    width: 100%;
    padding: 14px 16px;
    background: var(--gate-surface);
    border: 1px solid var(--gate-border-emph);
    border-radius: 10px;
    color: var(--gate-cream);
    font-family: var(--body);
    font-size: 15px;
    -webkit-appearance: none;
    appearance: none;
}
.wl-fields input::placeholder { color: var(--gate-steel); }
.wl-fields input:focus,
.wl-fields select:focus {
    outline: none;
    border-color: var(--gate-sand);
}
.wl-select-wrap {
    position: relative;
}
.wl-select-wrap::after {
    content: "▾";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gate-steel);
    pointer-events: none;
    font-size: 12px;
}
.wl-fields select { color: var(--gate-cream); cursor: pointer; }
.wl-fields select option { background: var(--gate-surface); color: var(--gate-cream); }
.wl-fields .btn-primary {
    flex: 0 0 auto;
    padding: 14px 22px;
    white-space: nowrap;
}
.wl-hint {
    color: var(--gate-cream-muted);
    font-size: 13px;
    margin: var(--md) 0 0;
    transition: color 0.2s;
}

/* success state */
.wl-success {
    animation: wl-fade 0.4s ease-out;
}
@keyframes wl-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wl-badge {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gate-sand);
    margin: 0 0 var(--md);
}
.wl-progress { margin-bottom: var(--md); }
.wl-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--gate-cream);
    margin-bottom: 8px;
}
.wl-percent { color: var(--gate-sand); }
.wl-bar-track {
    height: 10px;
    background: rgba(122, 144, 166, 0.12);
    border-radius: 6px;
    overflow: hidden;
}
.wl-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--gate-sand), var(--gate-gold));
    transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    width: 2%;
}
.wl-remaining {
    color: var(--gate-cream-muted);
    font-size: 13px;
    margin: 8px 0 0;
}
.wl-cta-copy {
    color: var(--gate-cream);
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 var(--md);
    max-width: 48ch;
}
.wl-cta-copy strong { color: var(--gate-sand); font-weight: 500; }
.wl-share {
    display: flex;
    gap: var(--sm);
    flex-wrap: wrap;
}
.wl-share input {
    flex: 1 1 200px;
    min-width: 0;
    padding: 12px 14px;
    background: var(--gate-surface);
    border: 1px solid var(--gate-border);
    border-radius: 10px;
    color: var(--gate-steel);
    font-family: var(--mono);
    font-size: 13px;
}
.wl-share .btn-primary { flex: 0 0 auto; padding: 12px 18px; }
.wl-referral {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--gate-sand);
    margin: var(--md) 0 0;
    letter-spacing: 0.02em;
}
.wl-fallback {
    font-size: 14px;
    color: var(--gate-steel);
    margin-top: var(--lg);
}
.wl-fallback a { color: var(--gate-steel); text-decoration: none; border-bottom: 1px solid var(--gate-border-emph); }
.wl-fallback a:hover { color: var(--gate-cream); }

@media (max-width: 560px) {
    .wl-fields .btn-primary { flex: 1 1 100%; }
    .wl-share .btn-primary { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .wl-success { animation: none; }
    .wl-bar-fill { transition: none; }
}

/* ============================================================
   Waitlist — dedicated section
   ============================================================ */
.hero-cta {
    display: flex;
    gap: var(--sm);
    margin-top: var(--xl);
    flex-wrap: wrap;
}
.waitlist-section {
    text-align: center;
    border-top: 1px solid var(--gate-border);
    border-bottom: 1px solid var(--gate-border);
    background:
        radial-gradient(60% 120% at 50% 0%, rgba(198, 168, 124, 0.06), transparent 70%);
}
.waitlist-section .section-label,
.waitlist-section .section-title {
    text-align: center;
}
.wl-explain {
    max-width: 680px;
    margin: 0 auto var(--xl);
    text-align: left;
}
.wl-explain p {
    color: var(--gate-cream-muted);
    font-size: 16px;
    line-height: 1.75;
    margin: 0 0 var(--md);
}
.wl-explain strong { color: var(--gate-sand); font-weight: 500; }
.waitlist-section .waitlist {
    max-width: 640px;
    margin: 0 auto;
    padding: var(--lg);
    background: var(--gate-surface);
    border: 1px solid var(--gate-border-emph);
    border-radius: 18px;
    text-align: left;
}
.wl-fields-selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sm);
    margin-bottom: var(--sm);
}
.waitlist-section .wl-fields input[type="email"],
.waitlist-section .wl-fields select {
    font-size: 16px;
    padding: 16px 18px;
}
.waitlist-section .wl-fields .btn-primary {
    padding: 16px 26px;
    font-size: 15px;
}
.wl-share .btn-ghost { flex: 0 0 auto; padding: 12px 16px; }
@media (max-width: 560px) {
    .wl-fields-selects { grid-template-columns: 1fr; }
    .waitlist-section .waitlist { padding: var(--md); }
    .hero-cta .btn { flex: 1 1 100%; text-align: center; }
}

/* same-device friend signup link */
.wl-again {
    display: block;
    margin: var(--md) auto 0;
    background: none;
    border: none;
    color: var(--gate-steel);
    font-family: var(--body);
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid var(--gate-border-emph);
    padding: 0 0 2px;
    transition: color 0.2s;
}
.wl-again:hover { color: var(--gate-cream); }

/* ============================================================
   Hero flanking phones
   ============================================================ */
.hero {
    position: relative;
}
.hero .container {
    position: relative;
    z-index: 1;
}
.hero-phone {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(200px, 17vw, 310px);
    height: auto;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.45));
}
.hero-phone-left  { left:  clamp(8px, 3vw, 64px); }
.hero-phone-right { right: clamp(8px, 3vw, 64px); }
.hero-cta { justify-content: center; }
@media (max-width: 1100px) {
    .hero-phone { display: none; }
}

/* Numberless progress: slow fill + soft shimmer sweep */
.wl-bar-fill {
    transition: width 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.wl-bar-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: wl-shimmer 2.6s ease-in-out infinite;
}
@keyframes wl-shimmer {
    0%   { transform: translateX(-100%); }
    60%  { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}
.wl-remaining strong { color: var(--gate-sand); font-weight: 500; }
@media (prefers-reduced-motion: reduce) {
    .wl-bar-fill::after { animation: none; }
}

/* signup disclosure */
.wl-consent {
    color: var(--gate-steel);
    font-size: 11.5px;
    line-height: 1.5;
    margin: 8px 0 0;
}
.wl-consent a { color: var(--gate-steel); text-decoration: underline; }
.wl-consent a:hover { color: var(--gate-cream); }

/* ============================================================
   Inside GATE — full-screen video section
   ============================================================ */
.inside-section {
    min-height: 100svh;
    display: flex;
    align-items: center;
    text-align: center;
    border-top: 1px solid var(--gate-border);
    background:
        radial-gradient(50% 90% at 50% 50%, rgba(196, 179, 150, 0.05), transparent 70%);
}
.inside-inner { width: 100%; }
.inside-section .section-label,
.inside-section .section-title { text-align: center; }
#inside-video {
    display: block;
    margin: 0 auto;
    height: min(72svh, 780px);
    max-width: 92vw;
    width: auto;
    border-radius: 26px;
    border: 1px solid var(--gate-border-emph);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    background: var(--gate-surface);
}

/* wordmark logo in nav + footer */
.brand-logo {
    height: 26px;
    width: auto;
    display: block;
}
.footer-brand .brand-logo { height: 22px; margin-bottom: 8px; }
