/* Green Reach Energy — Homepage Stylesheet
   Loaded only on front-page.php via conditional enqueue.
   Depends on global.css for variables and base styles.
   ═══════════════════════════════════════════════ */

/* ── BACKGROUND MESH ─────────────────────────────── */
.bg-mesh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(0,200,100,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(0,180,140,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(29,255,160,0.04) 0%, transparent 50%);
}
.bg-dots {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(29,255,160,0.12) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 80%);
}
.bg-noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4'/%3E%3C/filter%3E%3Crect width='512' height='512' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ── HERO ────────────────────────────────────────── */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 156px 80px 80px;
  overflow: hidden;
}

/* Orb rings */
.orb-wrap {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: 680px; height: 680px; pointer-events: none;
}
.orb {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(29,255,160,0.15);
}
.orb-1 { inset: 0; animation: spin 30s linear infinite; }
.orb-2 { inset: 60px; border-color: rgba(0,201,167,0.12); animation: spin 40s linear infinite reverse; }
.orb-3 { inset: 130px; border-color: rgba(29,255,160,0.08); animation: spin 55s linear infinite; }
.orb-4 { inset: 200px; background: radial-gradient(circle, rgba(29,255,160,0.06) 0%, transparent 70%); }
.orb-5 { inset: 250px; background: radial-gradient(circle, rgba(0,201,167,0.12) 0%, transparent 60%); border: none; }
.orb-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 20px var(--accent), 0 0 40px rgba(29,255,160,0.4); top: 8%; left: 50%; transform: translateX(-50%); }
@keyframes spin { to { transform: rotate(360deg); } }

/* turbine icon (CSS) */
.turbine-icon {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 200px; height: 200px;
}
.turbine-center {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); z-index: 2;
  box-shadow: 0 0 16px var(--accent), 0 0 32px rgba(29,255,160,0.5);
}
.turbine-blades {
  position: absolute; inset: 0;
  animation: turbine-spin 8s linear infinite;
}
@keyframes turbine-spin { to { transform: rotate(360deg); } }
.blade {
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 68px; background: linear-gradient(to top, transparent, var(--accent2), var(--accent));
  border-radius: 3px; transform-origin: bottom center;
  transform: translateX(-50%) translateY(-100%);
  filter: drop-shadow(0 0 6px var(--accent));
}
.blade:nth-child(2) { transform: translateX(-50%) translateY(-100%) rotate(120deg); }
.blade:nth-child(3) { transform: translateX(-50%) translateY(-100%) rotate(240deg); }

.hero-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--border-hi); border-radius: 100px;
  padding: 6px 16px; margin-bottom: 32px;
  width: fit-content;
  background: rgba(29,255,160,0.05);
}
.hero-label-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero h1 {
  font-family: var(--serif); font-size: clamp(3.2rem, 5.5vw, 6rem);
  font-weight: 800; line-height: 1.0; letter-spacing: -0.03em;
  max-width: 760px;
  margin-bottom: 28px;
}
.hero h1 em {
  font-style: italic; font-weight: 400;
  color: transparent;
  -webkit-text-stroke: 1px rgba(29,255,160,0.6);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.1rem; font-weight: 300; color: var(--muted);
  max-width: 480px; margin-bottom: 44px; line-height: 1.7;
}

.hero-ctas {
  display: flex; gap: 16px; align-items: center; margin-bottom: 72px;
}
.btn-primary {
  background: var(--accent); color: #020F08;
  padding: 14px 32px; border-radius: 8px; border: none;
  font-family: var(--body); font-size: 0.92rem; font-weight: 600;
  letter-spacing: 0.02em; cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 0 30px rgba(29,255,160,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(29,255,160,0.4), 0 8px 24px rgba(0,0,0,0.4);
}
.btn-ghost {
  background: transparent; color: var(--white);
  padding: 14px 32px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  font-family: var(--body); font-size: 0.92rem; font-weight: 400;
  cursor: pointer; transition: all 0.25s;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.04); }
.arrow-icon { font-size: 1.1rem; transition: transform 0.2s; }
.btn-ghost:hover .arrow-icon { transform: translateX(4px); }

