/**
 * Cultouring — Landing Page CSS
 *
 * Premium editorial design for Maya highlands cultural tourism.
 * Palette: jade/teal, amber/gold, terracotta (accent), estuco, ink.
 * Cinematic, warm, sophisticated. Mobile-first.
 *
 * JS HOOKS (DO NOT RENAME OR REMOVE):
 *   #ct-hero-particles          — canvas for particle constellation
 *   [data-ct-typewriter]        — typewriter text target
 *   [data-ct-tilt]              — 3-D tilt card targets
 *   [data-ct-tilt-root]         — tilt root container
 *   .ct-btn-magnetic            — magnetic hover buttons
 *   [data-ct-marquee]           — marquee scroll strip
 *   .ct-marquee-track           — injected by initMarquee()
 *   .ct-typing                  — toggled by typewriter
 *   --ct-tilt-x / --ct-tilt-y  — CSS vars written by tilt JS
 *   --ct-glow-x / --ct-glow-y  — CSS vars written by tilt JS
 *   --ct-mx / --ct-my           — CSS vars written by magnetic JS
 *   --ct-marquee-duration       — CSS var written by marquee JS
 *   .ct-reveal / .ct-visible    — scroll reveal (inline script in template)
 *   .ct-stat-value[data-count]  — counter animation targets
 *   #ct-map-toggle              — map accordion toggle
 *   #ct-landing-map-wrap        — map accordion panel
 *   #ct-landing-map             — Leaflet mount point
 *
 * @package  com_cultouring
 * @since    1.0.0
 */

/* =========================================================================
   CASSIOPEIA FULL-WIDTH OVERRIDE (CAL-120 / CAL-162)
   ========================================================================= */
.site-grid:has(.com-cultouring-landing) {
    display: block !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.container-component:has(.com-cultouring-landing) {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.site-grid:has(.com-cultouring-landing) .container-sidebar-left,
.site-grid:has(.com-cultouring-landing) .container-sidebar-right {
    display: none !important;
}

.container-component:has(.com-cultouring-landing) .mod-breadcrumbs {
    display: none !important;
}

/* =========================================================================
   SELF-HOSTED FONTS — Fraunces (editorial display) + Inter (UI). MILPA DIGITAL.
   ========================================================================= */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 900; font-display: swap; src: url('../fonts/fraunces-wght-normal.woff2') format('woff2-variations'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 300 900; font-display: swap; src: url('../fonts/fraunces-wght-italic.woff2') format('woff2-variations'); }
@font-face { font-family: 'Inter';    font-style: normal; font-weight: 400 700; font-display: swap; src: url('../fonts/inter-wght-normal.woff2') format('woff2-variations'); }

/* =========================================================================
   CSS CUSTOM PROPERTIES — "MILPA DIGITAL" palette
   (token NAMES kept for selector compat; VALUES remapped to the new direction:
   jade #1C5C52 · terracotta #C8583A · maíz gold #C4901A · cream #F5F0E8 · obsidian #1A1511)
   ========================================================================= */
:root {
    /* Jade family (was teal) — primary action / brand */
    --ct-teal-950: #082624;
    --ct-teal-900: #0c3a38;
    --ct-teal-800: #114c4c;
    --ct-teal-700: #16504a;
    --ct-teal-600: #1C5C52;
    --ct-teal-500: #2E8070;
    --ct-teal-400: #3a9a86;
    --ct-teal-300: #6fbfae;
    --ct-teal-100: #d6eae6;
    --ct-teal-50:  #eef6f3;

    /* Maíz / Gold family (was amber) — stars, trust, highlights */
    --ct-amber-950: #3b2a06;
    --ct-amber-900: #6b5310;
    --ct-amber-800: #855010;
    --ct-amber-700: #9a7115;
    --ct-amber-600: #b0811a;
    --ct-amber-500: #C4901A;
    --ct-amber-400: #d9a52e;
    --ct-amber-200: #ecd09a;
    --ct-amber-100: #f5e7c8;
    --ct-amber-50:  #fbf5e6;

    /* Obsidian / warm-ink family (was cool slate) — warm browns, never blue-black */
    --ct-ink-950:  #0d0b08;
    --ct-ink-900:  #14110c;
    --ct-ink-800:  #1A1511;
    --ct-ink-700:  #2E2419;
    --ct-ink-600:  #5C4A3A;
    --ct-ink-500:  #6b5a48;
    --ct-ink-400:  #9A8A78;
    --ct-ink-300:  #b8ab9a;
    --ct-ink-200:  #d9d0c4;
    --ct-ink-100:  #e8e2d8;
    --ct-ink-50:   #f3efe7;

    /* Aliases kept for backward compat with existing selectors */
    --ct-slate-900: var(--ct-ink-900);
    --ct-slate-800: var(--ct-ink-700);
    --ct-slate-700: var(--ct-ink-600);
    --ct-slate-600: var(--ct-ink-500);
    --ct-slate-400: var(--ct-ink-300);
    --ct-slate-200: var(--ct-ink-100);
    --ct-slate-100: var(--ct-ink-50);
    --ct-slate-50:  #f3efe7;

    /* Terracotta accent — booking CTA / urgency */
    --ct-terra-700: #a8431f;
    --ct-terra-600: #C8583A;
    --ct-terra-400: #E07A5F;

    /* Estuco / Milpa cream (never pure white) */
    --ct-estuco:    #F5F0E8;
    --ct-white:     #ffffff;

    /* Typography — Inter for UI, Fraunces for editorial display */
    --ct-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
    --ct-font-display: 'Fraunces', 'Times New Roman', Georgia, serif;

    /* Border radii */
    --ct-radius-xl: 20px;
    --ct-radius:    16px;
    --ct-radius-sm: 12px;
    --ct-radius-xs: 8px;

    /* Shadows — editorial depth */
    --ct-shadow-xs: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --ct-shadow:    0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
    --ct-shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --ct-shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.10), 0 8px 10px -6px rgba(0,0,0,0.05);
    --ct-shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.18);
    --ct-shadow-teal: 0 8px 32px -8px rgba(13,148,136,0.30);
    --ct-shadow-amber: 0 8px 32px -8px rgba(245,158,11,0.25);

    /* Transitions */
    --ct-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ct-ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
    --ct-ease-spring: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ct-transition: all 0.35s var(--ct-ease);
    --ct-transition-fast: all 0.2s var(--ct-ease);

    /* Section geometry */
    --ct-content-width: 1200px;
    --ct-section-pad-x: clamp(1rem, 4vw, 3rem);
    --ct-section-pad-y: clamp(4rem, 8vw, 7rem);
}

