/* =============================================
   HOME PAGE — LeckerCAD Landing
   ============================================= */

@import url('../fonts/fonts.css');

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

/* Disable text + image selection everywhere on the home page. Affects
   click-drag selection and Ctrl/Cmd+A. The home page is purely
   presentational — there's nothing here a user needs to copy. */
html, body {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
/* Prevent the browser's native image-drag (the ghost preview that
   appears when you click and drag any <img>). */
img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

:root {
    --glass-bg: rgba(20, 20, 35, 0.75);
    --glass-bg-solid: rgba(20, 20, 35, 0.92);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.05);
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.5);
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    /* ---- Grid overlay variables (NEW) ---- */
    --grid-gap: 26px;
    --grid-opacity: 0.25;
    --grid-border: 36px;
    --grid-bg: #0d0d18;
    --grid-minor: rgba(120, 140, 255, calc(var(--grid-opacity) * 0.2));
    --grid-major: rgba(120, 140, 255, calc(var(--grid-opacity) * 0.4));
    --grid-cross: rgba(120, 140, 255, var(--grid-opacity));
    --lines-y: linear-gradient(var(--grid-minor) 1px, transparent 1px);
    --lines-x: linear-gradient(to right, var(--grid-minor) 1px, transparent 1px);
    --lines-y-major: linear-gradient(var(--grid-major) 1px, transparent 1px);
    --lines-x-major: linear-gradient(to right, var(--grid-major) 1px, transparent 1px);
    --cross-y: linear-gradient(var(--grid-cross) 1px, transparent 1px);
    --cross-x: linear-gradient(to right, var(--grid-cross) 1px, transparent 1px);
    --cross-mask: radial-gradient(circle at center,
        transparent calc(var(--grid-gap) / 2),
        var(--grid-bg) calc(var(--grid-gap) / 2)
    );
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0a0a14 0%, #12121f 50%, #0d1a2d 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ======== FIXED OVERLAYS ======== */
.particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 0;
}
.gear-canvas-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 10;
}
.cursor-glow {
    position: fixed;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    will-change: transform;
}


/* ======== MODERN HEADER ======== */
.header {
    background: rgba(10, 10, 20, 0.4); /* Much more transparent initially */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent; /* Border is hidden at top of page */
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

/* This class gets applied by JS when the user scrolls down */
.header.scrolled {
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    max-width: 1800px; /* Matches your feature section max-width */
    margin: 0 auto;
    width: 100%;
}

/* Main Navigation Links */
.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.nav-link:hover {
    color: var(--text);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.3); /* Subtle glow on hover */
}

/* ======== THE NAV LAMP (HIDDEN BY DEFAULT) ======== */
.nav-link::before {
    content: "";
    position: absolute;
    top: -14px; /* Floating just above the text */
    left: 50%;
    transform: translateX(-50%);
    width: 0; /* Starts at 0 width */
    height: 3px;
    background: #ffffff;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
}

