@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500&display=swap');

:root {
    /* --- The Midnight Palette --- */
    --bg-depth: #08090f;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-surface-hover: rgba(255, 255, 255, 0.06);

    /* Gradients */
    --gradient-glow: radial-gradient(circle at 50% 0%, rgba(120, 119, 198, 0.15), transparent 60%);
    --gradient-primary: linear-gradient(135deg, #FFDbf2 0%, #a4c9ff 50%, #d8b4fe 100%);
    --gradient-border: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));

    /* Text */
    --text-primary: #edEEF0;
    --text-secondary: #9496A1;
    --text-tertiary: #5E606A;

    /* Metrics (Fluid) */
    --gap-xs: clamp(8px, 1vw, 12px);
    --gap-sm: clamp(16px, 2vw, 24px);
    --gap-md: clamp(24px, 4vw, 40px);
    --gap-lg: clamp(48px, 6vw, 80px);
    --gap-xl: clamp(64px, 8vw, 120px);

    --radius-sm: 12px;
    --radius-md: 24px;
    --radius-lg: 32px;

    /* Fonts */
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

/* --- Reset & Base --- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg-depth);
    background-image: var(--gradient-glow);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: clamp(15px, 1.1vw, 18px);
    /* Fluid body text */
    line-height: 1.6;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* animation: smoothEntry 1s cubic-bezier(0.2, 0.8, 0.2, 1); REMOVED for Lighthouse FCP */
}

@keyframes smoothEntry {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    margin: 0 0 1em 0;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: white;
}

a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

/* --- Layout Utility --- */

.home {
    width: min(90%, 1100px);
    margin: 0 auto;
    padding: var(--gap-lg) 0 var(--gap-xl);
    display: flex;
    flex-direction: column;
    gap: var(--gap-xl);
}

/* --- Components: Glass Card --- */

.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Fallback */
    border-top-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.hero {
    text-align: center;
    padding: var(--gap-lg) var(--gap-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.eyebrow {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    background: linear-gradient(90deg, #a4c9ff, #d8b4fe);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--gap-sm);
    display: inline-block;
    padding: 6px 16px;
    border-radius: 99px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero h1 {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    /* Massive responsive text */
    font-weight: 800;
    margin-bottom: var(--gap-sm);
    background: linear-gradient(180deg, #ffffff 20%, rgba(255, 255, 255, 0.6) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

/* Glow effect behind text */
.hero h1::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    z-index: -1;
    filter: blur(40px);
    pointer-events: none;
}

.hero .lead {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto var(--gap-md);
    font-weight: 400;
}

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

.cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 36px;
    border-radius: 99px;
    font-weight: 600;
    font-family: var(--font-display);
    font-size: 1rem;
    position: relative;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn.primary {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn.ghost {
    color: var(--text-secondary);
    padding: 16px 24px;
}

.btn.ghost:hover {
    color: white;
}

/* --- Features Grid (The Glass Grid) --- */

.panel.highlight {
    composes: glass-panel;
    /* Using glass-panel styles */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-md);
    padding: var(--gap-lg);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    align-items: center;
}

@media (max-width: 800px) {
    .panel.highlight {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.panel.highlight h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--gap-sm);
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-md);
}

.stat {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    font-family: var(--font-display);
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

.stat+.label {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* --- Feature Cards --- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap-md);
}

.card {
    composes: glass-panel;
    padding: var(--gap-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border-color: rgba(255, 255, 255, 0.1);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--gap-sm);
    font-weight: 600;
}

.card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* --- Steps Section --- */

.panel-head {
    text-align: center;
    margin-bottom: var(--gap-lg);
}

.panel-head h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    max-width: 800px;
    margin: 10px auto 0;
}

.steps ol {
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--gap-sm);
    counter-reset: step-counter;
}

.steps li {
    list-style: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    padding: var(--gap-md);
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    transition: background 0.2s ease;
}

.steps li:hover {
    background: rgba(255, 255, 255, 0.04);
}

.steps .index {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: rgba(255, 255, 255, 0.1);
    min-width: 60px;
    text-align: center;
}

/* --- Footer --- */

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: var(--gap-lg);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--gap-md);
    color: var(--text-tertiary);
}

