/* Red Dragon welcome page. Brand: black, red #C6001D, gold #B1801E. Anton + Lato (brand book). */

:root {
  --black: #000;
  --bg: #050505;
  --panel: #111;
  --panel-2: #181818;
  --line: #2a2a2a;
  --line-2: #3a3a3a;
  --red: #c6001d;
  --red-hi: #ff3149;
  --red-deep: #6d0010;
  --gold: #b1801e;
  --gold-hi: #e0ae4a;
  --text: #f4f1ec;
  --muted: #b3aca2;
  --dim: #7d776f;
  --ok: #3ccf7a;
  --radius: 18px;
  --radius-sm: 12px;
  --display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --body: "Lato", "Century Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--body);
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: var(--gold-hi); }
a:hover { color: #fff; }
button { font: inherit; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }

/* ---------------------------------------------------------------- backdrop ribbon */
.backdrop { position: absolute; inset: 0 0 auto 0; height: 760px; pointer-events: none; z-index: 0; overflow: hidden; }
.backdrop svg { position: absolute; left: 50%; top: -40px; width: 1400px; max-width: none; transform: translateX(-50%); opacity: .95; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(5,5,5,0) 55%, var(--bg) 100%); }
/* Views without the big shield are shorter: lift the ribbon so it stays behind the seal
   instead of running under the headline. */
body[data-view="view-done"] .backdrop svg,
body[data-view="view-referral-done"] .backdrop svg { top: -170px; opacity: .8; }
body[data-view="view-picker"] .backdrop svg { top: -60px; }

/* ---------------------------------------------------------------- layout */
.wrap { position: relative; z-index: 1; width: 100%; max-width: 540px; margin: 0 auto; padding: 0 18px calc(24px + env(safe-area-inset-bottom)); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 0 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.brand img { width: 30px; height: auto; flex: none; }
.brand-word { font-family: var(--display); letter-spacing: .06em; font-size: 17px; line-height: 1; white-space: nowrap; }
.brand-word em { font-style: normal; color: var(--red-hi); }
.top-right { display: flex; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 46vw; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(0,0,0,.55); color: var(--text); font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(6px); }
.chip svg { width: 14px; height: 14px; flex: none; color: var(--red-hi); }
.lang { min-width: 44px; height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(0,0,0,.55); color: var(--text); font-weight: 900; font-size: 13px; letter-spacing: .08em; cursor: pointer; }
.lang:hover { border-color: var(--gold); }

/* ---------------------------------------------------------------- type */
.eyebrow { margin: 0; font-weight: 900; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-hi); }
.display { margin: 6px 0 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .95; letter-spacing: .01em; font-size: clamp(44px, 13vw, 64px); }
.display .l1, .display .l2 { display: block; }
.display .l2, .red { color: var(--red-hi); }
.h2 { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; font-size: 26px; line-height: 1.05; }
.lede { margin: 14px 0 0; color: var(--muted); font-size: 17px; }
.lede strong { color: var(--text); }
.fine { margin: 12px 0 0; color: var(--dim); font-size: 12.5px; line-height: 1.45; }
.fine a { color: var(--muted); }

