:root {
  --red: #CC0000;
  --red-dark: #a30000;
  --black: #0a0a0a;
  --ink: #141414;
  --line: rgba(255,255,255,0.12);
  --muted: rgba(255,255,255,0.68);
  --white: #ffffff;
  --display: Impact, 'Anton', 'Arial Black', sans-serif;
  --body: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 400 16px/1.55 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 16px 40px; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  max-width: 560px; width: 100%; margin: 0 auto;
}
.wordmark { color: var(--white); text-decoration: none; font: 30px/1 var(--display); letter-spacing: 1px; white-space: nowrap; }
.topbar-tag { text-align: right; }
.wordmark span { color: var(--red); }
.topbar-tag { font: 700 11px/1 var(--body); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }

/* Steps */
.step { display: none; padding-top: 24px; animation: fade .35s ease; }
.step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.label {
  display: inline-block; background: var(--red); color: var(--white);
  font: 700 12px/1 var(--body); letter-spacing: 3px; text-transform: uppercase;
  padding: 10px 18px; margin-bottom: 18px;
}
.hero, .h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; margin: 0 0 14px; }
.hero { font-size: clamp(56px, 17vw, 92px); line-height: 0.9; letter-spacing: 0.5px; }
.h2 { font-size: clamp(34px, 10vw, 48px); line-height: 0.95; }
.hero em, .h2 em { font-style: normal; color: var(--red); }
.center { text-align: center; }
.lede { color: var(--muted); font-size: 17px; margin: 0 0 24px; }
.fine { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

/* Hero demo */
.demo { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 8px 0 26px; }
.demo-face {
  width: 128px; height: 160px; border-radius: 10px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #1d1d1d, #111); border: 1px solid var(--line);
}
.demo-face::before { /* head */
  content: ''; position: absolute; left: 50%; top: 26px; transform: translateX(-50%);
  width: 70px; height: 84px; border-radius: 50% 50% 46% 46%; background: #3a3a3a;
}
.demo-face::after { /* shoulders */
  content: ''; position: absolute; left: 50%; bottom: -40px; transform: translateX(-50%);
  width: 140px; height: 80px; border-radius: 50%; background: #2c2c2c;
}
.demo-face.before::before { width: 84px; height: 88px; border-radius: 48%; }
.demo-face.after { border-color: var(--red); box-shadow: 0 0 30px rgba(204,0,0,0.35); }
.demo-face.after::before { width: 64px; background: #5a5a5a; }
.demo-face span {
  position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; z-index: 2;
  font: 700 10px/1 var(--body); letter-spacing: 2px;
}
.demo-face.after span { color: var(--white); }
.demo-arrow { font: 34px/1 var(--display); color: var(--red); }

.steps-list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.steps-list li { display: flex; align-items: center; gap: 14px; font-weight: 700; }
.steps-list b {
  flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--red);
  display: grid; place-items: center; font: 18px/1 var(--display);
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: block; width: 100%; text-align: center; text-decoration: none; cursor: pointer;
  border: 0; border-radius: 6px; padding: 18px 20px; margin-top: 14px;
  font: 22px/1 var(--display); letter-spacing: 1px; text-transform: uppercase;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--white); border: 2px solid var(--white); font-size: 18px; padding: 15px 20px; }
.btn-link {
  display: block; margin: 14px auto 0; background: none; border: 0; color: var(--muted);
  text-decoration: underline; font: 14px/1.4 var(--body); cursor: pointer;
}

/* Form */
form { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.5px; color: var(--muted); }
input[type=text], input:not([type]), input[type=email], input[type=tel] {
  width: 100%; padding: 14px; border-radius: 6px; border: 1px solid #333; background: var(--ink);
  color: var(--white); font: 16px/1.2 var(--body);
}
input:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
fieldset { border: 0; padding: 0; margin: 4px 0 0; }
legend { font-size: 15px; font-weight: 700; color: var(--white); margin-bottom: 10px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 11px 16px; border-radius: 40px; border: 1px solid #3a3a3a;
  background: var(--ink); color: var(--white); font: 700 14px/1 var(--body);
}
.chip input:checked + span { background: var(--red); border-color: var(--red); }
.chip input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 13px; line-height: 1.45; }
.check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--red); }
.check a { color: var(--white); }
.form-error { color: #ff6b6b; font-size: 14px; min-height: 0; margin: 0; }
.form-error:empty { display: none; }

/* Upload */
.tips { margin: 0 0 18px; padding-left: 20px; color: var(--muted); }
.tips li { margin: 3px 0; }
.dropzone {
  position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; width: 100%;
  border: 2px dashed #444; border-radius: 10px; background: var(--ink); cursor: pointer; overflow: hidden;
  color: var(--white);
}
.dropzone:hover { border-color: var(--red); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone img { width: 100%; height: 100%; object-fit: cover; }
.dz-empty { display: grid; justify-items: center; gap: 8px; text-align: center; pointer-events: none; }
.dz-empty svg { color: var(--red); }
.dz-empty b { font-size: 16px; color: var(--white); }
.dz-empty small { color: var(--muted); font-weight: 400; }

/* Loading */
.loader-wrap { position: relative; width: 72%; max-width: 320px; margin: 10px auto 24px; aspect-ratio: 1/1; border-radius: 10px; overflow: hidden; border: 2px solid var(--red); }
.loader-wrap img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.4) brightness(0.8); }
.scanline {
  position: absolute; left: 0; right: 0; height: 30%;
  background: linear-gradient(180deg, transparent, rgba(204,0,0,0.45), transparent);
  animation: scan 1.8s ease-in-out infinite;
}
@keyframes scan { 0% { top: -30%; } 100% { top: 100%; } }

