/* ======================================================
   MoodFlow Web Portal - Complete Stylesheet
   Dark + Light theme via CSS custom properties
   ====================================================== */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Theme Variables ── */
:root,
[data-theme="dark"] {
    --bg:          #0d1117;
    --bg2:         #161b22;
    --surface:     #1c2128;
    --surface2:    #21262d;
    --border:      #30363d;
    --border-lt:   #262c36;
    --text:        #e6edf3;
    --text-sec:    #8b949e;
    --text-dim:    #484f58;
    --accent:      #58a6ff;
    --accent-hvr:  #79c0ff;
    --accent-bg:   rgba(56,139,253,0.15);
    --accent-glow: rgba(56,139,253,0.4);
    --success:     #3fb950;
    --success-bg:  rgba(63,185,80,0.15);
    --warn:        #d29922;
    --danger:      #f85149;
    --purple:      #bc8cff;
    --cyan:        #39d2c0;
    --shadow:      0 2px 12px rgba(0,0,0,0.4);
    --shadow-lg:   0 8px 32px rgba(0,0,0,0.5);
}

[data-theme="light"] {
    --bg:          #ffffff;
    --bg2:         #f6f8fa;
    --surface:     #ffffff;
    --surface2:    #f0f3f6;
    --border:      #d0d7de;
    --border-lt:   #e1e4e8;
    --text:        #1f2328;
    --text-sec:    #656d76;
    --text-dim:    #8b949e;
    --accent:      #0969da;
    --accent-hvr:  #0550ae;
    --accent-bg:   rgba(9,105,218,0.10);
    --accent-glow: rgba(9,105,218,0.25);
    --success:     #1a7f37;
    --success-bg:  rgba(26,127,55,0.10);
    --warn:        #9a6700;
    --danger:      #cf222e;
    --purple:      #8250df;
    --cyan:        #0891b2;
    --shadow:      0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg:   0 8px 32px rgba(0,0,0,0.12);
}

/* ── Typography ── */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#main-content { flex: 1; }

h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    line-height: 1.3;
    font-weight: 700;
}
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--accent-hvr); }
code {
    background: var(--surface2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent);
}
.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-sec); }
.text-center { text-align: center; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Container ── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.container-sm { max-width: 560px; }
.container-md { max-width: 800px; }

/* ── Section ── */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-title {
    font-size: 2rem;
    margin-bottom: 12px;
}
.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-sec);
    max-width: 600px;
    margin: 0 auto;
}

/* ══════════════════════════════════════
   HEADER
   ══════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    text-decoration: none;
}
.logo-text { color: var(--text); }
.logo-accent { color: var(--accent); }
.logo:hover .logo-accent { color: var(--accent-hvr); }

/* Nav */
.main-nav { flex: 1; }
.nav-list {
    display: flex;
    list-style: none;
    gap: 4px;
    justify-content: center;
}
.nav-link {
    display: block;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-sec);
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: var(--surface2);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.25rem;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-sec);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    position: relative;
}
.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-bg);
}
[data-theme="dark"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: inline; }
[data-theme="light"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: inline; }

/* ══════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}
.btn i { font-size: 0.85em; }
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-hvr);
    border-color: var(--accent-hvr);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-secondary {
    background: var(--surface2);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}
.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }

/* ══════════════════════════════════════
   FORMS
   ══════════════════════════════════════ */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input::placeholder { color: var(--text-dim); }
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-textarea {
    resize: vertical;
    min-height: 120px;
}
.input-icon-wrapper {
    position: relative;
}
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.9rem;
    pointer-events: none;
}
.input-icon-wrapper .form-input {
    padding-left: 42px;
}
.otp-input {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 12px;
    padding: 16px;
}
.form-note {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 12px;
    text-align: center;
}

/* ══════════════════════════════════════
   CARDS
   ══════════════════════════════════════ */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.form-card-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--bg2);
}
.form-card-body { padding: 32px; }
.form-card-body h2 {
    font-size: 1.35rem;
    margin-bottom: 8px;
}
.form-card-body h2 i {
    color: var(--accent);
    margin-right: 8px;
}
.form-card-body > p {
    color: var(--text-sec);
    margin-bottom: 24px;
}

