/* =====================================================
   Login + Sign Up — Locate My Table
   One full-page split shared by both pages (.st-auth). There is
   no boxed card: the page itself is the layout.
   Left: a light ivory panel with a soft gold glow and an event
   seating illustration; its curved edge sweeps into the form
   side with translucent gold bands, so both halves read as
   one piece. Form controls live in form.css (RULE 24).
   All values use CSS custom properties only.
   ===================================================== */

.section-auth {
    position: relative;
    overflow: hidden;
    /* Warm ivory behind the form, with a soft gold glow in the corner;
       the form fields stay white so they stand out. */
    background-color: var(--color-bg);
    background-image: radial-gradient(ellipse 50% 60% at 100% 100%, rgba(var(--color-accent-rgb), 0.14), transparent 70%);
}

.st-auth__layout {
    position: relative;
    display: grid;
    /* Illustration side is slightly narrower; the curve gives it some width back */
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    /* Fill the screen under the fixed header */
    min-height: max(var(--auth-min-h), calc(100svh - var(--header-h)));
}

/* =====================================================
   Illustration side
   ===================================================== */

.st-auth__visual {
    position: relative;
    z-index: 0;
    display: flex;
    flex-direction: column;
    /* One compact group (tagline, illustration, points), centred across the
       panel and pinned to the top. Sizes and gaps are fixed, so its position
       does not change when the page gets taller. */
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-8);
    text-align: center;
    /* Reach into the form column; the curve only touches it mid-height */
    margin-right: calc(var(--space-10) * -1);
    /* Extra padding on the curved side keeps content clear of the bands */
    padding: var(--space-12) var(--space-20) var(--space-12) var(--space-12);
    color: var(--color-text);
}

.st-auth__surface,
.st-auth__band {
    position: absolute;
    inset: 0;
    /* Convex right edge: full width at mid-height, about 87% at top and bottom */
    clip-path: ellipse(100% 100% at 0% 50%);
}

.st-auth__band--inner {
    right: calc(var(--space-5) * -1);
    background-color: rgba(var(--color-accent-rgb), 0.26);
}

.st-auth__band--outer {
    right: calc(var(--space-10) * -1);
    background-color: rgba(var(--color-accent-rgb), 0.12);
}

/* Ivory with a faint dot grid and a warm gold glow behind the illustration */
.st-auth__surface {
    background-color: var(--color-tint);
    background-image:
        radial-gradient(rgba(var(--color-primary-rgb), 0.07) 1px, transparent 1.5px),
        radial-gradient(ellipse 65% 50% at 35% 62%, rgba(var(--color-accent-rgb), 0.2), transparent 75%),
        radial-gradient(ellipse 55% 45% at 0% 0%, rgba(var(--color-primary-light-rgb), 0.1), transparent 70%),
        linear-gradient(160deg, var(--color-white) 0%, var(--color-tint) 70%);
    background-size: var(--space-6) var(--space-6), auto, auto, auto;
}

.st-auth__story,
.st-auth__art,
.st-auth__points {
    position: relative;
    z-index: 1;
}

.st-auth__story {
    max-width: var(--measure-text);
}

.st-auth__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent-dark);
}

.st-auth__eyebrow::before,
.st-auth__eyebrow::after {
    content: "";
    width: var(--space-8);
    height: 1px;
    background-color: var(--color-accent);
}

.st-auth__tagline {
    margin-top: var(--space-3);
    font-family: var(--font-heading);
    font-size: var(--text-h3);
    font-weight: var(--fw-semibold);
    line-height: var(--leading-heading);
    letter-spacing: -0.01em;
    color: var(--color-text);
}

.st-auth__highlight {
    font-style: italic;
    color: var(--color-accent-dark);
}

.st-auth__body {
    margin-top: var(--space-2);
    margin-inline: auto;
    max-width: var(--form-max);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    color: var(--color-muted);
}

