/* ==========================================================================
   "Deep Freeze" - closings.cadott.band design system
   Same family as the pep band "Stadium Night" theme: midnight navy base,
   Outfit/Inter typography, glassmorphism - with a frost/ice accent and a
   gentle CSS-only snowfall. Status colors stay semantic:
   open = emerald, virtual = amber, partial = yellow, closed = red.
   ========================================================================== */

:root {
    --bg-0: #060a14;
    --bg-1: #0a1120;
    --panel: rgba(13, 20, 38, 0.62);
    --panel-2: rgba(17, 26, 48, 0.55);
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #e8eefb;
    --text-dim: #93a1c0;
    --frost: #38bdf8;
    --frost-2: #7dd3fc;
    --frost-3: #22d3ee;
    --frost-ink: #04263a;
    --indigo: #5b6ef5;
    --open: #34d399;
    --virtual: #fbbf24;
    --partial: #facc15;
    --closed: #f87171;
    --radius: 16px;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-display: "Outfit", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0 0 40px;
    min-height: 100vh;
    background:
        radial-gradient(1100px 700px at 85% -8%, rgba(56, 189, 248, 0.14), transparent 60%),
        radial-gradient(900px 620px at -10% 8%, rgba(91, 110, 245, 0.12), transparent 55%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
    background-attachment: fixed;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* Keep page content above the snow layers */
body > * { position: relative; z-index: 1; }

::selection { background: rgba(56, 189, 248, 0.35); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); }

a { color: var(--frost-2); }

:focus-visible {
    outline: 2px solid var(--frost);
    outline-offset: 2px;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Snowfall - two parallax layers of tiled dots drifting slowly downward.
   Loops seamlessly because each layer moves exactly one tile per cycle.
   -------------------------------------------------------------------------- */

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-repeat: repeat;
}

body::before {
    background-image:
        radial-gradient(1.6px 1.6px at 20px 30px, rgba(255, 255, 255, 0.55), transparent 100%),
        radial-gradient(1.4px 1.4px at 92px 112px, rgba(255, 255, 255, 0.38), transparent 100%),
        radial-gradient(1.8px 1.8px at 164px 62px, rgba(226, 244, 255, 0.5), transparent 100%),
        radial-gradient(1.3px 1.3px at 122px 192px, rgba(255, 255, 255, 0.32), transparent 100%),
        radial-gradient(1.6px 1.6px at 52px 164px, rgba(226, 244, 255, 0.42), transparent 100%),
        radial-gradient(1.4px 1.4px at 196px 172px, rgba(255, 255, 255, 0.36), transparent 100%);
    background-size: 220px 220px;
    animation: snow-fall-1 110s linear infinite;
}

body::after {
    background-image:
        radial-gradient(2.4px 2.4px at 40px 62px, rgba(255, 255, 255, 0.4), transparent 100%),
        radial-gradient(2px 2px at 152px 32px, rgba(226, 244, 255, 0.34), transparent 100%),
        radial-gradient(2.6px 2.6px at 262px 122px, rgba(255, 255, 255, 0.3), transparent 100%),
        radial-gradient(2px 2px at 84px 222px, rgba(226, 244, 255, 0.3), transparent 100%),
        radial-gradient(2.4px 2.4px at 202px 284px, rgba(255, 255, 255, 0.26), transparent 100%),
        radial-gradient(2px 2px at 312px 192px, rgba(226, 244, 255, 0.3), transparent 100%);
    background-size: 340px 340px;
    animation: snow-fall-2 70s linear infinite;
}

@keyframes snow-fall-1 { to { background-position: 0 220px; } }
@keyframes snow-fall-2 { to { background-position: 0 340px; } }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    max-width: 960px;
    margin: 0 auto;
    padding: 56px 22px 6px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--frost-2), var(--frost) 55%, var(--frost-3));
    color: var(--frost-ink);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.35);
    margin-bottom: 16px;
}

.hero-badge svg { display: block; }

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    margin: 0 0 10px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 0 0 12px;
}