/* ══════════════════════════════════════
   ALERTS
   ══════════════════════════════════════ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    border: 1px solid;
}
.alert i { margin-top: 2px; flex-shrink: 0; }
.alert-danger {
    background: rgba(248,81,73,0.1);
    border-color: rgba(248,81,73,0.3);
    color: var(--danger);
}
.alert-success {
    background: var(--success-bg);
    border-color: rgba(63,185,80,0.3);
    color: var(--success);
}
.alert-info {
    background: var(--accent-bg);
    border-color: rgba(56,139,253,0.3);
    color: var(--accent);
}

/* ══════════════════════════════════════
   STEP INDICATOR
   ══════════════════════════════════════ */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--surface2);
    color: var(--text-dim);
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}
.step.active .step-num {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}
.step.completed .step-num {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}
.step-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 600;
}
.step.active .step-label { color: var(--accent); }
.step.completed .step-label { color: var(--success); }
.step-line {
    width: 60px;
    height: 2px;
    background: var(--border);
    margin: 0 8px;
    margin-bottom: 22px;
    transition: background 0.3s ease;
}
.step-line.filled { background: var(--success); }

/* Success icon */
.success-icon {
    font-size: 56px;
    color: var(--success);
    margin-bottom: 16px;
}
.error-icon {
    font-size: 56px;
    color: var(--danger);
    margin-bottom: 16px;
}

/* ══════════════════════════════════════
   HERO
   ══════════════════════════════════════ */
.hero {
    padding: 100px 0 80px;
    overflow: hidden;
}
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid rgba(56,139,253,0.2);
    margin-bottom: 20px;
}
.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.hero-description {
    font-size: 1.2rem;
    color: var(--text-sec);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 520px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Hero Mockup */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}
.hero-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--accent-glow);
    border-radius: 50%;
    filter: blur(80px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.hero-mockup {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.mockup-bar {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
}
.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dim);
}
.mockup-dot:nth-child(1) { background: var(--danger); }
.mockup-dot:nth-child(2) { background: var(--warn); }
.mockup-dot:nth-child(3) { background: var(--success); }
.mockup-body { padding: 24px; }
.mockup-viz {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 140px;
    margin-bottom: 20px;
}
.viz-bar {
    flex: 1;
    height: var(--h, 50%);
    background: linear-gradient(to top, var(--accent), var(--purple));
    border-radius: 4px 4px 0 0;
    animation: vizPulse 2s ease-in-out infinite alternate;
}
.viz-bar:nth-child(even) { animation-delay: 0.3s; }
.viz-bar:nth-child(3n) { animation-delay: 0.6s; }
@keyframes vizPulse {
    0% { opacity: 0.6; transform: scaleY(0.85); }
    100% { opacity: 1; transform: scaleY(1); }
}
.mockup-info {
    display: flex;
    justify-content: space-between;
}
.mockup-bpm, .mockup-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-sec);
}
.mockup-bpm i { color: var(--accent); }
.mockup-status i { color: var(--success); }

/* ══════════════════════════════════════
   FEATURE CARDS GRID
   ══════════════════════════════════════ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px 28px;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--accent-glow);
}
.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 12px;
    font-size: 1.25rem;
    margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.feature-card p {
    font-size: 0.9rem;
    color: var(--text-sec);
    line-height: 1.6;
}

/* ══════════════════════════════════════
   CTA SECTION
   ══════════════════════════════════════ */
.section-cta { padding-bottom: 100px; }
.cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 40px 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.cta-card h2 { font-size: 1.5rem; margin-bottom: 6px; }
.cta-card p { color: var(--text-sec); font-size: 1rem; }
.cta-inline {
    text-align: center;
    margin-top: 48px;
    padding: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.cta-inline p {
    color: var(--text-sec);
    margin-bottom: 16px;
    font-size: 1rem;
}

/* ══════════════════════════════════════
   PAGE HERO (sub-pages)
   ══════════════════════════════════════ */
.page-hero {
    padding: 60px 0 20px;
    text-align: center;
}
.page-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-sec);
}

/* ══════════════════════════════════════
   FEATURE DETAIL (Features page)
   ══════════════════════════════════════ */
