@font-face { font-family: "Onest"; src: url("fonts/onest.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Serif Italic"; src: url("fonts/serif-italic.woff2") format("woff2"); font-style: italic; font-display: swap; }

:root {
  --bg: #f6f4fb;
  --card: #ffffff;
  --ink: #1e1a2b;
  --muted: #7a7488;
  --line: #ece8f4;
  --soft: #f1edfa;
  --violet: #6c4ce4;
  --violet-press: #5a3bd0;
  --lilac: #e4dafb;
  --error: #d23c31;
  --radius: 24px;
  --gutter: 20px;
  --col: 480px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 1px 2px rgba(30, 26, 43, .04), 0 8px 24px -12px rgba(30, 26, 43, .12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 50% -10%, #e9e0ff 0%, rgba(233, 224, 255, 0) 60%),
    var(--bg);
  color: var(--ink);
  font: 400 16px/1.45 "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, p, ol, ul { margin: 0; padding: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #b9a6f5; outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app {
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 0 auto;
  padding: env(safe-area-inset-top) var(--gutter) 0;
}

/* ---------------------------------------------------------- top bar */

.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: block; height: 40px; width: auto; }
.pill-free {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  color: var(--violet);
}

/* ---------------------------------------------------------- hero */

.hero { padding: 28px 0 24px; text-align: center; }
.hello { margin-bottom: 10px; font-size: 15px; font-weight: 600; color: var(--violet); }
.hero h1 {
  font-size: clamp(34px, 10vw, 46px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero h1 em {
  font-family: "Serif Italic", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--violet);
  padding-right: .04em;
}
.sub {
  margin: 14px auto 0;
  max-width: 21em;
  font-size: 16px;
  color: var(--muted);
  text-wrap: balance;
}

/* ---------------------------------------------------------- video */

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1d1428;
  box-shadow: 0 24px 48px -24px rgba(60, 30, 120, .45);
}
.player video { display: block; width: 100%; height: 100%; background: #000; }
.lock { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; display: block; }
.lock img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.lock:hover img { transform: scale(1.015); }
/* corner chips, bottom-right: the thumbnail's own type (left half) stays clear */
.chips {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}
.lock-btn, .duration {
  height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity .4s, transform .4s var(--ease);
}
.lock-btn {
  gap: 6px;
  padding: 0 12px 0 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(20, 10, 40, .25);
}
.lock-btn svg { color: var(--violet); }
.duration {
  padding: 0 11px;
  background: rgba(20, 14, 32, .55);
  color: #fff;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.player.unlocking .chips { opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s var(--ease); }

/* ---------------------------------------------------------- action */

.action { padding: 24px 0 8px; text-align: center; }
.cta {
  display: block;
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  box-shadow: 0 14px 30px -12px rgba(108, 76, 228, .75);
  transition: background .15s, transform .12s;
}
.cta:hover { background: var(--violet-press); }
.cta:active { transform: scale(.98); }
.cta[aria-busy="true"] { opacity: .7; pointer-events: none; }
.hint { margin-top: 10px; font-size: 14px; color: var(--muted); }

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

.card {
  margin-top: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.card h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }

.steps { margin-top: 24px; }
.steps ol { list-style: none; margin-top: 16px; display: grid; gap: 14px; }
.steps li { display: flex; align-items: center; gap: 14px; font-size: 16px; }
.steps li span {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--violet);
  font-weight: 700;
  font-size: 15px;
}

.topics { margin-top: 28px; }
.topics h2 { font-size: 18px; font-weight: 700; }
.topics ul { list-style: none; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.topics li {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 500;
}

.author { margin-top: 28px; }
.author-row { display: flex; align-items: center; gap: 14px; }
.author-row img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--soft); }
.author-row p { margin-top: 2px; font-size: 14px; color: var(--muted); }
.feat {
  margin-top: 18px;
  padding: 18px 18px 18px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #7a5cf0 0%, #5b3ad6 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 16px 30px -16px rgba(108, 76, 228, .8);
}
.feat b { display: block; font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -0.035em; }
.feat span { display: block; margin-top: 8px; font-size: 14px; line-height: 1.35; color: rgba(255, 255, 255, .85); }
.trophy { flex: none; filter: drop-shadow(0 6px 10px rgba(30, 10, 80, .35)); }
.stats { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats div { padding: 14px; border-radius: 18px; background: var(--soft); }
.stats b { display: block; font-size: 24px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.3; color: var(--muted); }

.bonus { display: flex; align-items: center; gap: 14px; padding: 14px; }
.bonus img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.bonus h2 { font-size: 16px; }
.bonus p { margin-top: 2px; font-size: 14px; color: var(--muted); }

.foot { padding: 28px 0 calc(110px + env(safe-area-inset-bottom)); text-align: center; font-size: 13px; color: var(--muted); }
.is-open .foot { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }

/* ---------------------------------------------------------- floating CTA */

.float {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(calc(100% - 2 * var(--gutter)), var(--col));
  transform: translate(-50%, 140%);
  transition: transform .35s var(--ease);
  z-index: 20;
}
.float.show { transform: translate(-50%, 0); }

/* ---------------------------------------------------------- quiz sheet */

.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 18, 38, .45);
  opacity: 0;
  transition: opacity .3s;
}
.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform .4s var(--ease);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: none; }

