:root {
  --cream: #fbf6ea;
  --cream-deep: #f3ead7;
  --surface: #ffffff;
  --ink: #241f1b;
  --ink-soft: #5c534a;
  --sage: #388e52;
  --sky: #5cb5ec;
  --zippy: #6b5ce7;
  --coral: #f05a6b;
  --sun: #f5a623;
  --border: rgba(36, 31, 27, 0.09);
  --shadow-sm: 0 6px 20px rgba(36, 31, 27, 0.07);
  --shadow-lg: 0 22px 54px rgba(27, 36, 48, 0.18);
  --radius-lg: 28px;
  --radius-md: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "SF Pro Rounded", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name {
  font-family: "Fredoka", "SF Pro Rounded", -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.015em;
  margin: 0;
}

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

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 246, 234, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(36, 31, 27, 0.14);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  font-size: 0.95rem;
}

.topnav a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.18s ease;
}

.topnav a:hover {
  color: var(--ink);
}

.topnav .nav-cta {
  background: var(--zippy);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(107, 92, 231, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.topnav .nav-cta:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(107, 92, 231, 0.36);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 76px;
}

.hero-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(92, 181, 236, 0.24), transparent 46%),
    radial-gradient(circle at 18% 12%, rgba(245, 166, 35, 0.18), transparent 40%),
    radial-gradient(circle at 70% 92%, rgba(56, 142, 82, 0.14), transparent 44%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 44px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--zippy);
  background: rgba(107, 92, 231, 0.11);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.7rem);
  line-height: 1.06;
  color: var(--ink);
  margin-bottom: 18px;
}

.lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 52ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.08rem;
  color: #fff;
  background: linear-gradient(135deg, #f35a70 0%, #f5942c 100%);
  padding: 15px 26px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(240, 90, 107, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(240, 90, 107, 0.42);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--surface);
  padding: 14px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(36, 31, 27, 0.22);
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-pills span {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
}

/* Framed iPhone Showcase */
.hero-phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 490px;
}

.phone-frame {
  width: 248px;
  border-radius: 40px;
  padding: 9px;
  background: #1b1c1f;
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(255, 255, 255, 0.45);
}

.phone-frame img {
  width: 100%;
  height: auto;
  border-radius: 32px;
}

.phone-front {
  position: relative;
  z-index: 2;
  transform: translateX(-28px) rotate(-2deg);
}

.phone-back {
  position: absolute;
  z-index: 1;
  width: 224px;
  transform: translate(118px, 18px) rotate(6deg);
  opacity: 0.96;
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-tint {
  background: var(--cream-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 42px;
}

.kicker {
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--coral);
  margin: 0 0 8px;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  margin-bottom: 10px;
}

.section-sub {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

/* Meet the 5 Playfriends Cast Grid */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.cast-card {
  position: relative;
  appearance: none;
  font: inherit;
  text-align: center;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 16px 12px 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.cast-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(36, 31, 27, 0.12);
}

.cast-card.is-speaking {
  transform: translateY(-8px) scale(1.03);
  border-color: var(--sun);
  box-shadow: 0 18px 36px rgba(245, 166, 35, 0.28);
}

.cast-card.card-zippy { background: linear-gradient(180deg, #f3f1ff 0%, #ffffff 68%); }
.cast-card.card-pip   { background: linear-gradient(180deg, #fff3e6 0%, #ffffff 68%); }
.cast-card.card-ollie { background: linear-gradient(180deg, #edf6ff 0%, #ffffff 68%); }
.cast-card.card-rocco { background: linear-gradient(180deg, #eef9f0 0%, #ffffff 68%); }
.cast-card.card-vern  { background: linear-gradient(180deg, #ecf8f7 0%, #ffffff 68%); }

.voice-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.cast-card.is-speaking .voice-pill {
  background: var(--sun);
  color: #fff;
  border-color: transparent;
}

.cast-art {
  height: 168px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 12px;
}

.cast-art img {
  max-height: 162px;
  width: auto;
  filter: drop-shadow(0 8px 12px rgba(36, 31, 27, 0.14));
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.cast-card.is-speaking .cast-art img {
  transform: scale(1.07) rotate(-2deg);
}

.cast-card h3 {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.cast-role {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.cast-quote {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

/* Three Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.game-card {
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  color: #fff;
  box-shadow: 0 16px 34px rgba(36, 31, 27, 0.14);
}

.game-explore {
  background: linear-gradient(145deg, #25a96b 0%, #157d69 100%);
}

.game-count {
  background: linear-gradient(145deg, #f35a78 0%, #f5942c 100%);
}

.game-find {
  background: linear-gradient(145deg, #6d5ce8 0%, #3d84e8 100%);
}

.game-badge {
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.22);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.game-card h3 {
  font-size: 1.55rem;
  margin-bottom: 10px;
}

.game-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.98rem;
}

/* Soundtracks */
.tracks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.track-card {
  appearance: none;
  font: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.track-card:hover {
  transform: translateY(-2px);
  border-color: rgba(107, 92, 231, 0.35);
}

.track-card.is-playing {
  border-color: var(--zippy);
  background: #f6f4ff;
  box-shadow: 0 12px 26px rgba(107, 92, 231, 0.18);
}

.track-play {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--zippy);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.track-info strong {
  display: block;
  font-family: "Fredoka", sans-serif;
  font-size: 1.08rem;
  margin-bottom: 2px;
}

.track-info span {
  font-size: 0.86rem;
  color: var(--ink-soft);
}

/* TestFlight Beta Banner */
.section-cta {
  padding-top: 24px;
  padding-bottom: 84px;
}

.beta-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: 36px;
  align-items: center;
  padding: 40px 44px;
  border-radius: 34px;
  background: linear-gradient(135deg, #2b3564 0%, #4d429c 55%, #6552b5 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.eyebrow-light {
  color: #ffe39b;
  background: rgba(255, 255, 255, 0.14);
}

.beta-copy h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.45rem);
  margin-bottom: 14px;
}

.beta-steps {
  margin: 0 0 24px;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.02rem;
}

.beta-steps li + li {
  margin-top: 6px;
}

.btn-large {
  font-size: 1.12rem;
  padding: 16px 30px;
}

.beta-note {
  margin: 14px 0 0;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.78);
}

.beta-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.qr-box {
  width: 176px;
  height: 176px;
  padding: 12px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.qr-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-caption {
  font-size: 0.82rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.88);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 42px;
  background: var(--cream);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-icon {
  border-radius: 7px;
}

.footer-links {
  display: flex;
  gap: 20px;
  font-weight: 700;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Privacy / Subpage */
.subpage {
  padding: 56px 0 88px;
}

.prose-card {
  max-width: 740px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 38px;
  box-shadow: var(--shadow-sm);
}

.prose-card h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.prose-card h2 {
  font-size: 1.3rem;
  margin-top: 26px;
  margin-bottom: 8px;
}

.prose-card p {
  color: var(--ink-soft);
  margin: 0 0 14px;
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .cta-row, .trust-pills {
    justify-content: center;
  }
  .hero-phones {
    min-height: 430px;
  }
  .cast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .games-grid, .tracks-grid {
    grid-template-columns: 1fr;
  }
  .beta-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px 24px;
  }
  .beta-steps {
    text-align: left;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 560px) {
  .topnav a:not(.nav-cta) {
    display: none;
  }
  .phone-frame {
    width: 210px;
  }
  .phone-front {
    transform: translateX(-22px) rotate(-2deg);
  }
  .phone-back {
    width: 185px;
    transform: translate(92px, 14px) rotate(6deg);
  }
  .prose-card {
    padding: 28px 22px;
  }
}