.feature-detail {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 40px;
    align-items: start;
    padding: 40px 0;
}
.feature-detail.reverse {
    grid-template-columns: 1fr 100px;
    direction: rtl;
}
.feature-detail.reverse > * { direction: ltr; }
.feature-detail-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 16px;
    font-size: 2rem;
    flex-shrink: 0;
}
.feature-detail-content h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}
.feature-detail-content p {
    color: var(--text-sec);
    line-height: 1.7;
    margin-bottom: 16px;
}
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-sec);
}
.feature-list li i {
    color: var(--success);
    font-size: 0.8rem;
    flex-shrink: 0;
}
.feature-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* ══════════════════════════════════════
   PIPELINE (How It Works)
   ══════════════════════════════════════ */
.pipeline {
    position: relative;
    padding-left: 60px;
}
.pipeline::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.pipeline-step {
    position: relative;
    margin-bottom: 40px;
}
.pipeline-number {
    position: absolute;
    left: -60px;
    top: 0;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 16px var(--accent-glow);
}
.pipeline-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 32px;
}
.pipeline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 10px;
    font-size: 1.1rem;
    margin-bottom: 12px;
}
.pipeline-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}
.pipeline-card p {
    color: var(--text-sec);
    line-height: 1.6;
    font-size: 0.9rem;
}
.pipeline-detail {
    margin-top: 16px;
    padding: 16px 20px;
    background: var(--bg2);
    border: 1px solid var(--border-lt);
    border-radius: 10px;
}
.pipeline-detail h4 {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 8px;
}
.pipeline-detail ol {
    padding-left: 20px;
    font-size: 0.85rem;
    color: var(--text-sec);
}
.pipeline-detail ol li { margin-bottom: 4px; }
.code-block code {
    display: block;
    font-size: 0.85rem;
    color: var(--cyan);
    margin-bottom: 4px;
}

/* Architecture Grid */
.architecture-section {
    margin-top: 64px;
    text-align: center;
}
.arch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 32px;
    text-align: left;
}
.arch-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.3s;
}
.arch-card:hover { border-color: var(--accent); }
.arch-card h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}
.arch-card h4 i { color: var(--accent); margin-right: 6px; }
.arch-card p { font-size: 0.85rem; color: var(--text-sec); line-height: 1.6; }

/* ══════════════════════════════════════
   UPDATES PAGE
   ══════════════════════════════════════ */
.update-latest {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 48px;
    box-shadow: var(--shadow);
}
.update-latest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
}
.update-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}
.update-channel-badge {
    padding: 4px 12px;
    background: var(--success-bg);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.update-latest-body {
    padding: 28px;
}
.update-latest-body h2 { margin-bottom: 16px; }
.update-notes {
    padding: 16px 20px;
    background: var(--bg2);
    border: 1px solid var(--border-lt);
    border-radius: 10px;
    color: var(--text-sec);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
    white-space: pre-line;
}

.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-dim);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state h3 { color: var(--text-sec); margin-bottom: 8px; }

/* Timeline */
.timeline {
    position: relative;
    padding-left: 32px;
    margin-top: 32px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    margin-bottom: 28px;
}
.timeline-marker {
    position: absolute;
    left: -32px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--surface2);
    border: 2px solid var(--accent);
}
.timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 24px;
}
.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.timeline-version {
    font-weight: 700;
    color: var(--accent);
}
.timeline-date {
    font-size: 0.8rem;
    color: var(--text-dim);
}
.timeline-body {
    font-size: 0.9rem;
    color: var(--text-sec);
    line-height: 1.6;
    margin-bottom: 12px;
}

/* ══════════════════════════════════════
   FAQ
   ══════════════════════════════════════ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s;
}
.faq-item.open { border-color: var(--accent); }
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 24px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    gap: 16px;
}
.faq-question:hover { color: var(--accent); }
.faq-chevron {
    transition: transform 0.3s ease;
    color: var(--text-dim);
    flex-shrink: 0;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--accent); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer {
    max-height: 400px;
}
.faq-answer p {
    padding: 0 24px 20px;
    font-size: 0.9rem;
    color: var(--text-sec);
    line-height: 1.7;
}

/* ══════════════════════════════════════
   PROSE (Privacy page)
   ══════════════════════════════════════ */
