/* =========================================================
   Casa Neira × WTP | Kitchen Staff Recruitment
   Gaya modern: 3D clay di studio hangat + panel gelap yang tenang.
   ========================================================= */

:root {
  --bg: #0b0706;
  --fg: #f7f2ec;
  --fg-2: rgba(247, 242, 236, 0.76);
  --fg-3: rgba(247, 242, 236, 0.6);
  --fg-4: rgba(247, 242, 236, 0.5);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-3: rgba(255, 255, 255, 0.24);
  --field: rgba(255, 255, 255, 0.045);
  --field-hi: rgba(255, 255, 255, 0.075);
  --accent: #ff7a4d; /* aksen terang untuk teks & garis di atas gelap */
  --accent-soft: rgba(255, 122, 77, 0.14);
  --grad: linear-gradient(180deg, #cc431d 0%, #bb3618 100%); /* isi tombol, kontras putih ≥ 4.8:1 */
  --danger: #ff8a7a;
  --r-xl: 28px;
  --r-lg: 18px;
  --r-md: 14px;
  --gutter: clamp(20px, 5vw, 72px);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --topbar-h: 80px;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  background:
    radial-gradient(900px 700px at 74% 48%, rgba(255, 106, 61, 0.12), transparent 60%),
    radial-gradient(700px 600px at 18% 92%, rgba(120, 24, 16, 0.14), transparent 60%),
    var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(255, 122, 77, 0.35); }

body.is-celebrating .veil { opacity: 0.15; }

#scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.4s var(--ease), transform 2.2s var(--ease);
}
#scene.is-ready { opacity: 1; transform: none; }

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.8s var(--ease);
  background: linear-gradient(90deg, rgba(11, 7, 6, 0.9) 0%, rgba(11, 7, 6, 0.78) 30%, rgba(11, 7, 6, 0.35) 50%, rgba(11, 7, 6, 0) 62%);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------- Topbar ---------------- */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  border-radius: 12px;
}
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -0.02em; }
.brand-x { color: var(--fg-4); font-size: 14px; }
.brand-partner { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; color: var(--fg-2); }

.dot {
  position: relative;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  animation: ping 2.4s var(--ease) infinite;
}

/* ---------------- Stage ---------------- */

.stage {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 720px);
  align-content: start;
  padding: max(calc(var(--topbar-h) + 24px), 15vh) var(--gutter) 48px;
}
body.is-hero .stage { align-content: center; padding-top: calc(var(--topbar-h) + 8px); }
.hero,
.deck { grid-area: 1 / 1; min-width: 0; }

/* ---------------- Hero ---------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--fg-2);
  font-size: 15px;
  font-weight: 500;
  animation: rise 0.8s 0.05s var(--spring) both;
}

.hero-title {
  margin: 0 0 26px;
  font-weight: 600;
  font-size: clamp(52px, 5.9vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.hero-title .w {
  display: inline-block;
  animation: wordIn 1s calc(var(--i) * 60ms + 100ms) var(--spring) both;
}
.hero-title .accent {
  padding-right: 0.06em;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.lede {
  max-width: 44ch;
  margin: 0 0 34px;
  color: var(--fg-2);
  font-size: clamp(16px, 1.3vw, 18.5px);
  line-height: 1.55;
  text-wrap: pretty;
  animation: rise 0.8s 0.32s var(--spring) both;
}
.lede strong { color: var(--fg); font-weight: 600; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  animation: rise 0.8s 0.42s var(--spring) both;
}
.hero-note { margin: 0; color: var(--fg-3); font-size: 14px; }

/* Batas pendaftaran: tampilan buka vs tutup (server menambah .is-closed setelah tenggat) */
body:not(.is-closed) .only-closed,
body.is-closed .only-open { display: none; }

.lede.only-open { margin-bottom: 22px; }
.deadline {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 30px;
  padding: 9px 18px 9px 9px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: rise 0.8s 0.37s var(--spring) both;
}
.deadline-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 122, 77, 0.14);
  color: var(--accent);
}
.deadline-ic svg { width: 19px; height: 19px; }
.deadline-txt { display: grid; gap: 2px; min-width: 0; color: var(--fg-2); font-size: 14px; line-height: 1.35; }
.deadline-txt b { color: var(--fg); font-weight: 600; white-space: nowrap; }
.deadline-txt small { color: var(--fg-3); font-size: 13px; }
.countdown { color: var(--accent); font-weight: 500; }
.countdown:not(:empty)::before { content: " · "; color: var(--fg-4); font-weight: 400; }
.hero-cta.only-open { animation-delay: 0.46s; }
.hero-note.only-closed { animation: rise 0.8s 0.42s var(--spring) both; }
.dot-off { background: var(--fg-4); }
.dot-off::after { display: none; }

