/* ==========================================================
   Photobooth IM3 Platinum — public screens (kiosk, mobile, review)
   Tone: IM3 Platinum (dark charcoal, silver, yellow #FFD500, copper)
   ========================================================== */
@font-face { font-family: "Indosat"; src: url("../fonts/IndosatRegular-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Indosat"; src: url("../fonts/IndosatMedium-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Indosat"; src: url("../fonts/IndosatBold-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Ooredoo"; src: url("../fonts/Ooredoo-Heavy.otf") format("opentype"); font-weight: 900; font-display: swap; }

:root {
  --bg: #1D1D1D;
  --bg-2: #282828;
  --card-a: #3C3E3F;
  --card-b: #363636;
  --line: rgba(255,255,255,.10);
  --text: #FFFFFF;
  --muted: #A9ADB1;
  --silver: #B9BCBF;
  --yellow: #FFD500;
  --yellow-press: #E6C000;
  --copper: #D9773F;
  --red: #ED2324;
  --ok: #3DDC84;
  --radius: 12px;
  --pill: 999px;
  --font: "Indosat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Ooredoo", "Indosat", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(217,119,63,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(185,188,191,.08), transparent 60%);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: var(--yellow); }

/* ---------- Layout ---------- */
.app { min-height: 100%; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; }
.topbar .logo { height: 46px; width: auto; }
.topbar .badge-src { font-size: 13px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.screen { flex: 1; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.screen.active { display: flex; animation: fadeIn .35s ease; }
.screen > * { max-width: 100%; }
body:not(.admin) { overflow-x: hidden; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.eyebrow { color: var(--yellow); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-size: 14px; margin: 0 0 10px; }
.title { font-family: var(--display); font-weight: 900; font-size: clamp(30px, 5vw, 64px); line-height: 1.05; margin: 0 0 14px; letter-spacing: -.01em; }
.title .accent { color: var(--yellow); }
.lead { color: var(--muted); font-size: clamp(15px, 1.6vw, 20px); margin: 0 0 28px; max-width: 640px; line-height: 1.5; }
.spark { color: var(--copper); }

/* ---------- Card ---------- */
.card {
  background: linear-gradient(140.19deg, var(--card-a) 43.66%, var(--card-b) 94.74%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  width: 100%;
}

/* ---------- Buttons (IM3 style: pill, yellow primary) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font); font-weight: 700; font-size: 16px; letter-spacing: .02em;
  padding: 14px 32px; min-height: 52px;
  border-radius: var(--pill); border: 2px solid transparent;
  cursor: pointer; text-decoration: none; user-select: none;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, color .15s ease, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.is-loading { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--yellow); color: #1D1D1D; }
.btn-primary:hover { background: var(--yellow-press); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn-ghost { background: rgba(255,255,255,.06); color: #fff; }
.btn-danger { background: transparent; color: #fff; border-color: rgba(237,35,36,.7); }
.btn-xl { font-size: clamp(20px, 2.4vw, 28px); padding: 22px 64px; min-height: 76px; letter-spacing: .08em; text-transform: uppercase; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-start { position: relative; box-shadow: 0 0 0 0 rgba(255,213,0,.5); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,213,0,.45); } 70% { box-shadow: 0 0 0 26px rgba(255,213,0,0); } 100% { box-shadow: 0 0 0 0 rgba(255,213,0,0); } }

/* ---------- Form ---------- */
.form { width: 100%; max-width: 520px; text-align: left; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--silver); margin-bottom: 8px; }
.input {
  width: 100%; font-family: var(--font); font-size: 20px; color: #fff;
  background: rgba(0,0,0,.28); border: 1.5px solid rgba(255,255,255,.18);
  border-radius: var(--radius); padding: 16px 18px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: rgba(255,255,255,.35); }
.input:focus { border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255,213,0,.15); }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.error-msg { color: #ff8a8a; font-size: 14px; min-height: 20px; margin: 4px 0 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.45; margin: 4px 0 20px; }
.check input { width: 20px; height: 20px; accent-color: var(--yellow); flex-shrink: 0; margin-top: 1px; }

/* ---------- Camera ---------- */
.stage { position: relative; width: min(100%, 520px); aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: #000; border: 2px solid rgba(255,255,255,.12); }
.stage video, .stage canvas.preview { width: 100%; height: 100%; object-fit: cover; }
.stage video.mirror { transform: scaleX(-1); }
.stage .guide { position: absolute; inset: 0; pointer-events: none; }
.stage .guide::before { content: ""; position: absolute; left: 18%; right: 18%; top: 12%; bottom: 0; border: 2px dashed rgba(255,213,0,.45); border-radius: 50% 50% 0 0 / 38% 38% 0 0; }
.countdown { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 180px; color: var(--yellow); text-shadow: 0 6px 30px rgba(0,0,0,.6); pointer-events: none; }
.countdown.tick { animation: tick 1s ease-out; }
@keyframes tick { from { transform: scale(1.6); opacity: 0; } 25% { opacity: 1; } to { transform: scale(.9); opacity: .2; } }
.flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 50; }
.flash.go { animation: flash .45s ease-out; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }
.stage-actions { margin-top: 22px; }

/* ---------- Result / Review ---------- */
.result-wrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 380px); gap: 36px; align-items: center; justify-content: center; width: 100%; max-width: 920px; }
.paper { background: #fff; color: #111; border-radius: 6px; padding: 18px 16px 14px; box-shadow: 0 25px 60px rgba(0,0,0,.5); }
.paper img { width: 100%; image-rendering: pixelated; }
.paper.paper-receipt { padding: 10px 8px; max-height: 72vh; overflow-y: auto; }
.paper.paper-receipt img { image-rendering: auto; }
.paper .p-logo { width: 34%; margin: 0 auto 8px; }
.paper .p-tag { font-family: var(--font); font-weight: 700; font-size: 15px; margin-bottom: 10px; text-align: center; letter-spacing: .02em; }
.paper .p-thanks { font-weight: 500; font-size: 12px; text-align: center; margin-top: 10px; letter-spacing: .05em; }
.qr-box { background: #fff; padding: 14px; border-radius: var(--radius); display: inline-block; }
.qr-box img, .qr-box canvas { width: 220px; height: 220px; image-rendering: pixelated; }
.code-pill { display: inline-block; font-family: var(--display); letter-spacing: .25em; font-size: 22px; padding: 8px 18px; border-radius: var(--pill); border: 1.5px solid rgba(255,255,255,.3); margin-top: 14px; }
.wait { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--muted); margin-top: 16px; }
.dot-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); animation: blink 1s infinite alternate; }
@keyframes blink { from { opacity: .2; } to { opacity: 1; } }

.spinner { width: 64px; height: 64px; border-radius: 50%; border: 5px solid rgba(255,255,255,.15); border-top-color: var(--yellow); animation: spin 1s linear infinite; margin: 0 auto 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
.big-icon { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 22px; background: var(--yellow); color: #1d1d1d; font-size: 52px; font-weight: 900; }

.footer-brand { padding: 16px; text-align: center; color: rgba(255,255,255,.35); font-size: 12px; letter-spacing: .12em; }
.corner-link { position: fixed; right: 10px; bottom: 8px; color: rgba(255,255,255,.18); font-size: 11px; text-decoration: none; z-index: 5; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #111; border: 1px solid var(--line); padding: 12px 20px; border-radius: var(--pill); font-size: 14px; opacity: 0; transition: opacity .2s; z-index: 60; }
.toast.show { opacity: 1; }

.chip-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 14px 0 0; }
.chip { font-family: var(--font); font-size: 13px; padding: 8px 14px; border-radius: var(--pill); border: 1.5px solid rgba(255,255,255,.25); background: transparent; color: #fff; cursor: pointer; }
.chip.on { background: var(--silver); color: #1d1d1d; border-color: var(--silver); font-weight: 700; }

/* Attract screen */
.attract .hero-logo { width: min(340px, 70vw); margin: 0 auto 26px; filter: drop-shadow(0 10px 30px rgba(0,0,0,.4)); }
.attract .steps { display: flex; gap: 14px; justify-content: center; margin: 34px 0 0; flex-wrap: wrap; }
.attract .step { min-width: 150px; padding: 14px 18px; border-radius: var(--radius); background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: 14px; color: var(--silver); }
.attract .step b { display: block; font-family: var(--display); color: var(--yellow); font-size: 22px; margin-bottom: 4px; }

@media (max-width: 820px) {
  .result-wrap { grid-template-columns: 1fr; gap: 22px; }
  .topbar { padding: 14px 16px; }
  .topbar .logo { height: 36px; }
  .topbar .badge-src { font-size: 11px; }
  .lead { width: 100%; }
  .attract .step { min-width: 0; flex: 1 1 40%; }
  .screen { padding: 16px; justify-content: flex-start; }
  .card { padding: 20px; }
  .btn-xl { padding: 18px 40px; min-height: 64px; }
  .countdown { font-size: 130px; }
  .input { font-size: 18px; }
}