.prose h2 {
    font-size: 1.3rem;
    margin: 32px 0 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.prose h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.prose h3 {
    font-size: 1.05rem;
    margin: 20px 0 8px;
    color: var(--text-sec);
}
.prose p {
    color: var(--text-sec);
    line-height: 1.7;
    margin-bottom: 12px;
}
.prose ul, .prose ol {
    padding-left: 24px;
    margin-bottom: 16px;
}
.prose li {
    color: var(--text-sec);
    line-height: 1.7;
    margin-bottom: 4px;
}

/* ══════════════════════════════════════
   GATE PAGE
   ══════════════════════════════════════ */
.gate-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
    position: relative;
}
.gate-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px 36px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.gate-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 28px;
}
.gate-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}
.gate-title {
    font-size: 1.35rem;
    margin-bottom: 6px;
}
.gate-subtitle {
    color: var(--text-sec);
    font-size: 0.9rem;
    margin-bottom: 28px;
}
.gate-form { text-align: left; }
.gate-form .btn { margin-top: 8px; }
.gate-footer {
    margin-top: 24px;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.gate-theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
}

/* ══════════════════════════════════════
   ADMIN
   ══════════════════════════════════════ */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 32px 0;
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}
.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 12px;
    font-size: 1.25rem;
}
.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-sec);
}
.admin-section {
    margin: 40px 0;
}
.admin-section h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.admin-section h2 i { color: var(--accent); margin-right: 8px; }
.admin-inline-form { margin-bottom: 24px; }
.admin-form-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
.admin-form-row .form-input { max-width: 280px; }
.table-responsive { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.admin-table th, .admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.admin-table th {
    background: var(--bg2);
    color: var(--text-sec);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.admin-table td { color: var(--text-sec); }
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: rgba(248,81,73,0.1); color: var(--danger); }
.admin-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.admin-message-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
}
.admin-msg-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
}
.admin-msg-date { margin-left: auto; color: var(--text-dim); font-size: 0.8rem; }
.admin-msg-body { font-size: 0.9rem; color: var(--text-sec); line-height: 1.6; }

/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg2);
    padding: 56px 0 32px;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand .logo-text, .footer-brand .logo-accent {
    font-size: 1.25rem;
    font-weight: 800;
}
.footer-tagline {
    color: var(--text-sec);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: 12px;
    max-width: 340px;
}
.footer-links h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-bottom: 16px;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
    font-size: 0.9rem;
    color: var(--text-sec);
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ══════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ══════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Page-load hero stagger */
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-badge   { animation: heroFadeIn 0.5s ease 0.1s both; }
.hero-title   { animation: heroFadeIn 0.5s ease 0.2s both; }
.hero-description { animation: heroFadeIn 0.5s ease 0.35s both; }
.hero-actions { animation: heroFadeIn 0.5s ease 0.5s both; }

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }
    .hero-description { margin: 0 auto 32px; }
    .hero-actions { justify-content: center; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .arch-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    .section { padding: 56px 0; }
    .hero { padding: 64px 0 48px; }
    .hero-title { font-size: 2.25rem; }
    .page-title { font-size: 2rem; }

    /* Mobile Nav */
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        z-index: 99;
    }
    .main-nav.open { display: block; }
    .nav-list {
        flex-direction: column;
        padding: 12px 16px;
        gap: 0;
    }
    .nav-link { padding: 12px 16px; border-radius: 8px; }

    .header-actions .btn span { display: none; }
    .header-actions .btn { padding: 8px 12px; }

    .features-grid { grid-template-columns: 1fr; }
    .feature-detail {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .feature-detail.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    .feature-detail-icon { width: 60px; height: 60px; font-size: 1.5rem; }

    .cta-card {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .arch-grid { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr; }
    .admin-form-row { flex-direction: column; }
    .admin-form-row .form-input { max-width: none; }

    .step-line { width: 32px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-title { font-size: 1.85rem; }
    .hero-mockup { max-width: 320px; }
    .gate-card { padding: 36px 24px; }
    .form-card-body { padding: 24px; }
    .pipeline { padding-left: 48px; }
    .pipeline-number {
        left: -48px;
        width: 42px;
        height: 42px;
        font-size: 0.95rem;
    }
    .pipeline::before { left: 20px; }
}