.st-auth__art {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Fixed width: the illustration keeps one size however wide the screen is,
   and only shrinks when its container is narrower than that. */
.st-auth__art .st-art {
    display: block;
    flex: 0 0 auto;
    width: var(--auth-art-max);
    max-width: 100%;
    height: auto;
}

/* Points: small white chips under the illustration */
.st-auth__points {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    max-width: var(--measure-text);
    list-style: none;
}

.st-auth__point {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--fw-medium);
    color: var(--color-text);
    background-color: var(--color-white);
    border: 1px solid rgba(var(--color-accent-rgb), 0.35);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.st-auth__check {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: var(--space-4);
    height: var(--space-4);
    border-radius: var(--radius-full);
    color: var(--color-white);
    background-color: var(--color-accent-dark);
}

/* =====================================================
   Illustration artwork (templates/sections/auth/illustration.php)
   Light palette: white tables and cards on a pale floor,
   gold chairs and accents, navy only for small details.
   ===================================================== */

.st-art__glow-stop          { stop-color: var(--color-accent-light); stop-opacity: 0.7; }
.st-art__glow-stop--end     { stop-opacity: 0; }

.st-art__wire               { stroke: var(--color-accent-dark); stroke-opacity: 0.45; stroke-width: 1.2; }
.st-art__bulb               { fill: var(--color-accent); }
.st-art__bulb-glow          { fill: var(--color-accent); opacity: 0.22; }

.st-art__floor              { fill: var(--color-white); fill-opacity: 0.85; stroke: var(--color-accent); stroke-opacity: 0.5; }
.st-art__side--left         { fill: var(--color-accent-light); }
.st-art__side--right        { fill: var(--color-accent-light); fill-opacity: 0.6; }
.st-art__grid               { stroke: var(--color-accent); stroke-opacity: 0.18; }

.st-art__dance              { fill: var(--color-accent); fill-opacity: 0.4; }
.st-art__dance.is-alt       { fill: var(--color-primary-light); fill-opacity: 0.28; }

.st-art__chair              { fill: var(--color-accent); }
.st-art__chair-side         { fill: var(--color-accent-dark); }
.st-art__top                { fill: var(--color-white); stroke: var(--color-border); }
.st-art__skirt              { fill: var(--color-tint); stroke: var(--color-border); }
.st-art__skirt--shade       { fill: var(--color-border); }
.st-art__top.is-target      { fill: var(--color-accent-light); stroke: var(--color-accent); }
.st-art__skirt.is-target    { fill: var(--color-accent); stroke: var(--color-accent); }
.st-art__bloom              { fill: var(--color-accent-dark); }

.st-art__ring               { stroke: var(--color-accent-dark); stroke-width: 1.5; stroke-dasharray: 4 4; fill: rgba(var(--color-accent-rgb), 0.14); }

.st-art__pin-shadow         { fill: var(--color-primary); opacity: 0.2; }
.st-art__pin-body           { fill: var(--color-accent); stroke: var(--color-white); stroke-width: 1.5; }
.st-art__pin-face           { fill: var(--color-white); }

.st-art__num                { font-family: var(--font-heading); font-weight: var(--fw-bold); fill: var(--color-primary); }
.st-art__num--pin           { font-size: 12px; }
.st-art__num--chip          { font-size: 11px; fill: var(--color-white); }
.st-art__num--card          { font-size: 20px; }

.st-art__phone-shadow       { fill: var(--color-primary); opacity: 0.12; }
.st-art__phone              { fill: var(--color-white); stroke: var(--color-accent); stroke-width: 1.5; }
.st-art__screen             { fill: var(--color-bg); }
.st-art__notch              { fill: var(--color-border); }
.st-art__field              { fill: var(--color-white); stroke: var(--color-border); }
.st-art__card               { fill: var(--color-white); stroke: var(--color-border); }
.st-art__line               { fill: var(--color-border); }
.st-art__line--dark         { fill: var(--color-primary); fill-opacity: 0.7; }
.st-art__icon-stroke        { stroke: var(--color-muted); stroke-width: 1.4; stroke-linecap: round; }
.st-art__gold               { fill: var(--color-accent); }
.st-art__avatar             { fill: var(--color-primary-light); fill-opacity: 0.3; }
.st-art__check              { stroke: var(--color-white); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.st-art__pending            { stroke: var(--color-border); stroke-width: 1.4; }
.st-art__mini               { fill: var(--color-border); }
.st-art__mini.is-target     { fill: var(--color-accent); }

.st-art__tent               { fill: var(--color-white); stroke: var(--color-border); }
.st-art__tent-back          { fill: var(--color-tint); stroke: var(--color-border); }
.st-art__tent-rule          { stroke: var(--color-accent); stroke-width: 1; }
.st-art__qr                 { fill: var(--color-primary); }

.st-art__sparkle            { fill: var(--color-accent); }

/* Gentle motion: the pin bobs, the ring breathes, the lights twinkle,
   and the phone and card drift slowly up and down */
.st-art__pin {
    animation: st-art-bob 3.6s ease-in-out infinite;
}

.st-art__ring {
    animation: st-art-breathe 3.6s ease-in-out infinite;
}

.st-art__bulb,
.st-art__sparkle {
    animation: st-art-twinkle 3.2s ease-in-out infinite;
    animation-delay: calc(var(--st-i, 0) * -0.8s);
}

.st-art__float {
    animation: st-art-float 6s ease-in-out infinite;
}

.st-art__float--alt {
    animation-delay: -3s;
}

@keyframes st-art-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(calc(var(--space-2) * -1)); }
}

