:root {
  --ink: #071016;
  --ink-soft: #0d1820;
  --fog: #9fb3c3;
  --paper: #e8f0f4;
  --signal: #3ee0b0;
  --amber: #f0a35e;
  --line: rgba(232, 240, 244, 0.14);
  --brand: "Syne", "Segoe UI", sans-serif;
  --body: "Manrope", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --pad: clamp(1.15rem, 4vw, 2.75rem);
  --max: 980px;
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--body);
  background:
    radial-gradient(90% 50% at 80% -10%, rgba(62, 224, 176, 0.1), transparent 50%),
    linear-gradient(180deg, #0d1820 0%, var(--ink) 45%, #05090d 100%);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--signal);
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem var(--pad);
  background: linear-gradient(180deg, rgba(7, 16, 22, 0.92), transparent);
}

.topbar-brand {
  font-family: var(--brand);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.topbar-nav {
  display: flex;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-nav a {
  color: rgba(232, 240, 244, 0.65);
  text-decoration: none;
}

.topbar-nav a:hover,
.topbar-nav a.is-active {
  color: var(--paper);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem var(--pad) 3rem;
}

.hero {
  margin-bottom: 1.5rem;
}

.kicker {
  margin: 0 0 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
}

h1,
h2 {
  font-family: var(--brand);
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.55rem, 4vw, 2.2rem);
}

.lede {
  margin: 0;
  max-width: 42ch;
  color: var(--fog);
  line-height: 1.6;
}

/* ——— Dashboard grid (sesuai wireframe) ——— */
.dash {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}

.dash-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.tile {
  border: 1.5px solid rgba(232, 240, 244, 0.55);
  border-radius: var(--radius);
  background: rgba(13, 24, 32, 0.55);
  padding: clamp(1rem, 3vw, 1.35rem);
  min-height: 200px;
}

.tile-label {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(232, 240, 244, 0.85);
}

.tile-weather {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: background 0.6s ease, border-color 0.6s ease;
}

.tile-weather::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.tile-weather.weather--clear::before {
  background: radial-gradient(circle at 30% 20%, rgba(240, 163, 94, 0.22), transparent 55%);
}

.tile-weather.weather--cloud::before {
  background: radial-gradient(circle at 50% 0%, rgba(159, 179, 195, 0.2), transparent 60%);
}

.tile-weather.weather--rain::before {
  background: radial-gradient(circle at 50% 0%, rgba(62, 224, 176, 0.14), transparent 55%);
}

.tile-weather.weather--storm::before {
  background: radial-gradient(circle at 40% 10%, rgba(240, 163, 94, 0.16), transparent 50%);
}

.tile-weather.weather--fog::before {
  background: radial-gradient(circle at 50% 30%, rgba(159, 179, 195, 0.28), transparent 65%);
}

.tile-weather > * {
  position: relative;
  z-index: 1;
}

.weather-visual {
  width: min(132px, 42vw);
  height: min(132px, 42vw);
  display: grid;
  place-items: center;
}

.weather-visual svg,
.weather-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
  animation: weather-float 5s ease-in-out infinite;
}

.weather--clear .weather-visual img {
  animation: weather-sun 6s ease-in-out infinite;
}

.weather--rain .weather-visual img {
  animation: weather-float 3.5s ease-in-out infinite;
}

@keyframes weather-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes weather-sun {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 8px 24px rgba(240, 163, 94, 0.35));
  }
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 10px 28px rgba(240, 163, 94, 0.5));
  }
}

.weather-skeleton {
  width: 72%;
  height: 72%;
  border-radius: 50%;
  background: linear-gradient(
    110deg,
    rgba(159, 179, 195, 0.12) 30%,
    rgba(232, 240, 244, 0.18) 50%,
    rgba(159, 179, 195, 0.12) 70%
  );
  background-size: 200% 100%;
  animation: weather-shimmer 1.4s ease-in-out infinite;
}

.weather-skeleton.is-hidden {
  display: none;
}

@keyframes weather-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.weather-outdoor {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--mono);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: rgba(232, 240, 244, 0.9);
}

.weather-outdoor-unit {
  font-size: 0.75em;
  color: var(--signal);
  margin-left: 0.1em;
}

.weather-outdoor-note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fog);
}

.weather-desc {
  margin: 0.35rem 0 0;
  font-family: var(--brand);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

#weather-place {
  color: var(--fog);
  font-weight: 400;
}

.tile-temp {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.temp-big {
  margin: 0.25rem 0;
  font-family: var(--mono);
  font-size: clamp(3.2rem, 11vw, 5.5rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.temp-unit {
  font-size: 0.38em;
  color: var(--signal);
  margin-left: 0.12em;
}

.temp-meta {
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: rgba(159, 179, 195, 0.75);
}

.demo-badge {
  display: inline-block;
  margin: 0.55rem 0 0;
  padding: 0.3rem 0.65rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0d9a8;
  background: rgba(240, 163, 94, 0.18);
  border: 1px solid rgba(240, 163, 94, 0.4);
  border-radius: 999px;
}

.chart-block {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.range-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.range-btn {
  appearance: none;
  border: 1px solid rgba(232, 240, 244, 0.28);
  background: rgba(13, 24, 32, 0.7);
  color: var(--fog);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.range-btn:hover {
  color: var(--paper);
  border-color: rgba(62, 224, 176, 0.45);
}

.range-btn.is-active {
  background: var(--signal);
  border-color: var(--signal);
  color: #062018;
}

.tile-chart {
  min-height: 280px;
}

.chart-wrap {
  position: relative;
  height: min(280px, 52vw);
}

.rules {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.code {
  overflow: auto;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  border-radius: 10px;
}

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem var(--pad) 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(159, 179, 195, 0.65);
}

.footer a {
  color: var(--signal);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .dash-top {
    grid-template-columns: 1fr;
  }

  .tile {
    min-height: 180px;
  }

  .topbar-nav a:not(.is-active):not([href="#aturan"]) {
    display: none;
  }
}