.site-footer a {
    color: var(--text-secondary);
    margin-left: 20px;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: white;
}

/* --- Auth Pages --- */

body.auth-theme {
    background: radial-gradient(circle at center, #1a1c2e 0%, #08090f 70%) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--gap-md);
    width: 100%;
}

.auth-layout {
    display: flex;
    gap: var(--gap-lg);
    width: 100%;
    max-width: 1000px;
    align-items: flex-start;
}

.auth-layout--center {
    justify-content: center;
    max-width: 500px;
}

.auth-card {
    background: var(--bg-surface);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: var(--gap-lg);
    width: 100%;
    flex: 1;
}

.auth-side {
    flex: 1;
    color: white;
    padding-top: var(--gap-md);
}

.auth-side h2 {
    font-size: 1.5rem;
    margin-bottom: var(--gap-md);
}

/* Auth Form Elements */
.auth-form .form-field {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: rgba(164, 201, 255, 0.5);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(164, 201, 255, 0.1);
}

.input-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn.full {
    width: 100%;
    margin-top: 10px;
}

/* Links */
.alt-link {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-top: 20px;
}

.alt-link a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(255, 255, 255, 0.3);
}

.alt-link a:hover {
    text-decoration-color: white;
}

/* Offer Cards (Register Side) */
.plan-offers {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.offer-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 20px;
}

.offer-card h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.offer-card .price {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.offer-card ul {
    padding: 0;
    margin: 0 0 16px 0;
    list-style: none;
}

.offer-card li {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
}

.offer-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #a4c9ff;
}

/* Responsive Auth */
@media (max-width: 900px) {
    .auth-layout {
        flex-direction: column;
    }

    .auth-side {
        display: none;
        /* Hide sidebar on mobile/tablet to focus on signup */
    }
}

/* Meta: Small cleanups */
.meta {
    opacity: 0.5;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 20px;
}

.meta span {
    margin: 0 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .home {
        width: 92%;
    }

    .hero {
        padding: 40px 0;
    }

    .btn {
        width: 100%;
    }

    /* Stack buttons on mobile */
    .cta-group {
        flex-direction: column;
        width: 100%;
    }
}

/* --- Pricing Plans Grid --- */

.plans-grid {
    grid-template-columns: repeat(4, 1fr) !important;
}

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

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

/* --- Main Navigation --- */

.main-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(8, 9, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--gap-sm) 0;
}

.main-nav__container {
    width: min(90%, 1100px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-md);
}

.main-nav__logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav__menu {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav__menu li {
    margin: 0;
}

.main-nav__menu a:not(.btn) {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 8px 0;
}

.main-nav__menu a:not(.btn):hover {
    color: white;
}

.main-nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.main-nav__toggle span {
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.main-nav__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.main-nav__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.main-nav__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
    .main-nav__toggle {
        display: flex;
    }

    .main-nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-depth);
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px var(--gap-md) var(--gap-md);
        gap: var(--gap-sm);
        transition: right 0.3s ease;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    }

    .main-nav__menu[aria-expanded="true"] {
        right: 0;
    }

    .main-nav__menu li {
        width: 100%;
    }

    .main-nav__menu a {
        display: block;
        width: 100%;
        padding: var(--gap-sm);
        border-radius: var(--radius-sm);
        transition: background 0.2s ease;
    }

    .main-nav__menu a:not(.btn):hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .main-nav__menu .btn {
        width: 100%;
        text-align: center;
    }
}

/* --- Notifications --- */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 400px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.notification-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.notification-info {
    background: rgba(164, 201, 255, 0.15);
    border-color: rgba(164, 201, 255, 0.3);
    color: var(--primary);
}

/* --- Form Errors --- */
.form-error {
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

/* --- Shake Animation --- */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}