@keyframes st-art-breathe {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

@keyframes st-art-twinkle {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

@keyframes st-art-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(calc(var(--space-1) * -1.5)); }
}

/* =====================================================
   Form side
   ===================================================== */

.st-auth__panel {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Form centred in the white area: extra room on the curved side, matching the left panel */
    padding: var(--space-12) var(--space-12) var(--space-12) var(--space-20);
}

.st-auth__form-wrap {
    width: 100%;
    max-width: var(--form-max);
}

.st-auth__form-eyebrow {
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent-dark);
}

.st-auth__heading {
    margin-top: var(--space-3);
    font-family: var(--font-heading);
    font-size: var(--text-h2);
    font-weight: var(--fw-semibold);
    line-height: var(--leading-heading);
    letter-spacing: -0.01em;
    color: var(--color-text);
}

.st-auth__intro {
    margin-top: var(--space-3);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    color: var(--color-muted);
}

.st-auth__form {
    margin-top: var(--space-8);
}

.st-auth__switch {
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-muted);
}

/* =====================================================
   Responsive
   ===================================================== */

/* Tablet and below: stack. The illustration panel sits on top and its
   curved bottom edge sweeps down into the form. */
@media ( max-width: 1024px ) {
    .st-auth__layout {
        --auth-gutter: var(--section-px);
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    /* Stacked: the panel is as tall as its content, so pack it from the top */
    .st-auth__visual {
        justify-content: flex-start;
        gap: var(--space-6);
    }

    .st-auth__visual {
        margin-right: 0;
        margin-bottom: calc(var(--space-6) * -1);
        padding: var(--space-10) var(--auth-gutter) var(--space-16);
        text-align: center;
        align-items: center;
    }

    .st-auth__surface,
    .st-auth__band {
        /* Convex bottom edge instead of right edge */
        clip-path: ellipse(100% 100% at 50% 0%);
    }

    .st-auth__band--inner {
        right: 0;
        bottom: calc(var(--space-3) * -1);
    }

    .st-auth__band--outer {
        right: 0;
        bottom: calc(var(--space-6) * -1);
    }

    .st-auth__art .st-art {
        width: var(--auth-art-max-sm);
    }

    .st-auth__panel {
        padding: var(--space-12) var(--auth-gutter) var(--space-14);
    }

    .st-auth__form-wrap {
        max-width: var(--auth-stack-max);
    }
}

@media ( max-width: 640px ) {
    .st-auth__visual {
        gap: var(--space-4);
        padding-top: var(--space-8);
        padding-bottom: var(--space-12);
    }

    /* Keep the top panel short on phones: tagline + illustration */
    .st-auth__body,
    .st-auth__points {
        display: none;
    }

    .st-auth__tagline {
        font-size: var(--text-h3);
    }

    .st-auth__panel {
        padding: var(--space-10) var(--space-5);
    }
}

@media ( prefers-reduced-motion: reduce ) {
    .st-art__pin,
    .st-art__ring,
    .st-art__bulb,
    .st-art__sparkle,
    .st-art__float {
        animation: none;
    }
}
