/**
 * EBCGG Public Site Extension — ebcgg-public.css
 * Companion to ebcgg.css — loaded only on public sites (newsite, welcome)
 * 10 modules: reveal, display typography, glass, photos, scroll, sections, counters, compare, carousel, patterns
 */

/* ── 1. SCROLL REVEAL ─────────────────────────────── */
.eb-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.eb-reveal.eb-revealed { opacity: 1; transform: translateY(0); }
.eb-reveal-left { opacity: 0; transform: translateX(-32px); transition: opacity 0.6s ease, transform 0.6s ease; }
.eb-reveal-left.eb-revealed { opacity: 1; transform: translateX(0); }
.eb-reveal-right { opacity: 0; transform: translateX(32px); transition: opacity 0.6s ease, transform 0.6s ease; }
.eb-reveal-right.eb-revealed { opacity: 1; transform: translateX(0); }
.eb-reveal-scale { opacity: 0; transform: scale(0.95); transition: opacity 0.5s ease, transform 0.5s ease; }
.eb-reveal-scale.eb-revealed { opacity: 1; transform: scale(1); }
.eb-stagger > :nth-child(1) { transition-delay: 0ms; }
.eb-stagger > :nth-child(2) { transition-delay: 100ms; }
.eb-stagger > :nth-child(3) { transition-delay: 200ms; }
.eb-stagger > :nth-child(4) { transition-delay: 300ms; }
.eb-stagger > :nth-child(5) { transition-delay: 400ms; }
.eb-stagger > :nth-child(6) { transition-delay: 500ms; }

