/* ══════════════════════════════════════
   Hero Circular Gallery — Front-end CSS v2
   • No nav / stats / eyebrow
   • Bigger cards with per-card button
   • Overlay color+opacity via CSS var
══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.hcg-hero {
  --hcg-overlay-color: rgba(7, 7, 12, 0.72);
  --hcg-card-scale: 100;

  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
  color: #fff;
  background: #07070c;
}

/* ── Background ── */
.hcg-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover;
  background-position: center 20%;
  filter: brightness(0.55) grayscale(0.1) contrast(1.05);
  transform: scale(1.06);
  animation: hcgBgFloat 22s ease-in-out infinite alternate;
  transition: background-image 0.7s ease;
  will-change: transform;
}
@keyframes hcgBgFloat {
  from { transform: scale(1.06) translateY(0); }
  to   { transform: scale(1.06) translateY(-18px); }
}

/* ── Overlay — uses CSS custom property for color+opacity ── */
.hcg-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, transparent 5%, var(--hcg-overlay-color) 80%),
    linear-gradient(180deg,
      transparent           0%,
      transparent           15%,
      var(--hcg-overlay-color) 55%,
      var(--hcg-overlay-color) 100%
    );
}

/* ── Logo bar (top-left only, no nav links) ── */
.hcg-logo-bar {
  position: relative; z-index: 30;
  padding: 28px 48px;
  animation: hcgFadeDown .8s ease both;
}
.hcg-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; letter-spacing: 5px; color: #fff;
  text-decoration: none; display: inline-block;
}

/* ── Body (headline + buttons) ── */
.hcg-body {
  position: relative; z-index: 20;
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 24px 20px;
  animation: hcgFadeUp .9s .15s ease both;
}

.hcg-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px, 9.5vw, 120px);
  line-height: .88; letter-spacing: 2px;
  background: linear-gradient(155deg, #fff 20%, rgba(255,255,255,.3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 18px;
}

.hcg-sub {
  font-size: 15px; font-weight: 300;
  color: rgba(255,255,255,.45);
  max-width: 420px; line-height: 1.75;
  margin-bottom: 30px;
}

.hcg-actions {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap;
}
.hcg-btn-primary {
  background: #fff; color: #07070c;
  border: none; padding: 13px 36px;
  border-radius: 100px; font-size: 12px; font-weight: 500;
  letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: opacity .2s, transform .2s;
  text-decoration: none; display: inline-block;
}
.hcg-btn-primary:hover { opacity: .85; transform: translateY(-2px); color: #07070c; }

.hcg-btn-ghost {
  background: transparent; color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.28);
  padding: 13px 36px; border-radius: 100px;
  font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: border-color .2s, color .2s;
  text-decoration: none; display: inline-block;
}
.hcg-btn-ghost:hover { border-color: rgba(255,255,255,.65); color: #fff; }

/* ══════════════════════════════════════
   GALLERY — taller, bigger cards
══════════════════════════════════════ */
.hcg-gallery-section {
  position: relative; z-index: 20;
  width: 100%;
  height: calc(clamp(320px, 42vw, 520px) * var(--hcg-card-scale) / 100);
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
  animation: hcgFadeUp .9s .4s ease both;
  /* CRITICAL: clip ALL children — prevents overlay bleed */
  overflow: hidden;
  isolation: isolate;
  margin-top: -20px;
}
.hcg-gallery-section:active { cursor: grabbing; }
.hcg-gallery-section canvas { display: block; position: absolute; inset: 0; z-index: 0; }

/* CSS fallback */
.hcg-gallery-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center; gap: 12px;
  padding: 0 16px 32px;
  pointer-events: none;
  transition: opacity .4s;
}
.hcg-fallback-card {
  width: clamp(130px, 13vw, 200px);
  height: clamp(200px, 26vw, 360px);
  border-radius: 20px;
  background-size: cover; background-position: center;
  background-color: #1e293b;
  flex-shrink: 0;
  box-shadow: 0 16px 48px rgba(0,0,0,.65);
  transition: transform .3s;
}
.hcg-fallback-card:hover { transform: translateY(-10px); }

