@font-face {
  font-family: 'Nohemi';
  src: url('../fonts/Nohemi-VF-BF6438cc58ad63d.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi-Variable.ttf') format('truetype-variations');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --orange: #df794e;
  --orange-soft: #fdf1ec;
  --black: #1c2028;
  --white: #ffffff;
  --text: #1c2028;
  --text-dim: #6b6b6b;
  --card: #f8f8f8;
  --line: #e9e9e9;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(28, 32, 40, 0.06);
  --display: 'Nohemi', 'Satoshi', system-ui, sans-serif;
  --body: 'Satoshi', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--white);
  line-height: 1.55;
  overflow-x: hidden;
}

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

a { color: inherit; }

/* Tanpa ini, teks di dalam <button> memakai warna bawaan sistem — di iOS
   Safari warnanya biru. */
button { font-family: inherit; color: inherit; }

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- Tombol ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: #d06b3f; }

.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: #2c323d; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--text); }

/* ---------- Navbar ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  /* Lockup-nya berbanding 2:1 dengan teks "Mech" hanya seperempat tinggi,
     jadi perlu lebih besar dari logo biasa agar terbaca. */
  height: 38px;
  width: auto;
  display: block;
}

/* ---------- Landing: hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  background: var(--orange);
  text-align: center;
  padding: 40px 0 clamp(44px, 6vw, 76px);
}

/* Pola komponen keyboard dari splash aplikasi iOS; warnanya sudah oranye
   brand, jadi cukup ditumpuk apa adanya. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('https://cdn.mechkit.app/web/hero-pattern.webp') center / cover no-repeat;
  opacity: 0.55;
}

.hero-logo { justify-content: center; margin-bottom: clamp(32px, 5vw, 56px); }
.hero-logo img { height: 58px; }

/* Teks di atas oranye memakai navy, bukan putih: putih hanya 3.2:1 dan
   gagal AA untuk ukuran teks isi. */
.hero h1 {
  font-size: clamp(33px, 5.6vw, 62px);
  max-width: 17ch;
  margin-inline: auto;
  color: var(--black);
}

.hero p {
  font-size: clamp(16px, 1.5vw, 19px);
  max-width: 50ch;
  margin: 20px auto 30px;
  color: var(--black);
}

.hero-shot {
  display: block;
  width: min(1080px, 100%);
  height: auto;
  margin: clamp(36px, 5vw, 60px) auto 0;
  filter: drop-shadow(0 26px 40px rgba(28, 32, 40, 0.26));
}

/* ---------- Bagian umum ---------- */

.section { padding: 68px 0; }
.section-alt { background: var(--card); }

