/* ============================================
   Fonts - self-hosted Manrope, the same files the app ships.
   Self-hosted rather than Google-hosted: a tracker that promises "no third
   parties" should not open the visit with a request to another company, and
   these five files together are smaller than the round trip they replace.
   ============================================ */
@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/manrope-400.woff2") format("woff2");
}

@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/manrope-500.woff2") format("woff2");
}

@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/manrope-600.woff2") format("woff2");
}

@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/manrope-700.woff2") format("woff2");
}

@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("fonts/manrope-800.woff2") format("woff2");
}

/* ============================================
   CSS Variables - Matching App Color Scheme
   ============================================ */
:root {
    --bg: #0b1220;
    --panel: #101826;
    --text: #f0e6e2;
    --muted: #b4bcc8;
    --accent: #3b82f6;
    --accent-2: #60a5fa;
    --gain: #22c55e;
    --loss: #ef4444;

    /* Fire / ember brand palette — matches the new app's identity */
    --ember: #f97316;
    --ember-light: #fb923c;
    --gold: #fde68a;
    --brand-gradient: linear-gradient(90deg, #fde68a 0%, #fb923c 45%, #60a5fa 100%);
    --fire-gradient: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    --ember-glow: rgba(249, 115, 22, 0.22);

    /* Additional colors for website */
    --accent-hover: #2563eb;
    --accent-light: rgba(59, 130, 246, 0.1);
    --panel-light: rgba(16, 24, 38, 0.5);
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.05);

    /* Unified surfaces (mirrors the app) */
    --ui-surface: rgba(148, 163, 184, 0.05);
    --ui-surface-hover: rgba(148, 163, 184, 0.075);
    --ui-surface-active: rgba(148, 163, 184, 0.12);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Border radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* The fixed navbar measures 97px (its old hard-coded offset of 80 in script.js
   was stale, so even a nav click used to land the heading under the bar), so
   anything reachable by fragment reserves that plus breathing room above
   itself. In CSS rather than in a click handler because it then also applies to
   a pasted /#pricing link, a search result, a Back press and the skip link —
   none of which go through JS. */
:target,
section[id],
main[id] {
    scroll-margin-top: 7.5rem;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 18, 32, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-section a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--fire-gradient);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--fire-gradient);
    color: #1a1206;
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(249, 115, 22, 0.45);
}

.btn-secondary {
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--ui-surface-hover);
    border-color: var(--ember-light);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(249, 115, 22, 0.18), transparent 60%),
        radial-gradient(90% 70% at 85% 12%, rgba(59, 130, 246, 0.16), transparent 55%),
        radial-gradient(100% 80% at 12% 95%, rgba(59, 130, 246, 0.10), transparent 55%);
    z-index: 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Without this, a 1fr track refuses to shrink below its content's min-content
   width and the whole grid grows past the viewport. */
.hero-container > * {
    min-width: 0;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--brand-gradient);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted);
}

/* ============================================
   App Screenshots
   Real fastlane exports from the shipping build, not a hand-built mockup.
   ============================================ */
.shot {
    position: relative;
    margin: 0;
}

.shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.shot figcaption {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--muted);
}

