/* Modernized Welcome Page Styles - White & Royal Blue Educational Theme */
:root {
    --bg-white: #ffffff;
    --bg-light: #f8f9fc;
    --card: #ffffff;
    --panel: #f5f7fa;
    --text-primary: #1a202c;
    --text-secondary: #2d3748;
    --text-muted: #4a5568;
    --royal-blue: #4169E1;
    --royal-blue-dark: #2952CC;
    --royal-blue-light: #5A7FEE;
    --accent: linear-gradient(135deg, #4169E1 0%, #2952CC 100%);
    --accent-solid: #4169E1;
    --border: rgba(65, 105, 225, 0.15);
    --border-light: rgba(0, 0, 0, 0.08);
    --practice-card-height: 0px;
    --practice-card-width: 0px;
}

* { box-sizing: border-box; }

.welcome-body {
    margin: 0;
    font-family: 'Inter', 'Nunito', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-white);
    color: var(--text-primary);
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    line-height: 1.6;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.welcome-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    padding-top: env(safe-area-inset-top);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.welcome-nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.welcome-nav-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
}

.welcome-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.logo-mark {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
}

.logo-type {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--royal-blue);
}

.welcome-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.welcome-hamburger span {
    width: 26px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.welcome-hamburger.active span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
.welcome-hamburger.active span:nth-child(2) { opacity: 0; }
.welcome-hamburger.active span:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

.welcome-nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.welcome-nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.welcome-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.welcome-nav-links a:hover {
    color: var(--royal-blue);
    background: rgba(65, 105, 225, 0.08);
}

.btn-get-started-nav {
    text-decoration: none;
    padding: 0.7rem 1.3rem;
    border-radius: 8px;
    color: white;
    background: var(--royal-blue);
    font-weight: 700;
    transition: all 0.2s ease;
    margin-left: auto;
}

.welcome-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-get-started-nav:hover {
    background: var(--royal-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(65, 105, 225, 0.3);
}

/* Hero */
.hero-section {
    position: relative;
    padding: max(8rem, calc(7rem + env(safe-area-inset-top))) 0 5rem;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 50%, #f5f7fa 100%);
}

.gradient-veil {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(65, 105, 225, 0.08), transparent 40%),
                radial-gradient(circle at 80% 0%, rgba(41, 82, 204, 0.06), transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.2rem;
    align-items: stretch;
}

.hero-copy { max-width: 640px; }

.eyebrow {
    display: inline-flex;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(65, 105, 225, 0.1);
    color: var(--royal-blue);
    font-weight: 700;
    font-size: 0.9rem;
}

.hero-title {
    font-size: clamp(2.6rem, 4vw, 3.4rem);
    line-height: 1.1;
    margin: 1rem 0 1rem;
    color: var(--text-primary);
    font-weight: 800;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.btn-get-started-hero {
    display: inline-block;
    background: var(--royal-blue);
    color: white;
    padding: 0.9rem 1.8rem;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-get-started-hero:hover {
    background: var(--royal-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(65, 105, 225, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--royal-blue);
    padding: 0.9rem 1.4rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-ghost:hover {
    border-color: var(--royal-blue-dark);
    background: rgba(65, 105, 225, 0.05);
    color: var(--royal-blue-dark);
}

.hero-meta {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 1rem 0 1.5rem;
}

.meta-pill {
    padding: 0.45rem 0.9rem;
    background: rgba(65, 105, 225, 0.1);
    border-radius: 999px;
    color: var(--royal-blue);
    font-size: 0.95rem;
    font-weight: 600;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(65, 105, 225, 0.15);
    border-color: var(--royal-blue);
}

.stat-number {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: var(--royal-blue);
}

.stat-label { color: var(--text-muted); font-weight: 600; }

.hero-visual { display: flex; justify-content: flex-end; align-items: stretch; }

.visual-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    border: 2px solid var(--border);
    min-height: calc(440px + var(--practice-card-height));
    max-height: calc(520px + var(--practice-card-height));
    height: 100%;
    display: flex;
    width: min(calc(100% + var(--practice-card-width)), 780px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.visual-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: var(--panel);
    display: block;
    flex: 1;
}

.visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.75));
    padding: 1.5rem 1.6rem;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.6rem;
}

.visual-overlay h3 { margin: 0; font-size: 1.3rem; font-weight: 700; }
.visual-overlay p { margin: 0 0 0.6rem; color: var(--text-muted); }

.overlay-tag {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--royal-blue);
    color: white;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.overlay-actions { display: flex; align-items: center; gap: 0.4rem; font-weight: 600; color: var(--royal-blue); }
.overlay-actions a { color: var(--royal-blue); text-decoration: none; }

/* Section shared */
section { padding: 6rem 0; }

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.section-title {
    margin: 0.3rem 0;
    font-size: clamp(2rem, 3vw, 2.6rem);
    color: var(--text-primary);
    font-weight: 800;
}

.section-subtitle {
    margin: 0;
    color: var(--text-muted);
    max-width: 640px;
    line-height: 1.7;
    font-size: 1.05rem;
}

.section-kicker {
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--royal-blue);
    font-weight: 700;
    font-size: 0.85rem;
    margin: 0;
}

/* Features */
.features-section { background: var(--bg-light); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: white;
    border: 2px solid var(--border);
    padding: 1.8rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.feature-card:hover {
    border-color: var(--royal-blue);
    box-shadow: 0 8px 20px rgba(65, 105, 225, 0.15);
    transform: translateY(-4px);
}
.feature-icon { font-size: 1.8rem; margin-bottom: 0.6rem; }
.feature-card h3 { margin: 0 0 0.5rem; color: var(--text-primary); font-weight: 700; }
.feature-card p { margin: 0; color: var(--text-muted); line-height: 1.6; }

/* About */
.about-section { background: white; }

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.about-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border);
    min-height: calc(360px + var(--practice-card-height));
    max-height: calc(480px + var(--practice-card-height));
    width: 100%;
    max-width: 640px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.about-image img { width: 100%; display: block; height: 100%; object-fit: cover; }

.about-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.75));
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 1.4rem;
    padding-bottom: 4.2rem;
}