/* ---------------------------------------------------------------- hero */
.hero { text-align: center; padding: 18px 0 8px; }
.hero-shield { width: 132px; margin: 4px auto 18px; filter: drop-shadow(0 16px 30px rgba(0,0,0,.8)); animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
.hero .display { animation: rise .7s .08s cubic-bezier(.2,.8,.2,1) both; }
.hero .lede { animation: rise .7s .16s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- cards */
.card { position: relative; margin-top: 18px; padding: 22px 20px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.prize { margin-top: 22px; padding: 22px 20px 20px; border-radius: var(--radius); background:
  radial-gradient(120% 140% at 100% 0%, rgba(198,0,29,.35), transparent 55%),
  linear-gradient(180deg, #1a1408, #0d0b07);
  border: 1px solid rgba(224,174,74,.45); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06); overflow: hidden; }
.prize-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.countdown { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(198,0,29,.18); border: 1px solid rgba(255,49,73,.45); color: #ffd9de; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.countdown .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red-hi); box-shadow: 0 0 0 0 rgba(255,49,73,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,49,73,.6); } 70% { box-shadow: 0 0 0 9px rgba(255,49,73,0); } 100% { box-shadow: 0 0 0 0 rgba(255,49,73,0); } }
.prize-main { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.prize-icon { flex: none; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold-hi), var(--gold)); color: #1a1206; box-shadow: 0 10px 24px -8px rgba(224,174,74,.6); }
.prize-icon svg { width: 32px; height: 32px; }
.prize-text { margin: 0; font-family: var(--display); text-transform: uppercase; font-size: 30px; line-height: 1; letter-spacing: .01em; }
.prize-sub { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.prize-winner { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--gold-hi); font-size: 14px; font-weight: 700; }
.prize-winner svg { flex: none; width: 16px; height: 16px; }
.how { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(224,174,74,.2); display: grid; gap: 9px; }
.how li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--text); }
.how .n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-weight: 900; font-size: 12px; margin-top: 1px; }

/* ---------------------------------------------------------------- forms */
.form .h2 { margin-bottom: 4px; }
.field { margin-top: 16px; }
.field label, .label { display: block; margin-bottom: 7px; font-weight: 700; font-size: 14px; color: var(--text); }
.field label .opt { color: var(--dim); font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; min-height: 52px; padding: 13px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: #0a0a0a; color: var(--text);
  font: 400 16px/1.3 var(--body); transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
textarea.input { min-height: 120px; resize: vertical; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.input::placeholder { color: #5f5a54; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224,174,74,.22); }
.field.bad .input { border-color: var(--red-hi); box-shadow: 0 0 0 3px rgba(255,49,73,.18); }
.err { display: none; margin-top: 7px; color: #ff7d8d; font-size: 13.5px; font-weight: 700; }
.field.bad .err, .check.bad + .err { display: block; }

.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; cursor: pointer; font-size: 14px; line-height: 1.45; color: var(--muted); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; border: 1.5px solid var(--line-2); background: #0a0a0a; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.check .box svg { width: 15px; height: 15px; color: #fff; opacity: 0; transform: scale(.6); transition: .15s; }
.check input:checked + .box { background: var(--red); border-color: var(--red); }
.check input:checked + .box svg { opacity: 1; transform: none; }
.check input:focus-visible + .box { outline: 3px solid var(--gold-hi); outline-offset: 2px; }
.check.bad .box { border-color: var(--red-hi); }
.check a { color: var(--gold-hi); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 20px; padding: 14px 20px; border: 0; border-radius: 14px; font-weight: 900; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s, color .2s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.985); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: linear-gradient(180deg, #df0a28, var(--red)); color: #fff; box-shadow: 0 14px 30px -12px rgba(198,0,29,.9), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover { color: #fff; background: linear-gradient(180deg, #ef1332, #d2001f); }
.btn-gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #140d02; box-shadow: 0 14px 30px -14px rgba(224,174,74,.8); }
.btn-gold:hover { color: #000; }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--gold); color: #fff; }
.btn[disabled], .btn.busy { opacity: .7; cursor: progress; }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.row { display: flex; gap: 10px; }
.row .btn { margin-top: 12px; }
.linkish { background: none; border: 0; padding: 6px 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
.linkish:hover { color: #fff; }

.pre-review { margin: 18px 0 0; text-align: center; color: var(--dim); font-size: 14px; }
.pre-review a { font-weight: 700; }

/* ---------------------------------------------------------------- done */
.done-hero { text-align: center; padding: 26px 0 4px; }
.seal { width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, var(--gold-hi), var(--gold) 60%, #7a5610); color: #1a1105; box-shadow: 0 0 0 8px rgba(224,174,74,.12), 0 20px 44px -12px rgba(224,174,74,.55); animation: pop .6s cubic-bezier(.2,1.4,.3,1) both; }
.seal svg { width: 46px; height: 46px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.done-hero .display { font-size: clamp(38px, 11vw, 54px); }
.ticket { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 16px; border: 1px dashed rgba(224,174,74,.6); border-radius: 12px; background: rgba(224,174,74,.07); font-size: 14px; color: var(--muted); }
.ticket strong { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 16px; letter-spacing: .08em; color: var(--gold-hi); }

.section-head { margin: 30px 0 0; text-align: center; color: var(--dim); font-size: 12px; font-weight: 900; letter-spacing: .24em; text-transform: uppercase; }
.action .head { display: flex; align-items: center; gap: 14px; }
.action .ico { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(198,0,29,.14); border: 1px solid rgba(255,49,73,.35); color: var(--red-hi); }
.action .ico.gold { background: rgba(224,174,74,.1); border-color: rgba(224,174,74,.4); color: var(--gold-hi); }
.action .ico svg { width: 24px; height: 24px; }
.action p { margin: 12px 0 0; color: var(--muted); }
.action .h2 { font-size: 23px; }
.done-mark { display: none; align-items: center; gap: 8px; margin-top: 14px; color: var(--ok); font-weight: 900; font-size: 14px; letter-spacing: .04em; }
.action.is-done .done-mark { display: flex; }
.done-mark svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- recorder */
.recorder { margin-top: 16px; }
.stage { position: relative; aspect-ratio: 3 / 4; max-height: 70vh; width: 100%; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line-2); }
.stage video { width: 100%; height: 100%; object-fit: cover; }
.stage video.mirror { transform: scaleX(-1); }
.stage .prompt { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.62); backdrop-filter: blur(6px); font-size: 14px; line-height: 1.35; text-align: center; }
.stage .count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 120px; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.7); pointer-events: none; }
.stage .rec { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(0,0,0,.6); font-weight: 900; font-size: 13px; letter-spacing: .06em; }
.stage .rec i { width: 10px; height: 10px; border-radius: 50%; background: var(--red-hi); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.stage .bar { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: rgba(255,255,255,.15); }
.stage .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--gold-hi)); }
.shutter { width: 76px; height: 76px; margin: 16px auto 0; border-radius: 50%; border: 4px solid #fff; background: transparent; display: grid; place-items: center; cursor: pointer; }
.shutter i { width: 58px; height: 58px; border-radius: 50%; background: var(--red); transition: .2s; }
.shutter.stop i { width: 30px; height: 30px; border-radius: 8px; }
.progress { height: 8px; margin-top: 14px; border-radius: 99px; background: #222; overflow: hidden; }
.progress i { display: block; height: 100%; width: 35%; background: linear-gradient(90deg, var(--red), var(--gold-hi)); animation: indet 1.2s ease-in-out infinite; }
.progress.det i { animation: none; transition: width .3s ease; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

/* ---------------------------------------------------------------- share + follow */
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.share-grid a, .share-grid button { display: grid; justify-items: center; gap: 6px; padding: 12px 4px; border-radius: 12px; border: 1px solid var(--line-2); background: #0c0c0c; color: var(--text); font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; }
.share-grid a:hover, .share-grid button:hover { border-color: var(--gold); color: #fff; }
.share-grid svg { width: 22px; height: 22px; }
.follow { margin-top: 26px; text-align: center; }
.follow .label { color: var(--dim); font-size: 12px; font-weight: 900; letter-spacing: .24em; text-transform: uppercase; }
.follow .icons { display: flex; justify-content: center; gap: 12px; margin-top: 10px; }
.follow a { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--text); background: #0c0c0c; }
.follow a:hover { border-color: var(--red-hi); color: #fff; }
.follow svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- picker */
.search { position: relative; margin-top: 18px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--dim); }
.search .input { padding-left: 44px; }
.studio-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.studio-list a { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); color: var(--text); text-decoration: none; transition: border-color .15s, transform .12s; }
.studio-list a:hover { border-color: var(--red-hi); transform: translateY(-1px); color: #fff; }
.studio-list .pin { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(198,0,29,.14); color: var(--red-hi); }
.studio-list .pin svg { width: 20px; height: 20px; }
.studio-list strong { display: block; font-size: 16px; }
.studio-list span { display: block; color: var(--dim); font-size: 13.5px; }
.studio-list .go { margin-left: auto; color: var(--dim); }
.notice { margin-top: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,49,73,.4); background: rgba(198,0,29,.12); color: #ffd9de; font-size: 14px; }

/* ---------------------------------------------------------------- footer */
.foot { position: relative; z-index: 1; max-width: 540px; margin: 36px auto 0; padding: 26px 18px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); text-align: center; color: var(--dim); font-size: 13.5px; }
.foot .studio-info strong { display: block; color: var(--text); font-size: 15px; }
.foot .studio-info .links { display: flex; justify-content: center; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.foot nav { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.foot nav a { color: var(--muted); }
.foot .legal { margin-top: 12px; font-size: 12px; }

/* ---------------------------------------------------------------- toast, confetti */
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 50; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: #fff; color: #111; font-weight: 700; font-size: 14px; box-shadow: 0 16px 40px -10px rgba(0,0,0,.8); transform: translate(-50%, 24px); opacity: 0; visibility: hidden; transition: transform .3s cubic-bezier(.2,.9,.2,1), opacity .3s, visibility .3s; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ---------------------------------------------------------------- rules page */
.doc { padding: 10px 0 20px; }
.doc h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 40px; line-height: 1; margin: 18px 0 6px; }
.doc h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 22px; letter-spacing: .02em; margin: 30px 0 8px; color: var(--gold-hi); }
.doc p, .doc li { color: var(--muted); font-size: 15.5px; }
.doc strong { color: var(--text); }
.doc .caps { text-transform: uppercase; color: var(--text); font-weight: 700; }

@media (min-width: 720px) {
  .wrap { padding-top: 10px; }
  .hero-shield { width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