.shot-hero {
    /* min() rather than width+max-width: the hero grid's 1fr track sizes to
       min-content, so a fixed 380px here made the column wider than the phone
       viewport and .hero { overflow: hidden } sliced the screenshot's right
       edge off. Paired with min-width: 0 on the grid children below. */
    width: min(380px, 100%);
    margin-inline: auto;
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

/* The ember glow the old mockup carried, kept behind the real screenshot so
   the hero keeps its warmth. */
.shot-hero::before {
    content: '';
    position: absolute;
    inset: -30px;
    background: radial-gradient(60% 60% at 60% 30%, var(--ember-glow), transparent 70%);
    z-index: -1;
    filter: blur(10px);
}

/* Showcase strip */
.showcase {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    max-width: 960px;
    margin: 0 auto 5rem;
}

.showcase .shot img {
    max-width: 300px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .showcase {
        grid-template-columns: 1fr;
        gap: 3rem;
        margin-bottom: 3.5rem;
    }

    .showcase .shot img {
        max-width: 260px;
    }
}

/* ============================================
   Container & Sections
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--muted);
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: 6rem 0;
    position: relative;
}

.version2-features {
    position: relative;
    overflow: hidden;
    margin-bottom: 3.5rem;
    padding: 2.5rem 2rem;
    background:
        radial-gradient(80% 120% at 0% 0%, rgba(249, 115, 22, 0.12), transparent 60%),
        linear-gradient(135deg, rgba(249, 115, 22, 0.06) 0%, rgba(59, 130, 246, 0.06) 100%);
    border: 1px solid rgba(251, 146, 60, 0.28);
    border-radius: var(--radius-lg);
    text-align: center;
}

.version2-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ember-light);
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(251, 146, 60, 0.35);
    border-radius: 999px;
}

.version2-features-title {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem;
    text-align: center;
}

.version2-features-intro {
    max-width: 620px;
    margin: 0 auto 2rem;
    color: var(--muted);
    line-height: 1.6;
}

.version2-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.version2-feature {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem;
    text-align: left;
    background: rgba(13, 21, 33, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.version2-feature:hover {
    border-color: var(--ember-light);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.version2-feature-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.version2-feature-desc {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
}

.feature-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    border-color: var(--ember-light);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Highlighted "new" feature cards */
.feature-card.is-new {
    border-color: rgba(251, 146, 60, 0.35);
    background:
        radial-gradient(90% 70% at 100% 0%, rgba(249, 115, 22, 0.08), transparent 60%),
        var(--panel);
}

.new-tag {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    padding: 0.25rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #1a1206;
    background: var(--fire-gradient);
    border-radius: 999px;
}

.feature-card.is-new .feature-icon {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18) 0%, rgba(96, 165, 250, 0.12) 100%);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    stroke: url(#icon-gradient);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.feature-description {
    color: var(--muted);
    line-height: 1.7;
    position: relative;
}

.feature-card {
    position: relative;
}

.region-hover {
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: var(--transition);
    position: relative;
}

.region-hover:hover {
    color: var(--accent-hover);
    text-decoration-color: var(--accent-hover);
}

.hover-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    font-style: italic;
    margin-top: 0.5rem;
    opacity: 0.7;
}

.region-tooltip {
    position: absolute;
    background: var(--panel);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    min-width: 280px;
    max-width: 400px;
    margin-top: 0.5rem;
}

