/* PikaLearn marketing site
   Airbnb-calm layout + PikaLearn spark/ink identity.
   Full-bleed imagery, generous space, flat controls. No game chrome. */

:root {
  --spark: #ffc531;
  --spark-deep: #b8860b;
  --ink: #1b2033;
  --ink-soft: #2a3048;
  --cloud: #f7f7f5;
  --page: #fefefe;
  --hairline: #e8e6e1;
  --muted: #6e7180;
  --correct: #2fbf71;
  --shadow: rgba(27, 32, 51, 0.08);
  --shadow-deep: rgba(27, 32, 51, 0.14);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --display: "Outfit", "Avenir Next", system-ui, sans-serif;
  --sans: "Figtree", "Avenir Next", system-ui, sans-serif;
  --max: 1180px;
  --radius: 1.25rem;
  --radius-sm: 0.85rem;
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .hero-media img,
  .download-mascot {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}

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

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.25s var(--ease);
}

a:hover {
  color: var(--spark-deep);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(254, 254, 254, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--hairline);
  background: rgba(254, 254, 254, 0.94);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.15rem;
}

.nav-desktop a {
  text-decoration: none;
  font-weight: 550;
  font-size: 0.95rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
}

.nav-desktop a:hover {
  color: var(--ink);
  background: var(--cloud);
}

.nav-cta {
  background: var(--ink) !important;
  color: #fff !important;
  margin-left: 0.35rem;
  padding-inline: 1.05rem !important;
}

.nav-cta:hover {
  background: var(--ink-soft) !important;
  color: #fff !important;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--cloud);
  cursor: pointer;
  position: relative;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 13px;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease), opacity 0.2s;
}

.nav-toggle-bars {
  top: 21px;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.mobile-nav {
  display: grid;
  gap: 0.15rem;
  padding: 0 0 1rem;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  text-decoration: none;
  font-weight: 600;
  padding: 0.85rem 0.25rem;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}

@media (min-width: 880px) {
  .nav-desktop {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.95rem 1.45rem;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
    color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:active {
  transform: scale(0.985);
}

.btn-ink {
  background: var(--ink);
  color: #fff;
}

.btn-ink:hover {
  background: var(--ink-soft);
  color: #fff;
}

.hero .btn-ink {
  background: var(--spark);
  color: var(--ink);
}

.hero .btn-ink:hover {
  background: #ffd45c;
  color: var(--ink);
}

.hero .btn-light {
  background: rgba(254, 254, 254, 0.96);
  color: var(--ink);
}

.btn-spark {
  background: var(--spark);
  color: var(--ink);
}

.btn-spark:hover {
  background: #ffd45c;
  color: var(--ink);
}

.btn-light {
  background: rgba(254, 254, 254, 0.92);
  color: var(--ink);
  backdrop-filter: blur(8px);
}

.btn-light:hover {
  background: #fff;
  color: var(--ink);
}

a[aria-disabled="true"] {
  opacity: 0.72;
  cursor: default;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: min(92dvh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  transform: scale(1.03);
  animation: hero-drift 18s var(--ease) infinite alternate;
}

@keyframes hero-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.5%, -1%, 0);
  }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(27, 32, 51, 0.08) 0%,
      rgba(27, 32, 51, 0.18) 48%,
      rgba(20, 24, 38, 0.72) 100%
    ),
    linear-gradient(100deg, rgba(20, 24, 38, 0.42) 0%, rgba(20, 24, 38, 0.08) 46%, transparent 68%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 5rem 0 3.75rem;
  max-width: 40rem;
  color: #fff;
  animation: hero-in 0.9s var(--ease) both;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.brand-mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.4rem, 9vw, 5.6rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
  margin-bottom: 0.85rem;
  color: #fff;
  text-shadow: 0 2px 24px rgba(20, 24, 38, 0.35);
}

.hero-line {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(1.45rem, 3.4vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  max-width: 18ch;
  margin-bottom: 0.85rem;
  color: #fff;
}

.hero-lede {
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  max-width: 34ch;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---- Sections ---- */
.section {
  padding: 5.5rem 0;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.75rem;
}

.section-head h2 {
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.section-head p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 42ch;
}

/* ---- Topics (Airbnb-style browse) ---- */
.topics {
  background: var(--page);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 0.9rem;
}

.topic {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-width: 0;
  isolation: isolate;
}

.topic > img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--cloud);
  flex: 0 0 auto;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.topic:hover > img {
  transform: scale(1.01);
  box-shadow: 0 14px 28px var(--shadow);
}

.topic-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.7rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  background: var(--page);
}

.topic-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.topic-icon.lg {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.topic-soft {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.85rem;
  min-height: 9.5rem;
  padding: 1.15rem;
  border-radius: var(--radius);
  background: var(--cloud);
  border: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.topic-soft:hover {
  border-color: var(--hairline);
  background: #f1f1ee;
  transform: translateY(-2px);
  color: var(--ink);
}

.topic-soft span {
  font-weight: 650;
  letter-spacing: -0.01em;
}

@media (min-width: 720px) {
  .topic-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem 1.15rem;
  }
}

/* ---- How / story rows ---- */
.how {
  background: var(--cloud);
  padding-bottom: 2rem;
}

.how .section-head {
  margin-bottom: 1.5rem;
}

.story {
  display: grid;
  gap: 1.75rem;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto 3.5rem;
  align-items: center;
}

.story-media {
  border-radius: calc(var(--radius) + 0.15rem);
  overflow: hidden;
  background: #ebeae6;
  aspect-ratio: 4 / 3;
}

.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-flip .story-media {
  background: linear-gradient(160deg, #fff6df, #f0efe9);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.story-flip .story-media img {
  width: min(72%, 280px);
  height: auto;
  object-fit: contain;
}

.story-kicker {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--spark-deep);
  margin-bottom: 0.65rem;
}

.story-copy h3 {
  font-family: var(--display);
  font-weight: 720;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.story-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 38ch;
}

@media (min-width: 900px) {
  .story {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
    margin-bottom: 4.5rem;
  }

  .story-flip {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .story-flip .story-media {
    order: 2;
  }

  .story-flip .story-copy {
    order: 1;
  }
}

/* ---- Finish ---- */
.finish {
  background: var(--page);
}

.finish-grid {
  display: grid;
  gap: 2rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--hairline);
}

.finish-grid h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.45rem;
}

.finish-grid p {
  color: var(--muted);
  max-width: 34ch;
}

@media (min-width: 800px) {
  .finish-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    padding-top: 2rem;
  }
}

