/* green.css — green-tech accents, modern transitions, infographics */

/* ---------- Green palette (works in both themes) ---------- */
:root,
[data-theme='light'] {
  --color-green:        #2f9e44;
  --color-green-2:      #51cf66;
  --color-green-deep:   #1f7a32;
  --color-green-soft:   #e6f4ea;
  --color-green-glow:   rgba(47, 158, 68, 0.18);
  --color-leaf:         #4ec56b;
  --color-earth:        #1c5e2e;
}
[data-theme='dark'] {
  --color-green:        #5dd06a;
  --color-green-2:      #7fe18a;
  --color-green-deep:   #2f9e44;
  --color-green-soft:   #143524;
  --color-green-glow:   rgba(93, 208, 106, 0.25);
  --color-leaf:         #7fe18a;
  --color-earth:        #2f7a44;
}

/* ====================================================
   MODERN TRANSITIONS — entrance variants + stagger
   ==================================================== */

.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale,
.reveal-fade,
.reveal-blur {
  opacity: 0;
  will-change: opacity, transform, filter;
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-up    { transform: translateY(28px); }
.reveal-left  { transform: translateX(-28px); }
.reveal-right { transform: translateX(28px); }
.reveal-scale { transform: scale(0.94); }
.reveal-blur  { filter: blur(8px); }

.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-scale.is-visible,
.reveal-fade.is-visible {
  opacity: 1;
  transform: none;
}
.reveal-blur.is-visible {
  opacity: 1;
  filter: blur(0);
}

/* Stagger: child elements with .stagger-child get sequential delays
   when the parent has .is-visible */
.stagger-child {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.is-visible > .stagger-child,
.is-visible .stagger-child {
  opacity: 1;
  transform: none;
}
.is-visible .stagger-child:nth-child(1) { transition-delay: 60ms; }
.is-visible .stagger-child:nth-child(2) { transition-delay: 140ms; }
.is-visible .stagger-child:nth-child(3) { transition-delay: 220ms; }
.is-visible .stagger-child:nth-child(4) { transition-delay: 300ms; }
.is-visible .stagger-child:nth-child(5) { transition-delay: 380ms; }
.is-visible .stagger-child:nth-child(6) { transition-delay: 460ms; }
.is-visible .stagger-child:nth-child(7) { transition-delay: 540ms; }
.is-visible .stagger-child:nth-child(8) { transition-delay: 620ms; }

/* Smooth card hover lift (apply where wanted) */
.lift {
  transition:
    transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 380ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 380ms cubic-bezier(0.22, 1, 0.36, 1);
}
.lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Subtle continuous gradient drift on hero & green band */
@keyframes ccrammts-drift {
  0%   { background-position: 0% 50%, 100% 50%, 0 0; }
  50%  { background-position: 100% 30%, 0% 70%, 0 0; }
  100% { background-position: 0% 50%, 100% 50%, 0 0; }
}

/* Float animation for hero leaf/sustainability accents */
@keyframes ccrammts-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* Soft pulse used by counter dots & impact markers */
@keyframes ccrammts-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.5); opacity: 0.5; }
}

/* Gradient sweep used on section eyebrows */
@keyframes ccrammts-sweep {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* Disable on reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .reveal-up, .reveal-left, .reveal-right, .reveal-scale, .reveal-fade, .reveal-blur,
  .stagger-child {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .lift:hover { transform: none; }
}

/* ====================================================
   GREEN BAND — homepage sustainability section
   ==================================================== */

.green-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 380px at 12% 10%, color-mix(in oklab, var(--color-green) 22%, transparent), transparent 60%),
    radial-gradient(720px 460px at 90% 90%, color-mix(in oklab, var(--color-accent) 18%, transparent), transparent 60%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-2) 100%);
  background-size: 200% 200%, 200% 200%, 100% 100%;
  animation: ccrammts-drift 22s ease-in-out infinite;
}

.green-band__leaf {
  position: absolute;
  inset: auto;
  width: 220px;
  height: 220px;
  opacity: 0.16;
  pointer-events: none;
  filter: drop-shadow(0 8px 24px var(--color-green-glow));
  animation: ccrammts-float 9s ease-in-out infinite;
}
.green-band__leaf--a { top: -40px; right: -40px; animation-delay: 0s; }
.green-band__leaf--b { bottom: -60px; left: -60px; animation-delay: -3s; transform: rotate(180deg); }

.green-band__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-green-deep);
  background: var(--color-green-soft);
  border: 1px solid color-mix(in oklab, var(--color-green) 30%, transparent);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
}
.green-band__eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-green) 25%, transparent);
}
[data-theme='dark'] .green-band__eyebrow { color: var(--color-green-2); }

/* ====================================================
   COUNTER STAT BLOCK
   ==================================================== */