.about-overlay h3 { margin: 0; font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.about-overlay p { margin: 0; color: var(--text-muted); }
.about-overlay-kicker { text-transform: uppercase; letter-spacing: 1px; margin: 0; color: var(--royal-blue); font-weight: 700; }

.about-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: var(--royal-blue);
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.about-text p { color: var(--text-muted); line-height: 1.7; }

.about-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }

.btn-link { color: var(--text-primary); text-decoration: none; font-weight: 700; }
.btn-link:hover { text-decoration: underline; }

/* Services */
.services-section { background: var(--bg-light); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.service-item {
    background: white;
    border: 2px solid var(--border);
    padding: 1.4rem;
    border-radius: 14px;
    min-height: 170px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.service-icon { font-size: 1.8rem; margin-bottom: 0.4rem; }
.service-item h3 { margin: 0 0 0.4rem; color: var(--text-primary); font-weight: 700; }
.service-item p { margin: 0; color: var(--text-muted); line-height: 1.5; }

/* Partner */
.partner-section { background: white; }

.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.partner-card {
    background: white;
    border: 2px solid var(--border);
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.partner-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(65, 105, 225, 0.15);
    border-color: var(--royal-blue);
}

.partner-icon { font-size: 1.8rem; margin-bottom: 0.4rem; }
.partner-card h3 { margin: 0 0 0.4rem; color: var(--text-primary); font-weight: 700; }
.partner-card p { margin: 0 0 0.7rem; color: var(--text-muted); line-height: 1.5; }
.partner-benefits { color: var(--text-muted); display: grid; gap: 0.35rem; }

.partner-cta {
    background: white;
    border: 2px solid var(--border);
    padding: 1.6rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.partner-cta h3 { margin-top: 0; color: var(--text-primary); font-weight: 700; }
.partner-cta p { color: var(--text-muted); }

.cta-buttons { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.btn-partner-primary,
.btn-partner-secondary {
    display: inline-block;
    padding: 0.9rem 1.4rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-partner-primary {
    background: var(--royal-blue);
    color: white;
}

.btn-partner-primary:hover {
    background: var(--royal-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(65, 105, 225, 0.3);
}

.btn-partner-secondary {
    border: 2px solid var(--royal-blue);
    color: var(--royal-blue);
    background: transparent;
}

.btn-partner-secondary:hover {
    background: rgba(65, 105, 225, 0.05);
    border-color: var(--royal-blue-dark);
}

.partner-showcase { background: var(--bg-light); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }

.partner-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.partner-school-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.partner-school-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(65, 105, 225, 0.15);
    border-color: var(--royal-blue);
}

.partner-card-header h3 { margin: 0.2rem 0; color: var(--text-primary); font-weight: 700; }
.school-label { margin: 0; color: var(--royal-blue); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; font-size: 0.85rem; }
.school-location { margin: 0; color: var(--text-muted); }
.school-meta { margin: 0; color: var(--text-muted); font-weight: 700; }

.highlight-list { margin: 0; padding-left: 1.1rem; color: var(--text-muted); display: grid; gap: 0.35rem; }

.partner-card-actions { margin-top: auto; }
.empty-state { color: var(--text-muted); }

.directory-filters {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-input, .filter-select {
    background: white;
    border: 2px solid var(--border);
    color: var(--text-primary);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    min-width: 200px;
    font-weight: 600;
}

.filter-input:focus, .filter-select:focus {
    outline: none;
    border-color: var(--royal-blue);
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.1);
}

.filter-input::placeholder { color: var(--text-muted); }

.signup-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.8rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.partner-summary {
    background: var(--bg-light);
    border: 2px dashed var(--royal-blue);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    display: grid;
    gap: 0.45rem;
}

.partner-summary__header {
    text-transform: uppercase;
    color: var(--royal-blue);
    letter-spacing: 0.6px;
    font-size: 0.85rem;
    margin: 0;
    font-weight: 700;
}

.partner-summary__title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.partner-summary__list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-primary);
    display: grid;
    gap: 0.3rem;
}

.partner-summary__note {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.signup-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--text-primary);
    font-weight: 600;
}

.label-with-help {
    position: relative;
    gap: 0.5rem;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(65, 105, 225, 0.1);
    color: var(--royal-blue);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: help;
    margin-top: -0.15rem;
}

.signup-form input,
.signup-form select {
    background: white;
    border: 2px solid var(--border);
    color: var(--text-primary);
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    font-weight: 600;
}

.signup-form input:focus,
.signup-form select:focus {
    outline: none;
    border-color: var(--royal-blue);
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.1);
}

.signup-form input::placeholder { color: var(--text-muted); }

.form-grid { display: grid; gap: 1rem; }
.form-grid.two-col { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.form-note { color: var(--text-muted); font-size: 0.9rem; }

.flash-stack { display: grid; gap: 0.5rem; margin-top: 1rem; }
.flash-message { padding: 0.8rem 1rem; border-radius: 10px; border: 2px solid; }
.flash-message.success { background: rgba(76, 175, 80, 0.12); border-color: rgba(76, 175, 80, 0.5); color: #2e7d32; }
.flash-message.error { background: rgba(244, 67, 54, 0.12); border-color: rgba(244, 67, 54, 0.5); color: #c62828; }

.stage-field select:disabled { opacity: 0.7; }

.btn-group { display: grid; gap: 0.6rem; }

/* FAQ */
.faq-section { background: var(--bg-light); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }

.faq-container { display: grid; gap: 1rem; }
.faq-item { background: white; border: 2px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
.faq-item:hover { border-color: var(--royal-blue); }
.faq-question { padding: 1.2rem 1.4rem; font-weight: 700; position: relative; color: var(--text-primary); }
.faq-question::after { content: '+'; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); transition: transform 0.2s ease; color: var(--royal-blue); font-size: 1.5rem; }
.faq-item.active .faq-question::after { transform: translateY(-50%) rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; padding: 0 1.2rem; color: var(--text-muted); line-height: 1.6; transition: max-height 0.25s ease, padding 0.25s ease; }
.faq-item.active .faq-answer { max-height: 400px; padding: 0 1.2rem 1rem; }

/* Contact */
.contact-section { background: white; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; align-items: center; }
.contact-info { display: grid; gap: 1rem; }
.contact-item { display: flex; gap: 1rem; align-items: center; padding: 1.3rem; border: 2px solid var(--border); border-radius: 12px; background: white; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); transition: all 0.2s ease; }
.contact-item:hover { border-color: var(--royal-blue); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(65, 105, 225, 0.15); }
.contact-icon { font-size: 1.6rem; }
.contact-item h3 { margin: 0 0 0.2rem; color: var(--text-primary); font-weight: 700; }
.contact-item p { margin: 0; color: var(--text-muted); }

.contact-cta { display: flex; justify-content: flex-end; }
.contact-card { background: white; border: 2px solid var(--border); padding: 1.8rem; border-radius: 12px; max-width: 400px; width: 100%; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
.contact-card h3 { margin-top: 0; color: var(--text-primary); font-weight: 700; }
.contact-card p { color: var(--text-muted); }
.full-width { display: block; text-align: center; margin-top: 1rem; }

/* Footer */
.welcome-footer { background: var(--bg-light); border-top: 1px solid var(--border-light); padding: 2.5rem 0 1.5rem; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.footer-section h3, .footer-section h4 { margin: 0 0 0.6rem; color: var(--text-primary); font-weight: 700; }
.footer-section p, .footer-section ul { margin: 0; color: var(--text-muted); }
.footer-section ul { list-style: none; padding: 0; display: grid; gap: 0.3rem; }
.footer-section a { color: var(--text-muted); text-decoration: none; transition: color 0.2s ease; }
.footer-section a:hover { color: var(--royal-blue); }
.footer-bottom { text-align: center; color: var(--text-muted); margin-top: 1rem; font-size: 0.9rem; }

/* Overlay */
.subject-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 1rem; backdrop-filter: blur(4px); }
.subject-overlay-content { background: white; color: var(--text-primary); border-radius: 12px; width: min(100%, 960px); max-height: 90vh; overflow: auto; border: 2px solid var(--border); box-shadow: 0 24px 70px rgba(0,0,0,0.2); }
.overlay-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 2px solid var(--border-light); position: sticky; top: 0; background: white; }
.overlay-header h2 { color: var(--text-primary); font-weight: 700; }
.overlay-body { padding: 1rem 1.25rem 1.5rem; }
.close-overlay-btn, .btn-download-pdf { background: transparent; border: 2px solid var(--royal-blue); color: var(--royal-blue); padding: 0.5rem 0.9rem; border-radius: 10px; cursor: pointer; font-weight: 600; transition: all 0.2s ease; }
.close-overlay-btn:hover, .btn-download-pdf:hover { background: var(--royal-blue); color: white; }
.close-overlay-btn { font-size: 1.2rem; line-height: 1; }
.overlay-header-buttons { display: flex; gap: 0.5rem; }
.subject-details-table { display: grid; gap: 1rem; }
.system-section { background: white; border: 2px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
.system-title { margin: 0; padding: 0.9rem 1rem; border-bottom: 2px solid var(--border-light); background: var(--bg-light); color: var(--text-primary); font-weight: 700; }
.details-table { width: 100%; border-collapse: collapse; }
.details-table th, .details-table td { padding: 0.75rem; border-bottom: 1px solid var(--border-light); color: var(--text-muted); text-align: left; vertical-align: top; }
.details-table th { color: var(--text-primary); font-weight: 700; background: var(--bg-light); }
.loading-spinner, .error-message { text-align: center; padding: 1rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 900px) {
    .welcome-nav-menu {
        position: fixed;
        top: calc(64px + env(safe-area-inset-top));
        right: 0;
        width: 100%;
        max-width: 320px;
        background: rgba(255, 255, 255, 0.98);
        border-left: 2px solid var(--border-light);
        border-bottom: 2px solid var(--border-light);
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        transform: translateX(110%);
        transition: transform 0.25s ease;
        backdrop-filter: blur(12px);
        align-items: flex-start;
        justify-content: flex-start;
        box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.1);
    }

    .welcome-nav-menu.active { transform: translateX(0); }
    .welcome-hamburger { display: flex; }
    .welcome-nav-links { flex-direction: column; justify-content: flex-start; width: 100%; }
    .btn-get-started-nav { margin-left: 0; width: 100%; text-align: center; }
    .hero-section { padding-top: max(7rem, calc(6.5rem + env(safe-area-inset-top))); }
}

@media (max-width: 600px) {
    .hero-actions { flex-direction: column; }
    .btn-get-started-hero, .btn-ghost { width: 100%; text-align: center; }
    .section-head { flex-direction: column; align-items: flex-start; }
}

/* Locale bar styles */
.locale-bar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-light);
    padding: 10px 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.locale-control {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-primary);
}

.locale-select {
    padding: 6px 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.locale-select:focus {
    outline: none;
    border-color: var(--royal-blue);
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.1);
}

.locale-country-label {
    font-weight: 700;
    color: var(--text-primary);
}

.language-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 16px;
    backdrop-filter: blur(4px);
}