/* Active State: Glow the text itself slightly */
.nav-link.active {
    color: var(--text);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

/* Trigger the lamp animation when the active class is added */
.nav-link.active::before {
    animation: turnOnLamp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Keyframes for a neon 'flicker on' effect */
@keyframes turnOnLamp {
    0% {
        width: 0;
        opacity: 0;
        box-shadow: 0 0 0px 0px rgba(99, 102, 241, 0);
    }
    30% {
        width: 12px;
        opacity: 0.6;
        box-shadow: 0 4px 10px 2px rgba(99, 102, 241, 0.5); /* Brief flicker on */
    }
    40% {
        opacity: 0.2; /* Brief flicker off */
    }
    100% {
        width: 24px;
        opacity: 1;
        /* The final glowing 'light cone' pointing down */
        box-shadow: 0 6px 16px 4px rgba(99, 102, 241, 0.8), 
                    0 2px 8px 1px rgba(6, 182, 212, 0.6);
        background: #ffffff;
    }
}


/* Specialized GitHub Nav Pill */
.nav-github {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-github:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Simple text-only ghost button for Log In */
.btn-ghost-text {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 8px 12px;
}
.btn-ghost-text:hover {
    color: var(--text);
}

/* =============================================
   MOBILE BURGER MENU (matches the PDM app's burger UX)
   Burger sits on the right of the header on narrow screens. When opened,
   the desktop .header-nav and .header-right become a vertical dropdown
   panel anchored to the bottom of the header.
   ============================================= */

.header-burger {
    display: none; /* hidden on desktop */
    width: 40px;
    height: 40px;
    background: var(--glass-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.header-burger span {
    display: block;
    width: 18px;
    height: 2px;
    background-color: var(--text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.header.menu-open .header-burger span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.header.menu-open .header-burger span:nth-child(2) {
    opacity: 0;
}
.header.menu-open .header-burger span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Click-outside scrim — covers the rest of the page when menu is open */
.header-mobile-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 90;
}
.header.menu-open ~ .header-mobile-scrim {
    display: block;
}

/* Responsive Rules for Header */
@media (max-width: 900px) {
    .header-container { padding: 12px 20px; position: relative; }
    .header .header-nav { display: none; }     /* hidden until burger opens */
    .header .header-right { display: none; }   /* hidden until burger opens */
    .header-burger { display: flex; }

    /* When burger is open, nav and right become a vertical dropdown panel */
    .header.menu-open .header-nav,
    .header.menu-open .header-right {
        display: flex;
        position: absolute;
        right: 20px;
        background: var(--glass-bg, rgba(20, 20, 28, 0.95));
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
        border-radius: 12px;
        padding: 10px;
        z-index: 95;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
        min-width: 150px;
        max-width: calc(100vw - 40px);
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .header.menu-open .header-nav {
        top: calc(100% + 8px);
        gap: 4px;
    }
    .header.menu-open .header-right {
        /* Sits directly below the nav panel — JS sets --nav-panel-h on
           the header so this stacks no matter how tall the nav grows. */
        top: calc(100% + 8px + var(--nav-panel-h, 200px) + 8px);
    }

    /* Inside the burger panel, links/buttons stretch full width with
       generous tap targets and left-aligned text. */
    .header.menu-open .header-nav .nav-link,
    .header.menu-open .header-right .btn-primary-action,
    .header.menu-open .header-right .btn-ghost-text {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 12px;
        text-align: left;
    }

    /* Active nav item in the burger panel: hide the desktop "lamp" dot
       indicator (which is calibrated for the horizontal top bar) and
       use a glowing-text treatment instead — a stronger version of the
       hover state so it reads clearly as "current section". */
    .header.menu-open .header-nav .nav-link.active::before {
        display: none;
    }
    .header.menu-open .header-nav .nav-link.active {
        color: var(--accent);
        text-shadow:
            0 0 8px rgba(99, 102, 241, 0.7),
            0 0 18px rgba(99, 102, 241, 0.45);
        font-weight: 600;
    }

    /* GitHub status pill in the burger panel: username + avatar with a small
       gap between them, the whole pill leaning to the right within its row. */
    .header.menu-open .header-right .gh-connected {
        padding: 6px 10px;
        gap: 8px;
        justify-content: flex-end;
        align-self: flex-end;
    }
    .header.menu-open .header-right .gh-connected > .gh-user {
        display: inline;
    }
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text {
    font-weight: 600;
    font-size: 17px;
    color: var(--text);
}
.header-spacer { flex: 1; }
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ======== BUTTONS ======== */
.btn-primary-action {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
    text-decoration: none;
}
.btn-primary-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn-ghost:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* ======== AVATAR — moved to css/avatar.css (shared with the PDM app) ======== */

/* ======== HERO ======== */
.hero {
    display: flex;
    align-items: stretch;
    gap: 48px;
    
    /* 1. Make the container full width so the grid spans the entire screen */
    width: 100%;
    max-width: none; 
    margin: 0;

    /* 2. Dynamic padding keeps the content centered.
       When screen > 1800px, it increases padding to simulate the 'margin: auto' effect.
       When screen < 1800px, it defaults to your original 40px padding. */
    padding: 40px max(40px, calc((100% - 1800px) / 2 + 40px));

    min-height: calc(100vh - 56px);
    position: relative;
}

/* ---- Hero grid overlay (NEW) ---- */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -2;

    background-color: var(--grid-bg);
    background-image:
        var(--lines-y),
        var(--lines-x),
        var(--lines-y-major),
        var(--lines-x-major),
        var(--cross-mask),
        var(--cross-y),
        var(--cross-x);

    background-size:
        var(--grid-gap) var(--grid-gap),
        var(--grid-gap) var(--grid-gap),
        calc(var(--grid-gap) * 5) calc(var(--grid-gap) * 5),
        calc(var(--grid-gap) * 5) calc(var(--grid-gap) * 5),
        calc(var(--grid-gap) * 5) calc(var(--grid-gap) * 5),
        calc(var(--grid-gap) * 5) calc(var(--grid-gap) * 5),
        calc(var(--grid-gap) * 5) calc(var(--grid-gap) * 5);

    background-position:
        var(--grid-border) var(--grid-border),
        var(--grid-border) var(--grid-border),
        var(--grid-border) var(--grid-border),
        var(--grid-border) var(--grid-border),
        calc(var(--grid-border) - var(--grid-gap) * 2.5)
        calc(var(--grid-border) - var(--grid-gap) * 2.5),
        var(--grid-border) var(--grid-border),
        var(--grid-border) var(--grid-border);

    background-repeat: repeat;

    mix-blend-mode: lighten;
    opacity: 0.9;

    /* --- ADDED: Fade effect starting at 50% --- */
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
}

.hero-text, .features-section {
    position: relative;
    z-index: 10; /* CHANGED: Boosted to 10 to guarantee it floats above the 3D model */
}

.hero-text {
    flex: 1;
    min-width: 340px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative; /* NEW */
}
.hero-text h1 {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
}
.hero-text h1 .accent-word {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-text p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 440px;
    margin-bottom: 28px;
}
.hero-3d {
    flex: 1.2;
    position: relative;
    z-index: 1; /* NEW — stays above the grid */
}
#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
}
.hero-cta {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ======== HERO COMMITS PANEL ======== */
.hero-commits-panel {
    position: absolute;
    /* Move up: decrease top, Move down: increase top */
    /* Move left: increase right, Move right: decrease right */
    top: 4%;
    right: 35%;
    width: 260px;
    background: rgba(20, 20, 35, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    z-index: 10;
    pointer-events: auto;
}
.hero-commits-title {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    padding: 0 4px 6px;
    font-weight: 600;
}
.hero-commit {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    background: transparent;
    margin-bottom: 4px;
}
.hero-commit:last-child { margin-bottom: 0; }
.hero-commit:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}
.hero-commit.active {
    background: rgba(99, 102, 241, 0.12);
}
.hero-commit-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    margin-top: 4px;
    flex-shrink: 0;
}
.hero-commit.active .hero-commit-dot {
    background: #6366f1;
}
.hero-commit-msg {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hero-commit.active .hero-commit-msg {
    color: white;
}
.hero-commit-meta {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}
.hero-commit-sha {
    color: rgba(99, 102, 241, 0.8);
}
.hero-commit-badge {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    margin-top: 2px;
}
/* Badge text is injected via CSS so it always reflects the active state,
   regardless of which commit was clicked. The HTML badge divs are empty. */
.hero-commit-badge::before {
    content: "view";
}
.hero-commit.active .hero-commit-badge {
    color: #6366f1;
}
.hero-commit.active .hero-commit-badge::before {
    content: "● viewing";
}

/* ======== PRICING ======== */
.pricing-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 40px 80px;
}
.pricing-section h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}
.pricing-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 40px;
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.pricing-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    position: relative;
}
.pricing-card.featured::before {
    content: 'Popular';
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
}
.tier-name { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.tier-price { font-size: 32px; font-weight: 700; margin-bottom: 2px; }
.tier-price span { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.tier-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.tier-features { list-style: none; flex: 1; }
.tier-features li {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tier-features li:last-child { border-bottom: none; }
.feat-yes { color: #34d399; font-size: 14px; }
.feat-no { font-size: 11px; opacity: 1; }
.feat-val { font-size: 11px; font-weight: 600; color: var(--accent); min-width: 60px; }
.tier-btn {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background: var(--glass-highlight);
    color: var(--text);
    margin-top: 16px;
    transition: all 0.2s;
    text-decoration: none;
}
.tier-btn:hover { background: rgba(255,255,255,0.1); }
.tier-btn.primary {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border: none;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.tier-btn.primary:hover { box-shadow: 0 6px 28px var(--accent-glow); }

/* ======== ACCOUNT MODAL ======== */
.account-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.account-modal {
    background: rgba(20,20,35,0.95);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    width: 380px;
    overflow: hidden;
}
.account-modal-body { padding: 28px 24px 16px; text-align: center; }
.account-modal-avatar {
    border-radius: 50%;
    border: 3px solid #a78bfa;
    box-shadow: 0 0 16px rgba(167,139,250,0.27);
}
.account-modal-name { font-size: 16px; font-weight: 600; color: white; margin-bottom: 4px; }
.account-modal-tier {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    margin-bottom: 20px;
}
.account-modal-foot { display: flex; gap: 8px; padding: 12px 24px 20px; justify-content: flex-end; }
.account-btn {
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
}
.account-btn-close {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
}
.account-btn-logout {
    background: rgba(239,68,68,0.15);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.3);
}

/* ======== BANDWIDTH BAR ======== */
.bw-section { text-align: left; padding: 0 4px; }
.bw-header { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 6px; }
.bw-track { height: 10px; border-radius: 5px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bw-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #6366f1, #06b6d4); }
.bw-pct { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 4px; text-align: right; }

/* ======== FOOTER ======== */
/* ======== FOOTER ======== */
.footer {
    background: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--glass-border);
    padding: 60px 40px 24px;
    margin-top: 60px;
    position: relative;
    z-index: 10; /* Keeps it above the 3D canvas */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-brand {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}

.footer-brand .logo {
    margin-bottom: 16px;
    display: inline-flex;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-links-wrapper {
    display: flex;
    gap: 80px;
    flex-wrap: wrap;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column h3 {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-column a:hover {
    color: var(--accent);
    transform: translateX(2px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 24px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #34d399; /* Green */
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 40px;
    }
    .footer-links-wrapper {
        gap: 40px;
        justify-content: space-between;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ======== FEATURES SHOWCASE ======== */
.features-section {
    max-width: 1800px;
    margin: 0 auto;
    padding: 60px 40px;
}
.feature-showcase {
    display: flex;
    align-items: center;
    gap: 48px;
}
.feature-showcase.reverse {
    flex-direction: row-reverse;
}
.feature-video {
    flex: 2;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.feature-video video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}
/* ======== MODERNIZED FEATURE INFO (GLASS + 3D) ======== */
.feature-info {
    flex: 1;
    background: rgba(20, 20, 35, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Add a subtle glare highlight to the top edge of the glass */
.feature-info::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 40%);
    pointer-events: none;
}

/* Accent glow when hovered */
.feature-info:hover {
    box-shadow: 0 24px 60px rgba(99, 102, 241, 0.15); /* Purple accent shadow */
    border-color: rgba(255, 255, 255, 0.15);
}

/* =============================================
   FEATURE-INFO BADGE — emoji or image marker pinned to the top-left
   corner of the frosted glass card. Slightly offset outside the box so
   it reads as a "tag" attached to the card. The slight rotation gives
   it a playful "pinned at an angle" look and pops to the opposite
   angle + a tiny scale on card hover.
   ============================================= */
.feature-info-icon {
    position: absolute;
    top: -22px;
    left: -16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    border-radius: 16px;
    /* Glass-on-glass: stronger background so the badge reads as a separate
       chip pinned ON the card, not part of it. */
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.32), rgba(6, 182, 212, 0.28));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 22px;
    line-height: 1;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    /* The rotate gives it a playful "pinned at an angle" look. */
    transform: rotate(-4deg);
}
/* Stagger the emoji glyphs slightly so they overlap into a "stack" */
.feature-info-icon > span {
    margin-left: -4px;
    /* Subtle drop-shadow per emoji for depth against the gradient bg */
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

/* The badge tilts the other way and pops slightly on card hover */
.feature-info:hover .feature-info-icon {
    transform: rotate(2deg) scale(1.04);
}

/* Variant for the AR showcase — holds an <img> instead of emoji.
   Sized so the burned-white icon image dominates the badge. */
.feature-info-icon-img {
    padding: 8px;
    width: 64px;
    height: 64px;
    justify-content: center;
}
.feature-info-icon-img img {
    width: 140%;
    height: 140%;
    object-fit: contain;
    /* Burn the PNG to white so it sits on the gradient cleanly */
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(99, 102, 241, 0.6));
}
.feature-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.feature-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* =============================================
   AR SHOWCASE — special layered section between Measure and PDM features.
   Breaks the standard alternating left/right pattern intentionally:
     • LEFT cluster: AR icon + title at top, description text, phone-frame video below
     • RIGHT cluster: a "wall-mounted" image rendered at a 3D angle, scaled
       larger than the left cluster and pulled slightly leftward to layer
       behind the phone video for depth
   ============================================= */
.ar-showcase-section {
    /* Hide overflow horizontally so the over-scaled wall image can extend
       toward the left without forcing a horizontal scrollbar. */
    overflow: hidden;
    padding-top: 80px;
    padding-bottom: 80px;
    position: relative;
}

/* Decorative purple glow behind the whole composition */
.ar-showcase-section::before {
    content: "";
    position: absolute;
    top: 10%;
    left: 50%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.18) 0%, transparent 60%);
    transform: translateX(-50%);
    pointer-events: none;
    filter: blur(40px);
    z-index: 0;
}

.ar-showcase {
    display: grid;
    /* Left column is narrower; the wall image gets the bigger right column
       so it can dominate the composition. */
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 32px;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ---------- LEFT CLUSTER ---------- */
.ar-showcase-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    /* Pulls the left cluster forward in the stacking order so the wall
       image's leftward bleed sits visually behind it. */
    z-index: 2;
}

/* AR showcase title — see feature-info-icon-img rule above for the badge. */
.ar-showcase-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* The left cluster's content card. Reuses .feature-info so it gets the
   frosted glass + 3D mouse-tilt automatically; overrides here just adapt
   the layout to our text-column + video composition. */
.ar-showcase-info {
    width: 100%;
    padding: 32px;
}

/* Body grid: left column holds the header + tags stacked together; the
   right column is the phone video. Vertically centered so the video sits
   at the same level as the middle of the text column. */
.ar-showcase-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
}

/* Left column inside the body — header on top, tag row beneath it. */
.ar-showcase-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ---------- DEVICE TAGS (replaces plain description text) ---------- */
.ar-device-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.ar-device-tags-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-right: 2px;
    width: 100%;
    margin-bottom: 2px;
}
.ar-device-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s, border-color 0.2s, transform 0.2s, color 0.2s;
    cursor: default;
    white-space: nowrap;
}
.ar-device-tag:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
    color: #fff;
}
.ar-device-tag-icon {
    font-size: 14px;
    line-height: 1;
}
.ar-device-tag-meta {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 2px;
}

/* Per-platform accent tint on hover — subtle palette differences for charm */
.ar-device-tag[data-platform="ios"]:hover     { border-color: rgba(176, 176, 184, 0.5); background: rgba(176, 176, 184, 0.10); }
.ar-device-tag[data-platform="android"]:hover { border-color: rgba(52, 211, 153, 0.5);  background: rgba(52, 211, 153, 0.10); }
.ar-device-tag[data-platform="quest"]:hover   { border-color: rgba(99, 102, 241, 0.5);  background: rgba(99, 102, 241, 0.12); }
.ar-device-tag[data-platform="vision"]:hover  { border-color: rgba(244, 114, 182, 0.5); background: rgba(244, 114, 182, 0.10); }
.ar-device-tag[data-platform="galaxy"]:hover  { border-color: rgba(56, 189, 248, 0.5);  background: rgba(56, 189, 248, 0.10); }

/* Phone-frame video — vertically-oriented like a real screen recording.
   We don't know the exact aspect ratio of the .mov file but `auto` height
   plus the rounded "phone" frame will fit anything reasonable. */
.ar-showcase-video {
    /* No left padding — sits flush in its grid column */
}
.ar-showcase-video-frame {
    /* Phone-like rounded bezel container — capped width keeps the video
       small enough that the wall image stays the visual hero. */
    width: 240px;
    padding: 10px;
    border-radius: 32px;
    background: linear-gradient(160deg, #1a1a28, #0a0a14);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(99, 102, 241, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
}
.ar-showcase-video-frame video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 22px;
    background: #000;
}

/* ---------- RIGHT CLUSTER (wall image) ---------- */
.ar-showcase-right {
    position: relative;
    /* Allow the perspective-tilted image to escape its grid cell visually
       toward the left, layering behind the phone video. */
    overflow: visible;
    /* Negative margin pulls the wrapper leftward into the left column */
    margin-left: -80px;
    perspective: 1400px;
}

.ar-showcase-image-wrap {
    position: relative;
    /* Tilted like a framed picture mounted on a wall, slightly facing the
       viewer. transform-style: preserve-3d keeps the rotation crisp. */
    transform: rotateY(-12deg) rotateX(3deg);
    transform-origin: center right;
    transform-style: preserve-3d;
    border-radius: 16px;
    overflow: hidden;
    /* Drop shadow + edge glow simulates the image sitting off the wall */
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 0 60px rgba(99, 102, 241, 0.15);
    /* Slight horizontal scaling so the image dominates the composition */
    transform-box: fill-box;
}
.ar-showcase-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
    /* Subtle gradient overlay via filter to integrate with the dark page */
    filter: saturate(1.05) contrast(1.02);
}

/* Soft gradient overlay on the image — bleeds left edge into the page */
.ar-showcase-image-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(10, 10, 20, 0.6) 0%,
        transparent 25%,
        transparent 100%
    );
    pointer-events: none;
}

/* ---------- RESPONSIVE: stack on small screens ---------- */
@media (max-width: 1100px) {
    /* Reduce the negative-margin bleed of the wall image so it stops
       overlapping the phone-video column on landscape tablets. */
    .ar-showcase-right { margin-left: -20px; }
    .ar-showcase {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}
@media (max-width: 900px) {
    .ar-showcase {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .ar-showcase-info {
        padding: 24px;
    }
    .ar-showcase-body {
        grid-template-columns: 1fr;
        gap: 24px;
        justify-items: center;
        text-align: center;
    }
    .ar-showcase-text {
        align-items: center;
    }
    .ar-device-tags {
        justify-content: center;
    }
    .ar-showcase-right {
        margin-left: 0;
        perspective: 1000px;
    }
    .ar-showcase-image-wrap {
        transform: rotateY(-6deg) rotateX(2deg);
    }
    .ar-showcase-title {
        font-size: 26px;
    }
    /* Smaller badge on mobile to balance the tighter padding */
    .feature-info-icon {
        font-size: 18px;
        padding: 8px 12px;
        top: -16px;
        left: -10px;
    }
    .feature-info-icon-img {
        width: 52px;
        height: 52px;
    }
    .ar-showcase-video-frame {
        width: 240px;
    }
    .ar-showcase-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }
}

/* =============================================
   DIFF VIEW SHOWCASE — between Colorize and Measure features.
   Two commit thumbnails stacked (A on top, B on bottom) on the left,
   a video on the right, connected by a dashed S-curve with a V-shaped
   "spotlight" cone shining toward the video.
   ============================================= */
.diff-showcase-section {
    overflow: hidden;
    padding-top: 80px;
    padding-bottom: 80px;
    position: relative;
}
.diff-showcase-section::before {
    content: "";
    position: absolute;
    top: 5%;
    left: 50%;
    width: 60%;
    height: 70%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.16) 0%, transparent 60%);
    transform: translateX(-50%);
    pointer-events: none;
    filter: blur(40px);
    z-index: 0;
}
.diff-showcase {
    position: relative;
    z-index: 1;
    /* Composition (the grid below) holds everything now — the info card
       lives inside the right column above the video. */
}

/* Composition grid: commit column on the left, video on the right.
   Sits OUTSIDE the frosted card, directly on the page. Position relative
   so the connector SVG can absolutely overlay it. */
.diff-composition {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 32px;
    /* align-items: stretch (default for grid) lets the right column
       stretch to match the left column's height. The right column then
       distributes that height between the info card and video. */
}

/* Right column — holds the demo video, vertically centered so the video
   sits at the middle of the column's height (the column matches the
   diff-side height via grid stretch). */
.diff-right-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Left column — commit rows stacked vertically with the connector SVG
   overlaying the entire composition (placed as a later sibling, NOT
   inside this column). */
.diff-side {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Row becomes a position-relative frame for the image; the commit chip
   is absolutely positioned as a badge attached to the image's bottom-right
   corner. No flex layout — the image dominates. */
.diff-row {
    position: relative;
    z-index: 1; /* above the connector svg */
    padding-bottom: 0;
}

/* Wrapper around the image — establishes the positioning context for
   the chip badge. The wrapper's width equals the image's width, so any
   percentage-based offsets on the chip scale proportionally with the
   image at every viewport size. inline-block keeps the wrapper sized
   to its content (the image) rather than stretching to fill the row. */
.diff-image-wrap {
    display: inline-block;
    position: relative;
    width: 50%; /* matches .diff-image width — wrapper hugs the image */
    vertical-align: top;
}

/* 3D model image — transparent PNG, sized as a percentage of its wrapper.
   The wrapper is 50% of the row, so the image is effectively half the
   row width. max-height caps it so a tall viewport doesn't stretch it. */
.diff-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    /* Soft drop shadow grounds the floating PNG against the gradient bg */
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.45));
}