.impact-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.impact-stat {
  position: relative;
  padding: var(--space-6) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 380ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 380ms cubic-bezier(0.22, 1, 0.36, 1);
}
.impact-stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in oklab, var(--color-green) 40%, var(--color-border));
}
.impact-stat::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--color-green) 0%, var(--color-accent) 100%);
  opacity: 0.9;
}
.impact-stat__icon {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-green-soft);
  color: var(--color-green-deep);
  margin-bottom: var(--space-4);
}
[data-theme='dark'] .impact-stat__icon { color: var(--color-green-2); }
.impact-stat__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.15em;
}
.impact-stat__value .unit {
  font-size: 0.55em;
  font-weight: 700;
  color: var(--color-green-deep);
}
[data-theme='dark'] .impact-stat__value .unit { color: var(--color-green-2); }
.impact-stat__label {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ====================================================
   PROCESS-FLOW INFOGRAPHIC (recycling lifecycle)
   ==================================================== */

.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-10);
}
@media (max-width: 900px) {
  .flow { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .flow { grid-template-columns: 1fr; }
}

.flow__step {
  position: relative;
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 380ms cubic-bezier(0.22, 1, 0.36, 1);
}
.flow__step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.flow__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -22px;
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-green) 0%, transparent 100%);
  transform: translateY(-50%);
  pointer-events: none;
}
@media (max-width: 900px) {
  .flow__step::after { display: none; }
}
.flow__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-green);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  box-shadow: 0 0 0 4px var(--color-green-soft);
}
.flow__step h4 {
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.flow__step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* ====================================================
   E-WASTE FACT-CARDS (homepage + recycling page)
   ==================================================== */

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-8);
}
.fact-card {
  position: relative;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--color-green) 6%, var(--color-surface)) 0%, var(--color-surface) 100%);
  border: 1px solid color-mix(in oklab, var(--color-green) 18%, var(--color-border));
  overflow: hidden;
  transition: transform 380ms ease, box-shadow 380ms ease;
}
.fact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.fact-card__big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 1.5rem + 2vw, 3.2rem);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--color-green) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.fact-card__label {
  margin-top: var(--space-3);
  font-weight: 600;
  color: var(--color-text);
}
.fact-card__desc {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.fact-card__source {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.fact-card::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  right: -50px;
  bottom: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-green-glow) 0%, transparent 70%);
  pointer-events: none;
}

/* ====================================================
   MATERIALS-RECOVERED DONUT/BAR INFOGRAPHIC
   ==================================================== */

.recovery-figure {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) 1fr;
  gap: var(--space-10);
  align-items: center;
  margin-top: var(--space-10);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
@media (max-width: 760px) {
  .recovery-figure { grid-template-columns: 1fr; }
}

.recovery-figure h3 {
  margin-bottom: var(--space-4);
}
.recovery-figure p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.donut {
  width: 100%;
  max-width: 320px;
  margin-inline: auto;
  aspect-ratio: 1 / 1;
}
.donut circle {
  fill: none;
  stroke-width: 18;
  transition: stroke-dashoffset 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.donut .track { stroke: var(--color-surface-offset); }

/* Bar list */
.bars { display: grid; gap: var(--space-3); }
.bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  align-items: center;
}
.bar__label {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}
.bar__label .swatch {
  width: 10px; height: 10px;
  border-radius: 2px;
}
.bar__value { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-text-muted); }
.bar__track {
  grid-column: 1 / -1;
  height: 8px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.bar__fill {
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.is-visible .bar__fill { width: var(--w, 0%); }

/* ====================================================
   E-WASTE COMPOSITION (vertical bar chart)
   ==================================================== */

.ewaste-chart {
  margin-top: var(--space-10);
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.ewaste-chart__bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3);
  height: 240px;
  align-items: end;
  margin-top: var(--space-6);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-divider);
}
@media (max-width: 640px) {
  .ewaste-chart__bars { grid-template-columns: repeat(3, 1fr); height: 200px; }
}
.vbar {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  height: 100%;
  justify-content: end;
}
.vbar__col {
  width: 100%;
  max-width: 56px;
  height: 0;
  background: linear-gradient(180deg, var(--color-green) 0%, var(--color-green-deep) 100%);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 1.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: inset 0 -8px 16px rgba(0,0,0,0.08);
}
.is-visible .vbar__col { height: var(--h, 0%); }
.vbar__val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.vbar__lbl {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.3;
  min-height: 2.6em;
}
.ewaste-chart__caption {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ====================================================
   ENVIRONMENTAL IMPACT BAND (CO2, landfill, water)
   ==================================================== */

.eco-impact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}
.eco-card {
  position: relative;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, var(--color-green-soft) 0%, color-mix(in oklab, var(--color-surface) 80%, var(--color-accent) 6%) 100%);
  border: 1px solid color-mix(in oklab, var(--color-green) 24%, var(--color-border));
  transition: transform 380ms ease, box-shadow 380ms ease;
}
.eco-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.eco-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-surface);
  color: var(--color-green-deep);
  margin-bottom: var(--space-4);
}
[data-theme='dark'] .eco-card__icon { color: var(--color-green-2); }
.eco-card__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  color: var(--color-text);
  line-height: 1;
}
.eco-card__num .unit { font-size: 0.5em; font-weight: 700; color: var(--color-green-deep); margin-left: 4px; }
[data-theme='dark'] .eco-card__num .unit { color: var(--color-green-2); }
.eco-card__label {
  margin-top: var(--space-3);
  font-weight: 600;
  color: var(--color-text);
}
.eco-card__desc {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ====================================================
   GREEN BADGE — small pill, reusable
   ==================================================== */

.badge-green {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-green-deep);
  background: var(--color-green-soft);
  border-radius: var(--radius-full);
  border: 1px solid color-mix(in oklab, var(--color-green) 28%, transparent);
}
[data-theme='dark'] .badge-green { color: var(--color-green-2); }
.badge-green::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-green);
  animation: ccrammts-pulse 2.6s ease-in-out infinite;
}