.language-modal[aria-hidden="false"] {
    display: flex;
}

.language-modal__dialog {
    background: #ffffff;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--border);
}

.language-modal__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.language-modal__body h3 {
    color: var(--text-primary);
    font-weight: 700;
    margin: 0;
}

.language-modal__body p {
    color: var(--text-muted);
    margin: 0;
}

.language-modal__body .btn {
    background: var(--royal-blue);
    color: white;
    border: none;
    padding: 0.8rem 1.4rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-modal__body .btn:hover {
    background: var(--royal-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(65, 105, 225, 0.3);
}

/* ============================================================
   Restored animations + colour polish.
   These were on the previous build but got lost in the deploy
   refactor. Brings back the gentle motion on the hero, a soft
   scroll-reveal on each section, a hovering glow on CTAs and a
   slow float on the logo so the landing page feels alive again
   instead of completely static.
   ============================================================ */

@keyframes brainboxFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes brainboxFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@keyframes brainboxPulseGlow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(65, 105, 225, 0.30);
    }
    50% {
        box-shadow: 0 6px 22px rgba(65, 105, 225, 0.45);
    }
}

/* Apply the animations to the long-standing welcome-page elements.
   Selectors target structural pieces (hero, section, primary CTA,
   logo image) so the animation hits even if individual class names
   shift later. */

