/* ==========================================================================
   EduFokam — "Aurora Ledger" public-site identity
   Scoped entirely to body.landing and body.auth-page so the working
   dashboards (developer/principal/teacher/student/guardian) keep their
   calm, ledger-plain look untouched. This file only ever loads on pages
   that explicitly opt in via $body_class in header.php.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap');

body.landing, body.auth-page {
    --aurora-teal: #2fd6b0;
    --aurora-violet: #8b7cf6;
    --aurora-gold: #e9b64d;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.14);
    --font-display: 'Space Grotesk', 'Archivo', sans-serif;
    background: var(--ink-deep);
    position: relative;
}

/* ---------- Motion primitives ---------- */

@keyframes auroraDrift {
    0%   { transform: translate3d(0,0,0) rotate(0deg) scale(1); }
    50%  { transform: translate3d(2%, -3%, 0) rotate(8deg) scale(1.08); }
    100% { transform: translate3d(0,0,0) rotate(0deg) scale(1); }
}
@keyframes gradientPan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes pulseGlow {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes shine {
    0% { transform: translateX(-130%) skewX(-15deg); }
    100% { transform: translateX(230%) skewX(-15deg); }
}
@keyframes revealUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------- Ambient background (whole page) ---------- */

body.landing::before, body.auth-page::before { display:none;
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(60% 45% at 12% 8%, rgba(47,214,176,0.20), transparent 60%),
        radial-gradient(50% 40% at 88% 15%, rgba(139,124,246,0.22), transparent 60%),
        radial-gradient(60% 50% at 50% 100%, rgba(233,182,77,0.14), transparent 65%),
        var(--ink-deep);
    animation: auroraDrift 22s ease-in-out infinite;
}
body.landing::after, body.auth-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 90%);
}
body.landing > *, body.auth-page > * { position: relative; z-index: 1; isolation: isolate; }

/* ---------- Reveal-on-scroll ---------- */

[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.2,0.7,0.2,1), transform 0.7s cubic-bezier(0.2,0.7,0.2,1);
}
[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}
[data-reveal="fade"] { transform: none; }

/* ---------- Topbar (glass, sticky) ---------- */

body.landing .topbar, body.auth-page .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(16, 26, 48, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
body.landing .topbar .brand, body.auth-page .topbar .brand {
    font-family: var(--font-display);
}
body.landing .topbar nav a, body.auth-page .topbar nav a {
    position: relative;
    transition: opacity 0.2s ease;
}
body.landing .topbar nav a::after, body.auth-page .topbar nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 100%;
    bottom: -4px;
    height: 2px;
    background: linear-gradient(90deg, var(--aurora-teal), var(--aurora-gold));
    transition: right 0.25s ease;
    border-radius: 2px;
}
body.landing .topbar nav a:hover::after, body.auth-page .topbar nav a:hover::after { right: 0; }

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

body.landing .hero {
    background: none;
    border-bottom: none;
    padding: 96px 28px 110px;
    animation: none;
}
body.landing .hero::before { display: none; }

body.landing .hero-ambient .orb { filter: blur(60px); opacity: 0.55; }
body.landing .hero-ambient .orb-1 { background: radial-gradient(circle, rgba(233,182,77,0.55), transparent 70%); width: 380px; height: 380px; }
body.landing .hero-ambient .orb-2 { background: radial-gradient(circle, rgba(47,214,176,0.5), transparent 72%); width: 320px; height: 320px; }
body.landing .hero-ambient .orb-3 { background: radial-gradient(circle, rgba(139,124,246,0.5), transparent 72%); width: 300px; height: 300px; }

body.landing .hero .seal-wrap {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 0 1px rgba(233,182,77,0.15), 0 20px 60px rgba(0,0,0,0.35);
    position: relative;
}
body.landing .hero .seal-wrap::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px dashed rgba(233,182,77,0.4);
    animation: ringSpin 26s linear infinite;
}