/* Hero stats */
.hero-stats {
  display: flex; gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  width: fit-content;
  background: rgba(7,17,14,0.6);
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.stat {
  padding: 20px 36px;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: var(--serif); font-size: 1.9rem; font-weight: 700;
  color: var(--white); line-height: 1; margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.stat-num span { color: var(--accent); }
.stat-label { font-size: 0.78rem; color: var(--muted); font-weight: 400; letter-spacing: 0.04em; }

/* ── TICKER ──────────────────────────────────────── */
.ticker-wrap {
  position: relative; z-index: 1;
  padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: rgba(7,17,14,0.5);
  overflow: hidden;
}
.ticker-track {
  display: flex; gap: 56px; white-space: nowrap;
  animation: ticker 28s linear infinite;
  width: max-content;
}
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker-item {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.82rem; font-weight: 400; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.ticker-item svg { flex-shrink: 0; opacity: 0.5; }

/* ── SECTION COMMONS ──────────────────────────────── */
section { position: relative; z-index: 1; }

.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 48px; }

.section-label {
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); font-weight: 500;
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.section-label::before {
  content: ''; display: block; width: 24px; height: 1px; background: var(--accent);
}

.section-heading {
  font-family: var(--serif); font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.02em;
  max-width: 560px;
}

/* ── FEATURES ────────────────────────────────────── */
.features { padding: 120px 0; }

.features-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 64px;
}
.features-sub {
  max-width: 320px; color: var(--muted); font-size: 0.95rem; line-height: 1.7;
  font-weight: 300;
}

.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; background: var(--border);
}
.feature-card {
  background: var(--bg2); padding: 40px 36px;
  position: relative; overflow: hidden;
  transition: background 0.3s;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent2), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.feature-card:hover { background: var(--bg3); }
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--glow); border: 1px solid var(--border-hi);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px; font-size: 1.4rem;
}
.feature-num {
  position: absolute; top: 28px; right: 28px;
  font-family: var(--serif); font-size: 3.5rem; font-weight: 800;
  color: rgba(29,255,160,0.05); line-height: 1;
  user-select: none;
}
.feature-card h3 {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 700;
  margin-bottom: 12px; letter-spacing: -0.01em;
}
.feature-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.7; margin-bottom: 0; }

/* ── IMPACT ──────────────────────────────────────── */
.impact { padding: 100px 0; }

.impact-inner {
  border: 1px solid var(--border); border-radius: 20px;
  background: var(--bg2);
  overflow: hidden; position: relative;
}
.impact-glow {
  position: absolute; top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 200px;
  background: radial-gradient(ellipse, rgba(29,255,160,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.impact-header {
  padding: 56px 64px 48px;
  border-bottom: 1px solid var(--border);
}
.impact-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.impact-stat {
  padding: 48px 40px;
  border-right: 1px solid var(--border);
  position: relative;
}
.impact-stat:last-child { border-right: none; }
.impact-stat-num {
  font-family: var(--serif); font-size: 3.2rem; font-weight: 800;
  line-height: 1; margin-bottom: 8px; letter-spacing: -0.03em;
}
.impact-stat-num .accent { color: var(--accent); }
.impact-stat-label { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.impact-stat-sub { font-size: 0.75rem; color: var(--muted2); margin-top: 4px; }

/* ── PRODUCTS ────────────────────────────────────── */
.products { padding: 120px 0; }

.products-header { margin-bottom: 56px; }

.products-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.product-card-img {
  width: 100%; height: 150px; object-fit: cover; object-position: center;
  display: block; border-radius: 12px 12px 0 0;
  margin: -32px -28px 24px; width: calc(100% + 56px);
  filter: brightness(0.8) saturate(0.85);
  transition: filter 0.3s;
}
.product-card:hover .product-card-img { filter: brightness(1) saturate(1); }
.product-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 32px 28px;
  transition: all 0.3s; cursor: pointer;
  position: relative; overflow: hidden;
  text-decoration: none; color: inherit; display: block;
}
.product-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(29,255,160,0.07) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.product-card:hover { border-color: var(--border-hi); transform: translateY(-4px); }
.product-card:hover::after { opacity: 1; }

.product-emoji { font-size: 2rem; margin-bottom: 20px; display: block; }
.product-card h3 {
  font-family: var(--serif); font-size: 1.05rem; font-weight: 700;
  margin-bottom: 8px; letter-spacing: -0.01em;
}
.product-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.product-saving {
  font-size: 0.78rem; color: var(--accent); font-weight: 500;
  letter-spacing: 0.04em;
}
.product-arrow {
  position: absolute; top: 28px; right: 28px;
  color: var(--muted2); font-size: 1.1rem;
  transition: all 0.25s;
}
.product-card:hover .product-arrow { color: var(--accent); transform: translate(2px, -2px); }

/* ── HOW IT WORKS ────────────────────────────────── */
.how { padding: 120px 0; }

.how-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 100px;
  align-items: center;
}
.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; gap: 24px;
  padding: 32px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s;
}
.step:first-child { padding-top: 0; }
.step:last-child { border-bottom: none; }
.step-num {
  font-family: var(--serif); font-size: 0.78rem; font-weight: 700;
  color: var(--muted2); width: 28px; flex-shrink: 0;
  padding-top: 3px; letter-spacing: 0.06em;
}
.step-content h4 {
  font-family: var(--serif); font-size: 1.05rem; font-weight: 700;
  margin-bottom: 8px; letter-spacing: -0.01em;
}
.step-content p { font-size: 0.88rem; color: var(--muted); line-height: 1.7; margin-bottom: 0; }
.step:hover .step-num { color: var(--accent); }
.step:hover .step-content h4 { color: var(--accent); }

.how-visual {
  border: 1px solid var(--border); border-radius: 20px;
  background: var(--bg2); padding: 48px;
  position: relative; overflow: hidden;
}
.how-visual-glow {
  position: absolute; bottom: -40px; right: -40px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,201,167,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.how-chart {
  display: flex; align-items: flex-end; gap: 8px; height: 140px;
  margin-bottom: 24px;
}
.chart-bar {
  flex: 1; border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--accent2), var(--accent));
  opacity: 0.15; transition: all 0.4s ease;
  position: relative;
}
.chart-bar.active { opacity: 1; }
.chart-bar:hover { opacity: 0.85; cursor: pointer; }
.how-chart-label {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: var(--muted); margin-bottom: 32px;
}
.how-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glow); border: 1px solid var(--border-hi);
  border-radius: 8px; padding: 12px 16px;
}
.how-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.how-badge-text { font-size: 0.85rem; font-weight: 500; }
.how-badge-text span { color: var(--accent); }

