/* ============================================================
   Mizuha — additions on top of site.css
   Language toggle, parallax, scroll-to-top, animations,
   logo mark, charts, world heat map, contact form, health page.
   ============================================================ */

/* GLOBAL ANIMATION KILL — disables all animations/transitions site-wide
   to prevent interference with Open Design comment/draw mode */
*, *::before, *::after {
  animation: none !important;
  transition: none !important;
}

/* ---- Brand logo mark ---- */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  border-bottom: none;
}
.brand-mark:hover { opacity: 1; }
.brand-mark svg { width: 28px; height: 28px; display: block; }
.brand-mark .word {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.025em;
  line-height: 1;
}
.brand-mark .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-left: 6px;
  border-left: 1px solid var(--hairline);
  padding-left: 8px;
  display: none;
  align-items: center;
  gap: 6px;
}
@media (min-width: 700px) { .brand-mark .tag { display: inline-flex; } }
.brand-mark .tag .flag-mini {
  width: 16px;
  height: 10px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--hairline) inset;
}

/* ---- Language toggle (nav) ---- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.lang-toggle button {
  background: transparent;
  border: 0;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
}
.mobile-lang { margin-top: 18px; }

/* ---- Made-in-Malaysia badge ---- */
.my-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
}
.my-badge .flag {
  width: 22px; height: 14px; display: block;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--hairline) inset;
}
.my-badge strong { color: var(--fg); font-weight: 500; }

/* ---- Hero parallax stage ---- */
.hero-stage {
  position: relative;
  overflow: hidden;
  padding-block: clamp(72px, 11vw, 160px);
  isolation: isolate;
}
.hero-stage .container { position: relative; z-index: 2; }
.parallax-layer {
  position: absolute;
  inset: -10% -5% -10% -5%;
  z-index: 0;
  pointer-events: none;
  /* will-change: transform; REMOVED — causes compositor issues with Open Design overlay */
}
.parallax-blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.55;
}
.parallax-blob.a {
  top: -10%; left: -8%;
  width: 46vw; height: 46vw;
  background: radial-gradient(circle at 30% 30%, oklch(86% 0.05 200) 0%, transparent 65%);
}
.parallax-blob.b {
  bottom: -20%; right: -10%;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle at 50% 50%, oklch(88% 0.06 170) 0%, transparent 65%);
  opacity: 0.45;
}
.parallax-blob.c {
  top: 30%; right: 20%;
  width: 28vw; height: 28vw;
  background: radial-gradient(circle at 50% 50%, oklch(92% 0.03 80) 0%, transparent 65%);
  opacity: 0.4;
}
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image:
    radial-gradient(currentColor 1px, transparent 1px),
    radial-gradient(currentColor 1px, transparent 1px);
  background-size: 4px 4px, 6px 6px;
  background-position: 0 0, 2px 3px;
}

/* The hero word reveal animation */
.hero-line {
  display: block;
  overflow: hidden;
}
.hero-line span {
  display: block;
  transform: none;
}
/* animation delays removed */
.fade-up {
  opacity: 1;
  transform: none;
}
.fade-up.d2 { /* delay removed */ }

/* float gentle — disabled to prevent looping */
.float-gentle {
  /* animation removed to stop looping */
}

/* ---- Page-head parallax + entrance (auto-applied to every sub-page hero) ---- */
.page-head {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.page-head::before,
.page-head::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: -1;
  filter: blur(60px);
  opacity: 0.55;
  border-radius: 999px;
  /* will-change: transform; REMOVED — causes compositor issues with Open Design overlay */
}
.page-head::before {
  top: -10%;
  left: -8%;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle at 30% 30%, oklch(88% 0.05 200) 0%, transparent 65%);
  /* animation removed to stop looping */
}
.page-head::after {
  bottom: -20%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle at 50% 50%, oklch(90% 0.06 170) 0%, transparent 65%);
  opacity: 0.45;
  /* animation removed to stop looping */
}
/* keyframes removed */

/* Page-head: entrance animations removed */
.page-head .kicker,
.page-head h1,
.page-head .lead {
  opacity: 1;
  transform: none;
}

/* Auto-stagger grids — animations removed, show immediately */
.reveal.is-in .grid-3 > *,
.reveal.is-in .grid-2 > *,
.reveal.is-in .pillars > *,
.reveal.is-in .metric-tiles > *,
.reveal.is-in .editorial > *,
.reveal.is-in .chart-grid > * {
  opacity: 1;
  transform: none;
}

/* reduced motion block removed — animations already disabled globally */

/* animations-done block removed — now handled by global kill */

/* Stagger reveal — show immediately, no transition */
.reveal-stagger > * {
  opacity: 1;
  transform: none;
}
.reveal-stagger.is-in > * { opacity: 1; transform: none; }

/* ---- Scroll-to-top button ---- */
.scroll-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 70;
  box-shadow: 0 8px 24px -10px rgba(0,0,0,0.35);
  cursor: pointer;
}
.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.scroll-top:hover { background: oklch(35% 0.005 80); }
.scroll-top svg { width: 18px; height: 18px; }