.text-gradient {
    background: linear-gradient(90deg, var(--frost-2), var(--frost) 55%, var(--frost-3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    color: var(--text-dim);
    font-size: 1.02rem;
    line-height: 1.55;
    max-width: 560px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Layout / glass panels
   -------------------------------------------------------------------------- */

.container {
    max-width: 960px;
    margin: 26px auto 0;
    padding: 26px clamp(18px, 3vw, 30px);
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

h1 {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 0 0 6px;
}

h2 {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}

.small {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 6px 0;
}

.link {
    color: var(--frost-2);
    text-decoration: none;
}

.link:hover { color: var(--frost-3); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Forms / school chips
   -------------------------------------------------------------------------- */

.form-row {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

.form-row form { flex: 1; min-width: 0; }

.side-panel { min-width: 220px; max-width: 260px; }

.schools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 4px 0 2px;
}

.school-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(10, 17, 32, 0.7);
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.school-item:hover {
    border-color: rgba(125, 211, 252, 0.55);
    background: rgba(20, 33, 58, 0.8);
    transform: translateY(-1px);
}

.school-item input[type="checkbox"] {
    accent-color: var(--frost);
    width: 15px;
    height: 15px;
    margin: 0;
    flex: none;
    cursor: pointer;
}

.school-item:has(input[type="checkbox"]:checked) {
    border-color: rgba(56, 189, 248, 0.75);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(34, 211, 238, 0.14));
    box-shadow: 0 4px 18px rgba(56, 189, 248, 0.25);
    color: #fff;
}

.school-item.closed {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(248, 113, 113, 0.12);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--frost-2), var(--frost) 55%, var(--frost-3));
    color: var(--frost-ink);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover { box-shadow: 0 10px 30px rgba(56, 189, 248, 0.5); }

.btn-secondary {
    background: rgba(10, 17, 32, 0.7);
    color: var(--text);
    border: 1px solid var(--line-strong);
}

.btn-secondary:hover { border-color: rgba(125, 211, 252, 0.55); color: #fff; }

.btn-danger {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: #2a0608;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

form .btn + input[type="submit"],
form .btn + .btn,
form input[type="submit"] + .btn { margin-left: 10px; }

input[type="submit"].btn,
input[type="submit"].btn-secondary { appearance: none; -webkit-appearance: none; }

/* --------------------------------------------------------------------------
   Status card grid (landing + result pages)
   -------------------------------------------------------------------------- */

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 18px;
}

@media (max-width: 900px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .grid { grid-template-columns: 1fr; }
}

.school-card {
    position: relative;
    padding: 16px 16px 14px 19px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
    min-height: 84px;
    overflow: hidden;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.school-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42);
}

/* status accent bar on the card's left edge */
.school-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent, var(--line-strong));
    opacity: 0.9;
}

.school-card .card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.school-card h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.status-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.status-open { --accent: var(--open); }

.status-open .status-pill {
    background: rgba(52, 211, 153, 0.14);
    color: #6ee7b7;
    border-color: rgba(52, 211, 153, 0.4);
}

.status-virtual { --accent: var(--virtual); }

.status-virtual .status-pill {
    background: rgba(251, 191, 36, 0.14);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.42);
}

.status-partial { --accent: var(--partial); }

.status-partial .status-pill {
    background: rgba(250, 204, 21, 0.14);
    color: #fde047;
    border-color: rgba(250, 204, 21, 0.42);
}

.status-closed { --accent: var(--closed); }

.status-closed .status-pill {
    background: rgba(248, 113, 113, 0.16);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.45);
}

/* faint status glow inside the card */
.status-closed::after,
.status-virtual::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(240px 120px at 85% -30%, var(--glow, transparent), transparent 70%);
    opacity: 0.5;
}

.status-closed::after { --glow: rgba(248, 113, 113, 0.14); }
.status-virtual::after { --glow: rgba(251, 191, 36, 0.12); }

/* --------------------------------------------------------------------------
   Tables (debug pages)
   -------------------------------------------------------------------------- */

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.table th,
.table td {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
}

.table th {
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   iOS install banner
   -------------------------------------------------------------------------- */

.ios-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 16px;
    background: rgba(13, 22, 40, 0.92);
    border: 1px solid rgba(125, 211, 252, 0.35);
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 1000;
    color: var(--text);
}

.ios-banner .btn { padding: 7px 12px; border-radius: 9px; }

.ios-banner .ios-text {
    flex: 1;
    font-size: 0.93rem;
    line-height: 1.45;
}

.ios-banner .ios-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-weight: 600;
    cursor: pointer;
    padding: 6px;
    font-size: 0.9rem;
}

.ios-banner .ios-close:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    text-align: center;
    padding: 30px 16px 6px;
    margin-top: 34px;
    color: var(--text-dim);
    font-size: 0.88rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer a {
    color: var(--frost-2);
    text-decoration: none;
    font-weight: 500;
}

.site-footer a:hover { color: var(--frost-3); text-decoration: underline; }

.footer-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    margin: 0 0.6rem;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
    .hero { padding-top: 42px; }

    .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .side-panel,
    .form-row > div {
        margin-left: 0 !important;
        min-width: unset !important;
        max-width: none;
    }

    .schools-list {
        max-height: 320px;
        overflow: auto;
        padding-right: 4px;
    }

    form .btn + input[type="submit"],
    form .btn + .btn,
    form input[type="submit"] + .btn { margin-left: 0; }

    .btn,
    form .btn {
        width: 100%;
    }

    .btn + .btn { margin-top: 10px; }

    .ios-banner { flex-wrap: wrap; }
    .ios-banner .ios-text { flex-basis: 100%; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after { animation: none; }

    .btn,
    .school-item,
    .school-card { transition: none; }

    .btn:hover,
    .school-item:hover,
    .school-card:hover { transform: none; }
}