.region-tooltip.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.tooltip-header {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.tooltip-countries {
    color: var(--text);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Mobile adjustments for tooltips */
@media (max-width: 768px) {
    .region-tooltip {
        min-width: 240px;
        max-width: calc(100vw - 40px);
        font-size: 0.85rem;
    }
    
    .tooltip-countries {
        font-size: 0.85rem;
    }
    
    .hover-hint {
        font-size: 0.8rem;
    }
}

/* ============================================
   How It Works Section
   ============================================ */
.how-it-works {
    padding: 6rem 0;
    background: var(--panel);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step.animate {
    opacity: 1;
    transform: translateY(0);
}

.step-number {
    width: 64px;
    height: 64px;
    background: var(--fire-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1206;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.32);
}

.step-content {
    max-width: 300px;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.step-description {
    color: var(--muted);
    line-height: 1.7;
}

/* ============================================
   Pricing Section
   ============================================ */
.pricing {
    padding: 6rem 0;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    position: relative;
}

.pricing-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.pricing-card.featured {
    border-color: var(--ember-light);
    border-width: 2px;
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.18);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--fire-gradient);
    color: #1a1206;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 700;
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pricing-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.pricing-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.price-line {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.price-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
}

.price-period {
    font-size: 1rem;
    color: var(--muted);
    display: block;
    width: 100%;
    text-align: center;
    margin-top: -5px;
}


.price-alt-text {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 400;
}

.pricing-features {
    margin-bottom: 2rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--muted);
    border-bottom: 1px solid var(--border-light);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li svg {
    color: var(--gain);
    flex-shrink: 0;
}

.pricing-features li strong {
    color: var(--text);
}

/* ============================================
   Download Section
   ============================================ */
.download {
    padding: 6rem 0;
    background:
        radial-gradient(70% 100% at 50% 0%, rgba(249, 115, 22, 0.12), transparent 65%),
        linear-gradient(135deg, rgba(249, 115, 22, 0.06) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.download-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.download-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.download-subtitle {
    font-size: 1.25rem;
    color: var(--muted);
    margin-bottom: 3rem;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    transition: var(--transition);
    width: 230px;
    text-decoration: none;
}

.download-btn:hover {
    border-color: var(--ember-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}



.download-btn-img {
    height: 48px;
    width: auto;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
}

.download-btn-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-align: left;
}

.download-btn-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-align: left;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
    background: var(--panel);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* Legal pages have only two footer sections (logo + Legal); without this the
   Legal column sits in the middle track with an empty third column. */

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.footer-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    color: var(--muted);
    line-height: 1.7;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--ember-light);
}








.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes growUp {
    from {
        height: 0;
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .download-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 6rem 0 3rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .feature-card,
    .pricing-card {
        padding: 1.5rem;
    }

    .version2-features {
        margin-bottom: 2.5rem;
        padding: 1.5rem 1.25rem;
    }

    .version2-features-grid {
        grid-template-columns: 1fr;
    }

    .version2-feature {
        padding: 1rem;
    }
}

/* ============================================
   Scroll reveal
   The hidden state lives behind html.js on purpose: if script.js fails, is
   blocked, or is simply slow, the page must still show its content rather
   than a hero followed by an empty void where the features should be.
   ============================================ */
.js [data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* transform: none rather than translateY(0) on purpose. A transform of any
   kind — including translateY(0) — makes the element a stacking context and a
   containing block, which trapped the region tooltips inside their own feature
   card: their z-index: 1000 could not out-rank the navbar's, so a tooltip near
   the top of the viewport was painted underneath it. Landing on `none` drops
   the stacking context once the reveal is done.
   For the same reason there is no will-change here: it would hold that
   stacking context open permanently, on all 35 revealed elements. */
.js [data-animate].animate {
    opacity: 1;
    transform: none;
}

/* ============================================
   Reduced motion
   Someone who has asked their OS for less movement gets the finished state
   immediately - no fades, no slides, no typewriter on the hero.
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js [data-animate],
    .js [data-animate].animate {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   Focus & skip link
   The stylesheet previously defined no focus styling at all, which left
   keyboard users with only the UA default against a near-black background.
   ============================================ */
:focus-visible {
    outline: 3px solid var(--ember-light);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 2000;
    padding: 0.75rem 1.25rem;
    background: var(--ember);
    color: #0b1220;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

/* ============================================
   Trust strip
   The privacy claim is the whole sale for a finance app, so it gets stated
   as four checkable facts directly under the hero rather than as one bullet
   buried in a grid of eighteen.
   ============================================ */
.trust {
    padding: 2.5rem 0;
    border-block: 1px solid var(--border-light);
    background: var(--panel-light);
}

.trust-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 3rem;
    list-style: none;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--muted);
}

.trust-item svg {
    flex-shrink: 0;
    color: var(--ember-light);
}

@media (max-width: 768px) {
    .trust-list {
        gap: 1rem 1.75rem;
    }

    .trust-item {
        font-size: 0.875rem;
    }
}

/* ============================================
   Feature groups
   Eighteen equally-weighted cards read as a wall. The headings split them
   into five scannable groups so "Complete Privacy" no longer carries the
   same visual weight as "Advanced Sorting".
   ============================================ */
.feature-group-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 4rem 0 1.75rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border);
}

.feature-group-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.1em;
    margin-right: 0.75rem;
    vertical-align: -0.15em;
    border-radius: 2px;
    background: var(--fire-gradient);
}

.features-grid + .feature-group-title {
    margin-top: 4.5rem;
}

@media (max-width: 768px) {
    .feature-group-title {
        font-size: 1.25rem;
        margin: 3rem 0 1.5rem;
    }
}

/* ============================================
   FAQ
   Native <details> so the answers are in the DOM for search engines and
   readable with the stylesheet or script switched off.
   ============================================ */
.faq {
    padding: 6rem 0;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--ui-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.25s ease, background 0.25s ease;
}

.faq-item:hover {
    border-color: rgba(249, 115, 22, 0.35);
    background: var(--ui-surface-hover);
}

.faq-item[open] {
    border-color: rgba(249, 115, 22, 0.45);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.375rem 1.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

/* Safari still paints its own triangle without this. */
.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '';
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--ember-light);
    border-bottom: 2px solid var(--ember-light);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.25s ease;
}