.section-head { max-width: 54ch; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.section-head p { color: var(--text-dim); margin-top: 12px; font-size: 16px; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.step-art {
  aspect-ratio: 4 / 3;
  background: var(--orange);
  overflow: hidden;
}

.step-art img {
  width: 100%;
  height: 100%;
  /* Gambar sudah dipotong 4:3 mengikuti isinya, jadi cover tidak memotong
     apa pun yang penting. */
  object-fit: cover;
  display: block;
}

.step-body { padding: 22px 24px 26px; }

.step-body h3 { font-size: 19px; margin: 10px 0 8px; }
.step-body p { color: var(--text-dim); font-size: 15px; margin: 0; }

/* ---------- Katalog: dinding warna asli ---------- */

.catalog {
  background: var(--black);
  color: var(--white);
}

.catalog .section-head h2 { color: var(--white); }
.catalog .section-head p { color: #a8aeb8; }

.cat-item {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 28px;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.cat-key b {
  display: block;
  font-family: var(--display);
  font-size: 36px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
}

.cat-key span { font-size: 13px; color: #a8aeb8; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chips i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

/* Keycap: primary / secondary / accent dalam satu keping */
.chips i.tri {
  background: linear-gradient(115deg, var(--a) 0 34%, var(--b) 34% 67%, var(--c) 67% 100%);
}

/* Switch: housing di luar, stem di tengah */
.chips i.sw {
  background: var(--s);
  box-shadow: inset 0 0 0 6px var(--h), inset 0 0 0 7px rgba(255, 255, 255, 0.22);
}

.chips-layout { gap: 16px; }
.chips-layout figure { margin: 0; text-align: center; }
.chips-layout figcaption {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #a8aeb8;
}
.chips-layout img {
  height: 72px;
  width: auto;
  border-radius: 10px;
  background: var(--white);
  padding: 6px 12px;
}

/* ---------- Penutup: CTA + footer dalam satu pita ---------- */

.closing {
  position: relative;
  isolation: isolate;
  background: var(--orange);
  padding: clamp(56px, 7vw, 88px) 0 34px;
  text-align: center;
}

.closing::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('https://cdn.mechkit.app/web/hero-pattern.webp') center / cover no-repeat;
  opacity: 0.5;
}

.closing-cta h2 { font-size: clamp(28px, 3.6vw, 42px); color: var(--black); }
.closing-cta p { color: var(--black); margin: 14px auto 30px; }

.footer {
  margin-top: clamp(48px, 6vw, 76px);
  padding-top: 26px;
  border-top: 1px solid rgba(28, 32, 40, 0.18);
  color: var(--black);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  text-align: left;
}

.footer .logo img { height: 40px; }

/* ---------- Customizer ---------- */

.cz {
  display: grid;
  grid-template-columns: 1fr 400px;
  height: 100dvh;
}

/* Panggung sengaja netral: latar berwarna akan mengubah persepsi warna case
   dan keycap, padahal menilai warna itu inti aplikasinya. Karakter brand
   dipindah ke panel. */
.stage {
  position: relative;
  overflow: hidden;
  background: radial-gradient(118% 88% at 50% 32%, #ffffff 0%, #f5f4f3 52%, #e5e3e1 100%);
  min-height: 300px;
}

/* Pola brand diabu-abukan dan nyaris transparan supaya panggung punya tekstur
   tanpa mencemari warna model. */
.stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://cdn.mechkit.app/web/hero-pattern.webp') center / cover no-repeat;
  filter: grayscale(1);
  opacity: 0.06;
  pointer-events: none;
}

.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(115% 85% at 50% 42%, transparent 58%, rgba(28, 32, 40, 0.11) 100%);
  pointer-events: none;
}

.stage model-viewer {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  --poster-color: transparent;
  --progress-bar-color: var(--orange);
}

/* Logo dan tombol kembali melayang di atas panggung, bukan bar tersendiri,
   supaya tidak memakan tinggi layar di ponsel. */
.stage-bar {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  pointer-events: none;
}

.stage-bar > * { pointer-events: auto; }
.stage-bar .logo img { height: 30px; width: auto; display: block; }

.stage-back {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
}

.stage-back:hover { border-color: var(--text); }

.stage-badge[hidden] { display: none; }
.stage-badge.faded { opacity: 0; pointer-events: none; }

.stage-badge {
  position: absolute;
  z-index: 3;
  top: 66px;
  left: 18px;
  right: 18px;
  width: fit-content;
  max-width: calc(100% - 36px);
  margin-inline: auto;
  text-align: center;
  transition: opacity 0.4s ease;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
}

.ar-btn {
  position: absolute;
  z-index: 3;
  bottom: 22px;
  left: 0;
  right: 0;
  width: fit-content;
  margin-inline: auto;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(28, 32, 40, 0.24);
}

.ar-btn[hidden] { display: none; }

.panel {
  border-left: 1px solid var(--line);
  background: var(--white);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.panel-head { padding: 18px 22px 14px; }

.panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 22px 34px;
}

.tabs {
  display: flex;
  gap: 4px;
  background: var(--card);
  border-radius: 999px;
  padding: 4px;
}

.tab {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 9px 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab[aria-selected='true'] {
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow);
}

.pane[hidden] { display: none; }

.field { margin-bottom: 26px; }

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.field-label h4 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.field-label em {
  font-style: normal;
  font-size: 12.5px;
  color: var(--text-dim);
}

.seg {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
}

.seg button {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  padding: 11px 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}

.seg button[aria-pressed='true'] {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange);
}

.seg-visual button {
  display: grid;
  gap: 7px;
  justify-items: center;
  padding: 12px 8px;
}

.seg-visual img {
  width: 100%;
  max-width: 118px;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 9px;
}

.swatch {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px solid var(--line);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.swatch:hover { transform: scale(1.06); }
.swatch[aria-pressed='true'] { border-color: var(--orange); }

.swatch[aria-pressed='true']::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1.5px solid var(--orange);
  border-radius: 16px;
}

.cw-list { display: grid; gap: 9px; }

.cw {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 13px;
  padding: 11px 13px;
  color: var(--text);
  /* Nama produk ada yang satu baris ada yang dua; tinggi dikunci agar
     daftarnya tidak bergerigi. */
  min-height: 62px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cw:hover { border-color: #d4d4d4; }
.cw[aria-pressed='true'] { border-color: var(--orange); background: var(--orange-soft); }

.cw-dots { display: flex; flex-shrink: 0; }

.cw-dots i {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1.5px solid var(--white);
  margin-left: -6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
}

.cw-dots i:first-child { margin-left: 0; }

.cw-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.cw-name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  /* Nama produk keycap sering panjang. Dipotong di dua baris, dan ruang dua
     baris itu selalu disediakan supaya tinggi kartu di satu daftar seragam. */
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cw-tag,
.cw-sub {
  font-size: 11.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cw-tag { color: var(--orange); font-weight: 600; }
.cw-sub { color: var(--text-dim); }

.group-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 22px 0 10px;
}

.group-label:first-child { margin-top: 0; }

/* Kartu produk nyata di tab ringkasan */

.prod {
  display: flex;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  margin-bottom: 11px;
  align-items: center;
}

.prod img {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--card);
  flex-shrink: 0;
}

.prod-body { min-width: 0; flex: 1; }
.prod-kind { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }

.prod-name {
  font-size: 14px;
  font-weight: 600;
  margin: 2px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prod-price { font-size: 13.5px; font-weight: 700; color: var(--orange); }

.prod-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  align-self: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
}

.prod-link:hover { border-color: var(--orange); }
.prod-link img { width: 15px; height: 15px; object-fit: contain; }

.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}

.total b { font-family: var(--display); font-size: 22px; }

.empty { color: var(--text-dim); font-size: 14px; }

.pick-note {
  font-size: 12.5px;
  color: var(--text-dim);
  margin: 12px 0 0;
  min-height: 1em;
}

.finish { border-top: 1px solid var(--line); padding-top: 22px; }

.finish-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.btn-soft {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-soft:hover { border-color: var(--orange); color: var(--orange); }
.btn-soft:disabled { opacity: 0.5; cursor: default; }

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: var(--black);
  color: var(--white);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 26px rgba(28, 32, 40, 0.3);
}

.toast[hidden] { display: none; }

.note {
  background: var(--orange-soft);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #9a4d27;
  margin-bottom: 18px;
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 37%, #f0f0f0 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  border-radius: 12px;
  height: 46px;
}

@keyframes shimmer {
  from { background-position: 100% 50%; }
  to { background-position: 0 50%; }
}

/* ---------- Responsif ---------- */

@media (max-width: 900px) {
  .hero { padding: 30px 0 42px; }
  .hero-logo img { height: 44px; }
  .section { padding: 52px 0; }
  .cat-item { grid-template-columns: 1fr; gap: 14px; }
  .cat-key { display: flex; align-items: baseline; gap: 8px; }
  .chips i { width: 20px; height: 20px; }
  .chips i.sw { box-shadow: inset 0 0 0 5px var(--h), inset 0 0 0 6px rgba(255,255,255,.22); }
  .footer { justify-content: center; text-align: center; }

  .cz {
    grid-template-columns: 1fr;
    grid-template-rows: 44dvh 1fr;
    height: 100dvh;
  }

  .panel { border-left: none; border-top: 1px solid var(--line); }
  .panel-head { padding: 14px 18px 12px; }
  .panel-scroll { padding: 4px 18px calc(24px + env(safe-area-inset-bottom)); }
  .stage-bar { padding: 12px 14px; }
  .stage-bar .logo img { height: 26px; }
  .stage-badge { font-size: 11.5px; top: 54px; padding: 6px 12px; }
  .ar-btn { bottom: 16px; font-size: 13px; padding: 11px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
