/* =========================================================
   INDEX.CSS — halaman pembuka (landing) Bengkel Kode (v6)
   Butuh base.css dimuat lebih dulu.
   Susunan: penjelasan di kiri, jendela editor di kanan (di HP: ditumpuk).
   ========================================================= */

.ix-stage {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
/* Hiasan latar: simbol kode samar (satu warna tosca, sangat transparan).
   Hanya mengisi margin kiri-kanan di luar konten (lebar konten 1040px); ukurannya mengikuti lebar margin. */
.ix-deco { --m: max(0px, calc((100vw - 1040px) / 2)); position: absolute; inset: 0; overflow: hidden; pointer-events: none; user-select: none; z-index: 0; }
.ix-deco span { position: absolute; font-family: var(--font-code); font-weight: 600; line-height: 1; white-space: nowrap; color: var(--accent); opacity: .09; animation: ix-float 13s ease-in-out infinite; }
.ix-deco .d1 { left: calc(var(--m) * .10);  top: 11%;    font-size: clamp(30px, calc(var(--m) * .34), 96px); animation-delay: -2s; }
.ix-deco .d2 { left: calc(var(--m) * .14);  bottom: 13%; font-size: clamp(26px, calc(var(--m) * .26), 76px); rotate: -6deg; animation-delay: -6s; }
.ix-deco .d3 { right: calc(var(--m) * .10); bottom: 14%; font-size: clamp(30px, calc(var(--m) * .32), 92px); animation-delay: -9s; }
.ix-deco .d4 { right: calc(var(--m) * .14); top: 9%;     font-size: clamp(28px, calc(var(--m) * .28), 80px); animation-delay: -4s; }
.ix-deco .d5 { left: calc(var(--m) * .12);  top: 46%;    font-size: clamp(24px, calc(var(--m) * .22), 64px); animation-delay: -11s; opacity: .07; }
.ix-deco .d6 { right: calc(var(--m) * .12); top: 45%;    font-size: clamp(30px, calc(var(--m) * .34), 96px); animation-delay: -7s; opacity: .07; }
@keyframes ix-float { 50% { transform: translateY(-12px); } }
.ix-wrap { position: relative; z-index: 1; }
@media (max-width: 1239px) { .ix-deco { display: none; } }
@media (prefers-reduced-motion: reduce) { .ix-deco span { animation: none; } }

/* Penggaris tipis di tepi atas: ciri khas "bengkel" (pengukuran) */
.ix-stage::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background:
    linear-gradient(90deg, var(--line-strong) 1px, transparent 1px) 0 0 / 40px 10px repeat-x,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 8px 5px repeat-x;
}

.ix-wrap {
  width: 100%; max-width: 1040px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center;
}