.faq-item[open] .faq-question::after {
    transform: rotate(-135deg) translate(-2px, -2px);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--muted);
    line-height: 1.7;
}

.faq-answer em {
    color: var(--text);
    font-style: normal;
    font-weight: 600;
}

@media (max-width: 768px) {
    .faq {
        padding: 4rem 0;
    }

    .faq-question {
        padding: 1.125rem 1.25rem;
        font-size: 1rem;
    }

    .faq-answer {
        padding: 0 1.25rem 1.25rem;
    }
}

/* ============================================
   Footer additions
   ============================================ */
.footer-madeby {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.footer-disclaimer {
    max-width: 720px;
    margin: 0 auto 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--muted);
    opacity: 0.85;
}

/* ============================================================
   Article pages (about + the topic pages)
   ============================================================
   The legal pages already had a .legal-* block scoped inline. These classes
   are the same shape but live here instead, because five pages share them and
   duplicating the block five times is how it drifts. .legal-* is left alone -
   rewriting working pages to share a class is not worth the regression risk.

   Everything below reuses the existing tokens. No new colours are introduced. */

.article-page {
    padding: 8rem 0 4rem;
    min-height: 100vh;
}

.article-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 2rem;
}

.article-header {
    margin-bottom: 2.5rem;
}

.article-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.article-standfirst {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.article-meta {
    color: var(--muted);
    font-size: 0.9rem;
    opacity: 0.8;
}

.article-content {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.article-content h2:first-child { margin-top: 0; }

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
    color: var(--muted);
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    color: var(--muted);
}

.article-content li { margin-bottom: 0.6rem; }

.article-content strong {
    color: var(--text);
    font-weight: 600;
}

.article-content a {
    color: var(--ember-light);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.article-content a:hover { color: var(--gold); }

/* Inline code, used for CSV column names and file names. Monospace matters
   here: "Aantal" vs "Amount" is the whole point of those passages. */
.article-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875em;
    padding: 0.15em 0.4em;
    border-radius: 0.35rem;
    background: var(--ui-surface-active);
    color: var(--text);
}

/* Callout. --note is neutral, --warn borrows the loss colour for the one thing
   on these pages that can actually cost someone money if skipped. */
.callout {
    border: 1px solid var(--border);
    border-left: 3px solid var(--ember);
    border-radius: var(--radius-sm);
    background: var(--ui-surface);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
}

.callout p:last-child { margin-bottom: 0; }

.callout-title {
    display: block;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.callout--warn { border-left-color: var(--loss); }
.callout--good { border-left-color: var(--gain); }

/* Tables scroll rather than forcing the page to. Several of these carry CSV
   column names that cannot wrap sensibly on a phone. */
.table-scroll {
    overflow-x: auto;
    margin: 1.75rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.925rem;
    min-width: 460px;
}

.article-content th,
.article-content td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
}

.article-content th {
    color: var(--text);
    font-weight: 600;
    background: var(--ui-surface);
    white-space: nowrap;
}

.article-content tbody tr:last-child td { border-bottom: none; }

/* Key-facts box at the top of a topic page: the extractable summary. Doubles
   as the passage an AI assistant is most likely to lift. */
.key-facts {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--ui-surface);
    padding: 1.5rem 1.75rem;
    margin-bottom: 2.5rem;
}

.key-facts h2 {
    font-size: 1rem !important;
    margin: 0 0 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 600;
}

.key-facts ul {
    margin: 0;
    padding-left: 1.25rem;
}

.key-facts li:last-child { margin-bottom: 0; }

/* End-of-article CTA. Deliberately quieter than the homepage hero button:
   someone who read 1,500 words does not need to be shouted at. */