/* Commit chip — attached to the image's bottom-right as a glass badge.
   Positioned with percentages of .diff-image-wrap so it scales with the
   image at every viewport. bottom:41% places it just below the model's
   center; right:-33% pushes it past the wrapper's right edge so the
   chip sits visually beside the image, attached to its lower-right side. */
.diff-side .gh-commit-item {
    position: absolute;
    bottom: 41%;
    right: -33%;
    z-index: 2;
    width: 220px;
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    /* Stronger background + blur than the inline version: this is a
       standalone badge, not part of a list. */
    background: rgba(20, 20, 28, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    cursor: default;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.diff-side .gh-commit-item.active {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.45);
}

/* Commit chip details — dot, info column, message, meta, sha.
   The frame styling (position, background, padding, etc.) is defined
   above on .diff-side .gh-commit-item as the absolute-positioned badge. */
.diff-side .gh-commit-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
    margin-top: 4px;
}
.diff-side .gh-commit-item.active .gh-commit-dot { background: var(--accent); }
.diff-side .gh-commit-info { flex: 1; min-width: 0; }
.diff-side .gh-commit-msg {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.diff-side .gh-commit-item.active .gh-commit-msg { color: var(--text); }
.diff-side .gh-commit-meta {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 3px;
}
.diff-side .gh-commit-sha {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}

/* Connector SVG — overlays the entire .diff-composition so its coordinate
   system aligns directly with chip positions. The path + endpoint dots
   are computed by JS (see initDiffConnector in home.js) on load + resize.
   Sits BELOW the rows in z-index so the chips render on top of the line. */
.diff-connector {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: visible; /* let endpoint dots' glow bleed outside the box */
}

/* Purple endpoint dots — sit at the middle of each chip's right edge
   (or bottom edge on mobile). The drop-shadow filter is applied to the
   SVG <circle> element, giving them a soft glow like marker pins. */
.diff-endpoint {
    fill: var(--accent);
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.8));
}

