/* Satoshi Fonts (Local) */
@font-face {
    font-family: 'Satoshi';
    src: url('/assets/fonts/Satoshi-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Satoshi';
    src: url('/assets/fonts/Satoshi-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Map 600 weight to Satoshi-Bold since SemiBold was not supplied */
@font-face {
    font-family: 'Satoshi';
    src: url('/assets/fonts/Satoshi-Bold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Satoshi';
    src: url('/assets/fonts/Satoshi-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Satoshi';
    src: url('/assets/fonts/Satoshi-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Caveat Fonts (Local) */
@font-face {
    font-family: 'Caveat';
    src: url('/assets/fonts/caveat-latin-600-normal.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Caveat';
    src: url('/assets/fonts/caveat-latin-700-normal.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: block;
}

/* ------------------------------
   LENSBOOTH DESIGN SYSTEM
   Unified Global Variables & Reset
   ------------------------------ */

:root {
    /* Brand Colors */
    --primary: #F12850;
    --primary-light: rgba(241, 40, 80, 0.08);
    --primary-medium: rgba(241, 40, 80, 0.15);
    --black: #000000;
    --white: #FFFFFF;
    --bg: #F4F4F0;
    --gray-dark: #797979;
    --gray-medium: #E5E1DC;
    --gray-light: rgba(0, 0, 0, 0.06);
    --border: rgba(0, 0, 0, 0.08);
    --accent-yellow: #FFC701;
    --success-green: #22C55E;
    --text-secondary: #666666;

    /* Typography */
    --font-main: 'Satoshi', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-logo: 'Satoshi', var(--font-main);
    --font-accent: 'Caveat', cursive;

    /* Typography Spec V3 */
    --font-size-body-primary: 16px;
    --font-weight-body-primary: 500;
    --line-height-body-primary: 1.6;
    
    --font-size-body-secondary: 15px;
    --font-weight-body-secondary: 500;
    --line-height-body-secondary: 1.5;
    
    --font-size-btn: 16px;
    --font-weight-btn: 600;
    --line-height-btn: 1.2;
    
    --font-size-input: 16px;
    --font-weight-input: 500;
    --line-height-input: 1.5;
    
    --font-size-label: 14px;
    --font-weight-label: 500;
    --line-height-label: 1.4;
    
    --font-size-caption: 13px;
    --font-weight-caption: 500;
    --line-height-caption: 1.4;
    
    --font-size-metadata: 12px;
    --font-weight-metadata: 700;
    --line-height-metadata: 1.2;

    /* Transitions */
    --ease-premium: cubic-bezier(0.23, 1, 0.32, 1);
    --transition-main: 0.4s var(--ease-premium);
    
    /* Layout — safe-area, header chrome, touch */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-x: max(20px, env(safe-area-inset-left, 20px), env(safe-area-inset-right, 20px));
    /* Aligned with header-v3: desktop 62px, mobile 64px, tablet portrait 80px */
    --header-height-desktop: calc(62px + var(--safe-top));
    --header-height-mobile: calc(64px + var(--safe-top));
    --header-height: var(--header-height-mobile);
    --touch-min: 44px;
    --chrome-bottom-pad: max(16px, var(--safe-bottom));

    /* Spacing System */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Sizing & Radii */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 10px; /* Used extensively across buttons/cards */
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Radii Spec V3 */
    --radius-card: 24px;
    --radius-modal: 24px;
    --radius-btn: 12px;
    --radius-input: 12px;
    --radius-badge: 999px;
    
    --desktop-border: 2px solid #000;
    --desktop-shadow: 8px 8px 0 #000;

    /* Global Button Sizing (Desktop First) */
    --btn-height: 60px;
    --btn-width: 240px;
    --btn-font-size: 16px;
    --btn-px: 40px;
}

@media (max-width: 767px) {
    :root {
        --btn-height: 52px;
        --btn-width: 220px;
        --btn-font-size: 16px;
        --btn-px: 32px;
        --header-height: var(--header-height-mobile);
    }
}

/* Tablet portrait: taller mobile header (header-v3) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    :root {
        --header-height-mobile: calc(80px + var(--safe-top));
        --header-height: var(--header-height-mobile);
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    :root {
        --btn-height: 64px;
        --btn-width: 280px;
        --btn-font-size: 18px;
        --btn-px: 40px;
    }
}

/* Desktop + tablet landscape: main-header is active */
@media (min-width: 1025px),
       (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    :root {
        --header-height: var(--header-height-desktop);
    }
}

/* Force Enter Booth CTA to use the token sizes on every breakpoint */
@media (min-width: 768px) and (max-width: 1024px) {
    a.btn-main[href="/booth"],
    a.about-cta-btn[href="/booth"],
    html body a.btn-main[href="/booth"],
    html body .hero-cta a.btn-main[href="/booth"] {
        height: var(--btn-height) !important;
        width: var(--btn-width) !important;
        min-height: var(--btn-height) !important;
        max-width: 100% !important;
        padding: 0 var(--btn-px) !important;
        font-size: var(--btn-font-size) !important;
        line-height: 1 !important;
        box-sizing: border-box !important;
    }
}

/* - CSS RESET & BASE STYLES - */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

button, a, input, select, textarea, [role="button"],
.filter, .layout, .zoom-btn, .share-app-btn, .copy-btn,
.retake-btn, #capture-btn, #retake-btn, #copyBtn, #join-btn-trigger {
    touch-action: manipulation;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

html {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100dvh;
    overflow-x: clip !important;
    box-sizing: border-box !important;
    -webkit-touch-callout: default;
    -webkit-user-select: auto;
    user-select: auto;
}

html.no-select,
html.no-select body {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 0;
    overflow-x: clip !important;
    position: relative !important;
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--gray-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--gray-light) 1px, transparent 1px);
    background-size: 32px 32px;
    font-family: var(--font-main);
    color: var(--black);
    box-sizing: border-box !important;
}

/* Safe-area & touch utility helpers (minimal, not a framework) */
.safe-pad-x {
    padding-left: var(--safe-x);
    padding-right: var(--safe-x);
}

.safe-pad-bottom {
    padding-bottom: var(--chrome-bottom-pad);
}

.touch-target {
    box-sizing: border-box;
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

input, textarea {
    -webkit-user-select: auto !important;
    user-select: auto !important;
}

main {
    flex: 1 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-x: clip !important;
    box-sizing: border-box !important;
}

footer, .site-footer {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-x: clip !important;
    box-sizing: border-box !important;
}

/* Global image sharpness - disabled crisp-edges to let browser use high-quality smooth interpolation */
img, video, canvas {
    image-rendering: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: #D1D1CB;
    border-radius: 10px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: #B1B1AB;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    z-index: 100000;
    transition: top 0.3s;
    text-decoration: none;
    font-weight: 700;
}
.skip-link:focus {
    top: 0;
}

/* Unified Logo Styles */
.app-logo, .footer-logo, .mobile-logo, .output-logo-center {
    font-family: var(--font-logo);
    font-weight: 700;
    text-decoration: none;
    color: var(--black);
}
.app-logo .lens, .footer-logo .lens, .mobile-logo .lens, .output-logo-center .lens {
    color: var(--primary) !important;
}

/* - Mobile Thumbnail Styles - */
@media (max-width: 767px) {
    .strip-preview-mobile {
        display: flex !important;
        flex-direction: row;
        gap: 8px;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-bottom: 15px;
        padding: 0 20px;
        box-sizing: border-box;
    }
    .strip-preview-mobile img {
        width: 48px !important;
        height: 48px !important;
        object-fit: cover !important;
        border-radius: 10px !important;
        border: 2px solid #fff !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        animation: thumbAppear 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards !important;
    }
    @keyframes thumbAppear {
        from { opacity: 0; transform: scale(0.5) translateY(10px); }
        to { opacity: 1; transform: scale(1) translateY(0); }
    }
}

/* - Ultra-Narrow Device Compliance (iPhone SE, etc.) - */
@media (max-width: 360px) {
    :root {
        --safe-x: 12px;
    }
    .share-card {
        padding: 12px 14px !important;
    }
    .share-title { font-size: 13px !important;
    }
    #copyBtn {
        height: 36px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
    }
    #boothLink {
        height: 36px !important;
        font-size: 12px !important;
        padding: 0 10px !important;
    }
}

/* - Safari iPad Tablet Viewport Safety - */
@media (min-width: 768px) and (max-width: 1024px) {
    html,
    body,
    main,
    #main-content,
    #landing-screen,
    .page-content-wrap,
    .about-hero-wrap,
    .site-footer {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        overflow-x: clip !important;
    }
}

/* Custom styling for CTA enter icon to ensure uniform spacing */
.cta-icon-enter {
    width: 1.1em !important;
    height: 1.1em !important;
    vertical-align: -0.15em !important;
    margin-right: 8px !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

/* Feedback CTA icon — same spacing as enter (btn-main forces gap:0) */
.cta-icon-feedback {
    width: 1.1em !important;
    height: 1.1em !important;
    margin-right: 8px !important;
    display: block !important;
    flex-shrink: 0 !important;
    /* Speech-bubble path sits high in the 24 viewBox; nudge to optical center */
    transform: translateY(0.06em) !important;
}

/* Ensure uniform spacing without double gaps in flex buttons */
.mobile-cta,
.nav-cta,
.btn-main:not(.capture-btn),
.about-cta-btn,
.mobile-menu-cta a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
}

/* --- UNIFORM ENTER BOOTH PAGE CTA --- */
/* Unifies 'Enter Booth' buttons across diff devices */
a.btn-main[href="/booth"],
a.about-cta-btn[href="/booth"] {
    height: var(--btn-height) !important;
    width: var(--btn-width) !important;
    max-width: 100% !important;
    padding: 0 var(--btn-px) !important;
    font-size: var(--btn-font-size) !important;
    font-weight: 600 !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Shine animation pseudo-element for about-cta-btn */
a.about-cta-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%) skewX(-25deg);
    animation: global-btn-shine 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes global-btn-shine {
    0% {
        transform: translateX(-100%) skewX(-25deg);
    }
    20% {
        transform: translateX(200%) skewX(-25deg);
    }
    100% {
        transform: translateX(200%) skewX(-25deg);
    }
}

/* --- GLOBAL CAVEAT ACCENT VERTICAL ALIGNMENT FIX --- */
/* Target all accent spans globally using high-specificity selectors to raise their position and align with main font */
html body .accent,
html body span.accent,
html body h1 .accent,
html body h2 .accent,
html body h3 .accent,
html body p .accent,
html body .hero-title .accent,
html body .stats-title .accent,
html body .about-hero-title .accent,
html body .showcase-title .accent,
html body .output-title .accent,
html body .section-title .accent,
html body .faq-title .accent {
    transform: translateY(-2px) rotate(-2deg) !important;
}

@media (max-width: 767px) {
    html body .accent,
    html body span.accent,
    html body h1 .accent,
    html body h2 .accent,
    html body h3 .accent,
    html body p .accent,
    html body .hero-title .accent,
    html body .stats-title .accent,
    html body .about-hero-title .accent,
    html body .showcase-title .accent,
    html body .output-title .accent,
    html body .section-title .accent,
    html body .faq-title .accent {
        transform: translateY(-1px) rotate(-2deg) !important;
    }
}

/* --- UNIFORM ICON STROKE WIDTH (all devices) --- */
:root {
    --icon-stroke: 2.5;
    --logo-font-size: 18px; /* mobile */
}
@media (min-width: 768px) {
    :root { --logo-font-size: 24px; } /* tablet + app headers */
}
@media (min-width: 1025px) {
    :root { --logo-font-size: 28px; } /* desktop */
}

/* UI SVG chrome — one stroke weight everywhere.
   Filled / decorative marks can opt out with data-stroke="keep" or class no-stroke-unify. */
html body a svg:not([data-stroke="keep"]):not(.no-stroke-unify) :is(path, circle, line, polyline, rect, ellipse),
html body button svg:not([data-stroke="keep"]):not(.no-stroke-unify) :is(path, circle, line, polyline, rect, ellipse),
html body [role="button"] svg:not([data-stroke="keep"]):not(.no-stroke-unify) :is(path, circle, line, polyline, rect, ellipse),
html body [role="tab"] svg:not([data-stroke="keep"]):not(.no-stroke-unify) :is(path, circle, line, polyline, rect, ellipse),
html body .card-icon svg :is(path, circle, line, polyline, rect, ellipse),
html body .checklist-list svg :is(path, circle, line, polyline, rect, ellipse),
html body .blog-lb-check :is(path, polyline),
html body .social-share-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .close-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .back-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .retake-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .exit-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .mobile-side-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .expand-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .flash-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .nav-arrow svg :is(path, circle, line, polyline, rect, ellipse),
html body .mode-tab svg :is(path, circle, line, polyline, rect, ellipse),
html body .join-icon-box svg :is(path, circle, line, polyline, rect, ellipse),
html body .share-app-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .share-copy-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .preview-back-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .preview-feedback-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .ic-output-back-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .ic-output-feedback-btn svg :is(path, circle, line, polyline, rect, ellipse),
html body .btn-action svg :is(path, circle, line, polyline, rect, ellipse),
html body .btn-main svg :is(path, circle, line, polyline, rect, ellipse),
html body .btn-secondary svg :is(path, circle, line, polyline, rect, ellipse),
html body .btn-primary svg :is(path, circle, line, polyline, rect, ellipse),
html body .filter svg :is(path, circle, line, polyline, rect, ellipse),
html body .share-modal-close svg :is(path, circle, line, polyline, rect, ellipse),
html body .post-dl-modal-close svg :is(path, circle, line, polyline, rect, ellipse),
html body svg[class*="icon"]:not([data-stroke="keep"]):not(.no-stroke-unify) :is(path, circle, line, polyline, rect, ellipse),
html body .cta-icon-enter :is(path, polyline),
html body .cta-icon-feedback :is(path, polyline),
html body .blog-icon svg :is(path, circle, line, polyline, rect, ellipse),
html body .blog-compare-icon svg :is(path, circle, line, polyline, rect, ellipse),
html body .blog-audience-icon svg :is(path, circle, line, polyline, rect, ellipse) {
    stroke-width: var(--icon-stroke) !important;
}

/* --- PRODUCT LOGO SIZE LOCK (all devices) --- */
html body .app-logo,
html body .mobile-logo,
html body .top-bar .app-logo,
html body .preview-fixed-header .output-logo-center,
html body .output-logo-center,
html body .error-nav .app-logo {
    font-size: var(--logo-font-size) !important;
    font-weight: 700 !important;
    font-family: 'Satoshi', sans-serif !important;
    letter-spacing: -0.025em !important;
}
@media (min-width: 1025px) {
    html body .app-logo,
    html body .top-bar .app-logo,
    html body .preview-fixed-header .output-logo-center,
    html body .output-logo-center {
        letter-spacing: -0.03em !important;
    }
}
/* --- GLOBAL FROM-SCRATCH TEXT WRAPPING SYSTEM --- */
/* Replaces buggy CSS text-wrap with a reliable max-width constraint for beautiful line breaks across all pages */
html body .hero p,
html body .hero-sub,
html body .section-sub,
html body .about-hero-sub,
html body .stats-subtitle,
html body .showcase-sub,
html body .community-subtitle,
html body .support-desc,
html body .faq-subtitle,
html body .about-cta-sub,
html body .contact-card-desc,
html body .blog-cta-sub,
html body .privacy-subtitle,
html body .terms-subtitle,
html body .strips-subtitle {
    max-width: 55ch !important;
    margin-inline: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* --- UNIFORM TITLE TO SUBTITLE SPACING (GLOBAL) --- */
html body .stats-title,
html body .showcase-title,
html body .community-title,
html body .section-header h2 {
    margin-bottom: clamp(16px, 2vw, 24px) !important;
}

/* --- UNIFORM HEADER & CTA SPACING (GLOBAL) --- */
/* Ensures all section headers and standalone subtitles have consistent spacing before the next element (like a CTA) */
html body .stats-header,
html body .community-header,
html body .section-header,
html body .showcase-text,
html body .about-cta-sub,
html body .blog-cta-sub,
html body .faq-subtitle {
    margin-bottom: clamp(36px, 4.5vw, 48px) !important;
}

/* Remove conflicting top margins on CTA wrappers and content rows to guarantee uniform spacing */
html body .btn-wrap,
html body .about-cta-btn-wrap,
html body .blog-cta-btn-wrap,
html body .booth-types-row,
html body .marquee-viewport,
html body .stats-row,
html body .community-container,
html body .machine-stack,
html body .cta-content,
html body .blog-grid,
html body .faq-list,
html body .how-row {
    margin-top: 0 !important;
}

/* --- UNIFORM SECTION VERTICAL SPACING (MOBILE & TABLET) --- */
@media (max-width: 1024px) {
    html body section#stats,
    html body section#community-showcase,
    html body section#booth-types,
    html body section#how,
    html body section#showcase,
    html body section#blog,
    html body section#instagram,
    html body section#faq,
    html body section#support,
    html body section#community,
    html body section#final-cta {
        padding-top: clamp(48px, 6vw, 64px) !important;
        padding-bottom: clamp(48px, 6vw, 64px) !important;
    }
}

/* --- UNIFORM TEXT WRAPPING ON TABLETS --- */
@media (min-width: 768px) and (max-width: 1024px) {
    html body .hero-sub,
    html body .stats-subtitle,
    html body .showcase-sub,
    html body .community-subtitle,
    html body .support-desc,
    html body .faq-subtitle,
    html body .about-cta-sub,
    html body .blog-cta-sub,
    html body .privacy-subtitle,
    html body .terms-subtitle,
    html body .strips-subtitle {
        max-width: 50ch !important;
    }
}

/* --- UNIFORM TEXT WRAPPING ON MOBILE --- */
@media (max-width: 767px) {
    html body .hero-sub,
    html body .stats-subtitle,
    html body .showcase-sub,
    html body .community-subtitle,
    html body .support-desc,
    html body .faq-subtitle,
    html body .about-cta-sub,
    html body .blog-cta-sub,
    html body .privacy-subtitle,
    html body .terms-subtitle,
    html body .strips-subtitle {
        max-width: 32ch !important;
    }
}

/* --- UNIFORM FOOTER SPACING ACROSS ALL PAGES --- */
/* Single source of truth for the light gap between the last section and
   .site-footer. Applies to about / privacy / terms / contact / blog
   (and any page ending in these containers). Do NOT also add
   .site-footer { margin-top } — that double-counts the gap.
   Scale: desktop/tablet 80px, mobile 64px. */
html body .body,
html body .blog-body,
html body .blog-page-wrap,
html body .faq-section,
html body .about-cta-section,
html body .final-cta-section,
html body .support-section {
    padding-bottom: 80px !important;
    margin-bottom: 0 !important;
}

@media (min-width: 768px) and (max-width: 1024px) {
    html body .body,
    html body .blog-body,
    html body .blog-page-wrap,
    html body .faq-section,
    html body .about-cta-section,
    html body .final-cta-section,
    html body .support-section {
        padding-bottom: 80px !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 767px) {
    html body .body,
    html body .blog-body,
    html body .blog-page-wrap,
    html body .faq-section,
    html body .about-cta-section,
    html body .final-cta-section,
    html body .support-section {
        padding-bottom: 64px !important;
        margin-bottom: 0 !important;
    }
}

/* Fix double padding nesting on individual blog post pages where .final-cta-section is inside .blog-body */
html body .blog-body:has(.final-cta-section) {
    padding-bottom: 0 !important;
}

/* Ensure footer never adds its own top gap — spacing lives on the last section */
html body .site-footer {
    margin-top: 0 !important;
}

/* ═══════════════════════════════════════════════════════
   UNIFORM HEADER-GROUP SPACING (ALL DEVICES)
   Consistent margin & padding for .header-group on
   strips, booth, and landing pages. Page-specific
   ID selectors override the per-page generic rules.
   ═══════════════════════════════════════════════════════ */

/* Mobile (≤767px) */
@media (max-width: 767px) {
    #strip-main > .header-group,
    #landing-screen > .main-content > .hero-text-col > .header-group {
        margin-top: 16px !important;
        margin-bottom: 16px !important;
        padding: 0 !important;
        max-width: 480px !important;
    }

    /* Booth: match strips — air above H1 (not zeroed padding) */
    #landing-screen > .main-content > .header-group {
        margin-top: 0 !important;
        margin-bottom: 16px !important;
        padding: 16px 0 0 !important;
        max-width: 480px !important;
    }
}

/* Tablet (768px–1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    #strip-main > .header-group,
    #landing-screen > .main-content > .header-group,
    #landing-screen > .main-content > .hero-text-col > .header-group {
        margin-top: 24px !important;
        margin-bottom: 32px !important;
        padding: 0 !important;
        max-width: 780px !important;
        margin-inline: auto !important;
    }
}

/* Desktop (≥1025px) */
@media (min-width: 1025px) {
    #strip-main > .header-group,
    #landing-screen > .main-content > .header-group,
    #landing-screen > .main-content > .hero-text-col > .header-group {
        margin-top: 32px !important;
        margin-bottom: 32px !important;
        padding: 0 !important;
        max-width: 600px !important;
        margin-inline: auto !important;
    }
}

/* Eliminate any trailing margins/paddings on the last elements inside page-ending containers to guarantee perfect alignment */
html body .body > *:last-child,
html body .blog-body > *:last-child,
html body .blog-page-wrap > *:last-child,
html body .faq-section > *:last-child,
html body .about-cta-section > *:last-child,
html body .final-cta-section > *:last-child,
html body .cta-buttons {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* --- UNIFORM TOP CLEARANCE FOR FIXED HEADER + ANNOUNCEMENT BAR --- */
/* Mobile Devices (max-width: 767px) */
@media (max-width: 767px) {
    html body.has-announcement .page-content-wrap,
    html body.has-announcement .about-hero-wrap,
    html body.has-announcement .blog-page-wrap {
        padding-top: calc(var(--header-height-mobile) + var(--announcement-height, 44px)) !important;
    }
    html body:not(.has-announcement) .page-content-wrap,
    html body:not(.has-announcement) .about-hero-wrap,
    html body:not(.has-announcement) .blog-page-wrap {
        padding-top: var(--header-height-mobile) !important;
    }
}

/* Tablet Devices (768px to 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    html body.has-announcement .page-content-wrap,
    html body.has-announcement .about-hero-wrap,
    html body.has-announcement .blog-page-wrap {
        padding-top: calc(var(--header-height-mobile) + var(--announcement-height, 44px)) !important;
    }
    html body:not(.has-announcement) .page-content-wrap,
    html body:not(.has-announcement) .about-hero-wrap,
    html body:not(.has-announcement) .blog-page-wrap {
        padding-top: var(--header-height-mobile) !important;
    }
}








/* ================================================================
   GLOBAL TYPOGRAPHY & ACCENT NORMALIZATION
   Applies to all pages to enforce cross-device consistency
   ================================================================ */

/* Accent Font Settings (Caveat) - Global Enforcement */
span.accent,
h1 .accent,
h2 .accent,
h3 .accent,
p .accent,
.hero-title .accent,
.about-hero-title .accent,
.output-title .accent,
.output-mobile-header .output-title .accent,
.section-title .accent,
.about-cta-title .accent,
.stats-title .accent,
.showcase-title .accent,
.faq-title .accent,
.blog-hero h1 .accent,
.blog-hero h1 .accent,
    .blog-hero h2 .accent,
.blog-cta-title .accent {
    font-family: 'Caveat', cursive !important;
    font-size: 1.32em !important;
    line-height: 0.8 !important;
    font-weight: 700 !important;
    display: inline-block !important;
    transform: translateY(3px) rotate(-2deg) !important;
    white-space: nowrap !important;
    margin: 0 !important;
    margin-right: 0.1em !important;
    letter-spacing: -0.01em !important;
}

html body .story-quote .accent {
    font-size: inherit !important;
    line-height: inherit !important;
    transform: none !important;
    margin: 0 !important;
    white-space: normal !important;
}

@media (max-width: 767px) {
    /* Responsive Accents - Mobile Tweak */
    span.accent,
    h1 .accent,
    h2 .accent,
    h3 .accent,
    p .accent,
    .hero-title .accent,
    .about-hero-title .accent,
    .output-title .accent,
    .output-mobile-header .output-title .accent,
    .section-title .accent,
    .about-cta-title .accent,
    .stats-title .accent,
    .showcase-title .accent,
    .faq-title .accent,
    .blog-hero h1 .accent,
    .blog-hero h1 .accent,
    .blog-hero h2 .accent,
    .blog-cta-title .accent {
        transform: translateY(4px) rotate(-2deg) !important;
    }
}

/* ================================================================
   GLOBAL LAYOUT NORMALIZATION
   Enforcing consistent spacing on mobile devices
   ================================================================ */
@media (max-width: 767px) {
    /* Ensure containers don't touch the screen edge */
    html body .container {
        padding-left: var(--safe-x, 24px) !important;
        padding-right: var(--safe-x, 24px) !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    
    html body .blog-container, 
    html body .page-content-wrap,
    html body .about-content-wrap,
    html body .legal-container,
    html body .contact-container {
        padding-left: 28px !important;
        padding-right: 28px !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    
    /* Centralize hero-title styling */
    html body h1.hero-title,
    html body .hero-title,
    html body .about-hero-title,
    html body .blog-hero h1,
    html body .section-title {
        font-size: 34px !important;
        line-height: 1.1 !important;
        margin-bottom: var(--space-md, 16px) !important;
    }
    
    html body .blog-hero h1,
.blog-hero h2 {
        font-size: 34px !important;
        line-height: 1.1 !important;
        margin-bottom: var(--space-md, 16px) !important;
    }
}

/* ================================================================
   INDEX PAGE MOBILE CARD UNIFICATION
   Ensures every card and div has the exact same width 
   ================================================================ */
@media (max-width: 767px) {
    /* Force identical left/right paddings on all index sections */
    html body .stats-section-container,
    html body .community-showcase-section,
    html body .booth-types-section,
    html body .how-section-container,
    html body .showcase-container,
    html body .final-cta-section {
        padding-left: var(--safe-x, 24px) !important;
        padding-right: var(--safe-x, 24px) !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    
    /* Ensure rows don't add extra horizontal spacing */
    html body .stats-row,
    html body .booth-types-row,
    html body .how-row {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Reset booth header padding since section handles it now */
    html body .booth-types-section .stats-header {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Ensure community container matches card width bounds */
    html body .community-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ================================================================
   OTHER PAGES MOBILE CARD UNIFICATION
   Ensures inner sections/grids don't add duplicate side padding
   ================================================================ */
@media (max-width: 767px) {
    /* Reset extra paddings inside containers for About, Contact, Privacy, Terms */
    html body .contact-grid,
    html body .about-hero,
    html body .mission-section,
    html body .story-section,
    html body .values-section,
    html body .about-cta-section,
    html body .legal-wrap {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
}

/* ================================================================
   TABLET DEVICES CARD UNIFICATION (up to 1024px)
   Ensures inner sections/grids don't add duplicate side padding
   and standardizes wrapper padding across all pages
   ================================================================ */
@media (max-width: 1024px) {
    /* Force identical left/right paddings on all main page wrappers */
    html body .stats-section-container,
    html body .community-showcase-section,
    html body .booth-types-section,
    html body .how-section-container,
    html body .showcase-container,
    html body .final-cta-section,
    html body .container, 
    html body .blog-container, 
    html body .page-content-wrap,
    html body .about-content-wrap,
    html body .legal-container,
    html body .contact-container {
        padding-left: var(--safe-x, 32px) !important;
        padding-right: var(--safe-x, 32px) !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    /* Reset extra paddings inside containers for Index, About, Contact, Privacy, Terms */
    html body .stats-row,
    html body .booth-types-row,
    html body .how-row,
    html body .contact-grid,
    html body .about-hero,
    html body .mission-section,
    html body .story-section,
    html body .values-section,
    html body .about-cta-section,
    html body .legal-wrap {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    /* Reset booth header padding since section handles it now */
    html body .booth-types-section .stats-header {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Ensure community container matches card width bounds */
    html body .community-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ================================================================
   OTHER PAGES MOBILE CARD UNIFICATION
   Ensures every card and div has the exact same width on about, terms, privacy, contact
   ================================================================ */
@media (max-width: 767px) {
    html body .about-hero-wrap,
    html body .about-section,
    html body .legal-container,
    html body .contact-container,
    html body .page-content-wrap,
    html body .about-content-wrap {
        padding-left: 28px !important;
        padding-right: 28px !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    
    /* Ensure grids and body containers don't shrink the width further */
    html body .contact-grid,
    html body .values-grid,
    html body .mission-stat-grid,
    html body .about-grid,
    html body .story-grid,
    html body .page-content-wrap .body,
    html body .legal-container .body,
    html body .faq-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ================================================================
   INDEX PAGE TABLET CONTAINER SPACING
   Prevents content from touching the edges on iPad/tablet devices
   ================================================================ */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Generous 48px padding on tablet to give content room to breathe */
    html body .stats-section-container,
    html body .community-showcase-section,
    html body .booth-types-section,
    html body .how-section-container,
    html body .showcase-container,
    html body .final-cta-section,
    html body .container,
    html body #landing-screen {
        padding-left: var(--space-2xl, 48px) !important;
        padding-right: var(--space-2xl, 48px) !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    
    /* Ensure internal rows don't add redundant margins that break the layout */
    html body .stats-row,
    html body .booth-types-row,
    html body .how-row {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure community container stays bounded */
    html body .community-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ================================================================
   OTHER PAGES TABLET CONTAINER SPACING
   Prevents content from touching edges on about, privacy, terms, contact, blog
   ================================================================ */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Generous 48px padding on tablet to give content room to breathe */
    html body .about-hero-wrap,
    html body .about-section,
    html body .legal-container,
    html body .contact-container,
    html body .page-content-wrap,
    html body .about-content-wrap,
    html body .blog-container,
    html body .blog-page-wrap {
        padding-left: var(--space-2xl, 48px) !important;
        padding-right: var(--space-2xl, 48px) !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    
    /* Ensure internal grids don't add redundant margins */
    html body .contact-grid,
    html body .values-grid,
    html body .mission-stat-grid,
    html body .about-grid,
    html body .story-grid,
    html body .page-content-wrap .body,
    html body .legal-container .body {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ================================================================
   INDEX PAGE TABLET BOOTH CARDS LAYOUT
   Keep Booth cards side-by-side on tablet, but stack their internal content
   ================================================================ */
@media (min-width: 768px) and (max-width: 1100px) {
    html body .booth-types-row {
        flex-direction: row !important;
        align-items: stretch !important;
        gap: 32px !important;
    }

    html body .booth-card-wrap {
        flex: 1 !important;
        width: 50% !important;
    }
}

/* ================================================================
   BOOTH CARD TITLE FLUID SIZING
   Overrides scattered media queries in index.css with a single fluid clamp
   ================================================================ */
html body .booth-card-title {
    font-size: clamp(20px, 3vw, 26px) !important;
}
