/* audit-fixes-2026-05-09.css — desktop+mobile UX audit fixes
   Loaded last so it wins specificity battles. Fixes flagged by
   /tmp/audit-desktop and /tmp/audit-mobile screenshot synthesis. */

/* ── Mobile lane hero text wrap. Was set to `overflow-wrap: anywhere`
   + `word-break: break-word` on 2026-05-09 morning to stop "Audited.
   Diffed. Fixed." from clipping the viewport edge — but combined with
   the lane-hero's flex parent (which has no width:100% on .container)
   that broke the container to a single-character column and stacked
   every letter vertically. Mobile UX walk evening 2026-05-09 caught it.
   Plain `overflow-wrap: break-word` is the standard safety net for
   unbreakable display text — it only kicks in when a word cannot fit
   on its own line, never breaks mid-word otherwise. */
@media (max-width: 768px) {
    .lane-hero h1, .lane-hero .hero-h1, .gg-section-icon,
    h1.hero-title, h1.dazzle-heading,
    .arc-hero h1, .arc-hero h2 {
        overflow-wrap: break-word;
    }
}

/* ── 3D / kinetic-bg canvas on small viewports — decorative only.
   Mobile audit (page 2 /lanes): "3D wireframe icosahedron in hero
   takes a full viewport on mobile and is decoration with no
   information — pure scroll cost." Hide the canvas under 768px so
   we keep the perf budget for content, but the bg stays on tablet+. */
@media (max-width: 768px) {
    body[data-scene] #kinetic-bg { display: none; }
}

/* ── Site-wide tap target enforcement (mobile audit, multiple pages).
   WCAG 2.5.5 minimum is 44×44px. The audit flagged theme-toggle,
   "Read case study" / "View report" text-links, expand-toggles, and
   cookie buttons under-target. Apply to typical link-in-card patterns. */