/* V-shaped cone: gently pulses so it reads as a "shining beam" of light
   emerging from the dashed path's apex toward the video. */
.diff-cone {
    /* Center origin works whether the cone points right (desktop) or
       down (mobile) — keeps the pulse animation visually balanced
       regardless of where JS places the cone's apex. */
    transform-origin: center;
    transform-box: fill-box;
    animation: diff-cone-pulse 4.5s ease-in-out infinite;
}
@keyframes diff-cone-pulse {
    0%, 100% { opacity: 0.60; transform: scale(0.97); }
    50%      { opacity: 0.85; transform: scale(1.02); }
}

/* Dashed line: marches in a slow loop so the connector feels alive. */
.diff-dash-path {
    stroke-dashoffset: 0;
    animation: diff-dash-march 18s linear infinite;
}
@keyframes diff-dash-march {
    to { stroke-dashoffset: -200; }
}

/* The video on the right of the composition. Wide aspect, frosted bezel
   so the whole composition feels cohesive. */
.diff-video {
    padding: 0;
    border-radius: 16px;
    background: linear-gradient(160deg, #1a1a28, #0a0a14);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(99, 102, 241, 0.12),
        0 0 80px rgba(99, 102, 241, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
}
.diff-video video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    background: #000;
}

/* Title badge for the video — same pattern as .feature-info-icon: a
   glass chip pinned to the top-left corner, peeking past the edge of
   its parent. Replaces the previous chrome-tab style. */
.diff-video-tab {
    position: absolute;
    top: -22px;
    left: -16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.32), rgba(6, 182, 212, 0.28));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    line-height: 1;
    /* Playful tilt matches the other corner badges on the page */
    transform: rotate(-4deg);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.diff-video-tab-title {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
}

