/* ============================================
   Revo-Bot — Landing Page + Chat Stylesheet
   Revolut blue + dark theme
   ============================================ */

/* ---- Theme Variables ---- */

:root {
    /* Accent — Revolut blue */
    --accent: #0666EB;
    --accent-light: #3384F0;
    --accent-dim: #0550C0;

    /* Dark backgrounds */
    --dark: #0A0A0F;
    --dark-light: #12121A;
    --dark-deep: #06060A;

    /* Light mode (default) */
    --bg: #FAFAFA;
    --bg-secondary: #F0F0F5;
    --surface: #FFFFFF;
    --border: #E0E0E8;
    --border-subtle: #ECECF0;
    --text: #0A0A0F;
    --text-dim: #4A4A5A;
    --text-muted: #8A8A9A;
    --shadow: 0 2px 16px rgba(10, 10, 15, 0.06);

    /* Chat colors (always dark) */
    --chat-bg: var(--dark);
    --chat-header-bg: var(--dark-deep);
    --chat-border: var(--dark-light);
    --chat-text: #F0F0F5;
    --chat-text-dim: #8A8A9A;
    --chat-input-bg: var(--dark-deep);
    --chat-input-border: #1E1E2A;
    --chat-bot-bg: rgba(255, 255, 255, 0.06);
    --chat-bot-border: rgba(255, 255, 255, 0.08);
    --chat-user-bg: rgba(6, 102, 235, 0.12);
    --chat-user-border: rgba(6, 102, 235, 0.2);

    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Dark mode ---- */

[data-theme="dark"] {
    --bg: #06060A;
    --bg-secondary: #0A0A10;
    --surface: #0E0E16;
    --border: #1E1E2A;
    --border-subtle: #14141E;
    --text: #F0F0F5;
    --text-dim: #8A8A9A;
    --text-muted: #5A5A6A;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.4);

    --chat-input-bg: #08080E;
    --chat-input-border: #1E1E2A;
}

/* ---- Reset ---- */

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

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ---- Page Layout ---- */

.page {
    max-width: 860px;
    margin: 0 auto;
    padding: 12px 16px;
}

/* ---- Header ---- */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
    transition: background 0.3s ease;
}

.header-logo {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-logo:hover {
    color: var(--accent-dim);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-location {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* ---- Theme Toggle ---- */

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    color: var(--text-dim);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent-dim);
}

.theme-label {
    font-size: 0.65rem;
    font-weight: 400;
    white-space: nowrap;
}

.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ---- Main ---- */

.main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ---- Section Base ---- */

.section {
    padding: 60px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 32px;
}

/* ---- Section 1 — Hero ---- */

.section-hero {
    text-align: center;
    padding: 80px 0 60px;
    opacity: 1;
    transform: none;
}

.hero-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent);
    background: rgba(6, 102, 235, 0.08);
    border: 1px solid rgba(6, 102, 235, 0.2);
    border-radius: 20px;
    padding: 6px 16px;
    margin-bottom: 24px;
    letter-spacing: 0.04em;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--text);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 32px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.hero-cta:hover {
    opacity: 0.7;
}

/* ---- Section 2 — Problem ---- */

.columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
}

