/* LaunchReel · the URL ad flow (create.html): address, free 5 s preview, payment, the full ad. */

:root {
  --paper: #faf9f6;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #4a4a48;
  --muted: #6b6b68;
  --muted-2: #8a8a86;
  --rule: #e7e4dc;
  --wash: #f4f2ed;
  --amber: #f5a623;
  --amber-2: #f7c948;
  --amber-deep: #c98a0e;
  --amber-tint: #fff6e6;
  --green: #1f8a4c;
  --error: #b42318;
  --error-tint: #fef3f2;
  --error-rule: #f1b8b1;
  --shadow-card: 0 30px 80px rgba(29, 29, 31, 0.1), 0 2px 6px rgba(29, 29, 31, 0.04);
  --shadow-cta: 0 12px 26px rgba(245, 166, 35, 0.36);
  --focus: 3px solid rgba(245, 166, 35, 0.65);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }
:focus-visible { outline: var(--focus); outline-offset: 2px; }
h1:focus { outline: none; }

/* ---------- header / footer ---------- */

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(16px, 4vw, 40px); }
.logo { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; font-size: 20px; letter-spacing: -0.015em; color: var(--ink); text-decoration: none; }
.logo i { display: block; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--amber), var(--amber-2)); box-shadow: 0 4px 12px rgba(245, 166, 35, 0.35); }
.top-note { margin: 0; font-size: 14px; color: var(--muted); white-space: nowrap; }
.top-note strong { color: var(--ink-2); font-weight: 600; }
.foot { margin-top: auto; display: flex; justify-content: center; gap: 22px; padding: 28px 16px 32px; font-size: 13.5px; }
.foot a { color: var(--muted-2); text-decoration: none; }
.foot a:hover { color: var(--ink-2); }

main { width: 100%; max-width: 1040px; margin: 0 auto; padding: 12px 16px 24px; display: flex; flex-direction: column; align-items: center; }

/* ---------- cards ---------- */

.card {
  width: 100%; max-width: 620px; background: var(--card); border-radius: 28px; box-shadow: var(--shadow-card);
  padding: clamp(24px, 4vw, 40px); margin-top: clamp(8px, 4vh, 40px); animation: rise 0.35s var(--ease);
}
.card h1 { margin: 0; font-size: clamp(26px, 4vw, 34px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; }
.sub { margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: var(--muted); }
.sub.small { font-size: 14px; }
.fine { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted-2); text-align: center; }
.note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.elapsed { color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* ---------- the address ---------- */

.url-row { display: flex; gap: 10px; margin-top: 24px; }
.field-url {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 16px; border-radius: 16px;
  border: 1.5px solid var(--rule); background: #fff; color: var(--muted-2); transition: border-color 0.15s, box-shadow 0.15s;
}
.field-url:focus-within { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.18); color: var(--amber-deep); }
.field-url input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font: inherit; font-size: 17px; color: var(--ink); }
.field-url input::placeholder { color: var(--muted-2); }
.facts { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 8px; }
.facts li { position: relative; padding-left: 26px; font-size: 14.5px; color: var(--ink-2); }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--amber-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%23C98A0E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 58px; padding: 0 24px; border: 0; border-radius: 16px;
  font: inherit; font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: var(--ink); box-shadow: var(--shadow-cta); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(245, 166, 35, 0.42); }
.btn-primary:disabled { opacity: 0.7; cursor: progress; transform: none; }
.btn-big { width: 100%; height: 62px; font-size: 18px; margin-top: 22px; }
.btn-soft { background: var(--wash); color: var(--ink); margin-top: 22px; }
.btn-soft:hover { background: var(--rule); }
.link-btn { display: block; margin: 14px auto 0; background: none; border: 0; padding: 4px 6px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--amber-deep); cursor: pointer; border-radius: 6px; }
.link-btn:hover { text-decoration: underline; }

.error { margin-top: 14px; border-radius: 14px; background: var(--error-tint); border: 1px solid var(--error-rule); color: var(--error); padding: 12px 14px; font-size: 14.5px; line-height: 1.45; }

/* ---------- working ---------- */

.site-chip, .paid-chip {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 12px; border-radius: 999px; background: var(--wash);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
}
.site-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: pulse 1.2s ease-in-out infinite; }
.paid-chip { background: #eaf6ee; color: var(--green); }
.stages { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.stages li { display: grid; grid-template-columns: 26px 1fr; column-gap: 12px; align-items: start; font-size: 16px; font-weight: 600; color: var(--muted-2); }
.stages li small { grid-column: 2; font-size: 13px; font-weight: 500; color: var(--muted-2); }
.stages .tick { width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--rule); grid-row: span 2; }
.stages li.is-now { color: var(--ink); }
.stages li.is-now .tick { border-color: var(--amber); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.stages li.is-done { color: var(--ink-2); }
.stages li.is-done .tick {
  border: 0; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.bar { height: 8px; border-radius: 99px; background: var(--wash); overflow: hidden; margin-top: 24px; }
.bar i { display: block; height: 100%; width: 3%; border-radius: 99px; background: linear-gradient(90deg, var(--amber), var(--amber-2)); transition: width 0.8s var(--ease); }
.reasons { margin: 16px 0 0; padding-left: 20px; color: var(--ink-2); }
.reasons li { margin: 6px 0; }

/* ---------- the photo fallback ---------- */

.upload { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--rule); }
.upload h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 16px; padding: 22px 16px; border-radius: 18px;
  border: 1.5px dashed var(--rule); background: var(--paper); text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop.is-over { border-color: var(--amber); background: var(--amber-tint); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: var(--focus); outline-offset: 2px; }
.drop strong { font-size: 16px; color: var(--amber-deep); }
.drop span { font-size: 13px; color: var(--muted); }
.thumbs { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumbs:empty { display: none; }
.thumbs li { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--wash); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs button {
  position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.6);
  color: #fff; font-size: 15px; line-height: 26px; cursor: pointer; padding: 0;
}
.upload .btn-big:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* ---------- preview and result ---------- */

.split { width: 100%; display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 440px); justify-content: center; gap: clamp(20px, 4vw, 44px); align-items: center; margin-top: clamp(8px, 3vh, 32px); }
.split .card.side { margin-top: 0; }
.player { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 26px; overflow: hidden; background: #111; box-shadow: var(--shadow-card); animation: rise 0.35s var(--ease); }
.player video { width: 100%; height: 100%; display: block; object-fit: cover; background: #111; }
.badge { position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; backdrop-filter: blur(6px); }
.sound { position: absolute; right: 14px; bottom: 14px; padding: 9px 14px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.92); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.sound[aria-pressed="true"] { background: var(--ink); color: #fff; }

@media (max-width: 820px) {
  .split { grid-template-columns: minmax(0, 460px); }
  .player { max-width: 460px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .top-note { display: none; }
  .url-row { flex-direction: column; }
  .btn { width: 100%; }
  .card { border-radius: 24px; }
}

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .card, .player { animation: none; }
  .stages li.is-now .tick, .site-chip .dot { animation: none; }
  .bar i { transition: none; }
}