/* ---------------- Panel ---------------- */

.deck {
  --pad: clamp(22px, 2.6vw, 34px);
  position: relative;
  max-width: 560px;
  padding: 26px var(--pad) var(--pad);
  border-radius: var(--r-xl);
  background: rgba(17, 12, 11, 0.84);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px var(--line),
    0 30px 80px -30px rgba(0, 0, 0, 0.75);
}

.deck-head { margin-bottom: 26px; }
.dh-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dh-step { color: var(--fg-3); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.dh-ing {
  --c: #ff5a3c;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg-2);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}
.dh-ing i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  transition: background-color 0.5s;
}
.dh-bar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dh-bar i {
  position: relative;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.dh-bar i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--spring);
}
.dh-bar i.is-done::after { transform: scaleX(1); }
.dh-bar i.is-current {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 122, 77, 0.55) 50%, rgba(255, 255, 255, 0.09) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s linear infinite;
}
body.is-done .deck-head { display: none; }

.steps { display: grid; }
.step { grid-area: 1 / 1; min-width: 0; }

.q {
  margin: 0 0 8px;
  font-size: clamp(27px, 2.5vw, 34px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
  outline: none;
  text-wrap: pretty;
}
.hint { margin: 0; color: var(--fg-3); font-size: 15px; text-wrap: pretty; }
.hint strong { color: var(--fg); font-weight: 600; }

.fields { display: grid; gap: 14px; margin-top: 24px; }
.fields.two { grid-template-columns: 1.1fr 1fr; }
.fields-tight { margin-top: 16px; }
.field { display: block; min-width: 0; }
.field-label { display: block; margin-bottom: 8px; color: var(--fg-2); font-size: 14px; font-weight: 500; }
.field-label .opt { color: var(--fg-4); font-weight: 400; }

.input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-md);
  outline: none;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--fg);
  font: inherit;
  font-size: 17px;
  color-scheme: dark;
  transition: box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}
.input::placeholder { color: var(--fg-4); }
.input:hover { background: var(--field-hi); box-shadow: inset 0 0 0 1px var(--line-3); }
.input:focus { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px rgba(255, 122, 77, 0.16); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--danger), 0 0 0 4px rgba(255, 138, 122, 0.12); }
textarea.input { min-height: 120px; padding: 15px 18px; resize: vertical; line-height: 1.5; }

.err {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
}
.err:empty { display: none; }
.err::before {
  content: "";
  flex: none;
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2zm0-4h-2V7h2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2zm0-4h-2V7h2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.err:not(:empty) { animation: errIn 0.4s var(--spring) both; }

/* bar aksi menempel di bawah layar saat kartu lebih tinggi dari layar */
.actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px calc(-1 * var(--pad)) calc(-1 * var(--pad));
  padding: 22px var(--pad) var(--pad);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  background: linear-gradient(180deg, rgba(17, 12, 11, 0) 0, #110c0b 20px);
}
.actions-end { justify-content: flex-end; }

.lbl-save,
.lbl-cancel { display: none; }
body.is-editing .lbl-next,
body.is-editing .step:not(.step-review) .lbl-back { display: none; }
body.is-editing .lbl-save,
body.is-editing .step:not(.step-review) .lbl-cancel { display: inline; }

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

.btn {
  --tx: 0px;
  --ty: 0px;
  --s: 1;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transform: translate3d(var(--tx), var(--ty), 0) scale(var(--s));
  transition: transform 0.5s var(--spring), box-shadow 0.3s var(--ease), background-color 0.3s;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:active,
.btn.is-pressed { --s: 0.96; transition-duration: 0.12s; }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.5s var(--spring); }

.btn-primary {
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: var(--grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 24px -12px rgba(0, 0, 0, 0.8);
}
.actions .btn-primary { min-width: 168px; }
.btn-primary::before {
  /* kilau tipis yang menyapu saat hover */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.16) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
}
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 14px 30px -12px rgba(0, 0, 0, 0.85); }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-ghost {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); box-shadow: inset 0 0 0 1px var(--line-3); }

.btn-lg { min-height: 60px; padding: 0 8px 0 28px; font-size: 16.5px; gap: 16px; }
.btn-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  transition: transform 0.6s var(--spring), background-color 0.3s;
}
.btn-lg:hover .btn-icon { transform: translateX(4px); background: rgba(255, 255, 255, 0.22); }
.btn-lg:hover .btn-icon svg { transform: none; }

.btn[disabled] { cursor: progress; }
.btn-fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.18);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  transition: transform 0.2s;
  pointer-events: none;
}
.btn-label { position: relative; }

