/* ============================================================
   SoloBot — Design System
   Private AI Companion for iPhone
   ============================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&display=swap');

/* --- CSS Variables --- */
:root {
    --bg: #0B0C14;
    --bg-elevated: #111220;
    --surface: #181930;
    --surface-hover: #1E1F3A;
    --card: #1C1D35;
    --card-hover: #232448;
    --primary: #8AAB92;
    --primary-light: #A8C5AE;
    --primary-dark: #6B8F73;
    --primary-glow: rgba(138, 171, 146, 0.12);
    --primary-glow-strong: rgba(138, 171, 146, 0.25);
    --accent-blue: #7BA4D4;
    --accent-lavender: #A78BCA;
    --accent-amber: #D4A87B;
    --text: #F0ECE5;
    --text-secondary: #A8A3B3;
    --text-muted: #6B6780;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --error: #E8796A;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 50px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 48px rgba(0,0,0,0.4);
    --shadow-glow: 0 4px 32px rgba(138,171,146,0.2);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1080px;
    --max-width-narrow: 720px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }

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

h1, h2, h3, h4 {
    font-family: 'Instrument Serif', 'Georgia', serif;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text);
}

/* --- Ambient Background --- */
.ambient-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; overflow: hidden; pointer-events: none;
}
.ambient-bg::before {
    content: '';
    position: absolute; top: -40%; left: -20%;
    width: 80vw; height: 80vw;
    background: radial-gradient(circle, rgba(138,171,146,0.06) 0%, transparent 70%);
    animation: ambientDrift 20s ease-in-out infinite alternate;
}
.ambient-bg::after {
    content: '';
    position: absolute; bottom: -30%; right: -20%;
    width: 70vw; height: 70vw;
    background: radial-gradient(circle, rgba(123,164,212,0.04) 0%, transparent 70%);
    animation: ambientDrift 25s ease-in-out infinite alternate-reverse;
}
@keyframes ambientDrift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5vw, 3vh) scale(1.1); }
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
    position: fixed; top: 0; width: 100%; z-index: 100;
    background: rgba(11, 12, 20, 0.8);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.nav-logo {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px; font-weight: 700;
    color: var(--primary); text-decoration: none;
    display: flex; align-items: center; gap: 8px;
}
.nav-logo-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.nav-links {
    display: flex; gap: 24px; align-items: center;
    list-style: none;
}
.nav-links a {
    color: var(--text-secondary); text-decoration: none;
    font-size: 14px; font-weight: 500;
    transition: color var(--transition);
    padding: 4px 0;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
    background: var(--primary) !important;
    color: var(--bg) !important;
    padding: 8px 18px !important;
    border-radius: var(--radius-pill) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    transition: transform var(--transition), opacity var(--transition) !important;
    white-space: nowrap;
}
.nav-cta:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
    color: var(--bg) !important;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    padding: 140px 24px 80px;
    text-align: center;
    position: relative;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary-glow);
    border: 1px solid rgba(138,171,146,0.2);
    border-radius: var(--radius-pill);
    padding: 6px 16px;
    font-size: 13px; font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 28px;
    animation: fadeInUp 0.6s ease-out;
}
.hero-badge-dot {
    width: 6px; height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.hero-icon {
    width: 88px; height: 88px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 28px;
    font-size: 40px;
    box-shadow: var(--shadow-glow);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}
.hero h1 {
    font-size: clamp(36px, 5vw, 56px);
    margin-bottom: 16px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}
.hero h1 em {
    font-style: italic;
    color: var(--primary-light);
}
.hero-subtitle {
    color: var(--text-secondary);
    font-size: clamp(16px, 2vw, 19px);
    max-width: 540px;
    margin: 0 auto 36px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}
.hero-cta-group {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 14px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--primary);
    color: var(--bg);
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-weight: 700; font-size: 16px;
    text-decoration: none;
    box-shadow: var(--shadow-glow);
    transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(138,171,146,0.4);
    color: var(--bg);
}
.btn-primary svg { width: 20px; height: 20px; fill: currentColor; }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text-secondary);
    padding: 14px 24px;
    border-radius: var(--radius-pill);
    font-weight: 500; font-size: 15px;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.btn-ghost:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: rgba(255,255,255,0.03);
}

/* --- Trust bar --- */
.trust-bar {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: 32px;
    margin-top: 48px;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}
.trust-item {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-muted);
    font-size: 13px; font-weight: 500;
}
.trust-icon {
    font-size: 16px;
}

/* ============================================================
   SECTIONS (generic)
   ============================================================ */