body.landing .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--aurora-gold);
}
body.landing .eyebrow::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--aurora-teal);
    box-shadow: 0 0 0 3px rgba(47,214,176,0.25);
    animation: pulseGlow 2.2s ease-in-out infinite;
}

body.landing .hero h1 {
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff; /* fallback for browsers without background-clip: text support */
    animation: fadeInUp 0.8s cubic-bezier(0.2,0.8,0.2,1) both;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    body.landing .hero h1 {
        background: linear-gradient(100deg, #fff 15%, var(--aurora-teal) 42%, var(--aurora-gold) 58%, #fff 82%);
        background-size: 250% auto;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        animation: fadeInUp 0.8s cubic-bezier(0.2,0.8,0.2,1) both, gradientPan 9s linear infinite 1.2s;
    }
}

body.landing .hero p.lede { max-width: 600px; }

/* Magnetic / shine buttons */
body.landing .btn, body.auth-page .btn {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.25s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.25s ease, background 0.25s ease;
    will-change: transform;
}
body.landing .btn::before, body.auth-page .btn::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 40%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: translateX(-130%) skewX(-15deg);
}
body.landing .btn:hover::before, body.auth-page .btn:hover::before { animation: shine 0.9s ease forwards; }
body.landing .hero .btn.secondary, body.auth-page .btn.secondary {
    background: linear-gradient(120deg, var(--aurora-gold), #d9a13d);
    box-shadow: 0 12px 30px rgba(233,182,77,0.28);
}
body.landing .hero .btn.secondary:hover { box-shadow: 0 16px 38px rgba(233,182,77,0.4); }

/* ---------- Stats strip ---------- */

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-width: 880px;
    margin: 46px auto 0;
}
@media (max-width: 720px) { .stats-strip { grid-template-columns: repeat(2, 1fr); } }
.stats-strip .stat {
    text-align: center;
    padding: 18px 10px;
    border-radius: 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
}
.stats-strip .stat .num {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    background: linear-gradient(90deg, var(--aurora-teal), var(--aurora-gold));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats-strip .stat .label {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ---------- Why EduFokam: feature slideshow ---------- */

.feature-slideshow {
    max-width: 1040px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 26px;
    padding: 10px;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    outline: none;
}
.feature-slideshow:focus-visible { box-shadow: 0 30px 80px rgba(0,0,0,0.35), 0 0 0 2px var(--aurora-teal); }

.fs-stage { position: relative; min-height: 460px; border-radius: 18px; overflow: hidden; }

.fs-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
    padding: 44px 48px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(26px);
    transition: opacity 0.5s cubic-bezier(0.2,0.7,0.2,1), transform 0.5s cubic-bezier(0.2,0.7,0.2,1), visibility 0.5s;
}
.fs-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(0); }

.fs-visual {
    position: relative;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.1);
    padding: 22px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    overflow: hidden;
}
.fs-visual::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 20% 10%, rgba(47,214,176,0.14), transparent 60%);
    pointer-events: none;
}
.mock-frame-label {
    position: relative;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
}
.mock-caption { position: relative; font-size: 0.82rem; color: rgba(255,255,255,0.55); }

.fs-copy { position: relative; }
.fs-num {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(47,214,176,0.4);
    color: var(--aurora-teal);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}
.fs-copy h3 { font-family: var(--font-display); color: #fff; font-size: clamp(1.2rem, 2.4vw, 1.5rem); margin: 0 0 12px; }
.fs-copy p { color: rgba(255,255,255,0.68); font-size: 0.95rem; line-height: 1.55; margin: 0 0 18px; }
.fs-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(233,182,77,0.1);
    border: 1px solid rgba(233,182,77,0.35);
    color: var(--aurora-gold);
    font-size: 0.78rem;
    font-weight: 600;
}
.fs-pill svg { flex: 0 0 auto; }

