/* ── Muson — meteorology theme ────────────────────────────── */
/* registered so the sky gradient can animate between conditions */
@property --sky-a { syntax: '<color>'; inherits: true; initial-value: #93aec9; }
@property --sky-b { syntax: '<color>'; inherits: true; initial-value: #e3ebf3; }
:root {
  --ink: #10233a;
  --ink-soft: #3e5673;
  --ink-faint: #7189a6;
  --card: rgba(255, 255, 255, 0.78);
  --card-border: rgba(16, 35, 58, 0.1);
  --accent: #0e7ac4;
  --up: #0a8f5b;
  --down: #c0392b;
  --band: #7189a6;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  /* sky per condition (overridden by the body class) */
  --sky-a: #aac9e8; --sky-b: #e8f1fa;
}
body.cond-clear  { --sky-a: #7db8ea; --sky-b: #eaf4fd; }
body.cond-cloudy { --sky-a: #93aec9; --sky-b: #e3ebf3; }
body.cond-rain   { --sky-a: #5f7a99; --sky-b: #c7d3e0; --card: rgba(255,255,255,.85); }
body.cond-storm  { --sky-a: #2e4059; --sky-b: #8fa1b8; --ink: #0c1a2c; --card: rgba(255,255,255,.88); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 42%, #f6f9fc 100%);
  background-attachment: fixed;
  transition: --sky-a 1.8s ease, --sky-b 1.8s ease;
  min-height: 100vh;
}

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* reveal on scroll (only when motion.js is active) */
.motion [data-reveal] {
  opacity: 0;
  transform: translateY(26px) scale(.985);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.motion [data-reveal].in { opacity: 1; transform: none; }

/* pop highlight in the hero headline */
.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl::after {
  content: ''; position: absolute; left: -4px; right: -6px; bottom: .08em; height: .36em; z-index: -1;
  background: #ffc94d; border-radius: 6px; transform: rotate(-1.2deg) scaleX(0); transform-origin: left;
  animation: hl-in .9s .5s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes hl-in { to { transform: rotate(-1.2deg) scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .hl::after { animation: none; transform: rotate(-1.2deg); } }
#sky {
  position: fixed; inset: 0; z-index: -1;
  width: 100vw; height: 100vh;
  pointer-events: none;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* topbar */
.topbar { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--sky-b) 55%, transparent);
  border-bottom: 1px solid var(--card-border); transition: box-shadow .3s ease; }
.topbar.scrolled { box-shadow: 0 6px 24px rgba(16,35,58,.1); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: .5px; color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: center; gap: 9px; }
.brand-logo { width: 28px; height: 28px; border-radius: 7px; display: block; }
.top-buy { font-family: var(--mono); font-size: 13px; font-weight: 700; text-decoration: none;
  color: #fff; background: var(--ink); padding: 8px 14px; border-radius: 10px; white-space: nowrap; }
.top-buy:hover { background: var(--accent); }
.topnav { margin-left: auto; margin-right: 18px; }
.topnav a { color: var(--ink-soft); text-decoration: none; font-size: 14px; margin-left: 18px; font-weight: 600; }
.topnav a:hover { color: var(--accent); }

/* hero */
.hero { padding: 84px 16px 40px; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: var(--ink-faint); margin: 0 0 10px; }
.hero h1 { font-size: clamp(38px, 6.5vw, 64px); line-height: 1.04; margin: 0 0 18px; letter-spacing: -1.5px; }
.lede { font-size: 18px; line-height: 1.6; color: var(--ink-soft); max-width: 640px; margin: 0 0 22px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { font-family: var(--mono); font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--card-border); color: var(--ink-soft); }
.badge b { color: var(--ink); }
#badge-conn.ok { color: var(--up); }
#badge-conn.bad { color: var(--down); }

/* launch card */
.launch { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.launch-kicker { color: var(--accent); font-weight: 700; margin-bottom: 14px; }
.countdown { display: flex; gap: 10px; }
.countdown[hidden] { display: none; }
.cd-unit { background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 0 8px;
  width: 78px; text-align: center; }
.cd-unit b { display: block; font-family: var(--mono); font-size: 32px; line-height: 1; }
.cd-unit span { display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  opacity: .7; margin-top: 5px; }
.launch-live { font-size: 34px; font-weight: 800; color: var(--up); letter-spacing: -0.5px; }
.launch-when { margin-top: 12px; font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.launch-local { color: var(--ink-faint); }
.ca-label { font-size: 12px; font-weight: 700; color: var(--ink-faint); letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 6px; }
.ca-box { display: flex; align-items: center; gap: 8px; background: rgba(16,35,58,.05);
  border: 1px dashed rgba(16,35,58,.2); border-radius: 10px; padding: 8px 8px 8px 12px; }
.ca-box code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.ca-box code.ca-soon { color: var(--ink-faint); font-style: italic; }
.ca-copy { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 8px;
  border: 0; background: var(--ink); color: #fff; cursor: pointer; flex: none; }
.ca-copy:disabled { background: rgba(16,35,58,.15); color: var(--ink-faint); cursor: not-allowed; }
.ca-copy.done { background: var(--up); }
.buy-btn { display: block; margin-top: 12px; text-align: center; font-weight: 800; font-size: 16px;
  padding: 14px; border-radius: 12px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #0e7ac4, #10233a); box-shadow: 0 6px 18px rgba(14,122,196,.3); }
.buy-btn:hover { filter: brightness(1.1); }
.buy-btn.disabled { background: rgba(16,35,58,.12); color: var(--ink-faint); box-shadow: none;
  cursor: not-allowed; filter: none; }
.launch-social { display: flex; gap: 16px; margin-top: 12px; justify-content: center; }
.launch-social a { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--accent);
  text-decoration: none; }
.launch-social a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .launch { grid-template-columns: 1fr; }
  .cd-unit { width: auto; flex: 1; }
}

/* section frame */
.section { padding: 46px 16px; }
.sec-head h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 10px; letter-spacing: -0.5px; }
.sec-sub { color: var(--ink-soft); line-height: 1.6; max-width: 680px; margin: 0; }
.sec-sub.center { margin: 0 auto; text-align: center; }
.sec-head { margin-bottom: 26px; }

.card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 20px;
  box-shadow: 0 8px 28px rgba(16, 35, 58, 0.07);
  backdrop-filter: blur(6px);
}

/* market tabs */
.market-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.mtab { font-family: var(--mono); font-size: 13px; font-weight: 700; padding: 8px 16px;
  border-radius: 10px; border: 1px solid var(--card-border); background: transparent;
  color: var(--ink-soft); cursor: pointer; }
.mtab.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* station */
.station-main { display: flex; align-items: center; gap: 18px; padding-bottom: 18px;
  border-bottom: 1px dashed var(--card-border); margin-bottom: 18px; flex-wrap: wrap; }
.cond-icon { width: 74px; height: 74px; flex: none; }
.cond-icon svg { width: 100%; height: 100%; }
.cond-label { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.cond-sub { color: var(--ink-faint); font-size: 14px; margin-top: 2px; }
.station-price { margin-left: auto; text-align: right; }
.price-big { font-family: var(--mono); font-size: clamp(28px, 4.5vw, 42px); font-weight: 700; }
.price-big { transition: color .4s ease; }
.price-big.tick-up { color: var(--up); }
.price-big.tick-down { color: var(--down); }
.price-sub { color: var(--ink-faint); font-size: 12px; font-family: var(--mono); }

.instruments { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.inst-name { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.inst-hint { display: block; font-weight: 400; color: var(--ink-faint); font-size: 11px; margin-top: 1px; }
.inst-val, .inst-big { font-family: var(--mono); font-size: 18px; font-weight: 700; margin-top: 6px; }
.gauge { position: relative; height: 10px; border-radius: 6px; background: rgba(16,35,58,.08); overflow: hidden; }
.gauge-mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: rgba(16,35,58,.25); }
.gauge-fill { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; background: var(--accent);
  border-radius: 6px; transition: all .5s ease; }
.gauge-fill.neg { background: var(--down); }
.gauge-fill.pos { background: var(--up); }

/* bulletin */
.bulletin { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.fc-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 14px; padding: 16px; }
.fc-hz { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); display: flex; justify-content: space-between; }
.fc-band { font-family: var(--mono); }
.fc-verdict { font-size: 19px; font-weight: 800; margin: 8px 0 10px; }
.fc-verdict.up { color: var(--up); } .fc-verdict.down { color: var(--down); } .fc-verdict.flat { color: var(--ink-soft); }
.fc-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.fc-bar i { display: block; height: 100%; }
.fc-bar .bu { background: var(--up); } .fc-bar .bw { background: rgba(16,35,58,.18); } .fc-bar .bd { background: var(--down); }
.fc-probs { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; }
.fc-probs b { font-size: 13px; }
.fc-raw { margin-top: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); }
.fineprint { color: var(--ink-faint); font-size: 12px; line-height: 1.6; margin-top: 16px; }

/* radar */
.radar-card { padding-bottom: 12px; }
.radar-controls { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.hbtn { font-family: var(--mono); font-size: 12px; padding: 5px 12px; border-radius: 8px;
  border: 1px solid var(--card-border); background: transparent; color: var(--ink-soft); cursor: pointer; }
.hbtn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
#radar-canvas { width: 100%; display: block; }
.radar-legend { display: flex; gap: 18px; font-size: 12px; color: var(--ink-faint); margin-top: 8px; font-family: var(--mono); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.dot-price { background: var(--accent); }
.dot-band { background: var(--band); opacity: .45; }

/* verifikasi */
.scorewrap { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; }
@media (max-width: 800px) { .scorewrap { grid-template-columns: 1fr; } }
.scoretable, .recenttable { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 13px; }
.scoretable th, .recenttable th { text-align: left; font-size: 11px; color: var(--ink-faint);
  font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--card-border); }
.scoretable td, .recenttable td { padding: 7px 8px; border-bottom: 1px dashed var(--card-border); }
.scoretable td.best { color: var(--up); font-weight: 700; }
.recent-head { font-weight: 800; margin-bottom: 10px; }
.o-above { color: var(--up); font-weight: 700; }
.o-below { color: var(--down); font-weight: 700; }
.o-within { color: var(--ink-soft); }
.muted { color: var(--ink-faint); }

/* closing + footer */
.closing { text-align: center; padding: 70px 16px; }
.closing h2 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 12px; letter-spacing: -1px; }
.site-footer { border-top: 1px solid var(--card-border); padding: 26px 0 40px;
  background: color-mix(in srgb, #f6f9fc 70%, transparent); }
.foot-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-links { margin: 10px 0 0; display: flex; gap: 14px; }
.foot-links a { font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--accent); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .station-price { margin-left: 0; text-align: left; width: 100%; }
  .topnav { display: none; }
}