/* ── 2. DISPLAY TYPOGRAPHY ────────────────────────── */
.eb-display-xl { font-size: clamp(36px, 5vw, 72px); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.eb-display-lg { font-size: clamp(30px, 4vw, 56px); font-weight: 700; line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance; }
.eb-display-md { font-size: clamp(24px, 3vw, 42px); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
.eb-display-sm { font-size: clamp(20px, 2.5vw, 32px); font-weight: 600; line-height: 1.2; text-wrap: balance; }
.eb-text-gradient-gold { background: linear-gradient(135deg, #C9A84C 0%, #E8D48A 50%, #C9A84C 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.eb-text-gradient-green { background: linear-gradient(135deg, #2B6E2B 0%, #4CAF4C 50%, #2B6E2B 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.eb-counter { font-family: var(--eb-font-mono); font-variant-numeric: tabular-nums; }

/* ── 2b. TYPOGRAPHY SCALE OVERRIDE (public site: +2px) ── */
body { font-size: 15px !important; line-height: 1.65 !important; }
.eb-text-2xs { font-size: 11px !important; }
.eb-text-xs { font-size: 12px !important; }
.eb-text-sm { font-size: 13px !important; }
.eb-text-lg { font-size: 18px !important; }
.eb-text-xl { font-size: 22px !important; }
.eb-h1 { font-size: 36px !important; }
.eb-h2 { font-size: 28px !important; }
.eb-h3 { font-size: 20px !important; }
.eb-h4 { font-size: 17px !important; }
.form-label { font-size: 12px !important; }
.pipeline-label { font-size: 13px !important; }
.stat-grid-value { font-size: 28px !important; }
@media (max-width: 768px) {
  .eb-h1 { font-size: 28px !important; }
  .eb-h2 { font-size: 22px !important; }
  .stat-grid-value { font-size: 22px !important; }
}
@media (max-width: 480px) {
  .eb-h1 { font-size: 24px !important; }
  .eb-h2 { font-size: 20px !important; }
}

/* ── 3. GLASS & DEPTH ─────────────────────────────── */
.eb-glass { background: rgba(255,255,255,0.04); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.08); }
.eb-glass-strong { background: rgba(255,255,255,0.08); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid rgba(255,255,255,0.12); }
.eb-glow-gold { box-shadow: 0 0 40px rgba(201,168,76,0.15), 0 0 80px rgba(201,168,76,0.05); }
.eb-glow-green { box-shadow: 0 0 40px rgba(43,110,43,0.15), 0 0 80px rgba(43,110,43,0.05); }
.eb-noise { position: relative; }
.eb-noise::after { content: ''; position: absolute; inset: 0; opacity: 0.03; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); pointer-events: none; z-index: 0; }
.eb-noise > * { position: relative; z-index: 1; }
.eb-depth-1 { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.eb-depth-2 { box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 2px 4px rgba(0,0,0,0.1); }
.eb-depth-3 { box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 4px 8px rgba(0,0,0,0.15); }

/* ── 4. PHOTOS ────────────────────────────────────── */
.eb-cover { object-fit: cover; }
.eb-contain { object-fit: contain; }
.eb-ratio-16x9 { aspect-ratio: 16/9; }
.eb-ratio-4x3 { aspect-ratio: 4/3; }
.eb-ratio-3x2 { aspect-ratio: 3/2; }
.eb-ratio-1x1 { aspect-ratio: 1/1; }
.eb-ratio-21x9 { aspect-ratio: 21/9; }
.eb-photo-zoom { overflow: hidden; }
.eb-photo-zoom img { transition: transform 0.4s ease; }
.eb-photo-zoom:hover img { transform: scale(1.05); }
.eb-photo-fade { position: relative; }
.eb-photo-fade::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 50%; background: linear-gradient(to top, var(--eb-bg), transparent); pointer-events: none; }
.eb-hero-photo { position: relative; min-height: 80vh; display: flex; align-items: center; overflow: hidden; border-radius: var(--eb-radius-xl, 16px); margin: var(--eb-space-3); }
@media (max-width: 768px) { .eb-hero-photo { min-height: auto; border-radius: var(--eb-radius-lg); margin: var(--eb-space-2); } }
.eb-hero-photo-bg { position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; z-index: 0; }
.eb-hero-photo-overlay { position: absolute; inset: 0; background: linear-gradient(170deg, rgba(15,26,15,0.85) 0%, rgba(15,26,15,0.50) 50%, rgba(15,26,15,0.30) 100%); z-index: 1; }
.eb-hero-photo > *:not(.eb-hero-photo-bg):not(.eb-hero-photo-overlay) { position: relative; z-index: 2; }
.eb-photo-lightbox { cursor: zoom-in; transition: transform 0.2s; }
.eb-photo-lightbox:hover { transform: scale(1.02); }

/* ── 5. SCROLL UTILITIES ──────────────────────────── */
[id] { scroll-margin-top: 72px; }
.eb-snap-x { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.eb-snap-x::-webkit-scrollbar { display: none; }
.eb-snap-item { scroll-snap-align: start; flex-shrink: 0; }
html { scroll-behavior: smooth; }
.eb-sticky-section { position: sticky; top: 72px; }

/* ── 6. SECTION LAYOUTS ───────────────────────────── */
.eb-full-bleed { width: 100vw; margin-left: calc(-50vw + 50%); }
.eb-section-tall { min-height: 80vh; display: flex; align-items: center; }
.eb-section-full { min-height: 100vh; display: flex; align-items: center; }
.eb-overlap-up { margin-top: -60px; position: relative; z-index: 2; }
.eb-overlap-down { margin-bottom: -60px; position: relative; z-index: 2; }
.eb-grid-60-40 { display: grid; grid-template-columns: 3fr 2fr; gap: var(--eb-space-6); }
.eb-grid-40-60 { display: grid; grid-template-columns: 2fr 3fr; gap: var(--eb-space-6); }
@media (max-width: 768px) { .eb-grid-60-40, .eb-grid-40-60 { grid-template-columns: 1fr; } }
.eb-divider-gold { height: 1px; background: linear-gradient(90deg, transparent, var(--eb-accent), transparent); border: none; }
.eb-divider-green { height: 1px; background: linear-gradient(90deg, transparent, var(--eb-success-text), transparent); border: none; }

/* ── 7. ANIMATED COUNTERS ─────────────────────────── */
.eb-counter-value { font-family: var(--eb-font-mono); font-variant-numeric: tabular-nums; font-size: clamp(28px, 4vw, 48px); font-weight: 700; color: var(--eb-text); line-height: 1; }
.eb-counter-value-accent { color: var(--eb-accent); }
.eb-counter-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--eb-text-3); margin-top: var(--eb-space-1); }
.eb-counter-unit { font-size: 0.5em; font-weight: 400; color: var(--eb-text-3); margin-left: 4px; }

/* ── 8. BEFORE/AFTER COMPARISON ───────────────────── */
.eb-compare { position: relative; overflow: hidden; border-radius: var(--eb-radius-lg); border: 1px solid var(--eb-border); }
.eb-compare-before, .eb-compare-after { padding: var(--eb-space-6); }
.eb-compare-before { background: rgba(180,40,40,0.06); border-right: 1px solid var(--eb-border); }
.eb-compare-after { background: rgba(43,110,43,0.06); }
.eb-compare-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--eb-space-3); }
.eb-compare-label-before { color: rgba(255,120,120,0.8); }
.eb-compare-label-after { color: var(--eb-success-text); }
.eb-compare-item { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; font-size: 14px; color: var(--eb-text-2); line-height: 1.5; }

