/* ==========================================================================
   FoodDetect IoT — Komponen: Header, Hero, Section, Footer
   ========================================================================== */

/* ---------------------------------------------------------------- Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--dur-mid) ease,
              border-color var(--dur-mid) ease,
              backdrop-filter var(--dur-mid) ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
  background: rgba(6, 13, 18, 0.82);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 32px -12px rgba(0, 0, 0, 0.7);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  width: 100%;
}

/* Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand__mark {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--mint-400), var(--mint-600));
  box-shadow: 0 6px 18px -6px rgba(16, 185, 129, 0.8),
              0 1px 0 rgba(255, 255, 255, 0.4) inset;
  color: #04120c;
  transition: transform var(--dur-mid) var(--ease-spring);
}

.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }

.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-size: 1.02rem; font-weight: 800; letter-spacing: -0.03em; }
.brand__sub {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint-400);
}

/* Nav */
.nav { display: flex; align-items: center; gap: 4px; }

.nav__link {
  position: relative;
  padding: 9px 15px;
  border-radius: var(--r-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-mid);
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
}

.nav__link:hover { color: var(--text-hi); background: rgba(255, 255, 255, 0.05); }

.nav__link.is-active { color: var(--mint-300); }
.nav__link.is-active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--mint-400);
  box-shadow: 0 0 10px var(--mint-400);
}

.header-actions { display: flex; align-items: center; gap: var(--sp-3); }

/* Burger */
.burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  place-items: center;
  color: var(--text-hi);
}

.burger__lines { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.burger__lines span {
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur-mid) var(--ease-out), opacity var(--dur-fast) ease;
}
.burger.is-open .burger__lines span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-open .burger__lines span:nth-child(2) { opacity: 0; }
.burger.is-open .burger__lines span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 99;
  padding: var(--sp-4) var(--sp-5) var(--sp-5);
  background: rgba(6, 13, 18, 0.97);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-110%);
  transition: transform var(--dur-mid) var(--ease-out);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.mobile-nav.is-open { transform: translateY(0); }

.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-mid);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.mobile-nav__link.is-active { color: var(--mint-300); }
.mobile-nav__actions { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-5); }

/* ---------------------------------------------------------------- Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + var(--sp-7));
  padding-bottom: var(--sp-8);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(0.85) contrast(1.05);
  transform: scale(1.08);
  animation: hero-drift 26s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to   { transform: scale(1.16) translate3d(-1.5%, -1.5%, 0); }
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 30%, rgba(16, 185, 129, 0.22), transparent 65%),
    linear-gradient(180deg, rgba(6, 13, 18, 0.55) 0%, rgba(6, 13, 18, 0.82) 55%, var(--ink-900) 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--sp-8);
  align-items: center;
  width: 100%;
}

.hero__copy { max-width: 620px; }

.hero__title { margin-top: var(--sp-5); }
.hero__title .line { display: block; }

.hero__desc { margin-top: var(--sp-5); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.hero__stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--mint-300);
  font-variant-numeric: tabular-nums;
}
.hero__stat-label { font-size: 0.78rem; color: var(--text-lo); letter-spacing: 0.02em; }

/* --- Panel 3D di hero --- */
.hero__visual {
  position: relative;
  perspective: 1400px;
  display: grid;
  place-items: center;
}

.device-3d {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1.06;
  transform-style: preserve-3d;
  transform: rotateY(-14deg) rotateX(8deg);
  transition: transform 500ms var(--ease-out);
  animation: float-3d 7s ease-in-out infinite;
}

@keyframes float-3d {
  0%, 100% { transform: rotateY(-14deg) rotateX(8deg) translateY(0); }
  50%      { transform: rotateY(-9deg) rotateX(5deg) translateY(-16px); }
}

.device-3d__plate {
  position: absolute;
  inset: 0;
  border-radius: var(--r-xl);
  border: 1px solid var(--border-hi);
  background:
    linear-gradient(155deg, rgba(16, 185, 129, 0.16) 0%, rgba(6, 13, 18, 0.9) 45%, rgba(0, 0, 0, 0.95) 100%);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

/* Grid holografik */
.device-3d__plate::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 231, 183, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 183, 0.09) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 78%);
}

/* Sapuan cahaya bergerak */
.device-3d__plate::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(110, 231, 183, 0.14) 40deg, transparent 90deg);
  animation: sweep 9s linear infinite;
}

@keyframes sweep {
  to { transform: rotate(360deg); }
}

.device-3d__content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.device-3d__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}

.device-3d__title { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mint-300); }

