/* ═══════════════════════════════════════════════════════════
   FoodRiskByGender — Premium Interaction Layer
   Progressive enhancement for the hand-coded classic theme.
   Loaded after main.css; only adds the premium "chrome" and the
   hooks the JS needs. Never hides content on its own.
   ═══════════════════════════════════════════════════════════ */

:root {
    --frb-green: #15803d;
    --frb-green-bright: #8BC34A;
    --frb-ink: #0f172a;
}

/* Kill horizontal scroll from parallax/tilt transforms */
html, body { overflow-x: hidden; }

/* ── LENIS SMOOTH SCROLL (base rules) ── */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ── SCROLL PROGRESS BAR ── */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--frb-green-bright), var(--frb-green));
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(21,128,61,0.5);
    will-change: width;
}

/* ── CUSTOM CURSOR ── */
.cursor-dot,
.cursor-ring {
    position: fixed; top: 0; left: 0;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cursor-active .cursor-dot,
.cursor-active .cursor-ring { opacity: 1; }
.cursor-dot {
    width: 8px; height: 8px;
    margin: 0;
    background: var(--frb-green-bright);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(139,195,74,0.7);
}
.cursor-ring {
    width: 40px; height: 40px;
    border: 1.5px solid rgba(139,195,74,0.5);
    border-radius: 50%;
    z-index: 99998;
    transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}
.cursor-ring.hover {
    width: 62px; height: 62px;
    border-color: rgba(139,195,74,0.85);
    background: rgba(139,195,74,0.06);
}
@media (max-width: 768px) {
    .cursor-dot, .cursor-ring { display: none !important; }
}

/* ── WEBGL / CANVAS HERO BACKDROP ── */
.hero { position: relative; overflow: hidden; }
#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    mix-blend-mode: screen;
    transition: opacity 1.2s ease;
}
#hero-canvas.ready { opacity: 0.85; }
.hero .hero-bg { z-index: 0; }
.hero .hero-inner,
.hero .hero-content { position: relative; z-index: 3; }
.hero-badge, .hero .hero-content h1, .hero-subtitle, .hero-stats { will-change: transform; }

/* ── HERO ALIGNMENT + ACCENT ── */
.hero h1 { text-align: left; }
.hero-accent { color: #60a5fa; }

/* ── HERO SCRAMBLE DECODE GLOW ── */
@keyframes accent-glow {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    50% { text-shadow: 0 0 18px rgba(96,165,250,0.6), 0 0 40px rgba(96,165,250,0.25); }
}
@keyframes accent-shimmer {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}
.hero-glow {
    animation: accent-glow 3s ease-in-out infinite;
}

/* ── 3D TILT ENABLERS (perspective on card grids) ── */
.about-highlights,
.obj-grid,
.sem-stats,
.impact-grid,
.team-grid,
.partners-grid { perspective: 1200px; }

.highlight-card,
.obj-card,
.sem-card,
.impact-card,
.team-card,
.partner-card { transform-style: preserve-3d; will-change: transform; }

/* ── GALLERY REVEAL / ZOOM POLISH ── */
.gallery-item { overflow: hidden; will-change: clip-path, opacity; }
.gallery-item img { transition: transform 0.7s cubic-bezier(0.22,1,0.36,1); will-change: transform; }
.gallery-item:hover img { transform: scale(1.06); }

/* ── COUNTERS: stable width while animating ── */
.hero-stat .num,
.info-item .val,
.impact-value,
.sem-card-value { font-variant-numeric: tabular-nums; }

/* ── SPLIT HERO CHARS ── */
.frb-char { will-change: transform, opacity; transform-origin: 50% 100%; }

/* ── NAVBAR premium easing ── */
.navbar { transition: transform 0.45s cubic-bezier(0.4,0,0.2,1), background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease; will-change: transform; }
.navbar.scrolled { box-shadow: 0 6px 34px rgba(0,0,0,0.10); backdrop-filter: blur(18px) saturate(160%); }
.nav-links a { will-change: transform; }

/* ── NAVBAR SVG LOGO ── */
.navbar-logo {
    height: 28px;
    width: auto;
}

/* ── INFOGRAPHIC BAR easing ── */
.impact-bar-fill { will-change: width; }

/* ── HERO CANVAS text crisp ── */
.hero-content { text-shadow: 0 2px 30px rgba(0,0,0,0.25); }

/* ── TEAM LOGO MODE ── */
.team-photo.team-logo {
    width: 140px;
    height: 140px;
    border-radius: 20px;
    background: var(--slate-50);
    border-color: var(--slate-200);
}
.team-photo.team-logo img {
    object-fit: contain;
    padding: 10px;
}

/* ── FAQ CENTERING ── */
.faq-list {
    margin-left: auto;
    margin-right: auto;
}

/* ── COMING SOON SKELETON PLACEHOLDERS ── */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.coming-soon-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
}

