/* ============================================
   GATE OVERLAY STYLES
   Sajid Mehmood · sajidmk.com
   ============================================ */

/* Lock scroll while gate is visible */
body.gate-active { overflow: hidden; }

/* Full-screen overlay */
#gateOverlay {
    position: fixed; inset: 0; z-index: 9999;
    background: #DDD8D0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Montserrat', sans-serif;
    transition: opacity .5s ease, visibility .5s ease;
}
#gateOverlay.gate-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Grain texture */
#gateOverlay::before {
    content: '';
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: .6;
}

/* Background decoration */
.g-deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.g-deco span { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(197,160,89,.08), transparent 70%); }
.g-deco span:nth-child(1) { width: 600px; height: 600px; top: -200px; right: -150px; }
.g-deco span:nth-child(2) { width: 400px; height: 400px; bottom: -100px; left: -100px; }
.g-line { position: absolute; background: rgba(197,160,89,.06); }
.g-line.v1 { width: 1px; height: 100vh; left: 12%; top: 0; }
.g-line.v2 { width: 1px; height: 100vh; right: 12%; top: 0; }
.g-line.h1 { width: 100vw; height: 1px; top: 20%; left: 0; }

/* Card */
.g-card {
    position: relative; z-index: 10;
    width: 100%; max-width: 460px; margin: 20px;
    background: #E8E3DB;
    border: 1px solid #D4CEC5;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(45,52,54,.12), 0 0 0 1px rgba(197,160,89,.08);
    overflow: hidden;
    animation: gCardIn .8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes gCardIn {
    from { opacity: 0; transform: translateY(40px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Gold shimmer stripe */
.g-stripe {
    height: 4px;
    background: linear-gradient(90deg, #A07840, #C5A059, #E8C97A, #C5A059);
    background-size: 200% 100%;
    animation: gStripe 3s ease infinite;
}
@keyframes gStripe {
    0%   { background-position: 0%; }
    50%  { background-position: 100%; }
    100% { background-position: 0%; }
}

/* Card body */
.g-body { padding: 44px 44px 40px; }

/* Logo */
.g-logo {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 36px;
    animation: gFadeDown .6s ease both .2s;
}
.g-logo img {
    width: 48px; height: 48px; object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(197,160,89,.2));
}
.g-logo-name {
    font-family: 'Playfair Display', serif;
    font-size: 17px; font-weight: 700; color: #2D3436;
    display: block; line-height: 1.2;
}
.g-logo-sub {
    font-family: 'DM Mono', monospace;
    font-size: 9px; color: #C5A059;
    letter-spacing: 1.5px; text-transform: uppercase;
    display: block; margin-top: 2px;
}

/* Divider */
.g-divider {
    height: 1px;
    background: linear-gradient(90deg, #C5A059, rgba(197,160,89,.1));
    margin-bottom: 32px;
    animation: gLineGrow .8s ease both .3s;
    transform-origin: left;
}
@keyframes gLineGrow {
    from { transform: scaleX(0); opacity: 0; }
    to   { transform: scaleX(1); opacity: 1; }
}

/* Welcome text */
.g-welcome { margin-bottom: 28px; animation: gFadeUp .6s ease both .35s; }
.g-eyebrow {
    font-family: 'DM Mono', monospace;
    font-size: 10px; color: #C5A059;
    letter-spacing: 2.5px; text-transform: uppercase;
    margin-bottom: 10px; display: block;
}
.g-headline {
    font-family: 'Playfair Display', serif;
    font-size: 28px; font-weight: 900; color: #2D3436;
    line-height: 1.25; margin-bottom: 10px;
}
.g-headline em { font-style: italic; color: #C5A059; }
.g-sub { font-size: 13px; color: #718096; line-height: 1.7; }

/* Input group */
.g-input-group { margin-bottom: 20px; animation: gFadeUp .6s ease both .45s; }
.g-label {
    display: block; font-size: 11px; font-weight: 700;
    color: #2D3436; letter-spacing: .8px; text-transform: uppercase;
    margin-bottom: 10px;
}
.g-input-wrap { position: relative; }
.g-icon {
    position: absolute; left: 16px; top: 50%;
    transform: translateY(-50%);
    color: #C5A059; font-size: 14px; pointer-events: none;
}
.g-input {
    width: 100%; padding: 15px 16px 15px 44px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px; font-weight: 500; color: #2D3436;
    background: #DDD8D0;
    border: 1.5px solid #D4CEC5; border-radius: 8px;
    outline: none;
    transition: border-color .3s, box-shadow .3s, background .3s;
    -webkit-appearance: none;
}
.g-input::placeholder { color: #A0AEC0; font-weight: 400; }
.g-input:focus {
    border-color: #C5A059; background: #fff;
    box-shadow: 0 0 0 3px rgba(197,160,89,.12);
}
.g-error {
    font-size: 12px; color: #e74c3c; font-weight: 600;
    margin-top: 10px; display: none;
    animation: gShake .4s ease;
}
.g-error.show { display: block; }
@keyframes gShake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-6px); }
    75%       { transform: translateX(6px); }
}

/* Submit button */
.g-btn {
    width: 100%; padding: 16px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    color: #2D3436;
    background: linear-gradient(135deg, #C5A059, #E8C97A);
    border: none; border-radius: 8px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 4px 20px rgba(197,160,89,.3);
    transition: all .3s ease;
    position: relative; overflow: hidden;
    animation: gFadeUp .6s ease both .55s;
}
.g-btn::before {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.3), transparent);
    transform: skewX(-20deg); transition: left .5s ease;
}
.g-btn:hover::before { left: 160%; }
.g-btn:hover {
    background: linear-gradient(135deg, #A07840, #C5A059);
    box-shadow: 0 8px 28px rgba(197,160,89,.4);
    transform: translateY(-2px);
}
.g-btn:active { transform: translateY(0); }
.g-btn .g-arrow { font-size: 16px; transition: transform .3s; }
.g-btn:hover .g-arrow { transform: translateX(4px); }
.g-btn.loading { pointer-events: none; opacity: .85; }
.g-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(45,52,54,.2); border-top-color: #2D3436;
    border-radius: 50%; animation: gSpin .7s linear infinite;
    display: none;
}
.g-btn.loading .g-spinner { display: block; }
.g-btn.loading .g-btn-text,
.g-btn.loading .g-arrow { display: none; }
@keyframes gSpin { to { transform: rotate(360deg); } }

/* Skip link */
.g-skip {
    display: block; text-align: center; margin-top: 18px;
    font-size: 11px; color: #A0AEC0; font-weight: 500;
    cursor: pointer; transition: color .3s;
    text-decoration: underline; text-underline-offset: 3px;
    animation: gFadeUp .6s ease both .65s;
}
.g-skip:hover { color: #C5A059; }

/* Card footer strip */
.g-footer {
    padding: 14px 44px;
    background: #DDD8D0; border-top: 1px solid #D4CEC5;
    display: flex; align-items: center; justify-content: space-between;
    animation: gFadeUp .6s ease both .7s;
}
.g-footer-left {
    font-family: 'DM Mono', monospace;
    font-size: 9px; color: #A0AEC0;
    letter-spacing: 1px; text-transform: uppercase;
}
.g-avail-dot {
    display: inline-block; width: 6px; height: 6px;
    border-radius: 50%; background: #27AE60;
    margin-right: 6px;
    animation: gPulse 2s ease-in-out infinite;
    vertical-align: middle;
}
@keyframes gPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.g-footer-right {
    font-family: 'DM Mono', monospace;
    font-size: 9px; color: #C5A059; letter-spacing: 1px;
}

/* Success state (shown inside card before overlay fades out) */
.g-success {
    position: absolute; inset: 0; background: #E8E3DB;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .3s ease; z-index: 5;
    border-radius: 16px;
}
.g-success.show { opacity: 1; pointer-events: auto; }
.g-success-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, #C5A059, #E8C97A);
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; margin-bottom: 20px;
    box-shadow: 0 8px 28px rgba(197,160,89,.35);
}
.g-success-name {
    font-family: 'Playfair Display', serif;
    font-size: 22px; font-weight: 900; color: #2D3436; margin-bottom: 8px;
}
.g-success-sub {
    font-size: 12px; color: #718096;
    font-family: 'DM Mono', monospace; letter-spacing: 1px;
}

/* Shared keyframes */
@keyframes gFadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes gFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 500px) {
    .g-body   { padding: 32px 28px 28px; }
    .g-footer { padding: 14px 28px; }
    .g-headline { font-size: 24px; }
}