.link-btn {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s;
}
.link-btn:hover { background: var(--accent-soft); }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------- Pilihan ---------------- */

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}
.choice { position: relative; display: block; cursor: pointer; }
.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.choice-face {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 46px 8px 10px;
  border-radius: var(--r-md);
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform 0.5s var(--spring), background-color 0.3s, box-shadow 0.3s var(--ease);
}
.choice:hover .choice-face { transform: translateY(-2px); background: var(--field-hi); box-shadow: inset 0 0 0 1px var(--line-3); }
.choice:active .choice-face { transform: scale(0.985); transition-duration: 0.12s; }
.choice input:focus-visible + .choice-face { outline: 2px solid var(--accent); outline-offset: 3px; }
.choice input:checked + .choice-face { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.choices[aria-invalid="true"] .choice-face { box-shadow: inset 0 0 0 1px rgba(255, 138, 122, 0.7); }
.choice-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg-2);
  transition: transform 0.6s var(--spring-bouncy), background-color 0.3s, color 0.3s;
}
.choice-icon svg { width: 19px; height: 19px; }
.choice input:checked + .choice-face .choice-icon { background: var(--grad); color: #fff; transform: scale(1.06); }
.choice-title { font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }
.choice input:checked + .choice-face .choice-title { font-weight: 600; }
.choice-check {
  position: absolute;
  top: 50%;
  right: 14px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-3);
  color: #fff;
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.6s var(--spring-bouncy);
}
.choice-check svg { width: 13px; height: 13px; }
.choice-check path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 0.35s 0.08s var(--ease), opacity 0s 0.43s; }
.choice input:checked + .choice-face .choice-check { background: var(--grad); box-shadow: none; transform: scale(1.1); }
.choice input:checked + .choice-face .choice-check path { stroke-dashoffset: 0; opacity: 1; transition: stroke-dashoffset 0.35s 0.08s var(--ease); }

.choices.segmented .choice-face { min-height: 64px; padding: 0 44px 0 18px; }
.choices.segmented .choice-title { font-size: 16.5px; }
.choices.compact { grid-template-columns: 1fr; gap: 8px; }

/* ---------------- Unggah CV ---------------- */

.drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 30px 20px 26px;
  border: 1.5px dashed var(--line-3);
  border-radius: var(--r-lg);
  background: var(--field);
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s, transform 0.5s var(--spring);
}
.drop:hover { border-color: rgba(255, 255, 255, 0.4); background-color: var(--field-hi); }
.drop:hover .drop-icon { transform: translateY(-4px); }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.drop.is-over { border-color: var(--accent); background-color: var(--accent-soft); transform: scale(1.015); }
.drop.has-file { border-style: solid; border-color: rgba(255, 122, 77, 0.55); }
.drop[aria-invalid="true"] { border-color: var(--danger); }
.drop-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 10px;
  border-radius: 17px;
  background: var(--grad);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 24px -12px rgba(0, 0, 0, 0.8);
  transition: transform 0.6s var(--spring);
}
.drop-icon svg { width: 24px; height: 24px; }
.drop-title { font-size: 15.5px; font-weight: 500; }
.drop-title strong { color: var(--accent); font-weight: 600; }
.drop-sub { color: var(--fg-3); font-size: 13.5px; }

.file-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 10px 10px 10px 12px;
  border-radius: 16px;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.file-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
}
.file-info { display: grid; min-width: 0; flex: 1; }
.file-info strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14.5px; font-weight: 600; }
.file-info small { color: var(--fg-3); font-size: 13px; }

/* ---------------- WhatsApp ---------------- */

.input-group {
  display: flex;
  align-items: stretch;
  border-radius: var(--r-md);
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}
.input-group:hover { background: var(--field-hi); box-shadow: inset 0 0 0 1px var(--line-3); }
.input-group:focus-within { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px rgba(255, 122, 77, 0.16); }
.input-group:has(.input[aria-invalid="true"]) { box-shadow: inset 0 0 0 1.5px var(--danger), 0 0 0 4px rgba(255, 138, 122, 0.12); }
.input-group .prefix {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 16px;
  border-right: 1px solid var(--line-2);
  color: var(--fg-2);
  font-size: 16px;
  font-weight: 500;
}
.input-group .prefix svg { width: 18px; height: 18px; color: var(--fg-3); }
.input-group .input,
.input-group .input:hover,
.input-group .input:focus { background: transparent; box-shadow: none; }

.wa-preview { margin: 10px 0 0; color: var(--fg-2); font-size: 14px; font-weight: 500; animation: errIn 0.4s var(--spring) both; }
.wa-preview:empty { display: none; }

/* ---------------- Ringkasan ---------------- */

