/* ============================================
   MIND MATCH — HOME / APEX (mind-match.app)
   Marketing landing page. Brand palette mirrors apps/mind-match/main.
   ============================================ */

:root {
    --bg-main:        #0B0F1A;
    --bg-secondary:   #121826;
    --surface-card:   #1A2236;

    --brand-blue:        #3ABEFF;
    --brand-blue-deep:   #1E6BFF;
    --brand-orange:      #FF5A3C;
    --brand-orange-glow: #FF8A3D;
    --brand-purple:      #8A5CFF;
    --brand-gradient:    linear-gradient(90deg, #3ABEFF, #8A5CFF, #FF5A3C);

    --text-primary:   #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted:     #64748B;

    --border-color: rgba(255, 255, 255, 0.10);
    --tint-08:      rgba(255, 255, 255, 0.05);
    --tint-15:      rgba(255, 255, 255, 0.10);

    --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg:   0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 32px rgba(58, 190, 255, 0.35);

    --radius-md: 0.5rem;
    --radius-lg: 0.85rem;
    --radius-xl: 1.25rem;
}

:root[data-theme="light"] {
    --bg-main:        #F5F7FA;
    --bg-secondary:   #E9EEF5;
    --surface-card:   #FFFFFF;

    --brand-blue:      #2563EB;
    --brand-blue-deep: #3B82F6;
    --brand-orange:    #F97316;
    --brand-purple:    #8B5CF6;
    --brand-gradient:  linear-gradient(90deg, #3B82F6, #8B5CF6, #F97316);

    --text-primary:   #0F172A;
    --text-secondary: #475569;
    --text-muted:     #94A3B8;

    --border-color: rgba(0, 0, 0, 0.10);
    --tint-08:      rgba(0, 0, 0, 0.04);
    --tint-15:      rgba(0, 0, 0, 0.08);

    --shadow-glow: 0 0 32px rgba(37, 99, 235, 0.20);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-blue); text-decoration: none; }
a:hover { color: var(--brand-purple); }

h1, h2, h3 {
    margin: 0 0 0.75em;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p  { margin: 0 0 1em; }

.grad {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
            color: transparent;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-blue);
    margin: 0 0 0.5em;
}
.eyebrow.center,
h2.center,
.lede.center { text-align: center; }

.lede {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

.section {
    padding: clamp(3rem, 8vw, 6rem) 0;
}
.section-tinted {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* ────── HEADER ────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem clamp(1rem, 4vw, 2rem);
    background: color-mix(in srgb, var(--bg-main) 85%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
    font-weight: 700;
}
.brand-mark { width: 36px; height: 36px; }
.brand-text { font-size: 1.1rem; letter-spacing: -0.01em; }

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 1.5rem);
}
.site-nav a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}
.site-nav a:hover { color: var(--text-primary); }
.site-nav .nav-cta {
    background: var(--brand-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 700;
}
.site-nav .nav-cta:hover { color: white; opacity: 0.9; }

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms ease;
}
.theme-toggle:hover { background: var(--tint-08); }

@media (max-width: 720px) {
    .site-nav a:not(.nav-cta) { display: none; }
}

/* ────── HERO ────── */
.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(138, 92, 255, 0.20), transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(58, 190, 255, 0.18), transparent 55%),
        radial-gradient(ellipse at 20% 70%, rgba(255, 90, 60, 0.15), transparent 55%),
        var(--bg-main);
}

.hero-stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 12% 18%, white, transparent),
        radial-gradient(1.5px 1.5px at 62% 24%, white, transparent),
        radial-gradient(1.8px 1.8px at 28% 64%, white, transparent),
        radial-gradient(1.5px 1.5px at 78% 72%, white, transparent),
        radial-gradient(1.6px 1.6px at 92% 38%, white, transparent),
        radial-gradient(1.4px 1.4px at 8%  82%, white, transparent);
    opacity: 0.35;
    pointer-events: none;
    animation: twinkle 5s ease-in-out infinite alternate;
}
:root[data-theme="light"] .hero-stars { display: none; }