/* Round icon that sits at the cone's apex (replaces the purple
   diffDotMid). JS writes left/top in CSS pixels at the same coords used
   for the SVG's cone-apex computation, so the icon snaps to the V's
   tip on every resize. Translate -50% centers the icon on that point. */
.diff-icon-mid {
    position: absolute;
    z-index: 3;
    width: 56px;
    height: 56px;
    transform: translate(-50%, -50%);
    /* Round, not square, per the design: icon reads as a "lens" or
       "light source" at the elbow of the dashed line. */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(6, 182, 212, 0.38));
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 24px rgba(99, 102, 241, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    /* Inherit the same gentle pulse as the cone so the elbow feels alive */
    animation: diff-icon-pulse 4.5s ease-in-out infinite;
    /* Default position kept off-screen so the icon doesn't flash at 0,0
       before JS computes its real coords. */
    left: -9999px;
    top: -9999px;
}
.diff-icon-mid img {
    width: 180%;
    height: 180%;
    object-fit: contain;
    /* Burn the PNG to white so it sits cleanly on the gradient bg */
    filter: brightness(0) invert(1) drop-shadow(0 0 6px rgba(99, 102, 241, 0.7));
}

/* Subtle pulse — slower and smaller-range than typical icon hovers,
   matching the cone's breathing animation so the two read as one
   unified light-source. */