.sheet-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 12px 12px;
}
.icon-btn {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  color: var(--ink);
}
.icon-btn[disabled] { visibility: hidden; }
.progress { flex: 1; height: 6px; border-radius: 3px; background: var(--lilac); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--violet); transition: width .35s var(--ease); }

.sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px var(--gutter) 24px;
  width: 100%;
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 0 auto;
}
.step { margin: 0; padding: 0; border: 0; min-width: 0; }
.step legend { padding: 0; width: 100%; }
.step-count { display: block; font-size: 14px; font-weight: 600; color: var(--violet); }
.step-title {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.step.enter { animation: step-in .35s var(--ease); }
.step.enter-back { animation: step-back .35s var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-24px); } }

.options { margin-top: 24px; display: grid; gap: 10px; }
.opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  width: 100%;
  padding: 16px 18px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  transition: border-color .15s, background .15s;
}
.opt::after {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #d9d2e8;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.opt[aria-pressed="true"] { border-color: var(--violet); }
.opt[aria-pressed="true"]::after { border-color: var(--violet); background: var(--violet); box-shadow: inset 0 0 0 4px #fff; }

.field { display: block; margin-top: 18px; }
.step-title + .field { margin-top: 24px; }
.field > span:first-child { display: block; margin: 0 0 8px 4px; font-size: 14px; font-weight: 500; color: var(--muted); }
.field input, .phone {
  width: 100%;
  height: 58px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 18px;
  transition: border-color .15s;
}
.field input { padding: 0 18px; }
.field input:focus, .phone:focus-within { outline: none; border-color: var(--violet); }
.phone { display: flex; align-items: center; overflow: hidden; }
.phone-code { padding-left: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.phone input { flex: 1; min-width: 0; height: 100%; border: 0; box-shadow: none; border-radius: 0; padding: 0 18px 0 8px; font-variant-numeric: tabular-nums; }
.phone input:focus { border: 0; }
.field.invalid > input, .field.invalid .phone { border-color: var(--error); }
.form-error { margin: 12px 4px 0; color: var(--error); font-size: 14px; }
#lead-form .cta { margin-top: 24px; }

/* ---------------------------------------------------------- larger screens: the sheet becomes a centred card */

@media (min-width: 720px) {
  .hero { padding-top: 44px; }
  .sheet-panel {
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    width: 520px;
    height: auto;
    max-height: min(760px, calc(100% - 64px));
    border-radius: 28px;
    transform: translate(-50%, -46%);
    opacity: 0;
    transition: transform .35s var(--ease), opacity .25s;
    box-shadow: 0 40px 80px -30px rgba(20, 10, 40, .5);
  }
  .sheet.open .sheet-panel { transform: translate(-50%, -50%); opacity: 1; }
  .sheet-top { padding-top: 16px; }
}

body.sheet-on { overflow: hidden; }

/* phones: the video card is small, so its corner chips are too */
@media (max-width: 480px) {
  .chips { right: 10px; bottom: 10px; gap: 6px; }
  .lock-btn, .duration { height: 28px; font-size: 12px; }
  .lock-btn { padding: 0 10px 0 8px; }
  .lock-btn svg { width: 13px; height: 13px; }
}

/* smallest phones: tighter trophy, stats stacked */
@media (max-width: 360px) {
  .trophy { width: 46px; height: 46px; }
  .feat { padding: 16px; }
  .stats { grid-template-columns: 1fr; }
}

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