/* ---- For-everyone band ---- */
.for-everyone {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.for-everyone .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
}
@media (min-width: 900px) {
  .for-everyone .container { grid-template-columns: 1fr 1.2fr; }
}
.role-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
}
@media (min-width: 700px) { .role-strip { grid-template-columns: repeat(4, 1fr); } }
.role-strip .role {
  padding: 24px 16px 24px 0;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.role-strip .role:last-child { border-right: 0; }
.role-strip .role .kicker { color: var(--muted); }
.role-strip .role .h3 { margin-top: 10px; }
.role-strip .role .footnote { margin-top: 10px; }

/* ---- Charts (pie + bar) ---- */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 48px);
}
@media (min-width: 900px) { .chart-grid { grid-template-columns: 1fr 1fr; gap: clamp(40px, 5vw, 64px); } }

.chart-card {
  border-top: 1px solid var(--hairline);
  padding-top: 28px;
}
.chart-card h3 {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.chart-card .src {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg.donut {
  max-width: 280px;
  margin: 0 auto;
  display: block;
}
.chart-legend {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 24px;
  font-size: 13px;
}
.chart-legend .sw {
  display: inline-block;
  width: 12px; height: 12px;
  margin-right: 8px;
  vertical-align: -1px;
  border-radius: 2px;
}
.chart-legend .row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 6px;
}
.chart-legend .row .v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* Horizontal bar chart */
.bars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.bars .bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 28%) 1fr minmax(70px, 16%);
  align-items: center;
  gap: 14px;
  font-size: 13px;
}
@media (max-width: 700px) {
  .bars .bar-row { grid-template-columns: 90px 1fr 64px; gap: 8px; font-size: 12px; }
}
.bars .bar-row .label { color: var(--fg); }
.bars .bar-row .track {
  height: 10px;
  background: var(--stone);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.bars .bar-row .fill {
  height: 100%;
  background: linear-gradient(to right, var(--fg) 0%, oklch(35% 0.005 80) 100%);
  width: var(--w, 0%);
  border-radius: 2px;
}
.bars .bar-row.in .fill { width: var(--w, 0%); }
.bars .bar-row .v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  text-align: right;
}
.bars.alt .bar-row .fill {
  background: linear-gradient(to right, var(--teal), var(--river));
}
.bars.heat .bar-row .fill {
  background: linear-gradient(to right, oklch(50% 0.20 35), oklch(70% 0.16 50));
}

/* ---- World plastic heat map ---- */
.heat-map {
  background: var(--bg-inverse);
  color: var(--fg-inverse);
  padding-block: clamp(56px, 7vw, 96px);
  overflow: hidden;
  position: relative;
}
.heat-map::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 50% at 10% 80%, oklch(35% 0.10 220 / 0.20) 0%, transparent 50%),
    radial-gradient(ellipse 80% 40% at 90% 70%, oklch(40% 0.08 230 / 0.15) 0%, transparent 40%);
  z-index: 0;
}
.heat-map > * {
  position: relative;
  z-index: 1;
}
.heat-map .display-m { color: var(--fg-inverse); }
.heat-map .body-l { color: var(--muted-inverse); }
.heat-map .head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.heat-map h2 { color: var(--fg-inverse); max-width: 22ch; }
.heat-map p { color: var(--muted-inverse); max-width: 56ch; }
.heat-map .map-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}
@media (min-width: 1024px) {
  .heat-map .map-wrap { grid-template-columns: 2fr 1fr; }
}
/* Photographic silhouette map + pin overlay */
.heat-map-img {
  margin: 0;
  position: relative;
  background: oklch(22% 0.06 240);
  border-radius: 8px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--border-inverse);
  overflow: hidden;
}
.heat-map-img .heat-base {
  width: 100%;
  height: auto;
  display: block;
  /* recolor the silhouette PNG to a soft blue-grey landmass on the ocean panel */
  filter: brightness(0) saturate(100%) invert(70%) sepia(12%) hue-rotate(180deg) brightness(90%) contrast(85%);
  opacity: 0.45;
}
.heat-pins {
  position: absolute;
  inset: clamp(24px, 3vw, 40px);
  pointer-events: none;
}
.heat-pins .pin {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: oklch(70% 0.18 45);
  box-shadow: 0 0 0 6px oklch(70% 0.18 45 / 0.25);
  /* animation removed to stop looping */
}
.heat-pins .pin.t5 { width: 22px; height: 22px; background: oklch(64% 0.22 28); }
.heat-pins .pin.t4 { width: 18px; height: 18px; background: oklch(68% 0.20 38); }
.heat-pins .pin.t3 { width: 14px; height: 14px; background: oklch(72% 0.16 55); }
.heat-pins .pin.t2 { width: 11px; height: 11px; background: oklch(78% 0.10 70); opacity: 0.75; }
.heat-pins .pin.malaysia {
  width: 14px; height: 14px;
  background: var(--accent, oklch(70% 0.13 200));
  box-shadow:
    0 0 0 4px oklch(70% 0.13 200 / 0.18),
    0 0 0 8px oklch(70% 0.13 200 / 0.08);
  /* animation removed to stop looping */
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-inverse);
  padding: 0;
  white-space: nowrap;
}
.heat-pins .pin.malaysia::after {
  content: 'MALAYSIA';
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--fg-inverse);
  white-space: nowrap;
}
/* keyframes removed */
.heat-legend {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-inverse);
}
.heat-legend .step {
  height: 14px;
  border-radius: 2px;
}
.heat-legend .step.h5 { background: oklch(82% 0.04 80); }
.heat-legend .step.h4 { background: oklch(78% 0.07 70); }
.heat-legend .step.h3 { background: oklch(72% 0.12 60); }
.heat-legend .step.h2 { background: oklch(64% 0.16 45); }
.heat-legend .step.h1 { background: oklch(58% 0.20 28); }
.heat-legend .label-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.heat-rank {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border-inverse);
}
.heat-rank .row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-inverse);
  align-items: baseline;
}
.heat-rank .row .rk {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-inverse);
  letter-spacing: 0.08em;
}
.heat-rank .row .name {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.015em;
  color: var(--fg-inverse);
}
.heat-rank .row .v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted-inverse);
}
.heat-rank .row.malaysia .name { color: oklch(82% 0.13 65); }
.heat-rank .row.malaysia .v { color: oklch(82% 0.13 65); }