/* Slider */
.slider {
  position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;
  background: var(--ink); user-select: none; -webkit-user-select: none; touch-action: pan-y;
  border: 2px solid var(--red);
}
.slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.s-after { clip-path: inset(0 0 0 var(--pos)); }
.s-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px;
  background: var(--white); pointer-events: none; box-shadow: 0 0 8px rgba(0,0,0,0.5);
}
.s-handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; background: var(--red); border: 3px solid var(--white);
  display: grid; place-items: center; font: 700 20px/1 var(--body); letter-spacing: -2px;
}
.s-tag {
  position: absolute; top: 12px; padding: 6px 10px; background: rgba(0,0,0,0.6);
  font: 700 11px/1 var(--body); letter-spacing: 2px; pointer-events: none;
}
.s-tag.left { left: 12px; }
.s-tag.right { right: 12px; background: rgba(204,0,0,0.85); }
.slider input[type=range] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
  -webkit-appearance: none; appearance: none; touch-action: pan-y;
}

.what-next { margin-top: 30px; padding: 22px; background: var(--ink); border-left: 4px solid var(--red); border-radius: 4px; }
.what-next h3 { font: 26px/1 var(--display); margin: 0 0 12px; letter-spacing: 0.5px; }
.what-next ul { margin: 0; padding-left: 18px; color: var(--muted); }
.what-next li { margin: 8px 0; }
.what-next b { color: var(--white); }

.disclaimer { margin-top: 22px; font-size: 11.5px; line-height: 1.5; color: rgba(255,255,255,0.5); }

.foot {
  display: flex; gap: 16px; justify-content: center; padding: 18px 16px 28px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.foot a { color: var(--muted); }

@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }

/* Photo step: camera, preview, checks */
.photo-actions { display: grid; gap: 0; }
.photo-actions .btn-primary { margin-top: 4px; }
.file-btn { position: relative; display: block; cursor: pointer; color: var(--white); letter-spacing: 1px; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.camera { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: #000; border: 2px solid var(--red); }
.camera[hidden], .photo-preview[hidden], .photo-check[hidden], .photo-actions[hidden], .checking[hidden] { display: none; }
.camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#cam-oval { transition: stroke .2s; }
.camera.good #cam-oval { stroke: #34c759; stroke-dasharray: none; }
.cam-hint {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%); max-width: 90%;
  background: rgba(0,0,0,0.65); padding: 8px 14px; border-radius: 30px; text-align: center;
  font: 700 14px/1.3 var(--body); white-space: nowrap;
}
.camera.good .cam-hint { background: rgba(28,140,60,0.9); }
.cam-controls { position: absolute; left: 0; right: 0; bottom: 14px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 16px; }
.cam-cancel { margin: 0; color: var(--white); justify-self: start; }
.shutter { width: 70px; height: 70px; border-radius: 50%; border: 5px solid var(--white); background: var(--red); cursor: pointer; padding: 0; }
.shutter:active { transform: scale(0.94); }
.photo-preview { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; border: 2px solid #333; background: var(--ink); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.checking { position: absolute; inset: auto 0 0 0; padding: 12px; background: rgba(0,0,0,0.7); text-align: center; font: 700 14px/1 var(--body); }
.checking span { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; border: 2px solid var(--white); border-right-color: transparent; vertical-align: -1px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.photo-check { margin-top: 14px; padding: 16px; border-left: 4px solid #f0a020; background: var(--ink); border-radius: 4px; }
.photo-check p { margin: 0 0 4px; }
.photo-check .btn-secondary { margin-top: 10px; }
.photo-check .btn-link { margin-top: 10px; }

[hidden] { display: none !important; }