/* =========================================================================
   BASE RESET
   ========================================================================= */
.ct-landing *,
.ct-landing *::before,
.ct-landing *::after { box-sizing: border-box; }

.ct-landing {
    font-family: var(--ct-font);
    color: var(--ct-ink-600);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--ct-estuco);
}

.ct-landing a { text-decoration: none; }
.ct-landing img { max-width: 100%; height: auto; display: block; }
.ct-landing p { margin: 0; }
.ct-landing h1,
.ct-landing h2,
.ct-landing h3 { line-height: 1.15; }

/* Editorial display type (Fraunces) on all headline-level elements — MILPA DIGITAL */
.ct-hero-title,
.ct-section-title,
.ct-place-title,
.ct-place-card .ct-place-title,
.ct-stat-value,
.ct-maya-lang-name,
.ct-community-card h3,
.ct-footer-brand {
    font-family: var(--ct-font-display);
    letter-spacing: -0.02em;
    font-optical-sizing: auto;
}
.ct-hero-title { font-weight: 800; }
.ct-section-title { font-weight: 600; }

/* =========================================================================
   CSS CONTAINMENT (Core Web Vitals)
   ========================================================================= */
.ct-section { contain: layout paint style; }
.ct-hero    { contain: layout paint; }

.ct-cat-card,
.ct-place-card,
.ct-stat-card { contain: layout paint style; }

/* Content-visibility only for confirmed below-fold items */
.ct-section.ct-below-fold {
    content-visibility: auto;
    contain-intrinsic-size: 1px 600px;
}

.ct-section.ct-below-fold .ct-place-card,
.ct-section.ct-below-fold .ct-cat-card,
.ct-section.ct-below-fold .ct-stat-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 240px;
}

/* =========================================================================
   REDUCED MOTION — MUST override all animations
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    .ct-landing *,
    .ct-landing *::before,
    .ct-landing *::after {
        animation-duration:       0.01ms !important;
        animation-iteration-count: 1     !important;
        transition-duration:      0.01ms !important;
        scroll-behavior:          auto   !important;
    }

    /* Ensure hero text and reveal are immediately visible */
    .ct-hero-title-main,
    .ct-hero-title-accent,
    .ct-hero-subtitle,
    .ct-hero-logo,
    .ct-hero-scroll-line,
    .ct-hero-scroll svg,
    .ct-hero-video,
    .ct-hero-still,
    .ct-hero-mesh {
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
    }

    .ct-hero-title-accent::after { display: none; }
    .ct-hero-particles { display: none; }

    .ct-reveal { opacity: 1; transform: none; transition: none; }

    .ct-cat-card,
    .ct-cat-card-inner,
    .ct-place-card,
    .ct-stat-card,
    .ct-btn { transition: none !important; transform: none !important; }

    .ct-featured-scroll[data-ct-marquee] > .ct-marquee-track {
        animation: none !important;
    }
}

/* =========================================================================
   FULL-WIDTH BREAKOUT
   ========================================================================= */
.ct-breakout {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* =========================================================================
   SECTION SCAFFOLDING
   ========================================================================= */
.ct-section {
    padding: var(--ct-section-pad-y) var(--ct-section-pad-x);
}

.ct-section-inner {
    max-width: var(--ct-content-width);
    margin: 0 auto;
    width: 96%;          /* ≈96% vw within the 100vw breakout */
}

/* Eyebrow label above section headings */
.ct-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ct-teal-600);
    margin-bottom: 0.75rem;
    padding: 0.3rem 0.85rem;
    background: rgba(13,148,136,0.08);
    border: 1px solid rgba(13,148,136,0.18);
    border-radius: 100px;
}

.ct-section-title {
    font-size: clamp(1.65rem, 3.8vw, 2.6rem);
    font-weight: 900;
    color: var(--ct-ink-900);
    margin: 0 0 0.6rem;
    letter-spacing: -0.028em;
    line-height: 1.12;
    text-wrap: balance;
}

.ct-section-subtitle {
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    color: var(--ct-ink-500);
    margin: 0 0 2.75rem;
    max-width: 580px;
    line-height: 1.65;
}

/* Decorative rule below section header group */
.ct-section-header {
    margin-bottom: 3rem;
}

.ct-section-header::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, var(--ct-teal-500), var(--ct-amber-400));
    border-radius: 2px;
    margin-top: 1.25rem;
}

/* =========================================================================
   SCROLL REVEAL
   ========================================================================= */