.skeleton-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.skeleton-card {
    background: rgba(255,255,255,0.5);
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    overflow: hidden;
}

.skeleton-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex-shrink: 0;
    background: linear-gradient(90deg, var(--slate-100) 0%, var(--slate-200) 40%, var(--slate-100) 80%);
    background-size: 400px 100%;
    animation: shimmer 1.8s ease-in-out infinite;
}

.skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--slate-100) 0%, var(--slate-200) 40%, var(--slate-100) 80%);
    background-size: 400px 100%;
    animation: shimmer 1.8s ease-in-out infinite;
}

.skeleton-line:nth-child(1) { width: 70%; animation-delay: 0.1s; }
.skeleton-line:nth-child(2) { width: 90%; animation-delay: 0.2s; }
.skeleton-line:nth-child(3) { width: 50%; animation-delay: 0.3s; }

.skeleton-card:nth-child(2) .skeleton-icon { animation-delay: 0.3s; }
.skeleton-card:nth-child(2) .skeleton-line:nth-child(1) { animation-delay: 0.4s; }
.skeleton-card:nth-child(2) .skeleton-line:nth-child(2) { animation-delay: 0.5s; }
.skeleton-card:nth-child(2) .skeleton-line:nth-child(3) { animation-delay: 0.6s; }

.skeleton-card:nth-child(3) .skeleton-icon { animation-delay: 0.6s; }
.skeleton-card:nth-child(3) .skeleton-line:nth-child(1) { animation-delay: 0.7s; }
.skeleton-card:nth-child(3) .skeleton-line:nth-child(2) { animation-delay: 0.8s; }
.skeleton-card:nth-child(3) .skeleton-line:nth-child(3) { animation-delay: 0.9s; }

.skeleton-card:nth-child(4) .skeleton-icon { animation-delay: 0.9s; }
.skeleton-card:nth-child(4) .skeleton-line:nth-child(1) { animation-delay: 1.0s; }
.skeleton-card:nth-child(4) .skeleton-line:nth-child(2) { animation-delay: 1.1s; }
.skeleton-card:nth-child(4) .skeleton-line:nth-child(3) { animation-delay: 1.2s; }

.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green-50);
    border: 1px solid var(--green-200);
    border-radius: 100px;
    padding: 8px 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green-700);
    letter-spacing: 0.03em;
}

.coming-soon-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-500);
    animation: pulse-glow 2s ease-in-out infinite;
}

.coming-soon-text {
    font-size: 0.88rem;
    color: var(--slate-400);
    text-align: center;
    max-width: 420px;
    line-height: 1.6;
}

.results-section .skeleton-card {
    background: var(--slate-50);
    border-color: var(--slate-100);
}

@media (max-width: 1024px) {
    .skeleton-cards { grid-template-columns: repeat(2, 1fr); }
    .skeleton-card:nth-child(3),
    .skeleton-card:nth-child(4) { display: none; }
    .hero h1 { text-align: center; }
}

@media (max-width: 768px) {
    .skeleton-cards { grid-template-columns: 1fr; }
    .skeleton-card:nth-child(2),
    .skeleton-card:nth-child(3),
    .skeleton-card:nth-child(4) { display: none; }

    .navbar-logo { height: 22px; }
}

/* ═══════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .scroll-progress,
    .cursor-dot,
    .cursor-ring,
    #hero-canvas { display: none !important; }

    .frb-char { opacity: 1 !important; transform: none !important; filter: none !important; }
    .hero-glow { animation: none !important; }

    * { scroll-behavior: auto !important; }

    .skeleton-icon,
    .skeleton-line { animation: none !important; }
    .coming-soon-dot { animation: none !important; opacity: 0.7; }
}

/* ── PRINT ── */
@media print {
    .scroll-progress, .cursor-dot, .cursor-ring, #hero-canvas { display: none !important; }
    .coming-soon-placeholder { display: none !important; }
}