/* ── 9. CAROUSEL ──────────────────────────────────── */
.eb-carousel { display: flex; gap: var(--eb-space-4); overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: var(--eb-space-2); scrollbar-width: none; }
.eb-carousel::-webkit-scrollbar { display: none; }
.eb-carousel-item { scroll-snap-align: start; flex-shrink: 0; width: 300px; }
.eb-carousel-item-lg { width: 400px; }
.eb-carousel-item-sm { width: 220px; }
@media (max-width: 768px) { .eb-carousel-item { width: 260px; } .eb-carousel-item-lg { width: 300px; } }
.eb-carousel-fade { position: relative; }
.eb-carousel-fade::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 60px; background: linear-gradient(to left, var(--eb-bg), transparent); pointer-events: none; z-index: 1; }

/* ── 10. SECTION PATTERNS ─────────────────────────── */
.eb-eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--eb-accent); margin-bottom: var(--eb-space-2); }
.eb-eyebrow-green { color: var(--eb-success-text); }
.eb-eyebrow-muted { color: var(--eb-text-3); }
.eb-section-intro { max-width: 600px; margin-bottom: var(--eb-space-8); }
.eb-section-intro-centered { max-width: 600px; margin: 0 auto var(--eb-space-8); text-align: center; }
.eb-highlight-strip { padding: var(--eb-space-5) var(--eb-space-4); border-top: 1px solid var(--eb-border); border-bottom: 1px solid var(--eb-border); }
.eb-highlight-strip-gold { background: linear-gradient(135deg, rgba(201,168,76,0.04), rgba(201,168,76,0.08)); border-color: rgba(201,168,76,0.15); }
.eb-highlight-strip-green { background: linear-gradient(135deg, rgba(43,110,43,0.04), rgba(43,110,43,0.08)); border-color: rgba(43,110,43,0.15); }

/* Auto-reveal elements above the fold */
.eb-hero-photo .eb-reveal, .eb-hero-photo .eb-reveal-left, .eb-hero-photo .eb-reveal-right { opacity: 1; transform: none; }

/* Fallback: visible after 2s if JS fails */
@keyframes eb-reveal-fallback { to { opacity: 1; transform: none; } }
.eb-reveal, .eb-reveal-left, .eb-reveal-right, .eb-reveal-scale { animation: eb-reveal-fallback 0.6s ease 2s forwards; }
.eb-reveal.eb-revealed, .eb-reveal-left.eb-revealed, .eb-reveal-right.eb-revealed, .eb-reveal-scale.eb-revealed { animation: none; }
@media (prefers-reduced-motion: reduce) { .eb-reveal, .eb-reveal-left, .eb-reveal-right, .eb-reveal-scale { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; } }