/* ---- Contact form ---- */
.contact-band {
  border-top: 1px solid var(--hairline);
}
.contact-band .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
}
@media (min-width: 900px) {
  .contact-band .container { grid-template-columns: 1fr 1.2fr; }
}
.contact-form {
  display: grid;
  gap: 0;
}
.contact-form .field {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
.contact-form label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--fg);
  padding: 4px 0;
  outline: none;
  resize: vertical;
  width: 100%;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted); }
.contact-form textarea { min-height: 120px; line-height: 1.5; }
.contact-form .row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 700px) {
  .contact-form .row-2 { grid-template-columns: 1fr 1fr; gap: 24px; }
}
.contact-form .submit {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.contact-form .submit .small {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.contact-form.success > .field,
.contact-form.success > .submit { display: none; }
.contact-form .ok {
  display: none;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.contact-form.success .ok { display: block; }

/* ---- Health page hero / metric tiles ---- */
.health-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(72px, 10vw, 144px);
}
.metric-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--hairline);
}
@media (min-width: 700px) { .metric-tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .metric-tiles { grid-template-columns: repeat(4, 1fr); } }
.metric-tiles .tile {
  padding: 32px 24px 32px 0;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.metric-tiles .tile:last-child { border-right: 0; }
@media (max-width: 700px) {
  .metric-tiles .tile:nth-child(odd) { border-right: 1px solid var(--hairline); }
}
.metric-tiles .v {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.95;
}
.metric-tiles .u {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}
.metric-tiles .d {
  font-size: 14px;
  color: var(--fg);
  max-width: 28ch;
  margin-top: 12px;
  line-height: 1.5;
}

/* compare card */
.compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 800px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare .side {
  padding: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 800px) {
  .compare .side:first-child { border-right: 1px solid var(--hairline); border-bottom: 0; }
  .compare .side:last-child { border-bottom: 0; }
}
.compare .side.plastic {
  background: oklch(96% 0.006 30);
}
.compare .side .head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.compare .side .ttl {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.compare .side ul { list-style: none; padding: 0; margin: 0; }
.compare .side li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
}
.compare .side li:last-child { border-bottom: 0; }
.compare .side li::before {
  content: '—';
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ---- Body diagram (microplastic concentration spots) ---- */
.body-figure {
  position: relative;
  aspect-ratio: 440 / 620;
  max-width: 560px;
  margin: 0 auto;
  background:
    radial-gradient(circle at 50% 18%, oklch(98% 0.005 80) 0%, oklch(94% 0.008 75) 70%, oklch(92% 0.010 70) 100%);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  padding: 18px;
  box-sizing: border-box;
  box-shadow: inset 0 0 60px oklch(0% 0 0 / 0.04);
}
.body-figure svg { width: 100%; height: 100%; display: block; }

/* Body figure dots — animations removed to stop looping */
.body-figure .bf-dots circle {
  transform-origin: center;
}
/* keyframes removed */

/* ---- Inline arrow link ---- */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 2px;
}

/* ---- Language helpers ---- */
/* Only ever HIDE the opposite-language; never touch the visible one's display,
   so the natural cascade (e.g. .hero-line span { display: block }) still wins.
   Specificity of these selectors beats element+class rules without needing !important. */
html:not([lang="bm"]) [data-lang-bm] { display: none; }
html[lang="bm"] [data-lang-en] { display: none; }