/* Controls */
.fs-controls { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 16px 8px 10px; }
.fs-arrow {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.fs-arrow:hover { background: rgba(47,214,176,0.16); border-color: rgba(47,214,176,0.4); transform: translateY(-1px); }
.fs-dots { display: flex; gap: 8px; }
.fs-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.22);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}
.fs-dot.is-active { width: 22px; border-radius: 4px; background: linear-gradient(90deg, var(--aurora-teal), var(--aurora-gold)); }

/* Slide 1 — timeline */
.mock-timeline { position: relative; display: flex; align-items: center; justify-content: space-between; }
.tl-node { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; position: relative; }
.tl-node::before { content: ""; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: rgba(255,255,255,0.14); z-index: 0; }
.tl-node:first-child::before { display: none; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.18); border: 2px solid rgba(255,255,255,0.28); position: relative; z-index: 1; }
.tl-grade { font-size: 0.62rem; color: rgba(255,255,255,0.45); font-weight: 600; }
.tl-node.is-current .tl-dot { background: var(--aurora-teal); border-color: var(--aurora-teal); box-shadow: 0 0 0 5px rgba(47,214,176,0.2); animation: pulseGlow 2s ease-in-out infinite; }
.tl-node.is-current .tl-grade { color: var(--aurora-teal); }
.tl-node.is-current::before { background: linear-gradient(90deg, rgba(255,255,255,0.14), var(--aurora-teal)); }