.ct-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s var(--ct-ease-out), transform 0.75s var(--ct-ease-spring);
}

.ct-reveal.ct-visible { opacity: 1; transform: translateY(0); }
.ct-reveal-delay-1 { transition-delay: 0.12s; }
.ct-reveal-delay-2 { transition-delay: 0.24s; }
.ct-reveal-delay-3 { transition-delay: 0.36s; }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.ct-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.875rem;
    min-height: 48px;           /* accessibility: ≥44px tap target */
    border-radius: 100px;
    font-size: 0.925rem;
    font-weight: 700;
    font-family: var(--ct-font);
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--ct-transition);
    line-height: 1.3;
    white-space: nowrap;
}

.ct-btn:focus-visible {
    outline: 2px solid var(--ct-amber-400);
    outline-offset: 3px;
}

.ct-btn svg { flex-shrink: 0; }

/* Primary — jade gradient */
.ct-btn-primary {
    background: linear-gradient(135deg, var(--ct-teal-600) 0%, var(--ct-teal-800) 100%);
    color: var(--ct-white);
    box-shadow: 0 4px 18px rgba(13,148,136,0.32), 0 1px 3px rgba(0,0,0,0.1);
}
.ct-btn-primary:hover,
.ct-btn-primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(13,148,136,0.38), 0 2px 6px rgba(0,0,0,0.12);
    color: var(--ct-white);
}

/* Glass — for hero overlay */
.ct-btn-glass {
    background: rgba(255,255,255,0.10);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.22);
    color: var(--ct-white);
}
.ct-btn-glass:hover,
.ct-btn-glass:focus-visible {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-2px);
    color: var(--ct-white);
}

/* Warm — amber/gold */
.ct-btn-warm {
    background: linear-gradient(135deg, var(--ct-amber-500) 0%, var(--ct-amber-700) 100%);
    color: var(--ct-white);
    box-shadow: 0 4px 18px rgba(217,119,6,0.30);
}
.ct-btn-warm:hover,
.ct-btn-warm:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(217,119,6,0.38);
    color: var(--ct-white);
}

/* Outline */
.ct-btn-outline {
    background: transparent;
    border: 2px solid var(--ct-teal-600);
    color: var(--ct-teal-700);
}
.ct-btn-outline:hover,
.ct-btn-outline:focus-visible {
    background: var(--ct-teal-600);
    color: var(--ct-white);
    transform: translateY(-2px);
}

/* Magnetic wrapper — CSS vars written by landing-hero.js */
.ct-btn-magnetic {
    position: relative;
    transition: transform 250ms var(--ct-ease-spring), box-shadow 250ms var(--ct-ease), background 250ms var(--ct-ease);
    will-change: transform;
}
.ct-btn-magnetic:hover {
    transform: translate3d(var(--ct-mx, 0px), var(--ct-my, -2px), 0) scale(1.02);
}

/* =========================================================================
   HERO — cinematic full-viewport (3.1)
   ========================================================================= */
.ct-hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Fallback gradient when no video/poster is configured */
    background:
        linear-gradient(
            160deg,
            rgba(4, 47, 46, 0.97)  0%,
            rgba(17, 94, 89, 0.93) 28%,
            rgba(13,148,136, 0.83) 56%,
            rgba(120, 53, 15, 0.78) 80%,
            rgba(4, 47, 46, 0.96) 100%
        );
    padding: 2rem var(--ct-section-pad-x);
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}

/* Cinematic variant: near-black base so video/mesh can dominate */
.ct-hero-cinematic {
    background: #040b09;
}

/* Optional hero background image via inline style --ct-hero-bg-image */
.ct-hero[style*="--ct-hero-bg-image"] {
    background-image: var(--ct-hero-bg-image);
    background-size: cover;
    background-position: center;
}

/* Video / still */
.ct-hero-video,
.ct-hero-still {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
    filter: saturate(1.1) contrast(1.04);
    animation: ct-hero-breathe 24s ease-in-out infinite;
    will-change: transform;
}

@keyframes ct-hero-breathe {
    0%, 100% { transform: scale(1.02); }
    50%      { transform: scale(1.07); }
}