.summary {
  display: grid;
  margin: 20px 0 0;
  padding: 2px 16px;
  border-radius: var(--r-lg);
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line);
}
.sum-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.sum-row:last-child { border-bottom: 0; }
.sum-row dt { color: var(--fg-3); font-size: 13.5px; }
.sum-row dd { margin: 0; font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
[data-sum="whatsapp"] { white-space: nowrap; }
.sum-lines span { display: block; }
.sum-lines span:empty { display: none; }
.sum-lines span + span { margin-top: 2px; color: var(--fg-2); }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  color: var(--fg-2);
  font-size: 14px;
  cursor: pointer;
}
.consent input {
  appearance: none;
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 7px;
  background: var(--field);
  box-shadow: inset 0 0 0 1.5px var(--line-3);
  cursor: pointer;
  transition: background-color 0.25s, box-shadow 0.25s, transform 0.5s var(--spring-bouncy);
}
.consent input::after {
  content: "";
  width: 10px;
  height: 6px;
  margin-top: -2px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.4s var(--spring-bouncy);
}
.consent input:checked { background: var(--grad); box-shadow: none; transform: scale(1.06); }
.consent input:checked::after { transform: rotate(-45deg) scale(1); }
.consent input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--danger); }

/* ---------------- Sukses ---------------- */

.success-badge {
  width: 72px;
  height: 72px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 77, 0.35);
  animation: popIn 0.9s 0.1s var(--spring-bouncy) both;
}
.success-badge svg { width: 100%; height: 100%; fill: none; stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; }
.sb-ring { stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0.5; animation: draw 0.9s 0.25s var(--ease) forwards; }
.sb-check { stroke-width: 4; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.5s 0.65s var(--ease) forwards; }

.ticket {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  padding: 14px 14px 14px 18px;
  border-radius: var(--r-lg);
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.ticket-label { color: var(--fg-3); font-size: 13px; line-height: 1.2; max-width: 9ch; }
.ticket strong { flex: 1; min-width: 0; min-height: 1.2em; font-family: var(--mono); font-size: clamp(16px, 2.2vw, 22px); font-weight: 500; letter-spacing: 0.04em; white-space: nowrap; }
.ticket-copy {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--fg);
  color: #140d0b;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.5s var(--spring);
}
.ticket-copy:active { transform: scale(0.95); }
.ticket-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------- Efek ---------------- */

.fx {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}
.spark {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  will-change: transform, opacity;
}

/* ---------------- Keyframes ---------------- */

@keyframes wordIn {
  from { opacity: 0; transform: translateY(0.4em); filter: blur(10px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes errIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@keyframes ping {
  0% { opacity: 0.8; transform: scale(0.6); }
  80%,
  100% { opacity: 0; transform: scale(1.6); }
}
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes popIn {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: none; }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 899px) {
  :root { --topbar-h: 64px; --r-xl: 24px; }
  .veil { background: linear-gradient(180deg, rgba(11, 7, 6, 0.55) 0, rgba(11, 7, 6, 0) 11%, rgba(11, 7, 6, 0) 26%, rgba(11, 7, 6, 0.75) 40%, rgba(11, 7, 6, 0.94) 100%); }
  .stage,
  body.is-hero .stage {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    padding-top: 34dvh;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  /* kartu mengisi sampai bawah layar; tombol aksi selalu di jangkauan jempol */
  .deck {
    display: flex;
    flex-direction: column;
    max-width: none;
    min-height: calc(66dvh - max(16px, env(safe-area-inset-bottom)));
  }
  .steps { flex: 1; }
  .step { display: flex; flex-direction: column; }
  .actions {
    margin-top: auto;
    padding-top: 26px;
    padding-bottom: max(var(--pad), env(safe-area-inset-bottom));
  }
  .actions .btn-ghost { background: #241b18; }
}

@media (max-width: 560px) {
  .stage,
  body.is-hero .stage { padding-left: 12px; padding-right: 12px; }
  .hero { padding: 0 8px; }
  .fields.two { grid-template-columns: 1fr; }
  .sum-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
  .sum-row dt { grid-column: 1; }
  .sum-row dd { grid-column: 1; }
  .sum-row .link-btn { grid-column: 2; grid-row: 1 / 3; }
  .actions .btn-primary { flex: 1; min-width: 0; }
  .hero-cta .btn { width: 100%; justify-content: space-between; }
  .ticket { flex-wrap: wrap; row-gap: 6px; }
  .ticket-label { flex-basis: 100%; max-width: none; }
  .ticket strong { font-size: clamp(16px, 4.6vw, 22px); }
}

@media (min-width: 900px) and (max-height: 820px) {
  .stage { padding-top: calc(var(--topbar-h) + 8px); }
}

@media (pointer: coarse) {
  .link-btn { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