/* ====================================================
   HERO accent tweaks — add a faint green glow
   ==================================================== */

.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 -20% 50%;
  width: 60%;
  height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--color-green-glow), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.6;
}

/* ====================================================
   WHEEL OF SERVICES
   ==================================================== */

/* Two-column hero layout */
.hero__inner.hero__inner--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--space-10);
  align-items: start;
}

@media (max-width: 980px) {
  .hero__inner.hero__inner--split {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .hero__right {
    order: 2;
    max-width: 560px;
    margin-inline: auto;
    width: 100%;
  }
}

.hero__left { min-width: 0; }
.hero__right { min-width: 0; }

/* Wheel container */
.wheel-of-services {
  position: relative;
  width: 100%;
  max-width: 680px;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  margin-top: calc(var(--space-2) * -1);
  filter: drop-shadow(0 24px 40px color-mix(in oklab, var(--color-primary) 18%, transparent));
}

.wheel {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Wedge base */
.wedge {
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.wedge__shape {
  fill: var(--color-surface);
  stroke: var(--color-bg);
  stroke-width: 3;
  transition: fill 280ms cubic-bezier(0.4, 0, 0.2, 1),
              filter 280ms ease;
}

/* Alternating wedge background tints (subtle) */
.wedge:nth-child(odd) .wedge__shape  { fill: color-mix(in oklab, var(--color-surface) 92%, var(--color-primary)); }
.wedge:nth-child(even) .wedge__shape { fill: color-mix(in oklab, var(--color-surface) 96%, var(--color-text)); }

/* Per-wedge accent palette — used on hover */
.wedge[data-service="data-destruction"] { --wedge-accent: #d63b3b; }
.wedge[data-service="itad"]             { --wedge-accent: #2670a8; }
.wedge[data-service="recycling"]        { --wedge-accent: #2f9e44; }
.wedge[data-service="consulting"]       { --wedge-accent: #9b59d6; }
.wedge[data-service="wifi"]             { --wedge-accent: #2dd4bf; }
.wedge[data-service="crypto"]           { --wedge-accent: #f59e0b; }
.wedge[data-service="cybersecurity"]    { --wedge-accent: #ec4899; }
.wedge[data-service="mdm"]              { --wedge-accent: #06b6d4; }
.wedge[data-service="cloud"]            { --wedge-accent: #6366f1; }
.wedge[data-service="web"]              { --wedge-accent: #0d8a8a; }

/* Hover / focus state */
.wedge:hover .wedge__shape,
.wedge:focus-visible .wedge__shape,
.wedge.is-active .wedge__shape {
  fill: var(--wedge-accent);
  filter: drop-shadow(0 6px 14px color-mix(in oklab, var(--wedge-accent) 50%, transparent));
}

/* Icon styling — neutral by default, white on hover */
.wedge__icon {
  color: var(--color-text-muted);
  transition: color 280ms ease;
  pointer-events: none;
}

.wedge:hover .wedge__icon,
.wedge:focus-visible .wedge__icon,
.wedge.is-active .wedge__icon {
  color: #fff;
}

/* Hub circle */
.wheel__hub {
  pointer-events: none;
  transition: stroke 240ms ease;
}

.wheel-of-services:has(.wedge:hover) .wheel__hub,
.wheel-of-services:has(.wedge.is-active) .wheel__hub {
  stroke: var(--color-primary);
}

/* Hub text overlay (HTML) */
.wheel__hub-text {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  margin: -70px 0 0 -70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-3);
  pointer-events: none;
}

.wheel__hub-default,
.wheel__hub-blurb {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
}

.wheel__hub-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.wheel__hub-hint {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.wheel__hub-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.2;
}

.wheel__hub-text-body {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.wheel__hub-cta {
  font-size: 0.6rem;
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* Default-vs-blurb visibility */
.wheel-of-services .wheel__hub-default { display: flex; }
.wheel-of-services .wheel__hub-blurb { display: none; }
.wheel-of-services.has-active .wheel__hub-default { display: none; }
.wheel-of-services.has-active .wheel__hub-blurb   { display: flex; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wedge__shape,
  .wedge__icon {
    transition: fill 120ms ease, color 120ms ease;
    transform: none !important;
  }
}