/* Card overlays are positioned via inline styles in hero-gallery.js.
   The overlay container has overflow:hidden applied in JS,
   preventing any bleed outside the gallery bounds. */

/* ── Keyframes ── */
@keyframes hcgFadeUp   { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
@keyframes hcgFadeDown { from { opacity:0; transform:translateY(-18px);} to { opacity:1; transform:translateY(0); } }

/* ══════════════════════════════════════
   RESPONSIVE — Tablet (≤ 768px)
══════════════════════════════════════ */
@media (max-width: 768px) {
  .hcg-logo-bar {
    padding: 18px 20px;
  }

  .hcg-logo {
    font-size: 18px;
    letter-spacing: 4px;
  }

  .hcg-body {
    padding: 0 20px 16px;
    justify-content: flex-end;
  }

  .hcg-headline {
    font-size: clamp(38px, 10vw, 72px);
    margin-bottom: 12px;
  }

  .hcg-sub {
    font-size: 13px;
    margin-bottom: 20px;
    max-width: 340px;
  }

  .hcg-gallery-section {
    height: calc(clamp(240px, 55vw, 380px) * var(--hcg-card-scale) / 100);
    margin-top: -12px;
  }
}

/* ══════════════════════════════════════
   RESPONSIVE — Mobile (≤ 480px)
══════════════════════════════════════ */
@media (max-width: 480px) {
  .hcg-hero {
    min-height: 100svh; /* safe viewport height on mobile browsers */
  }

  .hcg-logo-bar {
    padding: 14px 16px;
  }

  .hcg-logo {
    font-size: 16px;
    letter-spacing: 3px;
  }

  .hcg-body {
    padding: 0 16px 12px;
    justify-content: flex-end;
  }

  .hcg-headline {
    font-size: clamp(32px, 11vw, 52px);
    letter-spacing: 1px;
    margin-bottom: 10px;
  }

  .hcg-sub {
    font-size: 12px;
    line-height: 1.65;
    margin-bottom: 16px;
    max-width: 100%;
  }

  .hcg-actions {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .hcg-btn-primary,
  .hcg-btn-ghost {
    width: 100%;
    max-width: 260px;
    text-align: center;
    padding: 12px 28px;
  }

  .hcg-gallery-section {
    height: calc(clamp(200px, 58vw, 320px) * var(--hcg-card-scale) / 100);
    margin-top: -8px;
    /* Improve touch performance */
    touch-action: pan-y pinch-zoom;
  }
}

/* ══════════════════════════════════════
   RESPONSIVE — Very small (≤ 360px)
══════════════════════════════════════ */
@media (max-width: 360px) {
  .hcg-headline {
    font-size: clamp(28px, 12vw, 42px);
  }

  .hcg-sub {
    font-size: 11px;
  }

  .hcg-gallery-section {
    height: calc(clamp(180px, 60vw, 280px) * var(--hcg-card-scale) / 100);
  }
}

/* ══════════════════════════════════════
   LANDSCAPE MOBILE — short screens
══════════════════════════════════════ */
@media (max-height: 500px) and (max-width: 900px) {
  .hcg-hero {
    min-height: 100svh;
  }

  .hcg-logo-bar {
    padding: 10px 16px;
  }

  .hcg-body {
    padding: 0 16px 8px;
  }

  .hcg-headline {
    font-size: clamp(24px, 7vw, 48px);
    margin-bottom: 8px;
  }

  .hcg-sub {
    display: none; /* hide on landscape to save vertical space */
  }

  .hcg-actions {
    margin-bottom: 6px;
    gap: 8px;
  }

  .hcg-btn-primary,
  .hcg-btn-ghost {
    padding: 9px 22px;
    font-size: 11px;
  }

  .hcg-gallery-section {
    height: calc(clamp(140px, 50vh, 280px) * var(--hcg-card-scale) / 100);
    margin-top: -6px;
  }
}

/* ══════════════════════════════════════
   TOUCH — improve tap target & pointer UX
══════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
  .hcg-gallery-section {
    cursor: default; /* remove grab cursor on touch devices */
  }

  .hcg-btn-primary,
  .hcg-btn-ghost {
    /* Larger tap targets on touch */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