/* ── CTA BAND ─────────────────────────────────────── */
.cta-band {
  padding: 0 48px 120px;
  position: relative; z-index: 1;
}
.cta-inner {
  max-width: 1200px; margin: 0 auto;
  background: linear-gradient(135deg, var(--bg3) 0%, rgba(0,100,70,0.15) 100%);
  border: 1px solid var(--border-hi); border-radius: 20px;
  padding: 80px 80px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px; position: relative; overflow: hidden;
}
.cta-glow {
  position: absolute; top: -60px; right: -60px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(29,255,160,0.1) 0%, transparent 60%);
  pointer-events: none;
}
.cta-text h2 {
  font-family: var(--serif); font-size: 2.4rem; font-weight: 800;
  letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 12px;
}
.cta-text p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }
.cta-actions { display: flex; gap: 14px; flex-shrink: 0; }

/* ── HOMEPAGE FOOTER OVERRIDES ────────────────────── */
.home-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 48px 80px;
  display: flex; align-items: center; justify-content: space-between;
}
.home-footer .nav-logo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent), 0 0 24px rgba(29,255,160,0.5);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}
.footer-links { display: flex; gap: 32px; }
.footer-links a {
  font-size: 0.82rem; color: var(--muted); text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 0.78rem; color: var(--muted2); }

/* ── REVEAL ANIMATIONS ───────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.22,.68,0,1.1), transform 0.7s cubic-bezier(.22,.68,0,1.1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* delay helpers */
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }
.d5 { transition-delay: 0.5s; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .impact-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .impact-stat:nth-child(2) { border-right: none; }
  .impact-stat:nth-child(3) { border-top: 1px solid var(--border); }
}
@media (max-width: 900px) {
  .hero { padding: 100px 32px 60px; min-height: auto; }
  .orb-wrap { display: none; }
  .features-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .features-grid { grid-template-columns: 1fr; }
  .how-layout { grid-template-columns: 1fr; gap: 48px; }
  .cta-inner { flex-direction: column; align-items: flex-start; padding: 48px; }
  .cta-band { padding: 0 24px 80px; }
  .home-footer { flex-direction: column; gap: 24px; text-align: center; padding: 40px 24px; }
  .section-inner { padding: 0 24px; }
  .impact-header { padding: 40px 32px 36px; }
  .impact-stat { padding: 32px 24px; }
}
@media (max-width: 600px) {
  .hero { padding: 72px 24px 48px; }
  .hero h1 { font-size: 2.6rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; margin-bottom: 48px; }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-ghost { width: 100%; text-align: center; justify-content: center; }
  .hero-stats { flex-direction: column; width: 100%; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
  .products-grid { grid-template-columns: 1fr; }
  .impact-stats-grid { grid-template-columns: 1fr; }
  .impact-stat { border-right: none; border-bottom: 1px solid var(--border); }
}
