/* TESLON — token, reset, komponen dipakai di semua halaman */

@font-face {
  font-family: "Archivo Black";
  src: url("../assets/fonts/archivo-black.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../assets/fonts/barlow-400.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../assets/fonts/barlow-600.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../assets/fonts/barlow-800.woff2") format("woff2");
  font-weight: 800; font-display: swap;
}

:root {
  --ink: #08080a;
  --ink-2: #101014;
  --ink-3: #17171d;
  --red: #e8102a;
  --red-deep: #8d0417;
  --ember: #ff6a1a;
  --chrome: #d9dee6;
  --bone: #f2efe8;
  --text: #eceff4;
  --muted: #9aa1ad;
  --line: rgba(217, 222, 230, .14);

  --display: "Archivo Black", "Arial Black", sans-serif;
  --body: "Barlow", system-ui, sans-serif;

  --wrap: 1240px;
  --pad: clamp(18px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* height:auto WAJIB — tanpa ini atribut height di HTML dipakai apa adanya
   sementara lebarnya menyusut, dan semua gambar jadi lonjong. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -.03em; line-height: .92; margin: 0; }

.wrap { width: min(100% - var(--pad) * 2, var(--wrap)); margin-inline: auto; }

.eyebrow {
  font-weight: 800; font-size: 13px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--red); margin: 0 0 14px;
}

/* ---------- ikon hasil generate (bukan emoji) ---------- */
.ico {
  width: 1em; height: 1em; display: inline-block; vertical-align: -.12em;
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.ico-coin   { background-image: url("../assets/ui/icons/coin.webp"); }
.ico-rocket { background-image: url("../assets/ui/icons/rocket.webp"); }
.ico-flame  { background-image: url("../assets/ui/icons/flame.webp"); }
.ico-mouth  { background-image: url("../assets/ui/icons/mouth.webp"); }
.ico-chart  { background-image: url("../assets/ui/icons/chart.webp"); }
.ico-gear   { background-image: url("../assets/ui/icons/gear.webp"); }
.ico-tire   { background-image: url("../assets/ui/icons/tire.webp"); }
.ico-shield { background-image: url("../assets/ui/icons/shield.webp"); }
.ico-fuel   { background-image: url("../assets/ui/icons/fuel.webp"); }

/* ---------- tombol ---------- */
.btn {
  --btn-bg: var(--red);
  position: relative; display: inline-flex; align-items: center; gap: .6em;
  padding: 15px 26px; border-radius: 4px;
  background: var(--btn-bg); color: #fff;
  font-family: var(--display); font-size: 15px; letter-spacing: .04em; text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform .18s var(--ease), filter .18s var(--ease), box-shadow .18s var(--ease);
  box-shadow: 0 0 0 rgba(232, 16, 42, 0);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 10px 30px rgba(232, 16, 42, .35); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }
.btn--ghost { --btn-bg: transparent; box-shadow: inset 0 0 0 2px var(--line); color: var(--text); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--chrome); }
.btn--chrome { --btn-bg: var(--chrome); color: #0b0b0e; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- panel dengan frame hasil generate ---------- */
.framed {
  border-style: solid;
  border-width: 26px;
  border-image: url("../assets/ui/frame-panel.webp") 78 fill round;
  background-clip: padding-box;
}

/* ---------- topbar: ticker + CA + socials ---------- */
.topbar {
  position: relative; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 8px var(--pad);
  background: linear-gradient(90deg, var(--red-deep), var(--red) 45%, #b00a1f);
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.topbar__marquee { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.topbar__track { display: flex; gap: 28px; width: max-content; animation: slide 28s linear infinite; }
.topbar__track span { white-space: nowrap; opacity: .92; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .topbar__track { animation: none; } }

.ca-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: 3px;
  background: rgba(8, 8, 10, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; letter-spacing: .02em;
  text-transform: none; color: #fff; cursor: pointer;
  transition: background .18s var(--ease);
}
.ca-chip:hover { background: rgba(8, 8, 10, .8); }
.ca-chip__label { color: rgba(255, 255, 255, .6); }
.ca-chip__copy { font-family: var(--body); font-weight: 800; font-size: 11px; letter-spacing: .12em; color: #ffd7dc; }

.socials { display: flex; gap: 8px; }
.socials a {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 3px;
  background: rgba(8, 8, 10, .45); transition: background .18s var(--ease), transform .18s var(--ease);
}
.socials a:hover { background: rgba(8, 8, 10, .85); transform: translateY(-2px); }
.socials svg { width: 15px; height: 15px; fill: #fff; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 35;
  display: flex; align-items: center; gap: 22px;
  padding: 12px var(--pad);
  background: rgba(8, 8, 10, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 17px; letter-spacing: -.02em; }
.nav__brand img { width: 34px; height: 34px; }
.nav__links { display: flex; gap: 20px; margin-left: auto; font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.nav__links a { color: var(--muted); transition: color .16s var(--ease); }
.nav__links a:hover { color: #fff; }
.nav .btn { padding: 11px 18px; font-size: 13px; }
.nav__burger { display: none; width: 40px; height: 40px; margin-left: auto; }
.nav__burger span { display: block; height: 2px; margin: 5px auto; width: 22px; background: #fff; transition: transform .2s var(--ease); }

@media (max-width: 900px) {
  .nav__links {
    position: absolute; inset: 100% 0 auto; flex-direction: column; gap: 0;
    background: rgba(10, 10, 12, .98); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .3s var(--ease);
  }
  .nav__links a { padding: 15px var(--pad); border-top: 1px solid var(--line); }
  .nav.is-open .nav__links { max-height: 400px; }
  .nav__burger { display: block; }
  .nav .btn { order: 3; }
  .topbar { flex-wrap: wrap; }
  .topbar__marquee { order: 3; flex-basis: 100%; }
}

/* ---------- reveal ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js-reveal .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  padding: 12px 20px; border-radius: 3px; background: #14141a;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .6), inset 0 0 0 1px var(--line);
  font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease); z-index: 90;
}
.toast.in { opacity: 1; transform: translate(-50%, 0); }

/* ---------- tombol suara ---------- */
.sound-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(16, 16, 20, .85); box-shadow: inset 0 0 0 1px var(--line), 0 8px 24px rgba(0, 0, 0, .45);
  transition: transform .18s var(--ease), background .18s var(--ease);
}
.sound-toggle:hover { transform: scale(1.06); background: rgba(232, 16, 42, .85); }
.sound-toggle svg { width: 20px; height: 20px; fill: #fff; }
.sound-toggle .on { display: none; }
.sound-toggle.is-on .on { display: block; }
.sound-toggle.is-on .off { display: none; }

/* ---------- footer ---------- */
.footer {
  padding: 54px var(--pad) 40px; border-top: 1px solid var(--line);
  background: var(--ink);
}
.footer__grid { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; justify-content: space-between; }
.footer__brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 20px; }
.footer__brand img { width: 42px; height: 42px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.footer__links a:hover { color: #fff; }
.footer__legal { margin-top: 28px; font-size: 12.5px; color: #6d7480; max-width: 720px; line-height: 1.7; }
