/* Vocablo landing page. Same palette, font and chunky 3D tiles as the app. */

:root {
  --bg: #13111f;
  --bg-deep: #0b0a14;
  --surface: #1e1a33;
  --surface-raised: #2a2547;
  --border: #3a3360;
  --text: #f5f3ff;
  --muted: #a39dc9;
  --faint: #6e6894;
  --brand: #8b5cf6;
  --brand-shade: #6236d1;
  --correct: #3fd467;
  --correct-shade: #24a148;
  --present: #ffc233;
  --present-shade: #d6950a;
  --absent: #3a3558;
  --absent-shade: #272340;
  --info: #38b6ff;
  --xp: #ffb020;
  --common: #a39dc9;
  --rare: #38b6ff;
  --epic: #b57bff;
  --legendary: #ffb020;
  --radius: 22px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  text-wrap: balance;
  font-weight: 900;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  text-align: center;
}

h3 {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

p {
  margin: 0;
}

.lead {
  text-wrap: pretty;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  max-width: 36em;
}

.kicker {
  display: block;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  text-align: center;
}

section {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 72px 0;
}

/* ---------- Buttons: the app's raised 3D buttons ---------- */

.btn {
  --face: var(--brand);
  --shade: var(--brand-shade);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 16px;
  background: var(--face);
  box-shadow: 0 5px 0 var(--shade);
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    transform 0.12s var(--ease),
    box-shadow 0.12s var(--ease),
    filter 0.2s;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 var(--shade);
}

.btn-big {
  font-size: 1.1rem;
  padding: 18px 34px;
  --face: var(--correct);
  --shade: var(--correct-shade);
}

.btn-small {
  padding: 9px 16px;
  font-size: 0.85rem;
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--shade);
}

.btn-ghost {
  --face: var(--surface-raised);
  --shade: var(--absent-shade);
}

/* ---------- Tiles ---------- */

.logo-tiles {
  display: flex;
  gap: 8px;
}

.t {
  --face: var(--brand);
  --shade: var(--brand-shade);
  width: 54px;
  height: 58px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 31px;
  background: var(--face);
  box-shadow: 0 5px 0 var(--shade);
  animation: pop 0.45s var(--ease) both;
}

.t.correct {
  --face: var(--correct);
  --shade: var(--correct-shade);
}
.t.present {
  --face: var(--present);
  --shade: var(--present-shade);
}
.t.brand {
  --face: var(--brand);
  --shade: var(--brand-shade);
}

.logo-tiles .t:nth-child(1) { animation-delay: 0.05s; rotate: -7deg; }
.logo-tiles .t:nth-child(2) { animation-delay: 0.12s; rotate: -5deg; }
.logo-tiles .t:nth-child(3) { animation-delay: 0.19s; rotate: -2deg; }
.logo-tiles .t:nth-child(4) { animation-delay: 0.26s; rotate: 0deg; }
.logo-tiles .t:nth-child(5) { animation-delay: 0.33s; rotate: 2deg; }
.logo-tiles .t:nth-child(6) { animation-delay: 0.4s; rotate: 5deg; }
.logo-tiles .t:nth-child(7) { animation-delay: 0.47s; rotate: 7deg; }

.logo-tiles.small .t {
  width: 42px;
  height: 45px;
  font-size: 24px;
  border-radius: 10px;
}

@keyframes pop {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px max(16px, calc((100% - var(--max)) / 2));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.2rem;
  text-decoration: none;
}

.nav-logo img {
  border-radius: 10px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang {
  display: flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.lang button {
  border: 0;
  background: none;
  color: var(--faint);
  font: inherit;
  font-weight: 900;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 9px;
  cursor: pointer;
}

.lang button[aria-pressed='true'] {
  background: var(--brand);
  color: var(--text);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding-top: 56px;
}

.hero-copy {
  display: grid;
  gap: 24px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.fine {
  color: var(--faint);
  font-size: 0.95rem;
}

.hero-phone {
  position: relative;
  justify-self: center;
  width: min(330px, 80vw);
}

.hero-phone::before {
  content: '';
  position: absolute;
  inset: -12%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 45%, transparent), transparent 65%);
  filter: blur(20px);
  z-index: -1;
}

.phone {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 40px;
  padding: 10px;
  background: #050409;
  box-shadow:
    0 0 0 2px var(--border),
    0 30px 60px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.phone video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 31px;
  background: var(--bg-deep);
}

.sound {
  position: absolute;
  left: 50%;
  bottom: 26px;
  translate: -50% 0;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(11, 10, 20, 0.75);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.sound .sound-on,
.sound[aria-pressed='true'] .sound-off {
  display: none;
}

.sound[aria-pressed='true'] .sound-on {
  display: inline;
}

.buddy {
  position: absolute;
  bottom: -3%;
  height: 72%;
  width: auto;
  z-index: 2;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.5));
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

.buddy-left {
  left: -44%;
  height: 64%;
}

.buddy-right {
  right: -40%;
  height: 64%;
  animation-delay: -3s;
}

@keyframes float {
  50% {
    translate: 0 -10px;
  }
}

/* ---------- How it works ---------- */

.how {
  display: grid;
  gap: 40px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.step {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px solid var(--border);
}

.step p {
  color: var(--muted);
  font-size: 0.95rem;
}

.num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand);
  box-shadow: 0 3px 0 var(--brand-shade);
  font-size: 1rem;
  flex-shrink: 0;
}