/* Animated gradient mesh */
.ct-hero-mesh {
    position: absolute;
    inset: -15%;
    background:
        radial-gradient(40% 40% at 18% 28%,
            color-mix(in srgb, var(--ct-brand-primary, #0d9488) 42%, transparent) 0%,
            transparent 70%),
        radial-gradient(32% 32% at 82% 72%,
            color-mix(in srgb, var(--ct-brand-accent, #f59e0b) 32%, transparent) 0%,
            transparent 68%),
        radial-gradient(55% 55% at 50% 105%,
            rgba(4, 47, 46, 0.90) 0%,
            transparent 60%);
    z-index: -2;
    animation: ct-mesh-drift 28s ease-in-out infinite alternate;
    filter: blur(44px);
    will-change: transform;
}

@keyframes ct-mesh-drift {
    0%   { transform: translate3d(-4%, -3%, 0) rotate(0deg); }
    100% { transform: translate3d( 3%,  5%, 0) rotate(9deg); }
}

/* Rich cinematic vignette — stronger at bottom for text legibility */
.ct-hero-vignette {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(4, 11,  9, 0.38) 0%,
            rgba(4, 11,  9, 0.10) 40%,
            rgba(4, 11,  9, 0.72) 100%
        ),
        radial-gradient(ellipse 90% 80% at 50% 50%, transparent 40%, rgba(4,11,9,0.52) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Particle canvas — JS writes to this */
.ct-hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

/* Hero content */
.ct-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: clamp(2.5rem, 7vw, 5.5rem) 0;
    width: 100%;
}

/* Logo */
.ct-hero-logo {
    display: block;
    margin: 0 auto 1.5rem;
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.40));
    animation: ct-hero-fade-down 0.9s 0.1s var(--ct-ease-spring) backwards;
}

@keyframes ct-hero-fade-down {
    from { opacity: 0; transform: translateY(-18px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0)     scale(1);   }
}

/* Badge */
.ct-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 1.25rem;
    background: rgba(13, 148, 136, 0.15);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(13, 148, 136, 0.35);
    border-radius: 100px;
    color: var(--ct-teal-300);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
    animation: ct-hero-fade-down 0.9s 0.2s var(--ct-ease-spring) backwards;
}

/* H1 */
.ct-hero h1,
.ct-hero-title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 900;
    color: var(--ct-white);
    margin: 0 0 1.125rem;
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

/* Accent span / typewriter target — gradient text */
.ct-hero h1 span,
.ct-hero-title-accent {
    background: linear-gradient(
        135deg,
        var(--ct-teal-300)  0%,
        var(--ct-amber-300, #fde68a) 55%,
        var(--ct-amber-400) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ct-hero-title-main,
.ct-hero-title-accent {
    display: block;
    opacity: 0;
    animation: ct-hero-title-rise 0.95s 0.3s var(--ct-ease-spring) forwards;
}

.ct-hero-title-accent {
    animation-delay: 0.5s;
    position: relative;
}

/* Typewriter caret — JS adds/removes .ct-typing */
.ct-hero-title-accent::after {
    content: '';
    display: inline-block;
    width: 3px;
    height: 0.88em;
    margin-left: 0.12em;
    background: var(--ct-amber-300, #fde68a);
    border-radius: 2px;
    vertical-align: middle;
    animation: ct-hero-caret 1.1s steps(2) infinite;
    opacity: 0;
}
.ct-hero-title-accent.ct-typing::after { opacity: 0.88; }

@keyframes ct-hero-title-rise {
    from { opacity: 0; transform: translate3d(0, 22px, 0); filter: blur(10px); }
    to   { opacity: 1; transform: translate3d(0, 0, 0);    filter: blur(0);    }
}

@keyframes ct-hero-caret {
    0%, 49% { opacity: 0.88; }
    50%, 100% { opacity: 0; }
}

/* Subtitle */
.ct-hero-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    color: rgba(255,255,255,0.80);
    margin: 0 auto 2.75rem;
    line-height: 1.55;
    max-width: 580px;
    opacity: 0;
    animation: ct-hero-title-rise 0.95s 0.7s var(--ct-ease-spring) forwards;
}

/* Search bar */
.ct-hero-search {
    display: flex;
    max-width: 580px;
    margin: 0 auto 2.25rem;
    background: rgba(255,255,255,0.10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 100px;
    overflow: hidden;
    transition: var(--ct-transition);
    box-shadow: 0 4px 24px rgba(0,0,0,0.14);
}

.ct-hero-search:focus-within {
    background: rgba(255,255,255,0.16);
    border-color: rgba(45, 212, 191, 0.55);
    box-shadow: 0 0 0 4px rgba(45,212,191,0.14), 0 4px 24px rgba(0,0,0,0.14);
}

.ct-hero-search input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: var(--ct-white);
    font-size: 1rem;
    font-family: var(--ct-font);
    outline: none;
    min-width: 0;
}

.ct-hero-search input::placeholder { color: rgba(255,255,255,0.46); }

.ct-hero-search button {
    padding: 1rem 1.75rem;
    background: linear-gradient(135deg, var(--ct-teal-600), var(--ct-teal-800));
    color: var(--ct-white);
    border: none;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--ct-font);
    cursor: pointer;
    transition: var(--ct-transition);
    white-space: nowrap;
    letter-spacing: 0.01em;
    min-height: 48px;
}

.ct-hero-search button:hover {
    background: linear-gradient(135deg, var(--ct-teal-500), var(--ct-teal-700));
}

.ct-hero-search button:focus-visible {
    outline: 2px solid var(--ct-amber-400);
    outline-offset: -2px;
}

/* Hero CTAs */
.ct-hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Scroll indicator */
.ct-hero-scroll {
    position: absolute;
    bottom: 2.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255,255,255,0.50);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.ct-hero-scroll svg {
    animation: ct-bounce 2.2s ease-in-out infinite;
}

/* The ::after transform on ct-hero-scroll svg uses translateX(-50%) via parent */
@keyframes ct-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40%  { transform: translateY(-7px); }
    60%  { transform: translateY(-3px); }
}

.ct-hero-scroll-line {
    display: block;
    width: 1px;
    height: 38px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.55));
    animation: ct-hero-scroll-line 2.2s ease-in-out infinite;
}

@keyframes ct-hero-scroll-line {
    0%, 100% { transform: scaleY(0.45); opacity: 0.30; transform-origin: bottom; }
    50%      { transform: scaleY(1.0);  opacity: 1.0;  transform-origin: top; }
}

/* =========================================================================
   COMMUNITIES — story-driven intro
   ========================================================================= */
.ct-communities {
    background:
        linear-gradient(180deg, var(--ct-estuco) 0%, var(--ct-white) 100%);
    padding: var(--ct-section-pad-y) var(--ct-section-pad-x);
    position: relative;
    overflow: hidden;
}

/* Subtle warm texture overlay */
.ct-communities::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        var(--ct-teal-500) 0%,
        var(--ct-amber-400) 50%,
        var(--ct-teal-500) 100%
    );
    opacity: 0.7;
}

