/* ════════════════════════════════════════════════════════════
   RIPPLE — Hero Home Page (Fixed Layout)
   Editorial style: big typography + globe + bottom stats bar
════════════════════════════════════════════════════════════ */

/* ── Section Root ─────────────────────────────────────────── */
#section-hero-global {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background: #080402;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: 'DM Sans', sans-serif;
  color: #f0e8de;
}

/* ── Backgrounds ─────────────────────────────────────────── */
.hg-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 60% at 70% 40%, rgba(243,112,30,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 10% 80%, rgba(184,58,45,0.06) 0%, transparent 55%),
    #080402;
}

.hg-bg-noise {
  position: absolute;
  inset: 0;
  z-index: 1;
  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");
  opacity: 0.03;
  pointer-events: none;
}

.hg-aurora {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hg-aurora::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 60vw; height: 60vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243,112,30,0.06) 0%, transparent 65%);
  animation: hg-drift 20s ease-in-out infinite alternate;
}
@keyframes hg-drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(3%, 4%) scale(1.04); }
}

/* ── Layout skeleton ──────────────────────────────────────── */
.hg-nav-spacer {
  height: 68px;   /* matches nav height */
  flex-shrink: 0;
}

/* Main two-column (takes all remaining height minus stats bar) */
.hg-container {
  position: relative;
  z-index: 5;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: 0 48px;
  align-items: start;
  min-height: 0;          /* allow flex child to shrink */
  overflow: hidden;
}

/* ══ LEFT ════════════════════════════════════════════════════ */
.hg-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 32px;
  min-width: 0;
}

/* Badges */
.hg-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.hg-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 6px 13px;
  border-radius: 50px;
}
.hg-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: hg-pulse 2s infinite;
}
.hg-badge.primary {
  background: rgba(243,112,30,0.1);
  color: #f3701e;
  border: 1px solid rgba(243,112,30,0.3);
}
.hg-badge.secondary {
  background: rgba(232,216,201,0.05);
  color: #a89f98;
  border: 1px solid rgba(232,216,201,0.1);
}
@keyframes hg-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.3); }
}

/* ── Title: editorial but CONTROLLED ────────────────────── */
.hg-title {
  font-family: 'Playfair Display', serif;
  /* Tight clamp: looks big but stays on 2-3 lines max */
  font-size: clamp(2.4rem, 3.6vw, 4.6rem);
  line-height: 1.05;
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.025em;
  color: #f0e8de;
}

.hg-title .hg-accent {
  background: linear-gradient(135deg, #f3701e 0%, #d04828 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline;            /* keep on same line flow */
}

/* Animated underline */
.hg-title .hg-accent::after {
  content: '';
  position: absolute;
  left: 0; bottom: 2px;
  width: 100%; height: 3px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f3701e, #b83a2d);
  transform: scaleX(0);
  transform-origin: left;
  animation: hg-ul 1s 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes hg-ul { to { transform: scaleX(1); } }

/* Tagline row */
.hg-tagline {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #554a44;
  text-transform: uppercase;
  line-height: 1;
}
.hg-tagline-brand { color: #f3701e; }

/* Subtitle */
.hg-subtitle {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #7a706a;
  max-width: 440px;
  margin: 0;
}
.hg-subtitle strong {
  color: #c8b9a9;
  font-style: italic;
  font-weight: 500;
}

/* CTA */
.hg-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.25s ease;
  white-space: nowrap;
}
.hg-btn-primary {
  background: #f3701e;
  color: #fff;
  box-shadow: 0 6px 24px rgba(243,112,30,0.35);
}
.hg-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(243,112,30,0.5);
}
.hg-btn-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.hg-btn-secondary {
  background: transparent;
  color: #9a8e86;
  padding-left: 6px;
  padding-right: 6px;
}
.hg-btn-secondary:hover {
  color: #f0e8de;
  transform: translateX(3px);
}

/* Dimension tags */
.hg-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.hg-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(232,216,201,0.05);
  border: 1px solid rgba(232,216,201,0.09);
  color: #7a706a;
}
.hg-tag span { font-size: 12px; }