@keyframes twinkle {
    0%   { opacity: 0.20; }
    100% { opacity: 0.50; }
}

.hero-inner {
    position: relative;
    max-width: 880px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

.hero-logo {
    width: clamp(220px, 40vw, 360px);
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 6px 20px rgba(58, 190, 255, 0.3));
}

.hero-headline {
    margin-bottom: 1rem;
}

.hero-sub {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.hero-foot {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ────── BUTTONS ────── */
.btn {
    display: inline-block;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
    border: none;
    cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: var(--brand-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover { color: white; opacity: 0.94; }

.btn-secondary {
    background: var(--brand-blue);
    color: white;
}
.btn-secondary:hover { color: white; }

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-ghost:hover { background: var(--tint-08); color: var(--text-primary); }

/* ────── TWO-COL SECTIONS ────── */
.two-col {
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    grid-template-columns: 1fr 1fr;
    align-items: center;
}
.two-col.reverse > :first-child { order: 2; }
@media (max-width: 820px) {
    .two-col { grid-template-columns: 1fr; }
    .two-col.reverse > :first-child { order: 0; }
}

.hero-art img {
    border-radius: var(--radius-xl);
    margin: 0 auto;
}
.edu-art {
    width: clamp(180px, 40vw, 320px);
    filter: drop-shadow(0 8px 28px rgba(138, 92, 255, 0.35));
}

/* ────── CHECK LIST ────── */
.check-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}
.check-list li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.8rem;
    color: var(--text-secondary);
}
.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0.4rem;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--brand-gradient);
    color: white;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ────── MODES GRID ────── */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 2.5rem;
}
.mode-card {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.mode-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(58, 190, 255, 0.4);
}
.mode-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}
.mode-card h3 { color: var(--text-primary); }
.mode-card p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

/* ────── DOWNLOAD ────── */
.download-section { text-align: center; }
.center-stack { display: flex; flex-direction: column; align-items: center; }

.store-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin: 2rem 0 1rem;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #000;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 150ms ease, box-shadow 150ms ease;
    min-width: 200px;
}
.store-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.store-btn-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}
.store-btn-text small {
    font-size: 0.7rem;
    opacity: 0.8;
}
.store-btn-text strong {
    font-size: 1.1rem;
    font-weight: 700;
}
.store-btn-web {
    background: var(--surface-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.store-btn-web:hover { color: var(--text-primary); }

.store-fineprint {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 540px;
}

/* ────── FOOTER ────── */
.site-footer {
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    padding: 2rem 0;
    margin-top: 0;
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
    align-items: center;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--text-primary);
}
.footer-brand .brand-mark { width: 28px; height: 28px; }
.footer-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer-links a:hover { color: var(--text-primary); }
.footer-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ────── LEGAL / ARTICLE PAGES (tos, privacy) ────── */
.legal {
    max-width: 780px;
    margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem);
    color: var(--text-secondary);
}
.legal-header {
    margin-bottom: 2.5rem;
    text-align: center;
}
.legal-header h1 {
    margin-bottom: 0.5rem;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--text-primary);
}
.legal-header .effective {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}
.legal h2 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin: 2.25rem 0 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.legal h2:first-of-type { border-top: none; padding-top: 0; }
.legal h3 {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin: 1.25rem 0 0.5rem;
}
.legal p { color: var(--text-secondary); }
.legal ul {
    padding-left: 1.4rem;
    margin: 0.5rem 0 1rem;
}
.legal ul li {
    margin: 0.35rem 0;
    color: var(--text-secondary);
}
.legal a { color: var(--brand-blue); }
.legal a:hover { color: var(--brand-purple); }
.legal-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}
.legal-footer a { margin: 0 0.5rem; }

/* ────── REDUCED MOTION ────── */
@media (prefers-reduced-motion: reduce) {
    .hero-stars { animation: none; }
    .btn:hover, .mode-card:hover, .store-btn:hover { transform: none; }
    html { scroll-behavior: auto; }
}