.ct-communities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.ct-community-card {
    background: var(--ct-white);
    border: 1px solid rgba(13,148,136,0.10);
    border-radius: var(--ct-radius);
    padding: 2rem;
    box-shadow: var(--ct-shadow);
    transition: var(--ct-transition);
    position: relative;
    overflow: hidden;
}

/* Card left-accent stripe */
.ct-community-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--ct-teal-500), var(--ct-teal-800));
    border-radius: 0 0 0 var(--ct-radius);
    transition: width 0.3s var(--ct-ease);
}

.ct-community-card:nth-child(2)::before {
    background: linear-gradient(180deg, var(--ct-amber-500), var(--ct-amber-800));
}

.ct-community-card:nth-child(3)::before {
    background: linear-gradient(180deg, var(--ct-terra-400, #e07b38), var(--ct-terra-700, #b45309));
}

.ct-community-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ct-shadow-lg);
    border-color: rgba(13,148,136,0.20);
}

.ct-community-card:hover::before { width: 6px; }

.ct-community-card h3 {
    color: var(--ct-teal-800);
    margin: 0 0 0.6rem;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.ct-community-lead {
    color: var(--ct-ink-500);
    font-size: 0.93rem;
    line-height: 1.65;
}

.ct-community-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(13,148,136,0.18);
    color: var(--ct-teal-700);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ct-community-footer::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* =========================================================================
   CATEGORIES GRID
   ========================================================================= */
.ct-categories {
    background: var(--ct-estuco);
    padding: var(--ct-section-pad-y) var(--ct-section-pad-x);
}

.ct-cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.125rem;
}

/* Category card — tilt JS writes --ct-tilt-x/y + --ct-glow-x/y */
.ct-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 1.625rem 1rem;
    background: var(--ct-white);
    border-radius: var(--ct-radius-sm);
    border: 1px solid rgba(226,232,240,0.8);
    box-shadow: var(--ct-shadow-xs);
    text-decoration: none;
    color: var(--ct-ink-600);
    transition: transform 250ms var(--ct-ease-spring), box-shadow 250ms var(--ct-ease), border-color 250ms var(--ct-ease);
    text-align: center;
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(800px) rotateX(var(--ct-tilt-x, 0deg)) rotateY(var(--ct-tilt-y, 0deg));
    will-change: transform;
    overflow: hidden;
}

.ct-cat-card:hover {
    transform: translateY(-5px) perspective(800px) rotateX(var(--ct-tilt-x, 0deg)) rotateY(var(--ct-tilt-y, 0deg));
    box-shadow: var(--ct-shadow-md), 0 0 0 1px rgba(13,148,136,0.15);
    border-color: rgba(13,148,136,0.25);
    color: var(--ct-teal-800);
}

.ct-cat-card:focus-visible {
    outline: 2px solid var(--ct-teal-600);
    outline-offset: 2px;
}

/* Inner content — raised via translateZ when tilting */
.ct-cat-card-inner {
    position: relative;
    z-index: 2;
    transform: translateZ(16px);
    transition: transform 250ms var(--ct-ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
}

.ct-cat-card:hover .ct-cat-card-inner { transform: translateZ(26px); }

/* Glow — JS writes --ct-glow-x/y */
.ct-cat-card-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(
        220px circle at var(--ct-glow-x, 50%) var(--ct-glow-y, 50%),
        color-mix(in srgb, var(--ct-brand-accent, #f59e0b) 28%, transparent) 0%,
        transparent 62%
    );
    opacity: 0;
    transition: opacity 200ms var(--ct-ease);
    pointer-events: none;
}

.ct-cat-card:hover .ct-cat-card-glow { opacity: 1; }

/* Icon circle */
.ct-cat-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ct-teal-100), var(--ct-teal-50));
    border-radius: 50%;
    color: var(--ct-teal-700);
    flex-shrink: 0;
    transition: background 250ms var(--ct-ease), box-shadow 250ms var(--ct-ease);
    box-shadow: 0 2px 8px rgba(13,148,136,0.10);
}

.ct-cat-card:hover .ct-cat-icon {
    background: linear-gradient(135deg, var(--ct-teal-200, #99f6e4), var(--ct-teal-100));
    box-shadow: 0 4px 16px rgba(13,148,136,0.20);
}

.ct-cat-name {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.005em;
}

.ct-cat-count {
    font-size: 0.725rem;
    color: var(--ct-ink-300);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* =========================================================================
   FEATURED PLACES — horizontal scroll strip with marquee
   ========================================================================= */
.ct-featured {
    background: var(--ct-white);
    padding: var(--ct-section-pad-y) 0;   /* no x-padding — strip bleeds to edges */
}

.ct-featured .ct-section-inner {
    padding-left: var(--ct-section-pad-x);
    padding-right: var(--ct-section-pad-x);
}

/* Marquee strip — data-ct-marquee, JS injects .ct-marquee-track */
.ct-featured-scroll {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem var(--ct-section-pad-x) 1.25rem;
    scroll-padding: 0 var(--ct-section-pad-x);
}

.ct-featured-scroll[data-ct-marquee] {
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0, #000 3.5%, #000 96.5%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 3.5%, #000 96.5%, transparent 100%);
}

.ct-featured-scroll[data-ct-marquee] > .ct-marquee-track {
    display: flex;
    gap: 1.25rem;
    animation: ct-marquee var(--ct-marquee-duration, 48s) linear infinite;
    will-change: transform;
    padding: 0.5rem 0 1.25rem;
}

.ct-featured-scroll[data-ct-marquee]:hover > .ct-marquee-track {
    animation-play-state: paused;
}

@keyframes ct-marquee {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

/* Custom scrollbar (non-marquee fallback) */
.ct-featured-scroll::-webkit-scrollbar { height: 5px; }
.ct-featured-scroll::-webkit-scrollbar-track { background: var(--ct-ink-100); border-radius: 3px; }
.ct-featured-scroll::-webkit-scrollbar-thumb { background: var(--ct-teal-400); border-radius: 3px; }

/* Place card */
.ct-place-card {
    flex: 0 0 290px;
    scroll-snap-align: start;
    border-radius: var(--ct-radius);
    overflow: hidden;
    background: var(--ct-white);
    box-shadow: var(--ct-shadow);
    transition: transform 0.35s var(--ct-ease-spring), box-shadow 0.35s var(--ct-ease), border-color 0.35s var(--ct-ease);
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(226,232,240,0.8);
    display: flex;
    flex-direction: column;
}

.ct-place-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--ct-shadow-lg), 0 0 0 1px rgba(13,148,136,0.18);
    border-color: rgba(13,148,136,0.22);
}

.ct-place-card:focus-visible {
    outline: 2px solid var(--ct-teal-600);
    outline-offset: 2px;
}

.ct-place-img {
    position: relative;
    height: 185px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ct-teal-100), var(--ct-amber-100));
}