.section {
    padding: 80px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}
.section-narrow {
    max-width: var(--max-width-narrow);
}
.section-header {
    text-align: center;
    margin-bottom: 56px;
}
.section-label {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}
.section-title {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 14px;
}
.section-desc {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto;
}

/* ============================================================
   FEATURES GRID
   ============================================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}
.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 18px;
}
.feature-icon-privacy { background: rgba(138,171,146,0.15); }
.feature-icon-offline { background: rgba(123,164,212,0.15); }
.feature-icon-models { background: rgba(167,139,202,0.15); }
.feature-icon-memory { background: rgba(212,168,123,0.15); }
.feature-icon-persona { background: rgba(232,121,106,0.15); }
.feature-icon-safety { background: rgba(138,171,146,0.15); }
.feature-card h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 17px; font-weight: 600;
    margin-bottom: 8px;
}
.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================================
   PERSONAS
   ============================================================ */
.personas-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.persona-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    transition: all var(--transition);
}
.persona-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
}
.persona-emoji {
    font-size: 28px;
    margin-bottom: 10px;
}
.persona-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px; font-weight: 600;
    margin-bottom: 4px;
}
.persona-tagline {
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    counter-reset: step;
}
.step {
    text-align: center;
    padding: 24px;
    counter-increment: step;
}
.step-number {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px; font-weight: 700;
    color: var(--primary);
}
.step h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px; font-weight: 600;
    margin-bottom: 8px;
}
.step p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============================================================
   MODELS SHOWCASE
   ============================================================ */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.model-pill {
    display: flex; align-items: center; gap: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    transition: border-color var(--transition);
}
.model-pill:hover { border-color: var(--border-hover); }
.model-logo {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--surface);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.model-info { flex: 1; }
.model-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px; font-weight: 600;
}
.model-meta {
    color: var(--text-muted);
    font-size: 12px;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
    display: flex; flex-direction: column;
    gap: 12px;
}
.faq-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition);
}
.faq-item:hover { border-color: var(--border-hover); }
.faq-item summary {
    padding: 20px 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px; font-weight: 600;
    cursor: pointer;
    color: var(--text);
    list-style: none;
    display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+"; font-size: 20px; color: var(--primary);
    font-weight: 300; flex-shrink: 0; margin-left: 12px;
    transition: transform var(--transition);
}
.faq-item[open] summary::after {
    content: "−"; transform: rotate(180deg);
}
.faq-answer {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 14px; line-height: 1.8;
}

/* ============================================================
   CONTACT CTA
   ============================================================ */
.contact-cta {
    background: linear-gradient(135deg, var(--primary-glow), transparent);
    border: 1px solid rgba(138,171,146,0.2);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
}
.contact-cta h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px; font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 10px;
}
.contact-cta p {
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-size: 15px;
}
.contact-cta a.email-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 17px;
}
.contact-cta a.email-link:hover { text-decoration: underline; }

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-content { max-width: var(--max-width-narrow); margin: 0 auto; }
.legal-content h2 {
    font-size: 32px;
    margin-bottom: 8px;
    padding-top: 120px;
}
.legal-content .legal-updated {
    color: var(--text-muted);
    font-size: 14px; font-style: italic;
    margin-bottom: 32px;
}
.legal-content h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 17px; font-weight: 600;
    margin: 28px 0 10px;
    color: var(--text);
}
.legal-content p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 14px;
    line-height: 1.8;
}
.legal-content ul {
    padding-left: 20px;
    margin-bottom: 14px;
}
.legal-content li {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 6px;
    line-height: 1.7;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 24px 32px;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex; flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
}
.footer-brand {
    max-width: 280px;
}
.footer-brand-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px; font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}
.footer-brand p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}
.footer-links-group h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px; font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.footer-links-group a {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    padding: 3px 0;
    transition: color var(--transition);
}
.footer-links-group a:hover { color: var(--primary); }
.footer-bottom {
    max-width: var(--max-width);
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
    max-width: var(--max-width-narrow);
    margin-left: auto; margin-right: auto;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .nav-links .hide-mobile { display: none; }
    .hero { padding: 120px 20px 60px; }
    .section { padding: 56px 20px; }
    .features-grid { grid-template-columns: 1fr; }
    .personas-scroll { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
    .models-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; gap: 24px; }
    .trust-bar { gap: 20px; }
}
@media (max-width: 480px) {
    .personas-scroll { grid-template-columns: 1fr; }
    .hero-cta-group { flex-direction: column; align-items: center; }
}