.article-cta {
    margin-top: 3rem;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--ui-surface);
    text-align: center;
}

.article-cta h2 {
    margin-top: 0 !important;
    font-size: 1.35rem !important;
}

.article-cta p { margin-bottom: 1.5rem; }

/* Related reading - the internal link graph these pages exist to create. */
.related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.related h2 {
    font-size: 1.1rem !important;
    margin: 0 0 1rem !important;
}

.related ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related li { margin-bottom: 0.75rem; }

.related a { font-weight: 600; }

.related span {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 400;
    margin-top: 0.15rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ember-light);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.back-link:hover { color: var(--gold); gap: 0.75rem; }
.back-link svg { width: 20px; height: 20px; }

/* Author block. The whole point of the About page is that a person is behind
   this, so the byline gets real presence rather than a grey footer line. */
.author-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--ui-surface);
    padding: 1.5rem;
    margin: 2.5rem 0 0;
}

.author-card img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.author-card p {
    margin: 0;
    font-size: 0.95rem;
}

.author-card .author-name {
    display: block;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

@media (max-width: 768px) {
    .article-page { padding: 6rem 0 3rem; }
    .article-content { padding: 2rem 1.5rem; }
    .article-container { padding: 0 1.25rem; }
    .author-card { flex-direction: column; text-align: center; }
}

/* ============================================================
   Article figures (inline SVG charts + diagrams)
   ============================================================
   No JavaScript anywhere in these: the CSP allows exactly two hashed inline
   scripts and a figure is not worth a third. Tooltips are native SVG <title>,
   which works with no script and is read by screen readers; hover states are
   CSS. Every figure carries <title>/<desc> and role="img".

   Colours are the validated chart pair - #e96400 (ember snapped into the dark
   lightness band) and #3b82f6 - not the raw brand tokens, which sit too light
   for a dark surface. Text inside a figure wears text tokens, never a series
   colour. */

.figure {
    margin: 2rem 0;
}

.figure svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.figure figcaption {
    margin-top: 0.85rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--muted);
    opacity: 0.9;
}

/* Recessive axis/label ink. Sizes are in SVG user units, which scale with the
   viewBox - so they stay proportionate rather than shrinking to nothing. */
.figure .ax   { font-size: 12px; fill: #8a94a6; font-family: inherit; }
.figure .lbl  { font-size: 13px; font-weight: 600; font-family: inherit; }
.figure .val  { font-size: 12px; font-weight: 600; fill: #f0e6e2; font-family: inherit; }
.figure .note { font-size: 11.5px; fill: #8a94a6; font-family: inherit; }
.figure .hub  { font-size: 16px; font-weight: 700; fill: #f0e6e2; font-family: inherit; }

/* Hover affordance. The hit target is the whole group, which is larger than
   the mark - a 4px bar is not a pointing target. */
.figure .bar, .figure .pt, .figure .node { cursor: default; }
.figure .bar rect,
.figure .node rect,
.figure .node circle { transition: opacity 0.15s ease; }
.figure .bar:hover rect,
.figure .node:hover rect,
.figure .node:hover circle { opacity: 0.82; }
.figure .pt:hover circle { fill: rgba(255, 255, 255, 0.10); }

/* On a narrow screen the chart keeps its aspect ratio and the type would drop
   below legibility, so nudge the ink up rather than letting it vanish. */
@media (max-width: 560px) {
    .figure .ax   { font-size: 14px; }
    .figure .note { font-size: 13px; }
    .figure .val  { font-size: 14px; }
}

/* Forced-colours / high-contrast: keep the marks visible as shapes. */
@media (forced-colors: active) {
    .figure svg * { forced-color-adjust: none; }
}

/* Annual plan line under the Pro price. Deliberately quieter than the headline
   figure: the monthly price is what most people compare on, and the saving is
   the reason to look twice - not the first thing shouted. */
.price-annual {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--muted);
}

.price-annual strong {
    color: var(--gain);
    font-weight: 700;
}

.price-annual-note {
    display: block;
    font-size: 0.8125rem;
    opacity: 0.8;
    margin-top: 0.15rem;
}
