/* ============================================
   MENTAL MATHER — SHARED STYLES
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a26;
    --bg-card-hover: #22222f;
    --text-primary: #e8e8ef;
    --text-secondary: #9898a8;
    --text-muted: #6a6a7c;
    --accent-green: #00C853;
    --accent-green-dim: #00A844;
    --accent-green-glow: rgba(0, 200, 83, 0.15);
    --accent-green-glow-strong: rgba(0, 200, 83, 0.3);
    --metallic-light: #c0c0d0;
    --metallic-mid: #8888a0;
    --metallic-dark: #4a4a5e;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(0, 200, 83, 0.2);
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --max-width: 1140px;
    --section-padding: 6rem 1.5rem;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-green); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

img { max-width: 100%; display: block; }

/* ============================================
   UTILITY
   ============================================ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-green);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ============================================
   NOISE TEXTURE OVERLAY
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: padding 0.3s;
}

nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent-green); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); opacity: 1; }

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    background: var(--accent-green);
    color: #000 !important;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
    opacity: 1 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-green-glow-strong);
}

.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   MOBILE NAV OVERLAY
   ============================================ */
.nav-mobile-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}
.nav-mobile-menu.open { display: flex; }

.nav-mobile-menu a {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 500;
}

.nav-mobile-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.75rem;
    cursor: pointer;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: var(--accent-green);
    color: #000;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-display);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-green-glow-strong);
    opacity: 1;
    color: #000;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: transparent;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-family: var(--font-display);
}
.btn-secondary:hover {
    border-color: var(--metallic-mid);
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
    opacity: 1;
}

/* ============================================
   PAGE HEADER (for subpages)
   ============================================ */
.page-header {
    padding: 8rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

.page-header-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: var(--accent-green);
    filter: blur(150px);
    opacity: 0.06;
    top: -20%;
    right: -5%;
    pointer-events: none;
}

.page-header .section-subtitle {
    margin-top: 0.5rem;
}

/* ============================================
   CONTENT SECTIONS (for subpages)
   ============================================ */
.page-section {
    padding: var(--section-padding);
    border-top: 1px solid var(--border-subtle);
}

.content-card {
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    transition: border-color 0.3s, transform 0.2s;
}
.content-card:hover {
    border-color: var(--metallic-dark);
    transform: translateY(-2px);
}

.content-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.content-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.content-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.content-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-list {
    max-width: 680px;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}
.faq-question:hover { color: var(--accent-green); }

.faq-question::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
    color: var(--accent-green);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    padding: 3rem 1.5rem 2rem;
    border-top: 1px solid var(--border-subtle);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand-description {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 0.75rem;
    max-width: 280px;
}

.footer-heading {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    font-size: 0.88rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-primary); opacity: 1; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    gap: 1.25rem;
}
.footer-socials a { color: var(--text-muted); font-size: 0.85rem; }
.footer-socials a:hover { color: var(--text-primary); }

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-in > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger-in.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-in.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-in.visible > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-in.visible > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-in.visible > * { opacity: 1; transform: translateY(0); }

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 900px) {
    .content-grid-2 { grid-template-columns: 1fr; }
    .content-grid-3 { grid-template-columns: 1fr; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .nav-links { display: none; }
    .nav-mobile-toggle { display: block; }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 480px) {
    :root { --section-padding: 4rem 1rem; }

    .page-header { padding: 6rem 1rem 3rem; }

    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }

    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