/* Slide 2 — marks */
.mock-rank { position: relative; color: rgba(255,255,255,0.75); font-size: 0.85rem; }
.mock-rank strong { color: var(--aurora-gold); font-family: var(--font-display); }
.mock-bars { position: relative; display: flex; flex-direction: column; gap: 10px; }
.mb-row { display: grid; grid-template-columns: 84px 1fr 40px; align-items: center; gap: 10px; font-size: 0.76rem; color: rgba(255,255,255,0.6); }
.mb-track { height: 7px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; }
.mb-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--aurora-teal), var(--aurora-gold)); animation: fillIn 1.1s cubic-bezier(0.2,0.7,0.2,1) both; }
.mb-row em { font-style: normal; color: #fff; font-weight: 600; text-align: right; }
@keyframes fillIn { from { width: 0 !important; } }

/* Slide 3 — attendance */
.att-rate-wrap { position: relative; display: flex; align-items: center; gap: 16px; }
.att-ring { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--aurora-teal) 0 96%, rgba(255,255,255,0.1) 0); font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; color: #fff; position: relative; flex: 0 0 auto; }
.att-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--ink-deep); }
.att-ring span { position: relative; }
.att-legend { font-size: 0.72rem; color: rgba(255,255,255,0.55); display: flex; align-items: center; flex-wrap: wrap; }
.att-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.att-legend .dot.present { background: var(--aurora-teal); }
.att-legend .dot.absent { background: #e2645f; margin-left: 12px; }
.att-grid { position: relative; display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; }
.att-cell { aspect-ratio: 1; border-radius: 3px; background: rgba(255,255,255,0.08); }
.att-cell.present { background: rgba(47,214,176,0.55); }
.att-cell.absent { background: rgba(226,100,95,0.6); }
.att-cell.break { background: rgba(233,182,77,0.5); }

/* Slide 4 — homework */
.hw-list { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hw-list li { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 9px 12px; font-size: 0.8rem; }
.hw-check { width: 20px; height: 20px; border-radius: 50%; background: rgba(47,214,176,0.18); color: var(--aurora-teal); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; flex: 0 0 auto; }
.hw-list li.pending .hw-check { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }
.hw-title { flex: 1; color: rgba(255,255,255,0.85); }
.hw-time { color: rgba(255,255,255,0.4); font-size: 0.72rem; white-space: nowrap; }

/* Slide 5 — roles */
.roles-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-chip { text-align: center; padding: 14px 8px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; color: rgba(255,255,255,0.7); font-weight: 600; animation: roleGlow 6s ease-in-out infinite; }
.role-chip:nth-child(1) { animation-delay: 0s; }
.role-chip:nth-child(2) { animation-delay: 1.5s; }
.role-chip:nth-child(3) { animation-delay: 3s; }
.role-chip:nth-child(4) { animation-delay: 4.5s; }
@keyframes roleGlow {
    0%, 85%, 100% { border-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); box-shadow: none; }
    15% { border-color: rgba(47,214,176,0.5); color: #fff; box-shadow: 0 0 0 3px rgba(47,214,176,0.12); }
}

/* Slide 6 — offline / PWA */
.signal-wrap { position: relative; display: flex; align-items: center; gap: 16px; }
.signal-bars { display: flex; align-items: flex-end; gap: 4px; height: 32px; flex: 0 0 auto; }
.signal-bars span { width: 6px; border-radius: 2px; background: rgba(255,255,255,0.15); animation: sigPulse 1.8s ease-in-out infinite; display: block; }
.signal-bars span:nth-child(1) { height: 30%; animation-delay: 0s; }
.signal-bars span:nth-child(2) { height: 55%; animation-delay: 0.2s; }
.signal-bars span:nth-child(3) { height: 78%; animation-delay: 0.4s; }
.signal-bars span:nth-child(4) { height: 100%; animation-delay: 0.6s; background: var(--aurora-teal); }
@keyframes sigPulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.offline-chip { font-size: 0.76rem; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.7); }

@media (max-width: 760px) {
    .fs-stage { min-height: 660px; overflow: visible; }
    .fs-slide { grid-template-columns: 1fr; padding: 26px 20px; }
    .fs-visual { min-height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
    .fs-slide { transition: none; }
    .tl-node.is-current .tl-dot, .role-chip, .signal-bars span, .mb-fill { animation: none !important; }
}

/* ---------- Sections on dark canvas ---------- */

body.landing .section {
    color: rgba(255,255,255,0.92);
}
body.landing .section .eyebrow { color: var(--aurora-gold); }
body.landing .section h2 {
    font-family: var(--font-display);
    color: #fff;
}
body.landing .section .section-lede { color: rgba(255,255,255,0.6); }

/* Glass cards replace flat paper cards on the public site */
body.landing .team-card, body.landing .card, body.auth-page .card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 20px 50px rgba(0,0,0,0.28);
    color: rgba(255,255,255,0.9);
}
body.landing .card h2, body.landing .card h3, body.auth-page .card h2, body.auth-page .card h3 { color: #fff; }
body.landing .card p, body.auth-page .card p { color: rgba(255,255,255,0.68); }

/* Module cards (Attendance / Marksheets / Homework) get an icon badge + tilt */
body.landing .team-card {
    transform-style: preserve-3d;
    transition: transform 0.15s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
body.landing .team-card:hover {
    border-color: rgba(233,182,77,0.35);
    box-shadow: 0 26px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(47,214,176,0.15);
}
body.landing #modules .avatar-ring {
    background: linear-gradient(135deg, rgba(47,214,176,0.18), rgba(139,124,246,0.18));
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--aurora-gold);
    font-size: 1.6rem;
    animation: floatY 5s ease-in-out infinite;
}
body.landing .team-card:nth-child(2) #modules .avatar-ring,
body.landing #modules .team-card:nth-child(2) .avatar-ring { animation-delay: 0.3s; }
body.landing #modules .team-card:nth-child(3) .avatar-ring { animation-delay: 0.6s; }

body.landing .team-card h3 { color: #fff; }
body.landing .team-card .role { color: var(--aurora-teal); }
body.landing .team-card .location { color: rgba(255,255,255,0.5); }
body.landing .team-card p.bio { color: rgba(255,255,255,0.68); }
body.landing #team .avatar-ring { border-color: var(--aurora-gold); }

/* Trial callout card */
body.landing .section [style*="var(--gold-soft)"] {
    background: linear-gradient(135deg, rgba(233,182,77,0.14), rgba(47,214,176,0.08)) !important;
    border: 1px solid rgba(233,182,77,0.35) !important;
    position: relative;
    overflow: hidden;
}
body.landing .section [style*="var(--gold-soft)"]::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.12), transparent 60%);
}
body.landing .section [style*="var(--gold-soft)"] h2,
body.landing .section [style*="var(--gold-soft)"] p { position: relative; }

