/* Vocki promo — Figma 785:7794 */

@font-face {
  font-family: "Telegraf";
  src: url("assets/fonts/Telegraf-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Telegraf";
  src: url("assets/fonts/Telegraf-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000;
  --bg: #F5F5F5;      /* Neutral/50 */
  --muted: #666;      /* Neutral/500 */
  --faint: #AAA;      /* Neutral/300 */
  --line: #CCC;       /* Neutral/200 */
  --blob: #C9C9C9;
  --ok: #B6E78B;
  --bad: #FCA7AA;

  /* The phone from the design: 344 × 705, radius 32. */
  --phone-w: 344px;
  /* Scale of everything inside the phone; set by app.js from the real width. */
  --s: 1;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Telegraf", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Layout: intro column · phone, 96 apart, centred ---------- */

.page {
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 256px var(--phone-w);
  column-gap: 96px;
  justify-content: center;
  align-items: center;
}

/* ---------- Intro ---------- */

.intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.intro__plate {
  width: 100px;
  height: 100px;
  border-radius: 26.667px;
  background: linear-gradient(#ECECEC, #C1C1C1);
  overflow: hidden;
}
.intro__mark {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
}

.intro__title {
  margin: 0;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.02em;
}

.intro__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.intro__tagline {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.02em;
}
.intro__text {
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 24px;
  color: var(--muted);
}

.stores {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.store {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: opacity .18s ease, transform .18s ease;
}
.store--ios {
  background: #000;
  color: #F5F5F5;
}
.store--ios:hover { opacity: .8; }
.store--ios:active { transform: scale(.98); }
.store--ios:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.store--android {
  border: 1px solid var(--line);
  color: var(--faint);
  cursor: default;
}

/* ---------- The phone ---------- */

.phone {
  position: relative;
  width: var(--phone-w);
  aspect-ratio: 344 / 705;
  background: #000;
  border-radius: calc(32px * var(--s));
  overflow: hidden;
  /* Bubble size; declared here so it follows the phone's own --s. */
  --b: calc(110px * var(--s));
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* Best · Result · clock, above the scrim so they read in every state. */
.phone__bar {
  position: absolute;
  z-index: 4;
  top: calc(22px * var(--s));
  left: calc(28px * var(--s));
  right: calc(20px * var(--s));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #F5F5F5;
  font-size: calc(16px * var(--s));
  line-height: calc(20px * var(--s));
  letter-spacing: -0.02em;
  white-space: nowrap;
  pointer-events: none;
}
.phone__bar [hidden] { display: none; }
.phone__clock { font-variant-numeric: tabular-nums; }
.phone__clock.is-low { color: #FF6B5A; }

.phone__word {
  position: absolute;
  left: calc(16px * var(--s));
  right: calc(16px * var(--s));
  top: calc(105px * var(--s));
  text-align: center;
  color: #fff;
  font-size: calc(48px * var(--s));
  line-height: calc(52px * var(--s));
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 2;
  transition: transform .25s cubic-bezier(.2,.9,.3,1.2), opacity .2s ease;
}
.phone__word.is-swapping {
  transform: scale(.8);
  opacity: 0;
  transition: none;
}

.phone__field {
  position: absolute;
  inset: 0;
}

/* ---------- Bubbles ---------- */

.bubble {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--b);
  height: var(--b);
  margin: calc(var(--b) / -2) 0 0 calc(var(--b) / -2);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.bubble:focus-visible .bubble__inner { outline: 2px solid #fff; outline-offset: 4px; border-radius: 50%; }

.bubble__inner {
  position: absolute;
  inset: 0;
  transform: rotate(var(--tilt));
  transition: opacity .2s ease, transform .22s ease-out;
}

.bubble__blob {
  position: absolute;
  left: 3%;
  top: 3%;
  width: 94%;
  height: 94%;
  transform: rotate(var(--rot));
  overflow: visible;
}
.bubble__blob path {
  fill: var(--blob);
  transition: fill .2s ease;
}

.bubble__img {
  position: absolute;
  left: 8.57%;
  width: 82.86%;
  height: 82.86%;
  top: 50%;
  transform: translateY(-50%);
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .16));
  pointer-events: none;
}

.bubble.is-correct .bubble__blob path { fill: url(#g-ok); }
.bubble.is-wrong   .bubble__blob path { fill: url(#g-bad); }

.bubble.is-leaving { pointer-events: none; }
.bubble.is-leaving .bubble__inner {
  transform: rotate(var(--tilt)) scale(.2);
  opacity: 0;
}

/* The app's "no-no" shake: 7px of travel, three wiggles in .4s. */
.bubble.is-shaking .bubble__inner {
  animation: shake .4s linear;
}
@keyframes shake {
  0%      { transform: translateX(0)    rotate(var(--tilt)); }
  8.33%   { transform: translateX(7px)  rotate(var(--tilt)); }
  25%     { transform: translateX(-7px) rotate(var(--tilt)); }
  41.67%  { transform: translateX(7px)  rotate(var(--tilt)); }
  58.33%  { transform: translateX(-7px) rotate(var(--tilt)); }
  75%     { transform: translateX(7px)  rotate(var(--tilt)); }
  91.67%  { transform: translateX(-7px) rotate(var(--tilt)); }
  100%    { transform: translateX(0)    rotate(var(--tilt)); }
}

/* ---------- Start / game over scrim (790:42822) ---------- */

.phone__scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(24px * var(--s));
  background: rgba(0, 0, 0, .6);
  animation: fade-in .3s ease;
}
.phone__scrim[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } }

.verdict {
  text-align: center;
  color: #fff;
}
.verdict[hidden] { display: none; }
.verdict__why {
  margin: 0;
  font-size: calc(16px * var(--s));
  line-height: calc(20px * var(--s));
  letter-spacing: -0.02em;
  color: #F5F5F5;
  opacity: .7;
}
.verdict__score {
  margin: 0;
  font-size: calc(48px * var(--s));
  line-height: calc(52px * var(--s));
  letter-spacing: -0.02em;
}

/* The Learn button (790:42826): pale plate, 48pt word, the streak flame. */
.learn {
  display: flex;
  align-items: center;
  gap: calc(8px * var(--s));
  padding: calc(8px * var(--s)) calc(16px * var(--s)) calc(8px * var(--s)) calc(24px * var(--s));
  background: #F5F5F5;
  color: #000;
  border: 0;
  border-radius: calc(16px * var(--s));
  font: inherit;
  font-size: calc(48px * var(--s));
  line-height: calc(52px * var(--s));
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.learn img {
  width: calc(40px * var(--s));
  height: calc(40px * var(--s));
}
.learn:hover { background: #fff; }
.learn:active { transform: scale(.97); }
.learn:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* ---------- Narrow screens ---------- */

@media (max-width: 799px) {
  :root { --phone-w: min(344px, 100vw - 32px); }

  .page {
    grid-template-columns: var(--phone-w);
    row-gap: 32px;
    padding: 24px 16px 40px;
    align-content: start;
  }
  .intro { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .bubble.is-shaking .bubble__inner { animation: none; }
  .phone__scrim { animation: none; }
}

/* ---------- Documents: privacy, support ---------- */

.doc {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}
.doc__back {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.02em;
}
.doc__back:hover { opacity: .8; }
.doc__mark {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 10.667px;
  background: linear-gradient(#ECECEC, #C1C1C1);
  object-fit: cover;
}
.doc__title {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.02em;
}
.doc .doc__date {
  margin: 0 0 32px;
  font-weight: 400;
  font-size: 14px;
  line-height: 24px;
  color: var(--faint);
}
.doc .doc__lead {
  margin: 0 0 32px;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.doc h2 {
  margin: 24px 0 4px;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.02em;
}
.doc p {
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 24px;
  color: var(--muted);
}
.doc a { color: var(--ink); }

.intro__legal {
  margin: 0;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: var(--faint);
}
.intro__legal a { color: var(--muted); text-decoration: none; }
.intro__legal a:hover { color: var(--ink); }