/* ══ RIGHT — Globe ════════════════════════════════════════ */
.hg-right {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;   /* anchor to center to align with ring */
  overflow: visible;
}

/* Globe canvas — let JS control its size, we center it */
#globe-canvas-landing {
  position: relative;
  z-index: 2;
  display: block;
  /* The JS sets width/height to 440px. We clamp it to fit. */
  max-width: min(46vw, 460px);
  max-height: min(46vw, 460px);
  width: 440px;
  height: 440px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Glow ring — centered around canvas */
.hg-globe-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(48vw, 480px);
  height: min(48vw, 480px);
  border-radius: 50%;
  border: 1px solid rgba(243,112,30,0.07);
  box-shadow:
    0 0 0 18px rgba(243,112,30,0.025),
    0 0 0 55px rgba(243,112,30,0.012),
    inset 0 0 80px rgba(0,0,0,0.4);
  z-index: 1;
  pointer-events: none;
}

/* Floating climate chips */
.hg-globe-chips {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.hg-chip {
  position: absolute;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10,7,5,0.82);
  border: 1px solid rgba(232,216,201,0.1);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 80px;
}
.hg-chip-val {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #f3701e;
  line-height: 1;
}
.hg-chip-label {
  font-family: 'Space Mono', monospace;
  font-size: 7.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #554a44;
}
.hg-chip.positive .hg-chip-val { color: #4bd28f; }
.hg-chip.negative .hg-chip-val { color: #e05050; }

/* Chip positions (relative to .hg-right) */
.hg-chip:nth-child(1) { top: 18%; left:  2%; }
.hg-chip:nth-child(2) { top: 18%; right: 2%; }
.hg-chip:nth-child(3) { bottom: 22%; left:  2%; }
.hg-chip:nth-child(4) { bottom: 22%; right: 2%; }

/* ══ BOTTOM Stats bar ══════════════════════════════════════ */
.hg-stats-bar {
  position: relative;
  z-index: 5;
  border-top: 1px solid rgba(232,216,201,0.07);
  display: flex;
  align-items: center;
  padding: 14px 48px;
  gap: 0;
  flex-shrink: 0;
  background: rgba(8,4,2,0.6);
  backdrop-filter: blur(10px);
}

.hg-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 32px;
  margin-right: 32px;
  border-right: 1px solid rgba(232,216,201,0.07);
}
.hg-stat-item:last-of-type { border-right: none; }

.hg-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #f0e8de;
  line-height: 1;
}
.hg-stat-desc {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #554a44;
}

/* Live ticker */
.hg-live-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.hg-ticker-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #f3701e;
  box-shadow: 0 0 8px #f3701e;
  animation: hg-pulse 2s infinite;
}
.hg-ticker-txt {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #554a44;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hg-container { padding: 0 24px; }
  .hg-left { padding-right: 20px; gap: 14px; }
  .hg-title { font-size: clamp(2.2rem, 3.2vw, 3.8rem); }
  #globe-canvas-landing {
    max-width: min(44vw, 400px);
    max-height: min(44vw, 400px);
    width: 400px; height: 400px;
  }
}

@media (max-width: 820px) {
  #section-hero-global { height: auto; }

  .hg-container {
    grid-template-columns: 1fr;
    padding: 24px 20px 16px;
    overflow: visible;
  }

  .hg-left { padding-right: 0; }

  .hg-right {
    height: 70vw;
    max-height: 340px;
    justify-content: center;
  }

  #globe-canvas-landing {
    max-width: min(70vw, 340px);
    max-height: min(70vw, 340px);
    width: 340px; height: 340px;
  }

  .hg-stats-bar { padding: 14px 20px; flex-wrap: wrap; gap: 10px; }
  .hg-stat-item { border-right: none; padding-right: 16px; margin-right: 0; }
}

@media (max-width: 540px) {
  .hg-title { font-size: clamp(2rem, 8vw, 3rem); }
  .hg-chip:nth-child(3), .hg-chip:nth-child(4) { display: none; }
}

/* Light mode: keep hero dark */
[data-theme="light"] #section-hero-global { background: #080402; color: #f0e8de; }