.ct-place-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s var(--ct-ease);
}

.ct-place-card:hover .ct-place-img img { transform: scale(1.07); }

.ct-place-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.22rem 0.72rem;
    background: rgba(4, 11, 9, 0.68);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--ct-white);
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 1px 6px rgba(0,0,0,0.25);
}

.ct-place-featured-star {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: rgba(245,158,11,0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ct-white);
    box-shadow: 0 2px 8px rgba(245,158,11,0.35);
}

.ct-place-body {
    padding: 1.1rem 1.25rem 1.375rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.ct-place-title {
    font-size: 0.975rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.3;
    color: var(--ct-ink-900);
    letter-spacing: -0.01em;
}

.ct-place-cat {
    font-size: 0.775rem;
    color: var(--ct-teal-700);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* =========================================================================
   MAYA LANGUAGE SECTION
   ========================================================================= */
.ct-maya {
    background:
        linear-gradient(
            135deg,
            var(--ct-teal-950) 0%,
            var(--ct-teal-900) 40%,
            var(--ct-ink-800)  70%,
            var(--ct-ink-900)  100%
        );
    color: var(--ct-white);
    position: relative;
    overflow: hidden;
    padding: var(--ct-section-pad-y) var(--ct-section-pad-x);
}

/* Ambient glow orbs */
.ct-maya::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle,
        rgba(20,184,166,0.14) 0%,
        rgba(13,148,136,0.06) 40%,
        transparent 70%);
    pointer-events: none;
    animation: ct-maya-orb 18s ease-in-out infinite alternate;
}

.ct-maya::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -8%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle,
        rgba(245,158,11,0.10) 0%,
        transparent 65%);
    pointer-events: none;
    animation: ct-maya-orb 22s 3s ease-in-out infinite alternate-reverse;
}

@keyframes ct-maya-orb {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(3%, 4%) scale(1.06); }
}

.ct-maya-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

.ct-maya-text .ct-section-title {
    color: var(--ct-white);
}

.ct-maya-text .ct-section-subtitle {
    color: rgba(255,255,255,0.72);
    max-width: none;
}

.ct-maya-visual {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.ct-maya-lang-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.125rem 1.5rem;
    background: rgba(255,255,255,0.055);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--ct-radius-xs);
    transition: var(--ct-transition);
    cursor: default;
}

.ct-maya-lang-card:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.18);
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.ct-maya-lang-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.2rem;
    box-shadow: 0 0 8px currentColor;
}

.ct-maya-lang-name {
    font-weight: 800;
    font-size: 0.975rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.ct-maya-lang-desc {
    font-size: 0.80rem;
    color: rgba(255,255,255,0.52);
    line-height: 1.5;
    margin-top: 0.15rem;
}

/* =========================================================================
   STATISTICS BAND
   ========================================================================= */
.ct-stats-section {
    background:
        linear-gradient(
            135deg,
            var(--ct-teal-800)  0%,
            var(--ct-teal-900)  40%,
            var(--ct-ink-800)   70%,
            var(--ct-ink-900)   100%
        );
    color: var(--ct-white);
    padding: var(--ct-section-pad-y) var(--ct-section-pad-x);
    position: relative;
    overflow: hidden;
}

/* Shared ambient with Maya section for visual continuity */
.ct-stats-section::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 65%);
    pointer-events: none;
}

.ct-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 2rem;
    text-align: center;
}

.ct-stat-card {
    padding: 2.25rem 1.25rem;
    background: rgba(255,255,255,0.055);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--ct-radius-sm);
    transition: var(--ct-transition);
    position: relative;
    overflow: hidden;
}

/* Top-border accent */
.ct-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 2px;
    background: linear-gradient(90deg, var(--ct-teal-400), var(--ct-amber-400));
    border-radius: 0 0 2px 2px;
    opacity: 0.6;
    transition: opacity 0.3s ease, left 0.3s ease, right 0.3s ease;
}

.ct-stat-card:hover::before { left: 8%; right: 8%; opacity: 1; }

.ct-stat-card:hover {
    background: rgba(255,255,255,0.095);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.22);
}

a.ct-stat-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: block;
}