@media (max-width: 768px) {
    a.tile-link, a.read-more, a.view-report,
    .case-card a, .report-card a, .card-link,
    .tier-cta, .lane-cta, .arc-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    /* Theme toggle (light/dark) — typically a 32px sun icon */
    .theme-toggle, [data-theme-toggle] {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ── Body type ≥ 16px on mobile (prevents iOS auto-zoom on input focus
   and improves readability). Mobile audit flagged ~14px body across
   lane pages and insight articles. */
@media (max-width: 768px) {
    body, p, li, .lane-bullets li, .gg-text-secondary,
    .arc-tagline, .insight-body p, .case-body p {
        font-size: max(16px, 1rem);
    }
    /* Form inputs should never be < 16px on iOS */
    input, select, textarea { font-size: max(16px, 1rem); }
}

/* ── Footer ribbon typography. Mobile UX walk evening 2026-05-09
   flagged 9.6px ribbon-meta and 11.2px legal/tagline + 12.8px
   nav-segment links across every page that loads the architect
   ribbon. Below 14px is hard-to-read and below 44px tap-target
   for nav links violates WCAG 2.5.5. Bump both. */
.architect-ribbon .ribbon-meta { font-size: 0.78rem; }
.architect-ribbon .ribbon-bottom .legal,
.architect-ribbon .ribbon-bottom .tagline { font-size: 0.85rem; }
.architect-ribbon .nav-segment a { font-size: 0.9rem; }
@media (max-width: 768px) {
    /* Ensure footer nav links hit the 44px tap-target floor on mobile.
       inline-flex + min-height keeps existing letterspacing layout. */
    .architect-ribbon .nav-segment a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0.25rem 0;
    }
}

/* ── Mobile-nav drawer link tap targets. Mobile UX walk flagged 29px
   tall links in the slide-out menu — under WCAG 2.5.5 (44px). */
@media (max-width: 768px) {
    .mobile-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .mobile-nav .mobile-nav-tools-label {
        /* Section labels are NOT links, so they don't need 44px,
           but bump them off the floor a little for visual rhythm. */
        padding-top: 0.4rem;
    }
}

/* ── Hide the inert "CODED BY JAKUB" footer credit only on auth-/
   transactional routes where it reads as a portfolio tell. (Kept on
   marketing pages — user explicitly retained it on 2026-05-09.) */
body[data-route="checkout"] .tagline,
body[data-route="login"] .tagline { display: none; }

/* ── Long-form articles (insights/* + case-studies/*) — improve
   readability of inline tables on mobile by stacking 4-col tables. */
@media (max-width: 768px) {
    .insight-body table, .case-body table, article table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ── Cookie consent: stop overlapping login/checkout forms.
   Increase z-index discipline: card-style auth panels (login.html)
   should stay below the fixed banner, never side-by-side. */
@media (max-width: 768px) {
    .auth-card, .login-card, .checkout-card {
        margin-bottom: 6rem; /* leaves room for the bottom banner */
    }
}

/* ─────────────────────────────────────────────────────────────────────
   Long-form enhancer (assets/js/longform-enhancer.js):
   byline, sticky-cta, read-next, mobile-TOC. Loaded on insights/*,
   case-studies/*, reports/*, /lanes/<lane>-methodology, etc.
   ───────────────────────────────────────────────────────────────────── */

/* Byline */
.lf-byline {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 0.75rem 0 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.95rem;
    color: var(--text-muted, #a9a9a9);
}
.lf-byline-avatar {
    display: inline-flex;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(348,83%,47%), hsl(348,83%,30%));
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.lf-byline-text strong { color: #fff; font-weight: 600; }
.lf-byline a {
    color: var(--garnet-text, hsl(348,83%,65%));
    text-decoration: none;
    border-bottom: 1px dashed rgba(170,26,51,0.5);
}

/* Sticky bottom CTA — mobile only (≤768px) so desktop readers aren't crowded */
.lf-sticky-cta {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9000; /* below cookie banner (9999) */
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(12,12,12,0.96), rgba(8,8,8,0.99));
    border-top: 1px solid rgba(170,26,51,0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transform: translateY(100%);
    animation: lfStickyIn 0.6s cubic-bezier(0.16,1,0.3,1) 1.2s both;
}
@keyframes lfStickyIn { to { transform: translateY(0); } }
@media (max-width: 768px) { .lf-sticky-cta { display: flex; } body.long-form-active main, body.long-form-active article { padding-bottom: 4.5rem; } }
.lf-sticky-cta-tag {
    color: rgba(255,255,255,0.55);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.lf-sticky-cta-btn {
    flex: 1;
    text-align: center;
    padding: 0.65rem 1rem;
    background: linear-gradient(135deg, #aa1a33, #cc1142);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.92rem;
    min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
}

/* Read-next rail */
.lf-read-next {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.lf-read-next-h {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted, #a9a9a9);
    margin: 0 0 1.5rem;
}
.lf-read-next-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.lf-read-next-card {
    display: block;
    padding: 1.25rem;
    background: rgba(15,15,15,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.lf-read-next-card:hover {
    border-color: rgba(170,26,51,0.5);
    transform: translateY(-2px);
}
.lf-read-next-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--garnet-text, hsl(348,83%,65%));
    margin-bottom: 0.5rem;
}
.lf-read-next-card h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
    color: #fff;
    font-weight: 600;
}

/* Mobile-collapsible TOC */
.lf-toc-mobile {
    background: rgba(15,15,15,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
}
.lf-toc-mobile summary {
    cursor: pointer;
    padding: 0.5rem 0;
    font-weight: 600;
    color: #fff;
    list-style: none;
}
.lf-toc-mobile summary::after { content: ' ↓'; color: var(--text-muted); }
.lf-toc-mobile[open] summary::after { content: ' ↑'; }

/* ── Insights filter pills — bump to 44px tap target (WCAG 2.5.5).
   Audit found pills at ~28-30px height — under-target on mobile. */
.ih-pill, .lh-pill, .filter-pill, [data-action="ihFilter"] {
    padding: 0.65rem 1.2rem !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center;
    font-size: 0.88rem !important;
}
@media (max-width: 768px) {
    .ih-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
        /* justify-content:center clips the leading chip off the left edge
           when the row overflows horizontally — flex-start anchors chips
           on the left so the scroll behavior reads naturally. */
        justify-content: flex-start !important;
        padding: 0 1rem 0.5rem !important;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 1rem;
    }
    .ih-pill { scroll-snap-align: start; flex-shrink: 0; }
}

/* ── Skip-link a11y. Pages that use bare `.skip-link` (insights.html,
   lane pages, etc.) had no rule — link rendered visible in the
   document flow at the top-left. Mobile UX walk caught it. Hide
   visually until keyboard-focused (matches .gg-skip-link pattern). */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
}
.skip-link:focus {
    left: 0.75rem;
    top: 0.75rem;
    width: auto;
    height: auto;
    padding: 0.75rem 1rem;
    background: #aa0000;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
}

/* ── /pricing sticky jump-nav (#8) ──────────────────────────────────
   9 legacy SKU categories were forcing 28k mobile px; this gives users
   a one-tap jump and (on mobile) collapses each section to summary. */
.pricing-jump-nav {
    position: sticky;
    top: 60px; /* below site nav */
    z-index: 100;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    margin: 0 0 2rem;
    background: rgba(8,8,8,0.92);
    border-bottom: 1px solid rgba(170,26,51,0.2);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.pricing-jump-chip {
    padding: 0.5rem 0.95rem;
    border-radius: 100px;
    background: rgba(170,26,51,0.08);
    border: 1px solid rgba(170,26,51,0.18);
    color: rgba(240,240,240,0.85);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}
.pricing-jump-chip:hover {
    background: rgba(170,26,51,0.18);
    color: #fff;
}
@media (max-width: 768px) {
    .pricing-jump-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding: 0.6rem 1rem;
    }
    .pricing-jump-chip {
        scroll-snap-align: start;
        flex-shrink: 0;
        min-height: 44px;
        font-size: 0.85rem;
    }
}

.pricing-accordion-mobile {
    margin: 1rem 0 2.5rem;
    background: rgba(15,15,15,0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
}
.pricing-accordion-mobile summary {
    cursor: pointer;
    list-style: none;
    padding: 0.75rem 1.25rem;
    color: var(--garnet-text, hsl(348,83%,65%));
    font-weight: 600;
    font-size: 0.92rem;
}
.pricing-accordion-mobile summary::after { content: ' ↓'; color: rgba(255,255,255,0.55); }
.pricing-accordion-mobile[open] summary::after { content: ' ↑'; }
.pricing-accordion-mobile[open] { background: rgba(15,15,15,0.7); }

/* ─────────────────────────────────────────────────────────────────────
   Inline-style → class refactor (CSP style-src strict, 2026-05-09).
   65 pages have an identical "lane-crosssell" footer with 7 inline
   style attributes per instance (455 total). Hoisting to CSS classes
   so the `style-src 'unsafe-inline'` directive can be dropped from CSP.
   ───────────────────────────────────────────────────────────────────── */
.lane-crosssell {
    padding: 4rem 1.5rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 3rem;
}
.lane-crosssell-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}
.lane-crosssell-eyebrow {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #aa1a33;
    margin-bottom: 0.75rem;
}
.lane-crosssell-h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #f0f0f0;
}
.lane-crosssell-body {
    color: rgba(240,240,240,0.75);
    max-width: 620px;
    margin: 0 auto 1.5rem;
    font-size: 0.98rem;
    line-height: 1.6;
}
.lane-crosssell-cta-row { margin: 0; }
.lane-crosssell-cta {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    background: #aa1a33;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}
.lane-crosssell-cta:hover { background: #cc1142; color: #fff; }

/* ─── 2026-05-12 mobile UX audit fix ───────────────────────────────────
 * .hero-btns is `display:flex; gap:1.5rem` with no flex-wrap, so on
 * mobile widths the primary CTA + trust ribbon + two secondary CTAs
 * (4 children) get crammed into a single row, each compressed into a
 * 1-character-wide column. Real audit screenshot showed the trust-line
 * "14-day money-back · cancel any time · Secured by Stripe" rendering
 * one word per line, and the primary CTA "Start with GEO Pro — $1,999/mo"
 * compressed to a 1-char vertical strip.
 *
 * Fix: allow wrap. The .trust-line still has width:100%/flex-basis:100%
 * inline so it claims a full row; the buttons then flow naturally
 * around it on narrow screens.
 */
.hero-btns {
    flex-wrap: wrap;
}

/* On narrow viewports, stack the CTAs vertically — readability over
 * horizontal density. Each button gets its own row + full width. */
@media (max-width: 640px) {
    .hero-btns {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    .hero-btns > .btn-primary,
    .hero-btns > .btn-secondary {
        width: 100%;
        text-align: center;
        margin-left: 0 !important;
    }
}
