/* ---- Page ---- */
:root {
  --blue: #2f6bff;
  --blue-dark: #1f4fd1;
  --green: #1fa65a;
  --bg: #f3f5fa;
  --ink: #1b2233;
  --muted: #667089;
  --line: #dfe4ef;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow: hidden;
}

body {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(47, 107, 255, 0.10), transparent 70%),
    var(--bg);
}

.stage {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stage.leaving { opacity: 0; transform: scale(0.96); pointer-events: none; }

/* ---- Card ---- */
.card {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(27, 34, 51, 0.10);
  text-align: center;
  animation: rise 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.card h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.sub { margin: 8px 0 24px; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---- "I'm not a robot" checkbox ---- */
.check {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  background: #fafbfe;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font: 600 16px/1 "Inter", system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.check:hover { border-color: #b9c3dc; }
.check:focus-visible { outline: 3px solid rgba(47, 107, 255, 0.5); outline-offset: 2px; }
.check.verifying, .check.done { cursor: default; }
.check.done { border-color: rgba(31, 166, 90, 0.5); background: #f1fbf5; }

.box {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border: 2px solid #aab4cc;
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, border-color 0.25s ease, border-radius 0.25s ease;
}
.box-spin, .tick { position: absolute; opacity: 0; }
.box-spin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(47, 107, 255, 0.2);
  border-top-color: var(--blue);
}
.tick { width: 20px; height: 20px; color: #fff; transform: scale(0.4); }

.check.verifying .box { border-radius: 50%; border-color: transparent; }
.check.verifying .box-spin { opacity: 1; animation: spin 0.8s linear infinite; }

.check.done .box { background: var(--green); border-color: var(--green); }
.check.done .tick {
  opacity: 1;
  transform: scale(1);
  transition: transform 0.35s cubic-bezier(0.2, 1.6, 0.4, 1), opacity 0.15s ease;
}

/* ---- Verify button ---- */
.verify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
  padding: 16px 24px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--blue), var(--blue-dark));
  color: #fff;
  font: 700 17px/1 "Inter", system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(47, 107, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.3s ease, filter 0.3s ease;
}
.verify:disabled { opacity: 0.45; filter: grayscale(0.6); box-shadow: none; cursor: not-allowed; }
.verify:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(47, 107, 255, 0.5); }
.verify:not(:disabled):active { transform: scale(0.98); }
.verify:focus-visible { outline: 3px solid rgba(47, 107, 255, 0.5); outline-offset: 3px; }
.verify.ready { animation: pop 0.45s ease; }
.verify:not(:disabled) .arrow { animation: nudge 1.1s ease-in-out infinite; }

/* ---- Player ---- */
.player {
  --vid-w: min(960px, 90vw);
  --vid-h: calc(var(--vid-w) * 9 / 16);
  --reveal-ease: cubic-bezier(0.65, 0, 0.35, 1);

  position: fixed;
  inset: 0;
  overflow: hidden; /* locked while the video is fullscreen-sized */
  background: #000;
  animation: fade-in 0.6s ease both;
  transition: background 1.2s ease;
}
.player[hidden] { display: none; }
/* Pre-loaded behind the intro screen: in the page (so the iframe loads) but invisible and
   unclickable. Removing the class plays the normal fade-in. */
.player.standby { visibility: hidden; pointer-events: none; animation: none; }

/* The video starts filling the window, then shrinks to leave room below it. */
.video-wrap {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height 1.3s var(--reveal-ease);
}
.video-frame {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  border-radius: 0;
  transition: width 1.3s var(--reveal-ease), height 1.3s var(--reveal-ease),
    border-radius 1.3s var(--reveal-ease), box-shadow 1.3s ease;
}

.player.revealed {
  overflow-y: auto;
  background: radial-gradient(60% 40% at 50% 20%, rgba(47, 107, 255, 0.25), transparent 70%), #0b0d14;
}
.player.revealed .video-wrap { height: calc(var(--vid-h) + 14vh); }
.player.revealed .video-frame {
  width: var(--vid-w);
  height: var(--vid-h);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.after {
  /* Tall enough to keep the page scrollable (so the video can scroll away), but the
     content sits at the top, right under the video, not centered in the tall box. */
  min-height: 100vh;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 0 20px 80px;
  text-align: center;
  color: #fff;
}
.after-inner { opacity: 0; transform: translateY(24px); }
.player.revealed .after-inner {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s ease 0.9s, transform 0.9s ease 0.9s;
}
.after-inner { width: 100%; max-width: 1100px; }
.after h2 { font-size: clamp(32px, 6vw, 56px); font-weight: 700; letter-spacing: -0.02em; }

/* Two columns: profile card on the left, right column reserved for a future card. */
.after-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
  text-align: left;
}

.profile-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.avatar {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}
/* Right-hand card: same look as the profile card, with a big number filling the rest. */
.counter-card { display: flex; flex-direction: column; }
.counter-card h3 { margin-top: 0; }
.counter-value {
  flex: 1;
  display: grid;
  place-items: center;
  padding-top: 22px;
  font-size: clamp(64px, 11vw, 112px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #8fb0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.profile-card h3 { margin-top: 18px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.profile-desc { margin-top: 8px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, 0.65); }

.links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.link-card:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); }
.link-card:focus-visible { outline: 3px solid rgba(47, 107, 255, 0.7); outline-offset: 2px; }
.gh { flex: none; width: 22px; height: 22px; }

@media (max-width: 760px) {
  .after-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .links { grid-template-columns: 1fr; }
}
/* ---- Falling photos ---- */
.pile {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  pointer-events: none;
}
.fall-item {
  position: absolute;
  display: block;
  object-fit: cover;
  will-change: transform;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}
.fall-item.photo { border: 4px solid #fff; border-radius: 4px; }

.player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Transparent layer over the iframe: swallows clicks/hovers so the video can't be
   paused (a click on the YouTube player toggles pause even with controls hidden). */
.shield {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.unmute {
  z-index: 2;
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 700 16px/1 "Inter", system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: rise 0.5s ease both;
}
.unmute[hidden] { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 40% { transform: scale(1.04); } }
@keyframes nudge { 50% { transform: translateX(6px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(0.92); }
}

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