.demo {
  height: 230px;
  padding: 20px;
  border-radius: 16px;
  background: var(--bg-deep);
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Guess demo */
.rows {
  display: grid;
  gap: 7px;
}

.row {
  display: flex;
  gap: 7px;
}

.cell {
  --face: transparent;
  --shade: transparent;
  width: 46px;
  height: 46px;
  border-radius: 9px;
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 23px;
  transition: transform 0.12s;
}

.cell.filled {
  border-color: #6b62a0;
  animation: bump 0.15s;
}

.cell.flip {
  animation: flip 0.42s ease-in-out both;
}

.cell.correct,
.cell.present,
.cell.absent {
  border-color: var(--face);
  background: var(--face);
  box-shadow: 0 3px 0 var(--shade);
}

.cell.correct {
  --face: var(--correct);
  --shade: var(--correct-shade);
}
.cell.present {
  --face: var(--present);
  --shade: var(--present-shade);
}
.cell.absent {
  --face: var(--absent);
  --shade: var(--absent-shade);
}

.cell.hop {
  animation: hop 0.37s var(--ease) both;
}

@keyframes bump {
  50% {
    transform: scale(1.12);
  }
}

@keyframes flip {
  50% {
    transform: rotateX(90deg);
  }
}

@keyframes hop {
  40% {
    transform: translateY(-12px);
  }
}

/* Versus demo */
.versus {
  display: flex;
  align-items: center;
  gap: 18px;
}

.player {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.player img {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  border: 3px solid var(--surface);
  transition: border-color 0.3s;
}

.player.win img {
  border-color: var(--xp);
}

.dots {
  display: flex;
  gap: 5px;
}

.dot {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface-raised);
  display: grid;
  place-items: center;
  color: var(--bg-deep);
  font-size: 12px;
  font-weight: 900;
}

.dot.on {
  background: var(--correct);
  animation: bump 0.2s;
}

.total {
  font-size: 1.4rem;
  font-weight: 900;
}

.player.win .total {
  color: var(--xp);
}

.vs {
  color: var(--faint);
  font-weight: 900;
  font-size: 1.3rem;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    transform: scale(1.15);
  }
}

/* Modes demo */
.modes {
  display: flex;
  gap: 10px;
}

.mode {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 128px;
  padding: 14px 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  font-size: 0.85rem;
}

.mode .icon {
  font-size: 1.6rem;
  line-height: 1;
}

.mode .big {
  font-size: 1.35rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.attempts {
  display: flex;
  gap: 3px;
}

.attempts i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--surface-raised);
}

.attempts i.on {
  background: var(--correct);
}

/* Level demo */
.level {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 80%;
}

.reward {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  overflow: hidden;
  border: 3px solid var(--border);
  transition: border-color 0.3s;
}

.reward img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) brightness(0.55);
  transition: filter 0.4s;
}

.reward::after {
  content: '🔒';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  transition: opacity 0.3s;
}

.reward.open {
  border-color: var(--common);
  animation: bump 0.35s;
  box-shadow: 0 0 30px color-mix(in srgb, var(--xp) 50%, transparent);
}

.reward.open img {
  filter: none;
}

.reward.open::after {
  opacity: 0;
}

.bar {
  width: 100%;
  height: 14px;
  border-radius: 7px;
  background: var(--surface-raised);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 15%;
  border-radius: 7px;
  background: var(--xp);
  transition: width 0.7s var(--ease);
}

.level-up {
  color: var(--xp);
  font-weight: 900;
  min-height: 1.5em;
  opacity: 0;
  transition: opacity 0.2s;
}

.level-up.show {
  opacity: 1;
}

/* ---------- Daily ---------- */

.daily-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--info) 22%, transparent), transparent 55%),
    var(--surface);
  border: 2px solid var(--border);
}

.daily-copy {
  display: grid;
  gap: 16px;
}

.daily-copy .kicker,
.daily-copy h2 {
  text-align: left;
}

.daily-copy .kicker {
  color: var(--info);
}

.daily-copy p {
  color: var(--muted);
}

.daily-buddy {
  height: 400px;
  width: auto;
  align-self: end;
  margin: -120px 0 -40px;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.45));
}

.mini-board {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.mini-board li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 14px;
  background: var(--bg);
  border: 2px solid var(--border);
  opacity: 0;
  translate: 24px 0;
  transition:
    opacity 0.4s,
    translate 0.4s var(--ease);
}