/* ---------- Kolom kiri ---------- */
.ix-brandrow { display: flex; align-items: center; gap: 12px; }
.ix-brand { font-family: var(--font-brand); font-weight: 500; font-size: 40px; line-height: 1; margin: 0; letter-spacing: -0.01em; color: var(--text); }
.ix-brand span { font-weight: 700; background: linear-gradient(90deg, var(--accent), var(--ok)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ix-tagline { font-family: var(--font-code); font-size: 13px; color: var(--muted); margin: 10px 0 28px; }

.ix-lead { font-size: 19px; line-height: 1.55; color: var(--text); margin: 0 0 24px; max-width: 30em; }

.ix-steps { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 0; max-width: 30em; border-top: 1px solid var(--line); }
.ix-steps li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ix-steps b {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font: 600 13px var(--font-code); color: var(--accent); background: var(--accent-soft);
}
.ix-steps li:nth-child(2) b { color: var(--accent-2); background: var(--accent-2-soft); }
.ix-steps li:nth-child(3) b { color: #d9a13b; background: rgba(253,186,116,0.16); }
.ix-steps strong { display: block; font-size: 15px; font-weight: 600; }
.ix-steps span { display: block; font-size: 14px; color: var(--muted); margin-top: 1px; }

.ix-start-btn { font-size: 16px; padding: 14px 28px; text-decoration: none; }
.ix-hint { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* ---------- Jendela editor (kolom kanan) ---------- */
.ix-scene { display: flex; flex-direction: column; min-width: 0; }
.ix-scene-art { position: relative; width: 100%; aspect-ratio: 492 / 230; margin-top: 14px; pointer-events: none; user-select: none; }
.ix-tools { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ix-gear { position: absolute; aspect-ratio: 1; }
.ix-gear img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* ukuran dan posisi dalam persen dari area 492 x 230; kecepatan sebanding dengan diameter supaya terlihat saling mengait */
.ix-gear--js   { left: 36.0%;  top: 15.2%; width: 34.6%; --dur: 36s; }
.ix-gear--kode { left: 64.6%;  top: 51.3%; width: 20.3%; --dur: 21.6s; }
.ix-gear--lime { left: 30.7%;  top: 59.6%; width: 15.9%; --dur: 17s; }
.ix-gear .rot { animation: ix-spin var(--dur, 30s) linear infinite; }
.ix-gear--kode .rot, .ix-gear--lime .rot { animation-direction: reverse; }
@keyframes ix-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ix-gear .rot { animation: none; } }
.ix-terminal {
  background: var(--code-bg); border-radius: var(--radius-l); overflow: hidden;
  border: 1px solid var(--code-line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 0 0 1px rgba(108,180,242,0.06), 0 30px 70px -20px rgba(108,180,242,0.22), 0 24px 50px -20px rgba(0,0,0,0.7);
}
.ix-terminal-bar { background: var(--code-bg-2); padding: 11px 18px; border-bottom: 1px solid var(--code-line); }
.ix-terminal-file { font-family: var(--font-code); font-size: 13px; color: var(--code-muted); }
.ix-terminal-body { padding: 18px 0 22px; font-family: var(--font-code); font-size: 14.5px; line-height: 1.8; color: var(--code-text); }
.ix-code-line { display: flex; gap: 18px; padding: 0 22px 0 0; min-height: 1.8em; }
.ix-code-line i { flex-shrink: 0; width: 44px; text-align: right; font-style: normal; color: var(--code-muted); opacity: 0.7; user-select: none; }
.ix-code-line span { white-space: pre-wrap; overflow-wrap: anywhere; }
.ix-code-line em { font-style: normal; }
.ix-code-line .k { color: var(--syn-keyword); }
.ix-code-line .n { color: var(--syn-num); }
.ix-code-line .s { color: var(--syn-str); }
.ix-code-line--typed { background: rgba(255,255,255,0.05); }
.ix-terminal-text { color: var(--syn-fn); }
.ix-caret { display: inline-block; width: 8px; height: 1.1em; background: var(--run); vertical-align: text-bottom; margin-left: 2px; animation: ix-blink 1s step-end infinite; }
@keyframes ix-blink { 50% { opacity: 0; } }

/* Satu gerakan saat halaman dibuka: kartu editor naik pelan */
.ix-terminal { animation: ix-rise 0.6s ease-out 0.1s both; }
@keyframes ix-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .ix-stage { align-items: flex-start; padding: 44px 20px 40px; }
  .ix-wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .ix-brand { font-size: 34px; }
  .ix-lead { font-size: 17px; }
  .ix-start-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ix-terminal { animation: none; }
  .ix-caret { animation: none; }
}

/* Penyederhanaan tampilan: tanpa glow, simbol melayang, penggaris, dan gradien merek */
.ix-deco { display: none; }
.ix-terminal { box-shadow: 0 24px 50px -20px rgba(0,0,0,0.7); }
.ix-brand span { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--accent); }

/* Ilustrasi roda (raster) diselaraskan dengan palet biru-abu */
.ix-gear--js img { filter: hue-rotate(38deg) saturate(.9); }
.ix-gear--kode img { filter: saturate(.3) brightness(1.05); }
.ix-gear--lime img { filter: hue-rotate(45deg) saturate(.7); }