a.ct-stat-card:hover .ct-stat-label { color: var(--ct-teal-300); }
a.ct-stat-card:focus-visible { outline: 2px solid var(--ct-amber-400); outline-offset: 2px; }

.ct-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.875rem;
    width: 50px;
    height: 50px;
    background: rgba(13,148,136,0.15);
    border-radius: 50%;
    color: var(--ct-teal-300);
    transition: background 0.3s ease;
}

.ct-stat-card:hover .ct-stat-icon {
    background: rgba(13,148,136,0.25);
}

/* Counter — JS writes this via animateCounter() */
.ct-stat-value {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--ct-teal-300) 0%, var(--ct-amber-300, #fde68a) 60%, var(--ct-amber-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.ct-stat-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.62);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    transition: color 0.25s ease;
}

/* =========================================================================
   MAP SECTION
   ========================================================================= */
.ct-map-section {
    background:
        linear-gradient(180deg, var(--ct-ink-900) 0%, var(--ct-ink-800) 100%);
    color: var(--ct-white);
    padding: var(--ct-section-pad-y) var(--ct-section-pad-x);
}

.ct-map-section .ct-section-title { color: var(--ct-white); }
.ct-map-section .ct-section-subtitle { color: rgba(255,255,255,0.62); }

/* Map toggle button */
.ct-map-toggle-wrap {
    text-align: center;
    padding: 0.25rem 0 0;
}

.ct-map-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: rgba(13,148,136,0.12);
    color: var(--ct-teal-300);
    border: 1.5px solid rgba(13,148,136,0.40);
    border-radius: 100px;
    padding: 0.8rem 2rem;
    min-height: 48px;
    font-size: 0.925rem;
    font-weight: 700;
    font-family: var(--ct-font);
    cursor: pointer;
    transition: var(--ct-transition);
    letter-spacing: 0.01em;
}

.ct-map-toggle:hover,
.ct-map-toggle[aria-expanded="true"] {
    background: var(--ct-teal-700);
    color: var(--ct-white);
    border-color: var(--ct-teal-600);
    box-shadow: var(--ct-shadow-teal);
}

.ct-map-toggle:focus-visible {
    outline: 2px solid var(--ct-amber-400);
    outline-offset: 2px;
}

.ct-map-toggle svg {
    transition: transform 0.28s var(--ct-ease);
    flex-shrink: 0;
}

.ct-map-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Map container */
.ct-map-container {
    margin-top: 2rem;
    border-radius: var(--ct-radius);
    overflow: hidden;
    box-shadow: var(--ct-shadow-xl);
    border: 1px solid rgba(255,255,255,0.08);
}

#ct-landing-map {
    width: 100%;
    height: 420px;
}

.ct-map-cta {
    text-align: center;
    margin-top: 2.25rem;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.ct-footer {
    background: var(--ct-ink-950, #020617);
    color: rgba(255,255,255,0.70);
    padding: 3.5rem var(--ct-section-pad-x);
    text-align: center;
    font-size: 0.875rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    position: relative;
}

/* Footer accent line */
.ct-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--ct-teal-500), var(--ct-amber-400));
    border-radius: 0 0 2px 2px;
    opacity: 0.55;
}

.ct-footer .ct-section-inner p { color: rgba(255,255,255,0.68); margin-top: 0.4rem; }

.ct-footer a {
    color: var(--ct-teal-400);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 600;
}

.ct-footer a:hover { color: var(--ct-amber-400); }
.ct-footer a:focus-visible { outline: 2px solid var(--ct-amber-400); outline-offset: 2px; }