.mini-board.in li {
  opacity: 1;
  translate: 0 0;
}

.mini-board li:nth-child(2) { transition-delay: 0.08s; }
.mini-board li:nth-child(3) { transition-delay: 0.16s; }
.mini-board li:nth-child(4) { transition-delay: 0.24s; }
.mini-board li:nth-child(5) { transition-delay: 0.32s; }

.mini-board li.you {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 14%, var(--bg));
}

.mini-board .medal {
  width: 26px;
  text-align: center;
  color: var(--faint);
}

.mini-board img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.mini-board b {
  flex: 1;
}

.mini-board em {
  font-style: normal;
  color: var(--info);
  font-weight: 900;
}

/* ---------- Cast: the Season Pass track ---------- */

.cast {
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.cast .lead {
  margin-bottom: 28px;
}

.track {
  --av: 104px;
  position: relative;
  width: 100%;
}

.track-bar {
  position: absolute;
  left: 5%;
  right: 5%;
  top: calc(var(--av) / 2 - 5px);
  height: 10px;
  border-radius: 5px;
  background: var(--surface-raised);
  overflow: hidden;
}

.track-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--brand), var(--xp));
  transition: width 2.8s linear 0.2s;
}

.track.in .track-bar span {
  width: 100%;
}

.tiers {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 12px;
  align-items: start;
}

.tier {
  --rarity: var(--common);
  --at: calc(var(--i) * 0.31s + 0.25s);
  display: grid;
  justify-items: center;
  gap: 2px;
}

.tier.rare {
  --rarity: var(--rare);
}
.tier.epic {
  --rarity: var(--epic);
}
.tier.legendary {
  --rarity: var(--legendary);
}

.av {
  position: relative;
  width: 100%;
  max-width: var(--av);
  aspect-ratio: 1;
  margin-bottom: 8px;
  border-radius: 30%;
  border: 3px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s var(--at);
}

.av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px) brightness(0.45) saturate(0.5);
  transition: filter 0.5s var(--at);
}

.av::after {
  content: '🔒';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  transition: opacity 0.3s var(--at);
}

.track.in .av {
  border-color: var(--rarity);
}

.track.in .av img {
  filter: none;
}

.track.in .av::after {
  opacity: 0;
}

.tier b {
  font-weight: 900;
  font-size: 1rem;
}

.tier-n {
  color: var(--faint);
  font-size: 0.8rem;
}

.rar {
  color: var(--rarity);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Teodoro: bigger, gold, glowing once unlocked. */
.tier.legendary .av {
  max-width: calc(var(--av) * 1.3);
  margin-top: calc(var(--av) * -0.15);
  border-width: 4px;
}

.track.in .tier.legendary .av {
  animation: glow 2.4s ease-in-out calc(var(--at) + 0.5s) infinite;
}

.tier.legendary b {
  color: var(--legendary);
  font-size: 1.15rem;
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 24px color-mix(in srgb, var(--legendary) 45%, transparent);
  }
  50% {
    box-shadow: 0 0 56px color-mix(in srgb, var(--legendary) 80%, transparent);
  }
}

/* ---------- Final + footer ---------- */

.final {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: center;
  gap: 56px;
  max-width: 900px;
  padding-bottom: 96px;
}

.final-buddy {
  height: 420px;
  width: auto;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.5));
  animation: float 7s ease-in-out infinite;
}

.final-copy {
  display: grid;
  justify-items: start;
  gap: 20px;
}

.final-copy h2 {
  text-align: left;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 28px 16px 40px;
  color: var(--faint);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text);
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  translate: 0 28px;
  transition:
    opacity 0.6s var(--ease),
    translate 0.6s var(--ease);
}

.reveal.in {
  opacity: 1;
  translate: 0 0;
}

.steps .reveal:nth-child(2) { transition-delay: 0.08s; }
.steps .reveal:nth-child(3) { transition-delay: 0.16s; }
.steps .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .buddy,
  .daily-buddy,
  .final-buddy {
    display: none;
  }

  .final {
    grid-template-columns: 1fr;
  }

  .final-copy {
    justify-items: center;
    text-align: center;
  }

  .final-copy h2 {
    text-align: center;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .hero-copy {
    justify-items: center;
  }

  .cta-row {
    justify-content: center;
  }


  .daily-card {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .tiers {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 28px;
    max-width: 480px;
    margin: 0 auto;
  }

  .track-bar {
    display: none;
  }

  .tier.legendary .av {
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  .cell {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .mode {
    width: 112px;
  }

  section {
    padding: 52px 0;
  }

  .t {
    width: 38px;
    height: 41px;
    font-size: 22px;
    border-radius: 9px;
    box-shadow: 0 4px 0 var(--shade);
  }

  .logo-tiles {
    gap: 5px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .track {
    --av: 92px;
  }


  .nav-logo span {
    display: none;
  }
}

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

  .reveal,
  .mini-board li {
    opacity: 1;
    translate: 0 0;
  }
}