/* Gauge melingkar */
.gauge {
  position: relative;
  display: grid;
  place-items: center;
  margin: auto 0;
}

.gauge__svg { width: 100%; max-width: 210px; transform: rotate(-90deg); }

.gauge__track { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 12; }

.gauge__fill {
  fill: none;
  stroke: url(#gaugeGrad);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 1.4s var(--ease-out);
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.7));
}

.gauge__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.gauge__value {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.gauge__unit { font-size: 0.72rem; color: var(--text-lo); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 4px; }

.device-3d__rows { display: grid; gap: 9px; }

.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}
.mini-row__label { color: var(--text-lo); display: flex; align-items: center; gap: 7px; }
.mini-row__value { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Kartu melayang di sekitar device */
.float-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border-radius: var(--r-full);
  background: rgba(10, 22, 32, 0.92);
  border: 1px solid var(--border-hi);
  box-shadow: var(--shadow-md), 0 0 30px -10px rgba(16, 185, 129, 0.5);
  backdrop-filter: blur(14px);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  animation: chip-float 5.5s ease-in-out infinite;
}

.float-chip--a { top: 6%; left: -6%; animation-delay: 0s; }
.float-chip--b { bottom: 14%; right: -8%; animation-delay: 1.4s; }
.float-chip--c { bottom: 2%; left: 4%; animation-delay: 2.6s; }

@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-11px); }
}

.float-chip__icon {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.18);
  color: var(--mint-300);
  flex-shrink: 0;
}

/* ---------------------------------------------------------------- Section head */
.section-head { max-width: 720px; margin-bottom: var(--sp-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head__title { margin-top: var(--sp-4); }
.section-head__desc { margin-top: var(--sp-4); }
.section-head--center .section-head__desc { margin-inline: auto; }

/* ---------------------------------------------------------------- Feature card */
.feature {
  position: relative;
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012) 60%, rgba(0, 0, 0, 0.14));
  box-shadow: var(--shadow-3d);
  overflow: hidden;
  transition: transform var(--dur-mid) var(--ease-out),
              border-color var(--dur-mid) ease,
              box-shadow var(--dur-mid) ease;
}

.feature::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.14), transparent 55%);
  opacity: 0;
  transition: opacity var(--dur-slow) ease;
  pointer-events: none;
}

.feature:hover {
  transform: translateY(-8px);
  border-color: var(--border-hi);
  box-shadow: var(--shadow-lg), var(--glow-mint);
}
.feature:hover::after { opacity: 1; }

.feature__icon {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-4);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.22), rgba(16, 185, 129, 0.06));
  border: 1px solid rgba(110, 231, 183, 0.24);
  color: var(--mint-300);
  box-shadow: 0 8px 22px -10px rgba(16, 185, 129, 0.7),
              0 1px 0 rgba(255, 255, 255, 0.14) inset;
  transition: transform var(--dur-mid) var(--ease-spring);
}
.feature:hover .feature__icon { transform: translateY(-3px) rotate(-6deg) scale(1.06); }

.feature__title { font-size: 1.12rem; margin-bottom: 9px; }
.feature__desc { font-size: 0.92rem; color: var(--text-mid); line-height: 1.65; }

.feature__num {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-lo);
  letter-spacing: 0.1em;
}

/* ---------------------------------------------------------------- Split media */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
}
.split--reverse .split__media { order: 2; }

.split__media {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  transform-style: preserve-3d;
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
}
.split__media:hover img { transform: scale(1.06); }

.split__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6, 13, 18, 0.75) 100%);
  pointer-events: none;
}

.split__badge {
  position: absolute;
  z-index: 2;
  bottom: var(--sp-4);
  left: var(--sp-4);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 17px;
  border-radius: var(--r-full);
  background: rgba(6, 13, 18, 0.85);
  border: 1px solid var(--border-hi);
  backdrop-filter: blur(14px);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------------------------------------------------------------- Steps */
.steps { display: grid; gap: var(--sp-4); counter-reset: step; }

.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color var(--dur-mid) ease, background var(--dur-mid) ease, transform var(--dur-mid) var(--ease-out);
}

.step:hover {
  border-color: var(--border-hi);
  background: rgba(16, 185, 129, 0.05);
  transform: translateX(6px);
}

.step__num {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mint-300);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(110, 231, 183, 0.22);
  box-shadow: 0 8px 20px -10px rgba(16, 185, 129, 0.6);
}

.step__title { font-size: 1.05rem; margin-bottom: 6px; }
.step__desc { font-size: 0.9rem; color: var(--text-mid); }