/* Contact / location pills */
body.landing .location-pill {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: rgba(255,255,255,0.85);
}
body.landing .location-pill .dot { background: var(--aurora-teal); box-shadow: 0 0 0 3px rgba(47,214,176,0.2); }

body.landing form input, body.landing form select, body.landing form textarea,
body.auth-page form input, body.auth-page form select, body.auth-page form textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.16);
    color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
body.landing form input::placeholder, body.auth-page form input::placeholder { color: rgba(255,255,255,0.35); }
body.landing form input:focus, body.landing form select:focus, body.landing form textarea:focus,
body.auth-page form input:focus, body.auth-page form select:focus, body.auth-page form textarea:focus {
    border-color: var(--aurora-teal);
    box-shadow: 0 0 0 3px rgba(47,214,176,0.15);
}
body.landing label, body.auth-page label { color: rgba(255,255,255,0.85); }
/* The native <select> dropdown POPUP (the expanded list of options) in
   Chrome inherits the select's own background/color — so the dark-theme
   styling above (white text, near-transparent background) that looks
   right on the closed box turns into invisible white-on-white text once
   the list opens. Options always get a fixed light background + dark
   text regardless of page theme, since that's the one combination every
   browser renders the native popup with reliably. */
body.landing form select option, body.auth-page form select option {
    background: #fff;
    color: #1B2A4A;
}
body.landing .alert-error, body.auth-page .alert-error { background: rgba(193,39,45,0.15); border-color: rgba(193,39,45,0.4); color: #ff9d97; }
body.landing .alert-success, body.auth-page .alert-success { background: rgba(47,214,176,0.14); border-color: rgba(47,214,176,0.4); color: #7fe9cf; }

/* ---------- Footer on dark canvas: keep, just add gradient top edge ---------- */
body.landing .footer, body.auth-page .footer {
    position: relative;
    background: #0c1730;
}
body.landing .footer::before, body.auth-page .footer::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--aurora-teal), var(--aurora-gold), var(--aurora-violet));
    background-size: 200% auto;
    animation: gradientPan 6s linear infinite;
}

/* ==========================================================================
   Auth pages (login / register) — split panel layout
   ========================================================================== */

.auth-shell {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 76px);
    max-width: 1100px;
    margin: 0 auto;
}

.auth-form-side {
    width: 100%;
    max-width: 480px;
    background: rgba(10, 16, 32, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 40px 100px rgba(0,0,0,0.35);
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 560px) {
    .auth-form-side { padding: 36px 26px; border-radius: 14px; }
}
.auth-form-side .card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}
.auth-form-side h1 { font-family: var(--font-display); color: #fff; text-align: left !important; }

body.auth-page .container { max-width: 1100px; padding: 40px 20px 60px; }

/* ---------- Reduced motion (extends the base rule for our new animations) --- */
@media (prefers-reduced-motion: reduce) {
    body.landing::before, body.landing::after,
    body.auth-page::before, body.auth-page::after { animation: none !important; }
    [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- "Get the app" (PWA install) buttons + iOS instructions modal ---------- */
.app-download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
}
.app-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}
.app-download-btn:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }
.app-download-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.install-modal {
    position: fixed;
    inset: 0;
    background: rgba(16, 26, 48, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999;
}
.install-modal[hidden] { display: none; }
.install-modal-card {
    background: var(--paper);
    color: var(--text);
    border-radius: 12px;
    max-width: 380px;
    width: 100%;
    padding: 26px;
    position: relative;
}
.install-modal-card h3 { margin-top: 0; font-family: var(--font-display); color: var(--ink); }
.install-modal-card ol { margin: 14px 0 0; padding-left: 20px; }
.install-modal-card ol li { margin-bottom: 8px; line-height: 1.5; }
.install-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
}
