﻿/* =========================================
   YOUNGVERSE AI - HOMEPAGE REDESIGN
   Phase 2.1 | Additive CSS
========================================= */

:root {
    --home-primary: #2563eb;
    --home-dark: #0f172a;
    --home-muted: #64748b;
    --home-border: #e2e8f0;
    --home-surface: #ffffff;
}

/* Base */
body {
    background: #f8fafc;
    color: var(--home-dark);
    font-family: 'Inter', sans-serif;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226,232,240,.85);
}

header .navbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

header .logo {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -1px;
    color: #0f172a;
    text-decoration: none;
    white-space: nowrap;
}

header .logo span {
    color: #2563eb;
}

header .logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: linear-gradient(135deg,#2563eb,#7c3aed);
    color: white;
    vertical-align: middle;
    margin-right: 7px;
}

header nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

header nav a {
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 650;
    padding: 11px 13px;
    border-radius: 10px;
    transition: all .2s ease;
}

header nav a:hover {
    color: #2563eb;
    background: #eff6ff;
}

header nav a.btn {
    color: white;
    background: linear-gradient(135deg,#2563eb,#4f46e5);
    box-shadow: 0 5px 14px rgba(37,99,235,.2);
}

header nav a.btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 9px 20px rgba(37,99,235,.27);
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    padding: 105px 0 95px;
    background:
        radial-gradient(ellipse at 85% 15%,rgba(129,140,248,.19),transparent 38%),
        radial-gradient(ellipse at 5% 90%,rgba(56,189,248,.13),transparent 35%),
        linear-gradient(135deg,#f8fbff 0%,#eff6ff 48%,#f5f3ff 100%);
}

.hero::before {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    right: -150px;
    top: -170px;
    border: 1px solid rgba(37,99,235,.13);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin-inline: auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: rgba(255,255,255,.8);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 750;
    box-shadow: 0 4px 14px rgba(37,99,235,.06);
}

.hero h1 {
    max-width: 850px;
    margin: 25px auto 20px;
    color: #0f172a;
    font-size: clamp(38px,6vw,66px);
    line-height: 1.1;
    letter-spacing: -2.8px;
    font-weight: 900;
}

.hero-description {
    max-width: 690px;
    margin: 0 auto;
    color: #64748b;
    font-size: 18px;
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.hero-actions .btn {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 25px;
    border-radius: 13px;
    font-weight: 750;
    transition: transform .2s ease,box-shadow .2s ease;
}

.hero-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(37,99,235,.18);
}

.hero-trust {
    margin-top: 35px;
    color: #64748b;
}

/* Sections */
.section {
    padding-top: 85px;
    padding-bottom: 85px;
}

.section:nth-of-type(even) {
    background: #ffffff;
}

.section-label {
    color: #2563eb;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.section-title,
.section h2 {
    color: #0f172a;
    letter-spacing: -1.2px;
    font-weight: 850;
}

/* Cards */
.card,
.portal-card,
.class-card,
.page-card {
    background: #ffffff;
    border: 1px solid #e8edf5;
    border-radius: 20px;
    box-shadow: 0 5px 22px rgba(15,23,42,.045);
    transition: transform .25s ease,box-shadow .25s ease,border-color .25s ease;
}

.card:hover,
.portal-card:hover,
.class-card:hover,
.page-card:hover {
    transform: translateY(-5px);
    border-color: #bfdbfe;
    box-shadow: 0 16px 36px rgba(15,23,42,.09);
}

.portal-card,
.class-card,
.page-card {
    padding: 25px;
}

.portal-icon,
.feature-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #eff6ff;
    color: #2563eb;
}

.portal-card h3,
.card h3,
.class-card h3,
.page-card h3 {
    color: #0f172a;
    font-weight: 800;
}

.portal-card p,
.card p,
.class-card p,
.page-card p {
    color: #64748b;
    line-height: 1.75;
}

.card-link {
    color: #2563eb;
    font-weight: 750;
    text-decoration: none;
}

/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 750;
    transition: all .2s ease;
}

.btn-outline {
    border: 1px solid #cbd5e1;
    background: white;
    color: #1e293b;
}

.btn-outline:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

/* Classes */
.classes-section {
    background: #f1f5f9;
}

/* Explore pages */
.all-pages {
    background: #ffffff;
}

.page-card-heading {
    font-weight: 800;
    color: #0f172a;
}

.page-links a {
    color: #475569;
    transition: color .2s ease;
}

.page-links a:hover {
    color: #2563eb;
}

/* CTA */
.cta {
    position: relative;
    overflow: hidden;
    padding: 75px 0;
    background: linear-gradient(120deg,#1d4ed8,#4338ca 65%,#6d28d9);
    color: white;
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta h2 {
    color: white;
    font-size: clamp(30px,4vw,46px);
    font-weight: 900;
    letter-spacing: -1.5px;
}

.cta p {
    color: rgba(255,255,255,.82);
}

.cta .btn {
    background: white;
    color: #1d4ed8;
    border: 0;
}

/* Footer */
footer {
    background: #0f172a;
    color: #cbd5e1;
}

.footer-brand,
.footer-grid h3,
.footer-grid h4 {
    color: white;
}

.footer-grid a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color .2s ease;
}

.footer-grid a:hover {
    color: #93c5fd;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
}

/* Responsive */
@media (max-width: 900px) {
    header .navbar {
        padding-top: 12px;
        padding-bottom: 12px;
        flex-wrap: wrap;
    }

    header nav {
        width: 100%;
        justify-content: center;
    }

    .hero {
        padding: 80px 0;
    }
}

@media (max-width: 600px) {
    .container {
        width: min(100% - 28px,1180px);
    }

    header .navbar {
        gap: 10px;
    }

    header .logo {
        font-size: 20px;
    }

    header nav {
        justify-content: flex-start;
        gap: 4px;
    }

    header nav a {
        padding: 9px 10px;
        font-size: 13px;
    }

    .hero {
        padding: 65px 0 60px;
    }

    .hero h1 {
        font-size: clamp(36px,10vw,48px);
        letter-spacing: -1.8px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .portal-card,
    .class-card,
    .page-card {
        padding: 20px;
    }

    .cta {
        padding: 60px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .card,
    .portal-card,
    .class-card,
    .page-card,
    .btn {
        transition: none;
    }
}