/* ---------------------------------------------------------------- Stats band */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--border);
}

.stat-cell {
  padding: var(--sp-6) var(--sp-5);
  background: rgba(10, 22, 32, 0.9);
  text-align: center;
  transition: background var(--dur-mid) ease;
}
.stat-cell:hover { background: rgba(16, 185, 129, 0.07); }

.stat-cell__value {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--mint-300);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-cell__label { margin-top: 9px; font-size: 0.8rem; color: var(--text-lo); }

/* ---------------------------------------------------------------- Testimoni */
.quote {
  position: relative;
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.1));
  box-shadow: var(--shadow-3d);
  transition: transform var(--dur-mid) var(--ease-out), border-color var(--dur-mid) ease;
}
.quote:hover { transform: translateY(-6px); border-color: var(--border-hi); }

.quote__mark {
  font-size: 3rem;
  line-height: 1;
  color: rgba(110, 231, 183, 0.28);
  font-family: Georgia, serif;
  margin-bottom: -8px;
}

.quote__text { font-size: 0.95rem; color: var(--text-mid); line-height: 1.7; font-style: italic; }

.quote__author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #04120c;
  background: linear-gradient(145deg, var(--mint-300), var(--mint-600));
  flex-shrink: 0;
  box-shadow: 0 4px 14px -4px rgba(16, 185, 129, 0.7);
}

.avatar--lg { width: 64px; height: 64px; font-size: 1.2rem; }
.avatar--sm { width: 32px; height: 32px; font-size: 0.72rem; }

.quote__name { font-size: 0.9rem; font-weight: 700; }
.quote__role { font-size: 0.78rem; color: var(--text-lo); }

/* ---------------------------------------------------------------- CTA */
.cta {
  position: relative;
  padding: var(--sp-9) var(--sp-6);
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border-hi);
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(16, 185, 129, 0.22), transparent 65%),
    linear-gradient(160deg, rgba(16, 185, 129, 0.1), rgba(6, 13, 18, 0.95));
  box-shadow: var(--shadow-lg), 0 0 80px -30px rgba(16, 185, 129, 0.5);
  text-align: center;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 231, 183, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 183, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, #000, transparent 75%);
  pointer-events: none;
}

.cta__inner { position: relative; z-index: 2; max-width: 640px; margin-inline: auto; }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-6); }

/* ---------------------------------------------------------------- Footer */
.site-footer {
  position: relative;
  margin-top: var(--sp-9);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--sp-7);
  padding-bottom: var(--sp-7);
}

.footer-col__title {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-lo);
  margin-bottom: var(--sp-4);
}

.footer-link {
  display: block;
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--text-mid);
  transition: color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.footer-link:hover { color: var(--mint-300); transform: translateX(3px); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-lo);
}

.footer-social { display: flex; gap: 9px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-mid);
  transition: all var(--dur-fast) ease;
}
.footer-social a:hover {
  color: var(--mint-300);
  border-color: var(--border-hi);
  background: rgba(16, 185, 129, 0.1);
  transform: translateY(-2px);
}

/* ---------------------------------------------------------------- Responsif */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--sp-7); }
  .hero__visual { order: -1; max-width: 460px; margin-inline: auto; }
  .hero__copy { max-width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
  .split { grid-template-columns: 1fr; gap: var(--sp-6); }
  .split--reverse .split__media { order: 0; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .nav { display: none; }
  .header-actions .btn--ghost { display: none; }
  .burger { display: grid; }
  .grid--3 { grid-template-columns: 1fr; }
  .section { padding-block: var(--sp-8); }
  .hero { min-height: auto; padding-top: calc(var(--header-h) + var(--sp-6)); }
  .float-chip--a { left: 0; }
  .float-chip--b { right: 0; }
}

@media (max-width: 640px) {
  .container { padding-inline: var(--sp-4); }
  .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .hero__meta { gap: var(--sp-5); }
  .hero__actions .btn { width: 100%; }
  .device-3d { max-width: 100%; }
  .float-chip { font-size: 0.7rem; padding: 8px 12px; }
  .float-chip--c { display: none; }
  .cta { padding: var(--sp-7) var(--sp-4); }
  .step { grid-template-columns: 44px 1fr; gap: var(--sp-3); padding: var(--sp-4); }
  .step__num { width: 44px; height: 44px; font-size: 0.9rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   Empty state — dipakai saat basis data masih kosong.
   Selalu berisi ikon, penjelasan, dan ajakan tindakan agar halaman
   tidak pernah terlihat bolong.
   ========================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-7) var(--sp-5);
  min-height: 260px;
  gap: var(--sp-3);
  background:
    radial-gradient(420px 200px at 50% 0%, rgba(52, 211, 153, 0.055), transparent 70%);
  border-radius: var(--r-lg);
}

.empty-state.es-compact {
  min-height: 200px;
  padding: var(--sp-6) var(--sp-4);
}

.empty-state.es-tall {
  min-height: 340px;
}

/* --- Ilustrasi cincin + ikon --- */
.es-art {
  position: relative;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-1);
}

