/* ─── Magic Landing Shared Styles ─────────────────────────────────
   Used by /insurance, /reminders, /customer-support, /document-manager.
   Mirrors the design tokens of frontend/landing.html.
─────────────────────────────────────────────────────────────────── */

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

:root {
    --primary: #1B6B5A;
    --primary-light: #E8F5F0;
    --primary-medium: #2D8B76;
    --primary-dark: #155A4A;
    --accent: #D4A853;
    --accent-light: #FFF8EC;
    --accent-dark: #B98E3B;
    --purple: #7C6AB5;
    --purple-light: #F1EEF8;
    --green: #3A8F6E;
    --red: #C75450;
    --red-light: #FDF2F1;
    --bg: #F7F6F3;
    --bg-warm: #F2F0EB;
    --surface: #FFFFFF;
    --text: #1A1A1A;
    --text-secondary: #6B6B6B;
    --text-tertiary: #9B9B9B;
    --border: #E8E6E1;
    --border-light: #F0EEE9;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; line-height: 1.2; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }

/* ─── Nav ─── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(247, 246, 243, 0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.nav-logo img { width: 36px; height: 36px; border-radius: 10px; }
.nav-logo-text { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 22px; letter-spacing: -0.5px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-secondary); font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }
.nav-links a.current { color: var(--primary); font-weight: 600; }
.nav-cta {
    background: var(--primary); color: white !important; padding: 8px 20px; border-radius: 20px;
    font-weight: 600 !important; transition: background 0.2s, transform 0.1s !important;
}
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }
.nav-mobile-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--text); cursor: pointer; }

/* ─── Buttons ─── */
.btn-primary {
    background: var(--primary); color: white; padding: 14px 32px; border-radius: 14px;
    font-size: 16px; font-weight: 600; text-decoration: none; border: none; cursor: pointer;
    transition: all 0.2s; font-family: inherit; display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(27,107,90,0.25); }
.btn-secondary {
    background: var(--surface); color: var(--text); padding: 14px 32px; border-radius: 14px;
    font-size: 16px; font-weight: 600; text-decoration: none; border: 1px solid var(--border);
    cursor: pointer; transition: all 0.2s; font-family: inherit; display: inline-flex; align-items: center; gap: 8px;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-white {
    background: white; color: var(--primary); padding: 16px 36px; border-radius: 14px;
    font-size: 16px; font-weight: 600; text-decoration: none; border: none; cursor: pointer;
    transition: all 0.2s; font-family: inherit; display: inline-flex; align-items: center; gap: 8px; position: relative;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

/* ─── Section Header ─── */
.section-header { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-label {
    display: inline-block; font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--primary); background: var(--primary-light);
    padding: 6px 14px; border-radius: 6px; margin-bottom: 16px;
}
.section-header h2 { font-size: 40px; letter-spacing: -1px; margin-bottom: 16px; }
.section-header p { font-size: 17px; color: var(--text-secondary); line-height: 1.7; }

/* ─── Hero ─── */
.hero { padding: 140px 0 80px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
    content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
    width: 800px; height: 800px; background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.5; pointer-events: none;
}
.hero-eyebrow {
    display: inline-block; font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--primary); background: var(--primary-light);
    padding: 6px 14px; border-radius: 6px; margin-bottom: 22px; position: relative;
}
.hero h1 { font-size: 52px; letter-spacing: -1.5px; margin-bottom: 20px; position: relative; }
.hero h1 span.accent {
    background: linear-gradient(135deg, var(--primary), var(--primary-medium));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle { font-size: 19px; color: var(--text-secondary); max-width: 620px; margin: 0 auto 40px; line-height: 1.7; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ─── Phone (hero animation) ─── */
.hero-visual {
    margin-top: 56px; display: flex; justify-content: center; align-items: flex-start; gap: 0; position: relative;
}
.phone-frame {
    width: 280px; background: var(--bg); border-radius: 32px; border: 5px solid #1A1A1A;
    box-shadow: 0 32px 80px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
    overflow: hidden; position: relative; z-index: 2;
}
.phone-notch {
    width: 100px; height: 24px; background: #1A1A1A;
    border-radius: 0 0 16px 16px; margin: 0 auto;
}
.phone-screen {
    padding: 6px 14px 20px; background: var(--bg); min-height: 460px; text-align: left;
}
.phone-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 0 12px; border-bottom: 1px solid var(--border-light); margin-bottom: 12px;
}
.phone-header img { width: 28px; height: 28px; border-radius: 8px; }
.phone-header-name { font-size: 13px; font-weight: 600; }

.phone-chat {
    display: flex; flex-direction: column; gap: 8px;
    height: 340px; overflow-y: auto; scroll-behavior: smooth;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.phone-chat::-webkit-scrollbar { display: none; }

.phone-msg {
    max-width: 88%; padding: 9px 12px; border-radius: 14px;
    font-size: 12px; line-height: 1.45;
}
.phone-msg-user {
    background: var(--primary); color: white; align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.phone-msg-agent {
    background: var(--surface); color: var(--text); align-self: flex-start;
    border-bottom-left-radius: 4px; border: 1px solid var(--border-light);
}
.phone-msg-status {
    align-self: flex-start; background: var(--primary-light); color: var(--primary);
    font-size: 10px; font-weight: 600; padding: 4px 12px; border-radius: 10px;
    display: flex; align-items: center; gap: 5px;
}

.phone-input-bar {
    display: flex; align-items: center; gap: 6px;
    background: var(--bg-warm); border: 1px solid var(--border);
    border-radius: 18px; padding: 7px 12px; margin-top: 14px;
}
.phone-input-bar span { color: var(--text-tertiary); font-size: 11px; flex: 1; }
.phone-input-send {
    width: 24px; height: 24px; background: var(--primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: white; font-size: 11px;
}

/* Embedded cards inside phone chat */
.phone-card {
    background: var(--surface); border: 1px solid var(--border-light); border-radius: 10px;
    padding: 8px 10px; margin-top: 2px; font-size: 10px; line-height: 1.4;
}
.phone-card strong { font-size: 11px; display: block; margin-bottom: 6px; }
.phone-card-table { width: 100%; border-collapse: collapse; font-size: 9.5px; margin-top: 4px; }
.phone-card-table th, .phone-card-table td {
    text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--border-light);
}
.phone-card-table th { font-weight: 600; color: var(--text-secondary); font-size: 9px; }
.phone-card-table tr:last-child td { border-bottom: none; }

.phone-policy-option {
    background: var(--bg); border: 1px solid var(--border-light); border-radius: 8px;
    padding: 6px 8px; margin-bottom: 5px; font-size: 10px; line-height: 1.4;
}
.phone-policy-option:last-child { margin-bottom: 0; }
.phone-policy-label {
    font-weight: 600; font-size: 10px; color: var(--primary); margin-bottom: 2px;
}
.phone-policy-detail { color: var(--text-secondary); font-size: 9px; }
.phone-policy-rec {
    display: inline-block; background: var(--accent-light); color: var(--accent-dark);
    font-size: 8px; font-weight: 600; padding: 1px 5px; border-radius: 4px; margin-left: 4px;
}
.phone-checklist-item {
    display: flex; align-items: center; gap: 4px; font-size: 9.5px;
    padding: 2px 0; color: var(--text-secondary);
}
.phone-checklist-item .chk { color: var(--text-tertiary); font-size: 10px; }

/* Reminder notification card (used in /reminders) */
.phone-notif {
    background: var(--surface); border: 1px solid var(--border-light); border-radius: 12px;
    padding: 10px 12px; margin-top: 4px;
}
.phone-notif-head {
    display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
}
.phone-notif-icon {
    width: 18px; height: 18px; border-radius: 5px;
    background: linear-gradient(135deg, var(--primary), var(--primary-medium));
    color: white; font-size: 10px; display: flex; align-items: center; justify-content: center;
}
.phone-notif-app { font-size: 10px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.6px; }
.phone-notif-time { font-size: 10px; color: var(--text-tertiary); margin-left: auto; }
.phone-notif-title { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.phone-notif-body { font-size: 10.5px; color: var(--text-secondary); }

/* Document result card (used in /document-manager) */
.phone-doc-result {
    background: var(--primary-light); border: 1px solid rgba(27,107,90,0.2);
    border-radius: 12px; padding: 10px; margin-top: 8px;
    display: flex; align-items: flex-start; gap: 8px;
}
.phone-doc-icon {
    width: 32px; height: 32px; background: var(--surface); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0;
}
.phone-doc-text { flex: 1; min-width: 0; }
.phone-doc-label { font-size: 11px; font-weight: 700; margin-bottom: 2px; }
.phone-doc-meta { font-size: 9.5px; color: var(--text-secondary); }
.phone-doc-owner {
    display: inline-block; padding: 1px 6px; border-radius: 4px;
    font-size: 8.5px; font-weight: 700; color: white; margin-left: 4px;
}

/* ─── Sticky bottom CTA (mobile + tablet) ─── */
.sticky-cta {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: rgba(247, 246, 243, 0.96);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    padding: 12px 16px;
    transform: translateY(110%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
}
.sticky-cta.visible { transform: translateY(0); }
.sticky-cta .btn-primary {
    width: 100%; justify-content: center;
    padding: 13px 24px; border-radius: 12px;
}
@media (max-width: 900px) {
    .sticky-cta { display: block; }
    footer { padding-bottom: 100px; }
}

/* Scenario label below phone */
.hero-scenario-label {
    position: absolute; bottom: -40px; left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--primary); color: white; font-size: 12px; font-weight: 600;
    padding: 6px 18px; border-radius: 20px; white-space: nowrap;
    opacity: 0; transition: opacity 0.4s ease, transform 0.4s ease;
    letter-spacing: 0.3px;
}

/* Floating context labels around phone */
.hero-float-label {
    position: absolute; background: var(--surface); border: 1px solid var(--border-light);
    border-radius: 12px; padding: 10px 16px; font-size: 13px; font-weight: 500; color: var(--text);
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06); white-space: nowrap; z-index: 1;
    opacity: 0; transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.hero-float-label.visible { opacity: 1; transform: translateY(0); }
.hero-float-label .float-icon {
    width: 28px; height: 28px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.float-left-1 { top: 40px; left: -60px; }
.float-left-2 { top: 200px; left: -80px; }
.float-right-1 { top: 80px; right: -70px; }
.float-right-2 { top: 260px; right: -50px; }

@media (max-width: 900px) {
    .hero-float-label { display: none; }
}

/* ─── Old vs New ─── */
.contrast-section { background: var(--surface); }
.contrast-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 800px; margin: 0 auto; }
.contrast-card { border-radius: 16px; padding: 32px 28px; }
.contrast-card-old { background: var(--red-light); border: 1px solid #F5D5D3; }
.contrast-card-new { background: var(--primary-light); border: 1px solid #C8E6DC; }
.contrast-card h3 { font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.contrast-card-old h3 { color: var(--red); }
.contrast-card-new h3 { color: var(--primary); }
.contrast-card ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.contrast-card li { font-size: 15px; color: var(--text-secondary); line-height: 1.5; padding-left: 24px; position: relative; }
.contrast-card-old li::before { content: '\00D7'; position: absolute; left: 0; color: var(--red); font-weight: 700; font-size: 16px; }
.contrast-card-new li::before { content: '\2713'; position: absolute; left: 0; color: var(--primary); font-weight: 700; font-size: 14px; }

/* ─── Features ─── */
.features { background: var(--bg); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
    background: var(--surface); border: 1px solid var(--border-light); border-radius: 16px;
    padding: 28px 24px; transition: all 0.3s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.06); border-color: var(--primary-light); }
.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-teal { background: var(--primary-light); }
.feature-icon-gold { background: var(--accent-light); }
.feature-icon-green { background: #EDF8F3; }
.feature-icon-purple { background: var(--purple-light); }
.feature-card h3 { font-family: 'DM Sans', sans-serif; font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ─── Steps ─── */
.how-it-works { background: var(--surface); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.steps::before {
    content: ''; position: absolute; top: 36px; left: 15%; right: 15%; height: 2px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary), var(--primary-light)); z-index: 0;
}
.step { text-align: center; position: relative; z-index: 1; }
.step-number {
    width: 72px; height: 72px; background: var(--surface); border: 2px solid var(--primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
    font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; color: var(--primary);
}
.step h3 { font-family: 'DM Sans', sans-serif; font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; max-width: 280px; margin: 0 auto; }

/* ─── Demo Conversation ─── */
.demo { background: var(--bg); }
.demo-container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.demo-text h2 { font-size: 36px; letter-spacing: -0.8px; margin-bottom: 16px; }
.demo-text p { font-size: 16px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 28px; }
.demo-capabilities { display: flex; flex-direction: column; gap: 14px; }
.demo-capability { display: flex; align-items: flex-start; gap: 12px; }
.demo-capability-icon {
    width: 32px; height: 32px; background: var(--primary-light); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; margin-top: 2px;
}
.demo-capability-text { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.demo-capability-text strong { color: var(--text); font-weight: 600; }

.demo-chat {
    background: var(--surface); border-radius: 20px; border: 1px solid var(--border-light);
    padding: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.04);
}
.demo-chat-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
    padding-bottom: 16px; border-bottom: 1px solid var(--border-light);
}
.demo-chat-avatar { width: 36px; height: 36px; border-radius: 10px; }
.demo-chat-name { font-weight: 600; font-size: 14px; }
.demo-messages { display: flex; flex-direction: column; gap: 12px; }
.demo-msg { max-width: 85%; padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.demo-msg-user { background: var(--primary); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.demo-msg-agent { background: var(--bg); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid var(--border-light); }
.demo-msg-thinking { font-size: 12px; color: var(--text-tertiary); font-style: italic; align-self: flex-start; padding: 4px 0; text-align: left; }

/* ─── Trust ─── */
.trust { background: var(--surface); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.trust-item { padding: 28px 20px; }
.trust-icon { font-size: 32px; margin-bottom: 14px; }
.trust-item h3 { font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.trust-item p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

/* ─── Sibling Pages ─── */
.siblings { background: var(--bg-warm); }
.siblings-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.sibling-card {
    background: var(--surface); border: 1px solid var(--border-light); border-radius: 16px;
    padding: 24px 20px; text-decoration: none; color: var(--text);
    transition: all 0.25s ease; display: block;
}
.sibling-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.06); border-color: var(--primary-light); }
.sibling-card .icon {
    width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center;
    justify-content: center; font-size: 20px; margin-bottom: 14px;
}
.sibling-card h3 { font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.sibling-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.sibling-card .arrow { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: 13px; font-weight: 600; margin-top: 10px; }
.sibling-card.current { background: var(--primary-light); border-color: rgba(27,107,90,0.2); pointer-events: none; }
.sibling-card.current .arrow { color: var(--text-tertiary); }

/* ─── CTA ─── */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-medium));
    text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
    content: ''; position: absolute; top: -100px; right: -100px; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%); pointer-events: none;
}
.cta-section h2 { font-size: 40px; color: white; margin-bottom: 16px; letter-spacing: -1px; position: relative; }
.cta-section p { font-size: 18px; color: rgba(255,255,255,0.8); max-width: 540px; margin: 0 auto 12px; line-height: 1.7; position: relative; }
.cta-section .cta-note { font-size: 14px; color: rgba(255,255,255,0.55); margin-bottom: 32px; position: relative; }

/* ─── Footer ─── */
footer { background: var(--text); color: rgba(255,255,255,0.6); padding: 48px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 32px; height: 32px; border-radius: 8px; }
.footer-brand-name { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 18px; color: white; }
.footer-links { display: flex; gap: 28px; list-style: none; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: white; }
.footer-copy { font-size: 13px; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.active {
        display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
        background: var(--bg); border-bottom: 1px solid var(--border); padding: 20px 24px; gap: 16px;
    }
    .nav-mobile-toggle { display: block; }
    .hero { padding: 110px 0 60px; }
    .hero h1 { font-size: 34px; letter-spacing: -1px; }
    .hero-subtitle { font-size: 16px; }
    .contrast-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; gap: 14px; }
    .steps { grid-template-columns: 1fr; gap: 40px; }
    .steps::before { display: none; }
    .demo-container { grid-template-columns: 1fr; gap: 40px; }
    .trust-grid { grid-template-columns: 1fr; gap: 12px; }
    .siblings-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .section-header h2, .demo-text h2 { font-size: 28px; }
    .cta-section h2 { font-size: 28px; }
    section { padding: 60px 0; }
    .footer-inner { flex-direction: column; text-align: center; }
    .phone-frame { width: 260px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 28px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
    .siblings-grid { grid-template-columns: 1fr; }
}