.ct-footer-brand {
    font-weight: 800;
    color: rgba(255,255,255,0.88);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

/* =========================================================================
   RESPONSIVE — mobile-first step-ups
   ========================================================================= */

/* --- Tablet 768px+ --- */
@media (min-width: 768px) {
    .ct-cat-grid { grid-template-columns: repeat(4, 1fr); }
    .ct-maya-grid { grid-template-columns: 1fr 1fr; }

    .ct-hero-search {
        flex-direction: row;
    }
}

/* --- Desktop 1024px+ --- */
@media (min-width: 1024px) {
    .ct-cat-grid { grid-template-columns: repeat(5, 1fr); }
}

/* --- Wide 1280px+ --- */
@media (min-width: 1280px) {
    .ct-cat-grid { grid-template-columns: repeat(5, 1fr); }
    .ct-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* --- Mobile breakdowns (max-width) --- */

/* ≤ 992px */
@media (max-width: 992px) {
    .ct-maya-grid { grid-template-columns: 1fr; gap: 2.25rem; }
}

/* ≤ 768px */
@media (max-width: 768px) {
    .ct-section { padding: clamp(2.75rem, 8vw, 4rem) clamp(1rem, 4vw, 1.5rem); }

    .ct-hero {
        min-height: 92vh;
        padding: 1.5rem 1rem;
    }

    .ct-hero-search {
        flex-direction: column;
        border-radius: var(--ct-radius);
        max-width: 100%;
    }

    .ct-hero-search input {
        padding: 0.875rem 1.25rem;
        text-align: center;
    }

    .ct-hero-search button {
        border-radius: 0;
        padding: 0.9rem 1rem;
    }

    .ct-hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .ct-cat-grid {
        grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
        gap: 0.75rem;
    }

    .ct-cat-card { padding: 1.125rem 0.75rem; }

    .ct-place-card { flex: 0 0 250px; }

    .ct-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

    #ct-landing-map { height: 300px; }
}

/* ≤ 480px */
@media (max-width: 480px) {
    .ct-cat-grid { grid-template-columns: repeat(3, 1fr); }

    .ct-cat-icon { width: 48px; height: 48px; }
    .ct-cat-icon svg { width: 22px; height: 22px; }
    .ct-cat-name { font-size: 0.78rem; }

    .ct-stats-grid { grid-template-columns: 1fr 1fr; }
    .ct-stat-card { padding: 1.625rem 0.75rem; }

    .ct-communities-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   MILPA hero — full-bleed photographic treatment (award-level)
   When a real hero photo is present, the photo leads; the mesh
   recedes and a strong cinematic vignette keeps the type legible.
   ============================================================ */
/* Photo-as-background hero (bulletproof: avoids the <img> z-index/sizing issues). */
.ct-hero[style*="--ct-hero-bg-image"] {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
.ct-hero[style*="--ct-hero-bg-image"] .ct-hero-still { display: none !important; }
.ct-hero[style*="--ct-hero-bg-image"] .ct-hero-mesh { opacity: 0.16 !important; }
.ct-hero[style*="--ct-hero-bg-image"] .ct-hero-particles { display: none !important; }
.ct-hero[style*="--ct-hero-bg-image"] .ct-hero-vignette {
    background:
        linear-gradient(180deg, rgba(20,17,12,0.42) 0%, rgba(20,17,12,0.12) 34%, rgba(20,17,12,0.88) 100%),
        radial-gradient(ellipse 100% 90% at 50% 40%, transparent 34%, rgba(20,17,12,0.6) 100%) !important;
}
.ct-hero-cinematic:has(.ct-hero-still) .ct-hero-vignette {
    background:
        linear-gradient(180deg, rgba(20,17,12,0.48) 0%, rgba(20,17,12,0.14) 36%, rgba(20,17,12,0.86) 100%),
        radial-gradient(ellipse 95% 85% at 50% 42%, transparent 36%, rgba(20,17,12,0.58) 100%);
}
.ct-hero .ct-hero-title { font-size: clamp(2.9rem, 8.6vw, 6.2rem); line-height: 1.0; letter-spacing: -0.03em; text-shadow: 0 2px 34px rgba(20,17,12,0.55), 0 1px 4px rgba(20,17,12,0.45); }
.ct-hero .ct-hero-subtitle { font-size: clamp(1.05rem, 2vw, 1.35rem); max-width: 46rem; text-shadow: 0 1px 14px rgba(20,17,12,0.6); }

/* ============================================================
   Hero text hierarchy + legibility refinement (award-style)
   Cream headline (legible), small gold tagline, stronger scrim.
   ============================================================ */
.ct-hero[style*="--ct-hero-bg-image"] .ct-hero-vignette {
    background:
        linear-gradient(180deg, rgba(18,15,11,0.58) 0%, rgba(18,15,11,0.36) 46%, rgba(18,15,11,0.94) 100%),
        radial-gradient(ellipse 80% 66% at 50% 52%, rgba(18,15,11,0.20) 0%, rgba(18,15,11,0.52) 100%) !important;
}
.ct-hero .ct-hero-title { font-size: clamp(2.2rem, 5.2vw, 4.1rem) !important; line-height: 1.06 !important; letter-spacing: -0.025em; }
.ct-hero .ct-hero-title-main { color: #F8F4EC; -webkit-text-fill-color: #F8F4EC; display: block; }
.ct-hero .ct-hero-title-accent { display: block; font-size: 0.4em !important; font-weight: 600; margin-top: 0.55rem; letter-spacing: 0.015em; line-height: 1.25; }
.ct-hero .ct-hero-subtitle { font-size: clamp(1rem, 1.5vw, 1.18rem) !important; color: #EDE6DA; }
.ct-hero-content { max-width: 60rem; }

/* =========================================================================
   SITE CHROME — Cassiopeia header harmonised with the "Milpa Digital" palette.
   (1) Hides the sitewide topbar mod_login form that dominated the top of every
       view and buried the hero. (2) Recolours the default indigo header band
       (#112855) to deep jade with cream Fraunces title. Literal hex so the block
       is self-contained regardless of which file's :root is present. CAL-271.
   ========================================================================= */
body.com_cultouring .container-topbar { display: none !important; }

body.com_cultouring header.container-header,
body.com_cultouring header.header {
    background: linear-gradient(180deg, #0c3a38 0%, #114c4c 100%) !important;
    border-bottom: 1px solid rgba(196, 144, 26, 0.30);
    box-shadow: 0 2px 18px -8px rgba(0, 0, 0, 0.45);
}
body.com_cultouring .navbar-brand .brand-logo,
body.com_cultouring .navbar-brand .brand-logo span {
    color: #F5F0E8 !important;
    font-family: 'Fraunces', Georgia, serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    text-decoration: none !important;
}
body.com_cultouring .navbar-brand .site-description {
    color: rgba(245, 240, 232, 0.74) !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-style: italic;
}
body.com_cultouring .container-nav .mod-menu > li > a {
    color: #F5F0E8 !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-weight: 500;
}
body.com_cultouring .container-nav .mod-menu > li > a:hover,
body.com_cultouring .container-nav .mod-menu > li.current > a {
    color: #d9a52e !important;
}

/* No-JS / crawler safety: if scripting is unavailable the IntersectionObserver
   never runs, so reveal all .ct-reveal content rather than leave it at opacity:0
   forever. Real users with JS still get the animated reveal. CAL-271. */
@media (scripting: none) {
    .ct-reveal { opacity: 1 !important; transform: none !important; }
}
