/* login.css — grid version (DRY) */

/* Animatable custom property for the body overlay alpha */
@property --bg-fade {
    syntax: "<number>";
    inherits: false;
    initial-value: 0;
}

/* Global tokens */
:root {
    /* Colors */
    --bg: #1d1d1d;
    --text: #fff;
    --muted: #aaa;
    --rule: #444;
    --err: #f88;

    /* Layout */
    --col: 460px;
    /* main column width */
    --banner-col: 480px;
    --pad: 24px;
    --safe-bottom: env(safe-area-inset-bottom);

    /* Body background motion */
    --bg-sway-x: 5%;
    --bg-sway-y: 10px;
    --bg-zoom: 5%;
    --bg-time: 18s;
}

/* Background anchored to the viewport + animated overlay */
body {
    margin: 0;
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;

    /* Layer 1: overlay (alpha via --bg-fade); Layer 2: footer image */
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(29, 29, 29, var(--bg-fade))),
        url("/footer.png");
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
    background-position:
        center calc(100% + var(--safe-bottom)),
        50% calc(100% + var(--safe-bottom));
    background-size:
        100% 100%,
        100% auto;

    animation: bg-sway var(--bg-time) ease-in-out infinite;
    will-change: background-position, background-size;
}

/* Keep page width stable when EB locks scroll with body{position:fixed} */
body[style*="position: fixed"] {
    position: fixed;
    inset: 0;
    width: 100vw;
    overflow-x: hidden;
    animation: none;
    /* pause bg animation while modal is open */
}

/* Main content padding */
main {
    padding: 16px;
}

/* Utilities */
.hidden {
    display: none;
}

/* Error box */
.err {
    padding: var(--pad);
    color: var(--err);
    text-align: center;
}

/* Container */
.main-narrow {
    max-width: var(--col);
    margin: 0.5vh auto;
    padding: var(--pad);
}

/* Page grid */
.login-grid {
    display: grid;
    gap: 1rem;
    align-items: start;
    background-color: rgba(0, 0, 0, 0.5);
}

.lead {
    text-align: center;
    line-height: 1.4;
    margin-block: 0.5rem;
}

/* Form as 1-column grid (email on top, login below) */
.form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

/* Inputs & buttons full-width */
.input,
.btn {
    width: 100%;
    box-sizing: border-box;
}

.input {
    padding: 0.6rem;
}

.btn {
    padding: 0.6rem 1rem;
}

/* “— or —” separator */
.or {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
    justify-content: center;
    font-weight: bold;
}

.or::before,
.or::after {
    content: "";
    height: 1px;
    background: var(--rule);
    flex: 1;
}

.or span {
    white-space: nowrap;
}

/* Banner (constrained column with animated background) */
.banner {
    max-width: var(--banner-col);
    margin: 0 auto;
    padding-block: 0;
    padding-inline: var(--pad);
    background: transparent;
    min-height: 320px;
    overflow: hidden;
    position: relative;
}

.banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/banner.png") 50% 0% / 90% auto no-repeat;
    animation: banner-pan 12s ease-in-out infinite alternate;
    will-change: background-position, background-size;
}

/* Banner pan keyframes */
@keyframes banner-pan {
    0% {
        background-position: 50% 0%;
        background-size: 95% auto;
    }

    25% {
        background-position: 30% -20%;
        background-size: 90% auto;
    }

    50% {
        background-position: 50% 0%;
        background-size: 93% auto;
    }

    75% {
        background-position: 70% -20%;
        background-size: 90% auto;
    }

    100% {
        background-position: 50% 0%;
        background-size: 95% auto;
    }
}

/* Body background drift/zoom/fade keyframes */
@keyframes bg-sway {
    0% {
        --bg-fade: 0.9;
        /* darker overlay (image less visible) */
        background-position:
            center calc(100% + var(--safe-bottom)),
            50% calc(100% + var(--safe-bottom));
        background-size:
            100% 100%,
            100% auto;
    }

    25% {
        --bg-fade: 0.75;
        background-position:
            center calc(100% + var(--safe-bottom)),
            calc(50% - var(--bg-sway-x)) calc(100% + var(--safe-bottom) + var(--bg-sway-y));
        background-size:
            100% 100%,
            calc(100% + var(--bg-zoom)) auto;
    }

    50% {
        --bg-fade: 0.9;
        background-position:
            center calc(100% + var(--safe-bottom)),
            50% calc(100% + var(--safe-bottom));
        background-size:
            100% 100%,
            100% auto;
    }

    75% {
        --bg-fade: 0.75;
        background-position:
            center calc(100% + var(--safe-bottom)),
            calc(50% + var(--bg-sway-x)) calc(100% + var(--safe-bottom) - var(--bg-sway-y));
        background-size:
            100% 100%,
            calc(100% + var(--bg-zoom)) auto;
    }

    100% {
        --bg-fade: 0.9;
        background-position:
            center calc(100% + var(--safe-bottom)),
            50% calc(100% + var(--safe-bottom));
        background-size:
            100% 100%,
            100% auto;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .banner::before {
        animation: none;
    }

    body {
        animation: none;
    }
}

/* NEW: button colors */
:root {
  --btn-login-bg: #e8e090;   /* Login */
  --btn-login-fg: #1d1d1d;
  --btn-tickets-bg: #cd1831; /* Get Tickets */
  --btn-tickets-fg: #fff;
}

/* Base button tweaks (optional) */
.btn { 
  border: 0;                 /* keep clean; remove if you want borders */
  border-radius: 8px;
  cursor: pointer;
  transition: filter .15s ease, transform .02s ease;
}
.btn:hover { filter: brightness(.98); }
.btn:active { transform: scale(.99); }
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Login button (inside the form) */
.form .btn {
  background: var(--btn-login-bg);
  color: var(--btn-login-fg);
}

/* Get Tickets button (by ID) */
#eventbrite-widget-modal-trigger-1598875763449 {
  background: var(--btn-tickets-bg);
  color: var(--btn-tickets-fg);
}