@keyframes diff-icon-pulse {
    0%, 100% { box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 18px rgba(99, 102, 241, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2); }
    50%      { box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 32px rgba(99, 102, 241, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.2); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .diff-showcase-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    /* Stack the composition: commit column above the video. Inside the
       commit column, A and B sit side-by-side so the horizontal connector
       + downward cone work cleanly. */
    .diff-composition {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    /* Push the video column down on mobile so the cone has room to shine
       into the gap between the commits and the video without overlapping
       either. Desktop layout doesn't need this — the column is to the
       right of the commits, not below them. */
    .diff-right-col {
        margin-top: 60px;
    }
    .diff-side {
        flex-direction: row;
        gap: 30px;
        align-items: stretch;
        justify-content: space-between;
    }
    .diff-row {
        flex: 1;
        /* Keep position: relative inherited from base rule so the chip
           badge still anchors to the row's bottom-right corner. */
    }
    /* Smaller badge on mobile so it fits a phone column. The chip sits at
       the image's bottom-right corner (not centered on the model like
       desktop) because mobile images are small enough that a centered
       chip would obscure them. */
    .diff-side .gh-commit-item {
        width: 180px;
        padding: 10px 12px;
        bottom: -10px;
        right: -8px;
    }
    /* Wrapper takes full row width on mobile so chip + image room is generous */
    .diff-image-wrap {
        width: 100%;
    }
    /* On mobile, the model images stay reasonable in the column layout */
    .diff-image {
        max-height: 220px;
    }
    /* Smaller title badge + icon on mobile so they don't dominate */
    .diff-video-tab {
        top: -16px;
        left: -10px;
        padding: 8px 12px;
    }
    .diff-video-tab-title {
        font-size: 12px;
    }
    /* Mid icon shrinks on mobile so it doesn't overlap the small chips */
    .diff-icon-mid {
        width: 44px;
        height: 44px;
    }
}

/* Narrower phones — the chip's horizontal offset is tuned to keep it
   from clipping off-screen as the image column shrinks. Each breakpoint
   pulls the chip slightly inward (or back out, depending on the row's
   effective width at that size) until the chip sits comfortably above
   the image on the smallest viewports. */
@media (max-width: 500px) {
    .diff-side .gh-commit-item { right: 16px; }
}
@media (max-width: 425px) {
    .diff-side .gh-commit-item { right: -4px; }
}
@media (max-width: 390px) {
    .diff-side .gh-commit-item { right: -12px; }
}

/* ======== HERO ARROW EFFECT ======== */
.hero-arrow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 50;
}
.hero-arrow-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.hero-arrow-path {
    stroke: url(#heroArrowGradient);
    stroke-width: 2.5;
    fill: none;
    stroke-dasharray: 10, 5;
    stroke-linecap: round;
    opacity: 0;
    filter: drop-shadow(0 0 6px rgba(255, 255, 22, 0.4))
            drop-shadow(0 0 14px rgba(139, 92, 246, 0.2));
    transition: opacity 0.6s ease;
}
.hero-arrow-head {
    fill: url(#heroArrowGradient);
    stroke: url(#heroArrowGradient);
    stroke-width: 1;
    stroke-linejoin: round;
    stroke-linecap: round;
    opacity: 0;
    filter: drop-shadow(0 0 8px rgba(255, 243, 12, 0.5))
            drop-shadow(0 0 18px rgba(139, 92, 246, 0.3));
    transition: opacity 0.6s ease;
}

/* ======== GLOBAL SCROLL CANVAS ======== */
.global-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0; /* Renders above background, but below the text/videos */
    pointer-events: none; /* Let clicks pass through to buttons/videos */
}

/* Ensure features stay above the canvas so text is readable */
.features-section {
    position: relative;
    z-index: 10; 
}

/* ======== FAQ SECTION ======== */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 40px;
    position: relative;
    z-index: 10;
}

.faq-header {
    text-align: center;
    margin-bottom: 48px;
}

.faq-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.faq-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* The Frosty Glass Panel */
.faq-item {
    background: rgba(20, 20, 35, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    background: rgba(30, 30, 50, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}

/* Arrow styling */
.faq-arrow {
    color: #06b6d4; /* Matches your accent colors */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: 24px;
}

/* 
   Smooth Expand/Collapse Trick using CSS Grid!
   Transitions from 0fr (0 height) to 1fr (natural height)
*/
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-inner {
    overflow: hidden;
    padding: 0 24px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Active (Open) State */
.faq-item.active {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(40, 40, 60, 0.7);
}

.faq-item.active .faq-answer {
    grid-template-rows: 1fr;
}

.faq-item.active .faq-answer-inner {
    padding-bottom: 24px;
    opacity: 1;
    transform: translateY(0);
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    color: #6366f1;
}


/* ======== FLOW CONNECTOR ======== */
.flow-connector {
    display: flex; justify-content: center;
    height: 60px; position: relative; z-index: 2;
}
.flow-connector svg { width: 2px; height: 60px; }
.flow-dash { animation: dash-flow 0.6s linear infinite; }
@keyframes dash-flow { from { stroke-dashoffset: 18; } to { stroke-dashoffset: 0; } }



/* ======== FORMATS SECTION ======== */
.formats-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 40px;
    position: relative;
    }

.formats-container {
    display: flex;
    gap: 60px;
    align-items: center;
}

.formats-info {
    flex: 1;
    z-index: 10;
}

.formats-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #06b6d4, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.formats-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Rounded Format Tags */
.formats-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.format-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.format-tag:hover, .format-tag.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

/* Exports Info Block */
.formats-exports {
    background: rgba(20, 20, 35, 0.6);
    border-left: 3px solid #34d399;
    padding: 16px 20px;
    border-radius: 0 12px 12px 0;
}

.exports-label {
    font-size: 11px;
    color: #34d399;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 6px;
}

.exports-list {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Technical Visualizer Pane */
.formats-visualizer {
    flex: 1.4;
    /* Responsive height scaling */
    height: clamp(400px, 70vh, 750px);
    position: relative;
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 20px;
    background: rgba(10, 10, 20, 0.6); 
    /* REMOVED backdrop-filter so the 3D canvas can interleave! */
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(6, 182, 212, 0.05), 0 16px 40px rgba(0,0,0,0.4);
    z-index: -1; /* Pushes the grid safely BEHIND the 3D canvas */
}

.visualizer-grid {
    position: absolute;
    inset: 0;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(6, 182, 212, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(6, 182, 212, 0.1) 1px, transparent 1px);
    z-index: -1; /* Sits behind the 3D Canvas (which is z-index: 2) */
}

/* HUD Overlay inside Visualizer */
.visualizer-hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10; /* Sits above the 3D Canvas */
    font-family: monospace;
}
.hud-status {
    color: #06b6d4;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
}

.hud-info {
    color: var(--text);
    font-size: 14px;
    text-shadow: 0 0 4px rgba(0,0,0,0.8);
}

/* Scanning Line Animation */
.scan-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10px;
    width: 2px;
    background: #06b6d4;
    box-shadow: 0 0 20px 4px rgba(6, 182, 212, 0.6);
    z-index: 10;
    opacity: 0; /* Hidden initially */
}

/* Loading Bar Animation */
.load-bar-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    z-index: 10;
    overflow: hidden;
    opacity: 0;
}

.load-bar-fill {
    height: 100%;
    width: 0%; /* Starts empty */
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    box-shadow: 0 0 10px #06b6d4;
}

@media (max-width: 900px) {
    .formats-container { flex-direction: column; }
    .formats-visualizer { width: 100%; height: 300px; }
}

/* ======== FORMAT TAG ANIMATIONS & EXPORTS ======== */
/* The pulsing animation for active scanning */
@keyframes pulse-scan {
    0% { opacity: 1; box-shadow: 0 0 15px rgba(99, 102, 241, 0.6); }
    50% { opacity: 0.4; box-shadow: 0 0 4px rgba(99, 102, 241, 0.2); }
    100% { opacity: 1; box-shadow: 0 0 15px rgba(99, 102, 241, 0.6); }
}

.format-tag.scanning-active {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
    color: white;
    animation: pulse-scan 1s infinite ease-in-out;
}

/* Orange/Yellow Export Tags */
.exports-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.format-tag-export {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: default; /* Normal cursor, not a hand */
    transition: all 0.2s ease;
}

.format-tag-export:hover {
    background: rgba(245, 158, 11, 0.2); /* Orange glass */
    border-color: #f59e0b; /* Solid orange border */
    color: white;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}


/* ======== RESPONSIVE — comprehensive sweep across breakpoints.
   Order: 1200 → 900 → 826 → 640 → 540 → 420.
   Earlier breakpoints in other sections (AR/diff) layer on top; final
   rules here apply to the small end. ======== */

/* ---- 1200px: trim padding + tighten gap on smaller desktops ----
   Layout still side-by-side; just pulls in the breathing room. ---- */
@media (max-width: 1200px) {
    .hero { gap: 32px; padding: 32px 28px; }
    .features-section { padding: 48px 28px; }
    .formats-section { padding: 72px 28px; }
    .ar-showcase-right { margin-left: -40px; }
    .pricing-section { padding: 40px 28px 64px; }
    .faq-section { padding: 64px 28px; }
    .footer { padding: 56px 28px 24px; }
}

/* ---- Tall portrait tablets: hero stays side-by-side (we're above 826px)
   but the 100vh min-height blows the canvas up to the full portrait
   viewport, which makes the pizza and the floating commits panel feel
   stretched. Targets iPad Pro portrait (1024×1366), Surface Pro 7
   portrait (912×1368), and similar tablet-portrait modes. Kept narrow
   (max 1200px) so this doesn't touch normal landscape laptops or
   regular desktops at any zoom level. ---- */
@media (min-width: 827px) and (max-width: 1200px) and (orientation: portrait) {
    .hero {
        /* Drop the 100vh floor so the hero block sizes to its content
           instead of stretching to fill a tall portrait viewport. */
        min-height: 0;
        align-items: center;
        padding-top: 56px;
        padding-bottom: 64px;
    }
    .hero-3d {
        /* Constrain the canvas height so the model isn't blown up. The
           flex stretch is now bounded by these min/max values. */
        min-height: 520px;
        max-height: 640px;
    }
    /* Re-anchor the commits panel inside the (now reasonable) canvas
       frame so it sits near the top-right of the visible model area
       instead of floating up to the top of an overly tall container. */
    .hero-commits-panel {
        top: 16px;
        right: 8%;
    }
}

/* ---- 900px: light tweaks — header padding only, layouts still wide.
   AR section's own 900px rule already covers its own stacking. ---- */
@media (max-width: 900px) {
    .header-container { padding: 12px 18px; }
    .feature-title { font-size: 26px; }
    /* Formats section is still side-by-side here; only trim its
       visualizer height so the 3D canvas inside doesn't dwarf the text. */
    .formats-visualizer { height: clamp(420px, 55vw, 600px); }
}

/* ---- 826px: HERO + FEATURES stack vertically. This is the main
   "go responsive" breakpoint for the hero block. Formats still holds
   side-by-side until 640px. ---- */
@media (max-width: 826px) {
    .hero {
        flex-direction: column;
        /* Generous vertical padding so the stacked text block has breathing
           room above and below it, just like the original layout. */
        padding: 56px 24px 64px;
        gap: 40px;
        min-height: auto;
    }
    .hero-text {
        order: 1;
        min-width: 0;
        align-items: center;
        text-align: center;
        /* Big top/bottom margin matches the original loose spacing. */
        margin-top: 50px;
        margin-bottom: 50px;
    }
    .hero-text h1, .hero-text p { max-width: 720px; }
    .hero-text p { margin-left: auto; margin-right: auto; }
    .hero-cta { justify-content: center; flex-wrap: wrap; }
    .hero-3d {
        order: 2;
        flex: none;
        width: 100%;
        height: clamp(360px, 55vw, 520px);
        position: relative;
        border-radius: 20px;
        overflow: visible;
    }
    /* Hide the arrow effect once the hero stacks vertically — the
       arc is calibrated to the wide-screen geometry only. */
    .hero-arrow-container { display: none; }

    /* Reposition the commits panel: pin to the top-left corner of the
       hero-3d canvas so it never collides with the pizza model. */
    .hero-commits-panel {
        top: 8px;
        right: auto;
        left: 8px;
        width: min(260px, calc(100% - 16px));
    }

    /* Feature showcase: stack at this breakpoint. feature-info ALWAYS
       above feature-video (regardless of the .reverse modifier). */
    .feature-showcase,
    .feature-showcase.reverse {
        flex-direction: column;
        gap: 32px;
    }
    .feature-showcase .feature-info,
    .feature-showcase.reverse .feature-info {
        order: 1;
        width: 100%;
        padding: 32px 28px;
    }
    .feature-showcase .feature-video,
    .feature-showcase.reverse .feature-video {
        order: 2;
        width: 100%;
    }

    /* Pricing: go 2-up at this size (was previously 3-up). Natural
       order — Basic / Plus (featured) / Pro. The third card wraps to
       its own row beneath; we span it across both columns and
       justify-self: center so it sits centered under the pair instead
       of stuck to the left column. */
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }
    .pricing-grid > .pricing-card:nth-child(3) {
        grid-column: 1 / -1;
        justify-self: center;
        /* Keep the orphan card the same effective width as either of
           the cards above it. ((max-width 720px - gap 20px) / 2) */
        width: calc((100% - 20px) / 2);
        min-width: 280px;
    }
}

/* ---- 640px: Formats section collapses here (later than the hero,
   per your request). Most other rules already covered above. ---- */
@media (max-width: 640px) {
    body { overflow-x: hidden; }

    .hero {
        padding: 44px 18px 52px;
        gap: 32px;
    }
    .hero-text h1 { font-size: clamp(26px, 7vw, 36px); }
    .hero-text p {
        font-size: 14.5px;
        margin-bottom: 22px;
    }
    .hero-cta { gap: 10px; }
    .btn-primary-action, .btn-ghost { font-size: 13px; padding: 9px 18px; }
    .hero-3d {
        height: clamp(320px, 70vw, 440px);
        border-radius: 16px;
    }

    /* Commits panel: scale down for narrow viewports. */
    .hero-commits-panel {
        width: min(220px, calc(100% - 16px));
        padding: 8px;
    }
    .hero-commit { padding: 6px; }
    .hero-commit-msg { font-size: 10.5px; }
    .hero-commit-meta { font-size: 9px; }
    .hero-commit-badge { font-size: 8.5px; }

    /* Formats stacks here, not at 826 — info above, visualizer below. */
    .formats-container {
        flex-direction: column;
        gap: 36px;
    }
    .formats-visualizer {
        width: 100%;
        height: clamp(280px, 60vw, 380px);
    }
    .formats-section { padding: 56px 18px; }
    .formats-title { font-size: 26px; }
    .formats-desc { font-size: 14.5px; }
    .formats-tags { gap: 8px; }
    .format-tag { padding: 6px 12px; font-size: 11px; }
    .visualizer-hud { top: 14px; left: 14px; right: 14px; }
    .hud-info { font-size: 12.5px; }

    .features-section { padding: 32px 18px; }
    .feature-info { padding: 24px 20px 22px; border-radius: 16px; }
    .feature-title { font-size: 22px; line-height: 1.2; }
    .feature-desc { font-size: 14px; }
    /* Cards float forward but the parallax tilt feels noisy on touch;
       cut the 3D push so cards read flat on mobile. */
    .feature-info .feature-title,
    .feature-info .feature-desc { transform: none; }
    .feature-info-icon {
        font-size: 18px;
        padding: 8px 12px;
        top: -16px;
        left: -10px;
        transform: rotate(-4deg);
    }
    .feature-info-icon-img { width: 48px; height: 48px; padding: 6px; }
    .feature-info:hover .feature-info-icon { transform: rotate(2deg) scale(1.04); }

    /* Pricing single-column under 640. Natural order preserved.
       Reset the 3rd-card centering rule from 826 — it doesn't apply
       in a single-column grid. */
    .pricing-section { padding: 24px 18px 56px; }
    .pricing-section h2 { font-size: 24px; }
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }
    .pricing-grid > .pricing-card:nth-child(3) {
        grid-column: auto;
        justify-self: stretch;
        width: auto;
        min-width: 0;
    }
    .pricing-card { padding: 24px 22px; }

    .faq-section { padding: 56px 18px; }
    .faq-header h2 { font-size: 26px; }
    .faq-question { padding: 18px 20px; font-size: 15px; }
    .faq-answer-inner { padding: 0 20px; font-size: 14px; }
    .faq-item.active .faq-answer-inner { padding-bottom: 18px; }

    .footer { padding: 48px 20px 22px; margin-top: 32px; }
    .footer-container { gap: 28px; padding-bottom: 28px; }
    .footer-links-wrapper { gap: 32px; width: 100%; }
    .footer-column { flex: 1; min-width: 110px; }

    /* Big mouse glow doesn't help on touch and just looks like a smudge. */
    .cursor-glow { display: none; }
    /* Reduced flow connector — takes too much space on small screens. */
    .flow-connector { height: 36px; }
    .flow-connector svg { height: 36px; }
}