/* ---- FAQ ---- */
.faq-section {
  background: var(--cloud);
}

.faq-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .faq-layout {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 3rem;
    align-items: start;
  }

  .faq-layout .section-head {
    margin-bottom: 0;
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

.faq {
  display: grid;
  gap: 0.65rem;
}

.faq details {
  background: var(--page);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.15rem 1.15rem;
  transition: border-color 0.25s var(--ease);
}

.faq details[open] {
  border-color: #d8d5cf;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  letter-spacing: -0.015em;
  padding: 1.05rem 0;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  font-weight: 500;
  color: var(--muted);
}

.faq details[open] summary::after {
  content: "-";
}

.faq details p {
  color: var(--muted);
  padding: 0 0 1.15rem;
  max-width: 52ch;
}

.faq a {
  color: var(--ink);
  font-weight: 600;
}

/* ---- Download ---- */
.download {
  position: relative;
  padding: 5rem 0;
  background:
    radial-gradient(ellipse 70% 80% at 85% 20%, rgba(255, 197, 49, 0.28), transparent 55%),
    linear-gradient(180deg, #fffaf0 0%, var(--page) 100%);
  overflow: hidden;
}

.download-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.download-copy h2 {
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.85rem;
  max-width: 14ch;
}

.download-copy > p {
  color: var(--muted);
  max-width: 40ch;
  margin-bottom: 1.5rem;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.download-note {
  font-size: 0.95rem;
  color: var(--muted);
}

.download-note a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.download-note a:hover {
  color: var(--spark-deep);
  text-decoration: underline;
}

.download-mascot {
  width: min(240px, 55vw);
  margin-inline: auto;
  filter: drop-shadow(0 18px 30px rgba(27, 32, 51, 0.12));
  animation: mascot-bob 4.5s ease-in-out infinite;
}

@keyframes mascot-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (min-width: 820px) {
  .download-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .download-mascot {
    width: min(300px, 100%);
    justify-self: end;
  }
}

/* ---- Footer ---- */
.site-footer {
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--hairline);
  background: var(--page);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  margin-top: 0.85rem;
  color: var(--muted);
  max-width: 28ch;
  font-size: 0.95rem;
}

.footer-col {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.footer-col h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.footer-col a {
  text-decoration: none;
  font-weight: 550;
  color: var(--ink);
}

.footer-col a:hover {
  color: var(--spark-deep);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

/* ---- Legal pages ---- */
.legal {
  padding-bottom: 4.5rem;
}

.legal-hero {
  padding: 3.5rem 0 2rem;
  background:
    linear-gradient(180deg, #fff8e8 0%, var(--page) 100%);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 2.5rem;
}

.legal-hero .eyebrow,
.legal .eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spark-deep);
  margin-bottom: 0.65rem;
}

.legal-hero h1 {
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.legal-hero .updated {
  margin-top: 0.75rem;
  color: var(--muted);
}

.legal .wrap > p,
.legal .wrap > ul,
.legal .wrap > h2 {
  max-width: 68ch;
}

.legal h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  margin: 2.25rem 0 0.75rem;
}

.legal p,
.legal li {
  color: #3d4254;
  margin-bottom: 0.85rem;
}

.legal ul {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.legal li + li {
  margin-top: 0.45rem;
}

.legal a {
  font-weight: 600;
}

.support-card {
  margin: 1.75rem 0 2.25rem;
  padding: 1.5rem 1.35rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--page);
  max-width: 36rem;
}

.support-card .mail {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.support-card .mail:hover {
  color: var(--spark-deep);
}

/* ---- Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.topic-grid .reveal:nth-child(2) { transition-delay: 0.05s; }
.topic-grid .reveal:nth-child(3) { transition-delay: 0.1s; }
.topic-grid .reveal:nth-child(4) { transition-delay: 0.15s; }
.topic-grid .reveal:nth-child(5) { transition-delay: 0.08s; }
.topic-grid .reveal:nth-child(6) { transition-delay: 0.12s; }
.topic-grid .reveal:nth-child(7) { transition-delay: 0.16s; }
.topic-grid .reveal:nth-child(8) { transition-delay: 0.2s; }
.topic-grid .reveal:nth-child(9) { transition-delay: 0.24s; }
.topic-grid .reveal:nth-child(10) { transition-delay: 0.28s; }
