:root {
    --gate-oak: #211812;
    --gate-oak-soft: #36271f;
    --gate-light: #f0cf8e;
    --gate-paper: #fbf5eb;
    --gate-paper-shadow: #dfcdb8;
    --gate-ink: #2a1f1a;
    --gate-ink-soft: #665248;
    --gate-copper: #b85f43;
    --gate-copper-dark: #93452f;
    --gate-error: #8f332a;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

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

html, body { min-height: 100%; }

body {
    margin: 0;
    color: var(--gate-ink);
    font-family: var(--font-body);
    background: var(--gate-oak);
}

.gate-page {
    min-height: 100svh;
    overflow-x: hidden;
    position: relative;
    background:
        linear-gradient(90deg, var(--gate-oak-soft) 0 49.85%, var(--gate-oak) 49.85% 50.15%, var(--gate-oak-soft) 50.15% 100%);
}

.gate-page::before,
.gate-page::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.gate-page::before {
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 1px, transparent 1px 82px),
        linear-gradient(180deg, rgba(255,255,255,.035), transparent 34%, rgba(0,0,0,.12));
}

.gate-page::after {
    background: radial-gradient(circle at 50% 52%, rgba(240, 207, 142, .15), transparent 31%);
}

.gate-light {
    position: fixed;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    background: var(--gate-light);
    box-shadow: 0 0 24px 5px rgba(240, 207, 142, .24), 0 0 110px 24px rgba(240, 207, 142, .08);
    animation: gate-glow 1.1s ease-out both;
}

.gate-shell {
    position: relative;
    z-index: 1;
    min-height: 100svh;
    width: min(100% - 32px, 620px);
    margin: 0 auto;
    padding: 34px 0 26px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: center;
}

.gate-brand {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(251, 245, 235, .88);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    overflow: hidden;
    border-radius: 50%;
    background: var(--gate-copper);
    box-shadow: 0 7px 24px rgba(0,0,0,.28);
}

.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

.gate-card {
    width: 100%;
    margin: 42px 0;
    padding: clamp(32px, 7vw, 58px);
    background: var(--gate-paper);
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 3px;
    box-shadow: 0 30px 85px rgba(0,0,0,.34), 0 5px 12px rgba(0,0,0,.18);
}

.gate-card h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 7vw, 4.15rem);
    font-weight: 600;
    line-height: .98;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.gate-intro {
    margin: 22px 0 30px;
    max-width: 40ch;
    color: var(--gate-ink-soft);
    font-size: 1rem;
    line-height: 1.65;
}

.gate-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border: 1px solid var(--gate-paper-shadow);
    border-radius: 8px;
    background: #fffdfa;
    box-shadow: inset 0 1px 2px rgba(42,31,26,.06);
}

.gate-control:focus-within {
    border-color: var(--gate-copper);
    box-shadow: 0 0 0 3px rgba(184, 95, 67, .16);
}

.gate-control input {
    min-width: 0;
    padding: 15px 16px;
    border: 0;
    outline: 0;
    color: var(--gate-ink);
    font: 600 1rem var(--font-body);
    background: transparent;
}

.gate-control button {
    margin: 4px;
    padding: 11px 18px;
    border: 0;
    border-radius: 6px;
    color: #fffaf4;
    font: 600 .9rem var(--font-body);
    background: var(--gate-copper);
    cursor: pointer;
    transition: background .16s ease, transform .16s ease;
}

.gate-control button:hover { background: var(--gate-copper-dark); }
.gate-control button:active { transform: translateY(1px); }
.gate-control button:focus-visible { outline: 3px solid var(--gate-light); outline-offset: 3px; }

.gate-error {
    margin: 12px 0 0;
    color: var(--gate-error);
    font-size: .88rem;
    line-height: 1.45;
}

.gate-note {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--gate-paper-shadow);
    color: var(--gate-ink-soft);
    font-size: .78rem;
    line-height: 1.55;
}

.gate-privacy {
    justify-self: center;
    margin: 0;
    font-size: .78rem;
}

.gate-privacy a { color: rgba(251, 245, 235, .68); }
.gate-privacy a:hover { color: var(--gate-paper); }

@keyframes gate-glow {
    from { opacity: 0; transform: translateX(-50%) scaleY(.35); }
    to { opacity: 1; transform: translateX(-50%) scaleY(1); }
}

@media (max-width: 620px) {
    .gate-shell { width: min(100% - 22px, 520px); padding-top: 22px; }
    .gate-card { padding: 32px 24px; margin: 28px 0; }
    .gate-control { grid-template-columns: 1fr; }
    .gate-control button { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
    .gate-light { animation: none; }
    .gate-control button { transition: none; }
}