/* ---- 540px: small phones. ---- */
@media (max-width: 540px) {
    .header-container { padding: 10px 14px; }
    .logo-icon { width: 30px; height: 30px; }
    .logo-text { font-size: 15px; }

    .hero { padding: 36px 14px 44px; gap: 28px; }
    .hero-3d { height: clamp(280px, 80vw, 360px); }
    .hero-text h1 { font-size: clamp(24px, 8vw, 32px); margin-bottom: 14px; }

    .formats-section { padding: 44px 14px; }
    .formats-visualizer { height: 280px; }

    .features-section { padding: 24px 14px; }
    .feature-info { padding: 22px 18px 20px; }
    .feature-title { font-size: 20px; margin-bottom: 12px; }
    .feature-desc { font-size: 13.5px; line-height: 1.6; }

    .faq-section { padding: 44px 14px; }
    .faq-question { padding: 16px 16px; font-size: 14.5px; gap: 12px; }
    .faq-arrow { margin-left: 12px; }
    .faq-answer-inner { padding: 0 16px; font-size: 13.5px; }
    .faq-item.active .faq-answer-inner { padding-bottom: 16px; }

    .pricing-section { padding: 16px 14px 44px; }
    .footer { padding: 36px 14px 18px; }
    .footer-links-wrapper { gap: 20px; }
    .footer-column { min-width: 100px; }
    .footer-bottom { font-size: 11.5px; }
}

/* ---- 420px: tightest. Keep things from breaking out horizontally. ---- */
@media (max-width: 420px) {
    .hero-text h1 { font-size: 24px; }
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 200px;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-cta .btn-primary-action,
    .hero-cta .btn-ghost { justify-content: center; padding: 11px 14px; }
    .hero-commits-panel { width: min(233px, calc(100% - 12px)); }

    .formats-tags { gap: 6px; }
    .format-tag { padding: 5px 10px; font-size: 10.5px; }

    .pricing-card { padding: 22px 18px; }
    .tier-price { font-size: 28px; }
}

/* ---- Touch & motion preferences ---- */
@media (hover: none) and (pointer: coarse) {
    .cursor-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .cursor-glow { display: none; }
}