/* Seamless style: black canvas, frosted glass, electric-blue accents, Onest type. */
:root {
  --bg-base: #000000;
  --navy: #020C14;
  --navy-border: #002A4B;
  --accent: #008FFF;
  --accent-sky: #34B3EC;
  --accent-teal: #17DDDD;
  --text: #FFFFFF;
  --text-dim: rgba(255, 255, 255, 0.72);
  --text-faint: rgba(255, 255, 255, 0.5);
  --glass: rgba(6, 12, 20, 0.58);
  --glass-line: rgba(255, 255, 255, 0.1);
  --surface: rgba(255, 255, 255, 0.06);
  --danger: #FF6B6B;
  --success: #3FE0A5;
  --radius-lg: 24px;
  --radius-md: 16px;
  --pill: 20999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  color: var(--text);
  font-family: 'Onest', system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; }
button, input { font: inherit; color: inherit; }
[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;
}

/* ---------- Background video ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #000; }
.bg__video {
  /* The whole frame is shown (no cropping) so the full car is visible, sized to
     fit the screen and slid up so the car sits above the upload panel. A thin
     feather at the frame's edges melts it into the black page. */
  position: absolute; left: 50%; top: 50%;
  width: min(94vw, 150vh); height: auto; aspect-ratio: 16 / 9;
  object-fit: contain;
  transform: translate(-50%, calc(-50% - 14vh + 50px)); /* +50px keeps it in step with .stage's top padding */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%),
                      linear-gradient(to bottom, transparent 0, #000 8%, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%),
                      linear-gradient(to bottom, transparent 0, #000 8%, #000 82%, transparent 100%);
          mask-composite: intersect;
  opacity: 0; transition: opacity 1.2s ease;
}
.bg__video.is-ready { opacity: 1; }
/* Portrait phones: full width so the whole car shows behind the headline */
@media (max-aspect-ratio: 1/1) {
  .bg__video { width: 100vw; transform: translate(-50%, calc(-50% - 16vh + 40px)); }
}
/* Darken toward the edges so text stays readable; kept wide and soft at the
   sides so the car's front and back aren't dimmed */
.bg__shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 120% 85% at 50% 50%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.35) 65%, rgba(0,0,0,0.8) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 22%, rgba(0,0,0,0.1) 55%, rgba(0,0,0,0.85) 76%, #000 86%);
}
/* Faint blue light pooling under the car, echoing its underglow */
.bg__glow {
  position: absolute; left: 50%; bottom: -20vh; width: 120vw; height: 60vh;
  translate: -50% 0;
  background: radial-gradient(ellipse at center, rgba(0,143,255,0.22), transparent 65%);
  filter: blur(20px);
  animation: glow-breathe 6s ease-in-out infinite;
}
@keyframes glow-breathe { 50% { opacity: 0.55; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center;
  padding: 14px clamp(16px, 4vw, 48px);
  padding-top: max(14px, env(safe-area-inset-top));
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header__logo img { height: 42px; width: auto; }

/* ---------- Layout ---------- */
.stage {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 170px 16px 0; /* no bottom padding so centered content shifts with the video on tall screens */
}
.view { width: 100%; max-width: 680px; text-align: center; }

.title {
  margin: 0 auto 18px;
  max-width: 700px;
  font-size: clamp(38px, 7.2vw, 72px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.065em;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
}
.accent {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-sky) 45%, var(--accent-teal) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 22px rgba(0, 143, 255, 0.45));
}
.lede {
  margin: 0 auto 36px; max-width: 46ch;
  font-size: clamp(15px, 2vw, 17px); line-height: 1.6;
  font-weight: 200; letter-spacing: 0.3px;
  color: var(--text-dim);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 1px 18px rgba(0, 0, 0, 0.9);
}

/* ---------- Glass panel ---------- */
.panel {
  display: grid; gap: 20px;
  padding: clamp(20px, 4vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: left;
}

.field { display: grid; gap: 8px; }
.field__label { font-size: 14px; font-weight: 500; letter-spacing: 0.2px; }
.field__hint { color: var(--text-faint); font-weight: 300; }
.field__input {
  width: 100%; padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  font-size: 16px; font-weight: 300;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field__input::placeholder { color: rgba(255, 255, 255, 0.35); }
.field__input:focus {
  outline: none;
  border-color: var(--accent-sky);
  box-shadow: 0 0 0 4px rgba(52, 179, 236, 0.18);
}

/* ---------- Drop zone with flowing neon border ---------- */
@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes neon-rotate { to { --angle: 360deg; } }

.dropzone {
  position: relative; isolation: isolate;
  display: block;
  border-radius: 20px;
  padding: 2px; /* border thickness: the ring shows through here */
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.4s var(--ease);
}
.dropzone__ring,
.dropzone__ring::after {
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), rgba(52,179,236,0) 0deg, rgba(52,179,236,0) 60deg, var(--accent) 250deg, var(--accent-sky) 330deg, var(--accent-teal) 360deg);
  animation: neon-rotate 3.2s linear infinite;
}
.dropzone__ring { background-color: rgba(255, 255, 255, 0.1); }
.dropzone__ring::after { content: ""; inset: -4px; filter: blur(12px); opacity: 0.55; }
.dropzone__inner {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: clamp(28px, 6vw, 44px) 20px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 143, 255, 0.14), transparent 70%),
    #05101B;
  text-align: center;
  transition: background 0.4s;
}
.dropzone__icon {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin-bottom: 10px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(160deg, var(--accent), var(--accent-teal));
  box-shadow: 0 0 0 8px rgba(0, 143, 255, 0.12), 0 10px 30px rgba(0, 143, 255, 0.45);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.dropzone__title { font-size: clamp(18px, 2.6vw, 21px); font-weight: 500; letter-spacing: -0.3px; }
.dropzone__sub { font-size: 15px; font-weight: 200; color: var(--text-dim); }
.dropzone__meta { margin-top: 8px; font-size: 12px; letter-spacing: 0.08em; color: var(--text-faint); text-transform: uppercase; }

.dropzone:hover .dropzone__icon,
.dropzone.is-dragging .dropzone__icon {
  transform: translateY(-4px);
  box-shadow: 0 0 0 10px rgba(0, 143, 255, 0.18), 0 16px 40px rgba(0, 143, 255, 0.6);
}
.dropzone:hover .dropzone__ring,
.dropzone:hover .dropzone__ring::after { animation-duration: 1.6s; }
.dropzone.is-dragging { transform: scale(1.015); }
.dropzone.is-dragging .dropzone__inner { background: radial-gradient(ellipse at 50% 30%, rgba(0, 143, 255, 0.3), transparent 75%), #05101B; }
.dropzone:has(:focus-visible) { outline: 2px solid var(--accent-sky); outline-offset: 4px; }
.dropzone.is-compact .dropzone__inner { flex-direction: row; justify-content: center; gap: 14px; padding: 16px 20px; }
.dropzone.is-compact .dropzone__icon { width: 40px; height: 40px; margin: 0; box-shadow: 0 6px 18px rgba(0, 143, 255, 0.4); }
.dropzone.is-compact .dropzone__icon svg { width: 20px; height: 20px; }
.dropzone.is-compact .dropzone__sub,
.dropzone.is-compact .dropzone__meta { display: none; }
.dropzone.is-compact .dropzone__title { font-size: 16px; }
.is-busy .dropzone { pointer-events: none; opacity: 0.5; }

/* ---------- Selected photos ---------- */
.picked { display: grid; gap: 12px; }
.picked__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.picked__count { margin: 0; font-size: 14px; font-weight: 500; }
.picked__count strong { color: var(--accent-sky); font-weight: 600; }
.picked__actions { display: flex; gap: 16px; }
.link-btn {
  padding: 4px 0; border: 0; background: none; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--accent-sky);
  transition: color 0.3s;
}
.link-btn:hover { color: #fff; }
.link-btn--muted { color: var(--text-faint); }
.is-busy .picked__actions { visibility: hidden; }

.thumbs {
  display: grid; gap: 10px; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}
.thumb {
  position: relative; aspect-ratio: 1; overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: thumb-in 0.45s var(--ease) both;
}
@keyframes thumb-in { from { opacity: 0; transform: scale(0.85); } }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__placeholder {
  display: grid; place-items: center; height: 100%;
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; color: var(--text-faint);
}
.thumb__remove {
  position: absolute; top: 5px; right: 5px;
  display: grid; place-items: center;
  width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px);
  cursor: pointer; transition: background 0.3s, transform 0.3s;
}
.thumb__remove:hover { background: var(--danger); transform: scale(1.08); }
.is-busy .thumb__remove { display: none; }
/* Per-photo upload status overlay */
.thumb__status {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(2, 12, 20, 0.55);
  opacity: 0; transition: opacity 0.3s;
}
.thumb[data-state] .thumb__status { opacity: 1; }
.thumb[data-state="done"] .thumb__status { background: rgba(2, 12, 20, 0.35); }
.thumb__bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.thumb__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-teal)); transition: width 0.2s; }
.thumb[data-state="done"] .thumb__bar,
.thumb[data-state="error"] .thumb__bar { display: none; }
.thumb__icon { width: 30px; height: 30px; border-radius: 50%; display: none; place-items: center; }
.thumb[data-state="done"] .thumb__icon--ok { display: grid; background: var(--success); color: #03140D; animation: pop 0.4s var(--ease); }
.thumb[data-state="error"] .thumb__icon--err { display: grid; background: var(--danger); color: #1a0505; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }

.notice {
  margin: 0; padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #FFD0D0; font-size: 14px; line-height: 1.5;
}

.progress { display: grid; gap: 8px; }
.progress__track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.progress__fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-sky), var(--accent-teal));
  background-size: 200% 100%;
  box-shadow: 0 0 16px rgba(0, 143, 255, 0.7);
  animation: shimmer 1.6s linear infinite;
  transition: width 0.3s var(--ease);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.progress__label { margin: 0; font-size: 13px; color: var(--text-dim); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px;
  border: 0; border-radius: var(--pill);
  font-size: 16px; font-weight: 500; letter-spacing: -0.2px;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s var(--ease), opacity 0.3s;
}
.btn--primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 143, 255, 0.4);
}
.btn--primary:hover:not(:disabled) { background: var(--accent-sky); box-shadow: 0 14px 40px rgba(52, 179, 236, 0.55); transform: translateY(-2px); }
.btn--primary:hover:not(:disabled) svg { transform: translateX(3px); }
.btn svg { transition: transform 0.3s var(--ease); }
.btn:disabled { cursor: not-allowed; opacity: 0.4; box-shadow: none; }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- Thank-you view ---------- */
.view--done { display: flex; flex-direction: column; align-items: center; }
.check {
  position: relative;
  display: grid; place-items: center;
  width: 116px; height: 116px; margin-bottom: 30px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(160deg, var(--accent), var(--accent-teal));
  box-shadow: 0 0 60px rgba(0, 143, 255, 0.6);
  animation: pop 0.6s var(--ease) both;
}
.check__halo {
  position: absolute; inset: -14px; border-radius: 50%;
  border: 2px solid rgba(52, 179, 236, 0.45);
  animation: halo 2.4s ease-out infinite 0.6s;
}
@keyframes halo { from { transform: scale(0.9); opacity: 1; } to { transform: scale(1.45); opacity: 0; } }
.check__tick { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.6s var(--ease) 0.35s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.title--done { max-width: none; }
.lede--done { margin-bottom: 14px; }
.done__count { margin: 0 0 32px; font-size: 14px; color: var(--accent-sky); font-weight: 500; letter-spacing: 0.04em; }
.view--done > * { animation: fade-up 0.8s var(--ease) both; }
.view--done > :nth-child(2) { animation-delay: 0.15s; }
.view--done > :nth-child(3) { animation-delay: 0.25s; }
.view--done > :nth-child(4) { animation-delay: 0.3s; }
.view--done > :nth-child(5) { animation-delay: 0.4s; }
.view--done > .check { animation: pop 0.6s var(--ease) both; }

/* ---------- Entrance animation ---------- */
@keyframes fade-up { from { opacity: 0; transform: translate3d(0, 28px, 0); } }
[data-animate] { opacity: 0; }
[data-animate].is-in { opacity: 1; animation: fade-up 1s var(--ease) both; }
[data-animate][data-delay="1"].is-in { animation-delay: 0.12s; }
[data-animate][data-delay="2"].is-in { animation-delay: 0.24s; }
[data-animate][data-delay="3"].is-in { animation-delay: 0.36s; }

.site-footer {
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  text-align: center; font-size: 12px; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.4);
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .site-header__logo img { height: 32px; }
  .stage { padding-top: 140px; align-items: flex-start; }
  .lede { margin-bottom: 26px; }
  .thumbs { grid-template-columns: repeat(4, 1fr); gap: 8px; }
}

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