.hero,
.welcome-hero,
section.hero,
section.welcome-section,
.welcome-section,
.welcome-content > section,
.welcome-content > div {
    animation: brainboxFadeUp 0.7s ease-out both;
}

.welcome-content > section:nth-child(2) { animation-delay: 0.10s; }
.welcome-content > section:nth-child(3) { animation-delay: 0.20s; }
.welcome-content > section:nth-child(4) { animation-delay: 0.30s; }
.welcome-content > section:nth-child(5) { animation-delay: 0.40s; }

.hero img,
.welcome-hero img,
.brand-logo,
.brain-logo,
.logo {
    animation: brainboxFloat 4.5s ease-in-out infinite;
}

.btn-primary,
.cta-button,
.btn.primary,
.welcome-cta {
    animation: brainboxPulseGlow 3s ease-in-out infinite;
}

/* Tiny global polish: smoother colour transitions on every link
   and button, so hover states never feel jarring. Honours
   prefers-reduced-motion so users who opted out get nothing. */
a, button, .btn, [role='button'] {
    transition: color 0.18s ease, background-color 0.18s ease,
                transform 0.18s ease, box-shadow 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
    .hero, .welcome-hero, section.hero, section.welcome-section,
    .welcome-section, .welcome-content > section,
    .welcome-content > div, .hero img, .welcome-hero img,
    .brand-logo, .brain-logo, .logo,
    .btn-primary, .cta-button, .btn.primary, .welcome-cta {
        animation: none !important;
    }
}