.column {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.column-heading {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.step-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.column-bad .step-num {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.column-good .step-num {
    background: rgba(6, 102, 235, 0.1);
    color: var(--accent);
}

.column-verdict {
    margin-top: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.verdict-bad { color: #ef4444; }
.verdict-good { color: var(--accent); }

/* ---- Section 3 — Market ---- */

.timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    min-width: 80px;
}

.timeline-text {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.4;
}

.market-quote {
    background: rgba(6, 102, 235, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 20px 24px;
    margin: 24px 0;
    font-size: 1rem;
    font-style: italic;
    color: var(--text);
    line-height: 1.6;
}

.market-quote cite {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    font-style: normal;
    color: var(--text-muted);
}

.comparison-table {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
}

.comparison-col {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
}

.comparison-col h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.comparison-col p {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.comparison-miss {
    color: #ef4444 !important;
    font-weight: 500;
}

.comparison-highlight {
    border-color: var(--accent);
    background: rgba(6, 102, 235, 0.04);
}

.comparison-win {
    color: var(--accent) !important;
    font-weight: 600;
}

/* ---- Section 4 — Solution ---- */

.account-tree {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
}

.tree-root {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.tree-tag {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 8px;
}

.tag-new {
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.tree-branches {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 20px;
    border-left: 2px solid var(--border);
}

.tree-branch {
    font-size: 0.85rem;
    color: var(--text-dim);
    padding: 8px 0;
}

.tree-new {
    background: rgba(6, 102, 235, 0.04);
    border: 1px solid rgba(6, 102, 235, 0.15);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.tree-branch-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.tree-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tree-details li {
    font-size: 0.82rem;
    color: var(--text-dim);
}

.tree-details li strong {
    color: var(--text);
}

.mcp-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.mcp-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: border-color 0.2s;
}

.mcp-card:hover {
    border-color: var(--accent);
}

.mcp-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    font-family: 'SF Mono', 'Fira Code', monospace;
    margin-bottom: 4px;
}

.mcp-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ---- Section 5 — Security ---- */

.security-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 24px 0;
}

.security-col {
    border-radius: var(--radius-sm);
    padding: 20px;
}

.security-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.security-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.security-col li {
    font-size: 0.82rem;
    line-height: 1.4;
}

.security-green {
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.security-green h4 { color: #22c55e; }
.security-green li { color: var(--text-dim); }

.security-blue {
    background: rgba(6, 102, 235, 0.06);
    border: 1px solid rgba(6, 102, 235, 0.15);
}

.security-blue h4 { color: var(--accent); }
.security-blue li { color: var(--text-dim); }

.security-red {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.security-red h4 { color: #ef4444; }
.security-red li { color: var(--text-dim); }

.push-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-top: 28px;
    margin-bottom: 12px;
}

.push-mockups {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.push-mockup {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.push-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.push-content {
    flex: 1;
    min-width: 150px;
}

.push-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.push-text {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.push-actions {
    display: flex;
    gap: 8px;
}

.push-btn {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    cursor: default;
    font-family: var(--font);
}

.push-approve {
    background: #22c55e;
    color: #fff;
}

.push-deny {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ---- Section 6 — Revenue ---- */

.pricing-tiers {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 24px 0;
}

.tier {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.tier-highlight {
    border-color: var(--accent);
    background: rgba(6, 102, 235, 0.04);
}

.tier-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.tier-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.tier-price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-dim);
}

.tier ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.tier li {
    font-size: 0.82rem;
    color: var(--text-dim);
}

.tier-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
}

.revenue-highlight {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-dim);
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    line-height: 1.6;
}

.revenue-num {
    font-weight: 700;
    color: var(--text);
}

.revenue-total {
    font-size: 1.2rem;
    color: var(--accent);
}

/* ---- Section 7 — Why Revolut ---- */

.checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.5;
    opacity: 0;
    transform: translateX(-15px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.check-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(6, 102, 235, 0.1);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.why-conclusion {
    font-size: 1.1rem;
    color: var(--text);
    text-align: center;
    padding: 20px;
}

/* ---- Section 8 — About ---- */

.about-text {
    max-width: 560px;
}

.about-text p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 12px;
}

.about-contact {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.contact-link {
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.contact-link:hover {
    opacity: 0.7;
}

/* ---- Section 9 — Chat ---- */

.section-chat {
    padding: 40px 0;
    opacity: 1;
    transform: none;
}

.chat-container {
    width: 100%;
    height: 420px;
    display: flex;
}

.chat-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--chat-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ---- Chat Header ---- */

.chat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--chat-header-bg);
    border-bottom: 1px solid var(--chat-border);
    flex-shrink: 0;
}

.chat-header-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
}

.chat-header-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--chat-text);
}

.chat-header-badge {
    font-size: 0.65rem;
    color: var(--chat-text-dim);
    margin-left: auto;
    font-weight: 300;
}

/* ---- Chat Messages ---- */

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--chat-border); border-radius: 4px; }

/* ---- Message Bubbles ---- */

.message {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    line-height: 1.55;
    word-wrap: break-word;
    animation: fadeIn 0.25s ease-out;
}

.message-bot {
    align-self: flex-start;
    background: var(--chat-bot-bg);
    border: 1px solid var(--chat-bot-border);
    color: var(--chat-text);
}

.message-user {
    align-self: flex-end;
    background: var(--chat-user-bg);
    border: 1px solid var(--chat-user-border);
    color: var(--chat-text);
}

.message-typing {
    align-self: flex-start;
    background: var(--chat-bot-bg);
    border: 1px solid var(--chat-bot-border);
    padding: 10px 18px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--chat-text-dim);
    animation: typingBounce 1.2s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

/* ---- Chat Input ---- */

.chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--chat-border);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    background: var(--chat-input-bg);
    border: 1px solid var(--chat-input-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--chat-text);
    font-family: var(--font);
    font-size: 0.875rem;
    line-height: 1.4;
    resize: none;
    outline: none;
    max-height: 100px;
    transition: border-color 0.2s;
}

.chat-input::placeholder { color: var(--chat-text-dim); }
.chat-input:focus { border-color: var(--accent-dim); }

.chat-send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, opacity 0.2s;
}

.chat-send:hover { background: var(--accent-dim); }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- Footer ---- */

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 20px;
}

.footer a {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 300;
    transition: color 0.2s;
}

.footer a:hover { color: var(--text-dim); }

/* ---- Animations ---- */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* ============================================
   RESPONSIVE — Tablet+ (min 640px)
   ============================================ */

@media (min-width: 640px) {
    .page { padding: 20px 24px; }

    .hero-title { font-size: 3.5rem; }
    .hero-subtitle { font-size: 1.2rem; }

    .section-title { font-size: 2.2rem; }

    .columns { grid-template-columns: 1fr 1fr; }
    .comparison-table { grid-template-columns: 1fr 1fr 1fr; }
    .security-columns { grid-template-columns: 1fr 1fr 1fr; }
    .pricing-tiers { grid-template-columns: 1fr 1fr 1fr; }
    .mcp-tools { grid-template-columns: 1fr 1fr; }

    .chat-container { height: 480px; }

    .chat-header { padding: 12px 18px; }
    .chat-messages { padding: 18px; gap: 12px; }
    .message { max-width: 80%; font-size: 0.9rem; }
    .chat-input-area { padding: 12px 16px; }
}

/* ============================================
   RESPONSIVE — Large desktop (min 1024px)
   ============================================ */

@media (min-width: 1024px) {
    .mcp-tools { grid-template-columns: 1fr 1fr 1fr; }
}

/* ============================================
   RESPONSIVE — Small mobile (max 380px)
   ============================================ */

@media (max-width: 380px) {
    .page { padding: 8px 10px; }

    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: 0.9rem; }

    .section { padding: 40px 0; }
    .section-title { font-size: 1.3rem; }

    .chat-container { height: 360px; }
    .chat-header { padding: 8px 10px; }
    .chat-messages { padding: 10px; gap: 8px; }
    .message { max-width: 92%; padding: 8px 10px; font-size: 0.82rem; }
    .chat-input-area { padding: 8px; gap: 6px; }
    .chat-input { padding: 8px 10px; font-size: 0.82rem; }
    .chat-send { width: 36px; height: 36px; }
}