.es-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(52, 211, 153, 0.28);
  background: radial-gradient(circle at 50% 35%, rgba(52, 211, 153, 0.14), transparent 68%);
  animation: esSpin 22s linear infinite;
}

.es-ring::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, 0.13);
}

@keyframes esSpin {
  to { transform: rotate(360deg); }
}

.es-ico {
  position: relative;
  z-index: 1;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.1);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.2), 0 12px 26px -14px rgba(52, 211, 153, 0.5);
}

.es-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-hi);
  letter-spacing: -0.01em;
  margin: 0;
}

.es-text {
  font-size: 0.89rem;
  line-height: 1.68;
  color: var(--text-dim);
  max-width: 400px;
  margin: 0;
}

.es-hint {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.79rem;
  line-height: 1.55;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--r-sm);
  padding: 9px 13px;
  max-width: 420px;
  text-align: left;
  margin: var(--sp-1) 0 0;
}

.es-hint svg { flex: 0 0 auto; margin-top: 2px; color: var(--mint-300); }

.es-actions { margin-top: var(--sp-3); }

.es-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 19px;
  border-radius: var(--r-sm);
  font-size: 0.855rem;
  font-weight: 700;
  text-decoration: none;
  color: #04140e;
  background: linear-gradient(135deg, #6ee7b7, #34d399);
  border: 0;
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.es-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -12px rgba(52, 211, 153, 0.55);
}

.es-btn.ghost {
  color: var(--text-mid);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.es-btn.ghost:hover {
  color: var(--text-hi);
  background: rgba(52, 211, 153, 0.09);
  border-color: rgba(52, 211, 153, 0.38);
  box-shadow: none;
}

/* --- Grafik kosong (pola ilustratif, bukan data palsu) --- */
.chart-empty {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.012);
}

.chart-empty svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.chart-empty-label {
  position: relative;
  z-index: 1;
  font-size: 0.795rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(7, 10, 16, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  padding: 6px 15px;
  text-align: center;
  max-width: 92%;
}

/* --- Penanda status basis data --- */
.data-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.755rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.09);
  color: #fcd34d;
  white-space: nowrap;
}

.data-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18);
  flex: 0 0 auto;
}

.data-pill--live {
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

.data-pill--live::before {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
  animation: dpPulse 2.2s ease-in-out infinite;
}

@keyframes dpPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}

/* --- Langkah lanjutan (dipakai pada empty state perangkat) --- */
.next-steps {
  display: grid;
  gap: 9px;
  width: 100%;
  max-width: 430px;
  margin-top: var(--sp-3);
  text-align: left;
}

.next-step {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}

.next-step:hover {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.05);
}

.next-step__num {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #04140e;
  background: linear-gradient(135deg, #6ee7b7, #34d399);
}

.next-step__body { min-width: 0; }
.next-step__title { font-size: 0.83rem; font-weight: 700; color: var(--text-hi); margin: 0 0 2px; }
.next-step__desc { font-size: 0.765rem; line-height: 1.55; color: var(--text-dim); margin: 0; }
.next-step code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--mint-300);
  background: rgba(0, 0, 0, 0.32);
  padding: 1px 5px;
  border-radius: 4px;
}

@media (max-width: 560px) {
  .empty-state { padding: var(--sp-6) var(--sp-3); min-height: 230px; }
  .es-art { width: 68px; height: 68px; }
  .es-ico { width: 44px; height: 44px; }
  .es-text { font-size: 0.855rem; }
}

@media (prefers-reduced-motion: reduce) {
  .es-ring, .data-pill--live::before { animation: none; }
}


/* ---------------------------------------------------------------- Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: modalFadeIn 0.2s ease;
}

.modal[hidden] {
  display: none;
}

.modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal__content {
  position: relative;
  z-index: 1;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8);
  animation: modalSlideUp 0.25s ease;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-hi);
}

.modal__close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-mid);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-hi);
}

.modal__body {
  padding: var(--sp-5);
}

.modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .modal {
    padding: var(--sp-3);
  }
  .modal__content {
    max-height: 95vh;
  }
}
