/* Animania landing page. Colors mirror the app's tokens (src/constants/theme.ts); like the app,
   it follows the system light/dark setting. */

@font-face {
  font-family: 'Jakarta';
  src: url('/assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-raised: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --primary: #6d28d9;
  --primary-strong: #5b21b6;
  --primary-muted: #ede9fe;
  --on-primary: #ffffff;
  --accent: #f59e0b;
  --violet-light: #8b5cf6;
  --violet-deep: #4c1d95;
  --radius: 18px;
  --max: 1120px;
  --shadow: 0 1px 3px rgba(15, 15, 20, 0.08), 0 1px 2px rgba(15, 15, 20, 0.06);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #020617;
    --surface: #0f172a;
    --surface-raised: #1e293b;
    --border: #1e293b;
    --text: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --primary: #a78bfa;
    --primary-strong: #c4b5fd;
    --primary-muted: #2e1065;
    --shadow: none;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Jakarta', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-strong);
}

:focus-visible {
  outline: 3px solid var(--violet-light);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
}

.skip-link:focus {
  left: 8px;
}

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

.flush-top {
  padding-top: 0;
}

a.on-violet,
a.on-violet:hover {
  color: #fff;
}

/* ---------- header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.logo img {
  width: 36px;
  height: 36px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-header nav a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.site-header nav a:hover {
  color: #fff;
}

.site-header .logo {
  color: #fff;
}

@media (max-width: 720px) {
  .site-header nav a:not(.btn) {
    display: none;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-light {
  background: #fff;
  color: var(--violet-deep);
  box-shadow: 0 10px 30px rgba(20, 8, 60, 0.3);
}

.btn-light:hover {
  color: var(--violet-deep);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.btn-primary {
  background: #6d28d9;
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  background: #5b21b6;
}

.btn[aria-disabled='true'] {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.site-header .btn {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

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

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 70% at 10% 0%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(80% 60% at 100% 100%, rgba(76, 29, 149, 0.9) 0%, rgba(76, 29, 149, 0) 70%),
    linear-gradient(160deg, var(--violet-light) 0%, #6d28d9 55%, var(--violet-deep) 100%);
  padding-top: 110px;
}

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

.hero-copy {
  padding-block: 40px 90px;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 999px;
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(38px, 5.4vw, 62px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-copy > p {
  margin-top: 20px;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.88);
  max-width: 34em;
}

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

.cta-meta {
  margin-top: 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.hero-phones {
  position: relative;
  height: 600px;
  align-self: end;
}

.hero-phones .phone {
  position: absolute;
  bottom: -70px;
}

.hero-phones .phone.front {
  --pw: 290px;
  left: 50%;
  transform: translateX(-38%);
  z-index: 2;
}

.hero-phones .phone.back {
  --pw: 250px;
  left: 50%;
  bottom: -20px;
  transform: translateX(-112%) rotate(-7deg);
  opacity: 0.96;
}

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-block: 20px 10px;
    text-align: center;
  }

  .hero-copy > p {
    margin-inline: auto;
  }

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

  .hero-phones {
    height: 440px;
  }

  .hero-phones .phone.front {
    --pw: 230px;
  }

  .hero-phones .phone.back {
    --pw: 200px;
  }
}

/* ---------- phone frame (same geometry as the store screenshots' frame) ---------- */

.phone {
  --pw: 280px;
  width: var(--pw);
  background: #0b0b12;
  border-radius: calc(var(--pw) * 0.113);
  padding: calc(var(--pw) * 0.028);
  box-shadow:
    0 30px 60px rgba(8, 4, 30, 0.35),
    0 8px 18px rgba(8, 4, 30, 0.25),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.14);
}

.phone .screen {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--pw) * 0.085);
  background: #000;
  aspect-ratio: 1080 / 2400;
}

.phone .screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone .screen::after {
  content: '';
  position: absolute;
  top: calc(var(--pw) * 0.028);
  left: 50%;
  width: calc(var(--pw) * 0.052);
  height: calc(var(--pw) * 0.052);
  transform: translateX(-50%);
  border-radius: 50%;
  background: #050508;
  box-shadow: inset 0 0 0 2px #15151c;
}

/* ---------- sections ---------- */

section {
  padding-block: 96px;
}

.section-head {
  text-align: center;
  max-width: 44em;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 800;
}

.section-head p {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 18px;
}

.types {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.type {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow);
}

.type strong {
  display: block;
  font-size: 18px;
}

.type span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.features {
  display: grid;
  gap: 96px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}

.feature:nth-child(even) .feature-copy {
  order: 2;
}

.feature-copy h3 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
}

.feature-copy p {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 30em;
}

.feature-art {
  display: grid;
  place-items: center;
  padding: 44px 0;
  border-radius: 28px;
  background:
    radial-gradient(80% 70% at 50% 0%, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0) 70%),
    var(--primary-muted);
}

.feature-art.night {
  background:
    radial-gradient(100% 55% at 50% 0%, rgba(139, 92, 246, 0.55) 0%, rgba(139, 92, 246, 0) 70%),
    linear-gradient(180deg, #1e1b4b 0%, #0b0a1f 70%, #020617 100%);
}

.feature-art .phone {
  --pw: 260px;
}

@media (max-width: 820px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .feature:nth-child(even) .feature-copy {
    order: 0;
  }

  .feature-copy {
    text-align: center;
  }

  .feature-copy p {
    margin-inline: auto;
  }
}

.band {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.card h3 {
  font-size: 20px;
  font-weight: 800;
}

.card p {
  margin-top: 8px;
  color: var(--text-secondary);
}

.card .icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-muted);
  color: var(--primary);
  margin-bottom: 16px;
}

.card .icon svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 820px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.gallery {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 20px 20px;
  margin-inline: calc((100vw - min(var(--max), 100vw - 40px)) / -2);
  padding-inline: max(20px, calc((100vw - var(--max)) / 2));
  scrollbar-width: thin;
}

.gallery img {
  flex: none;
  width: 250px;
  height: auto;
  aspect-ratio: 1080 / 1920;
  border-radius: 16px;
  scroll-snap-align: center;
  box-shadow: var(--shadow);
}

/* ---------- download ---------- */

.download {
  text-align: center;
}

.download-box {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 44px 36px;
  box-shadow: var(--shadow);
}

.download-box img.app-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
}

.download-box h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 800;
}

.download-box .meta {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 15px;
}

.download-box .btn {
  margin-top: 26px;
}

.checksum {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.checksum code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: var(--surface-raised);
  padding: 2px 6px;
  border-radius: 6px;
}

.steps {
  margin: 36px auto 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
  text-align: left;
  max-width: 560px;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--text-secondary);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-muted);
  color: var(--primary);
  font-weight: 800;
  font-size: 15px;
}

.note {
  margin-top: 26px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4px 22px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  padding-block: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

.faq summary::after {
  content: '+';
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details p {
  color: var(--text-secondary);
  padding-bottom: 18px;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding-block: 40px 56px;
  color: var(--text-muted);
  font-size: 14px;
}

footer .wrap {
  display: grid;
  gap: 18px;
}

footer .top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

footer .logo {
  color: var(--text);
  font-size: 18px;
}

footer .logo img {
  width: 30px;
  height: 30px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

footer nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

footer nav a:hover {
  color: var(--primary);
}

/* ---------- legal pages ---------- */

.page-header {
  background: linear-gradient(160deg, var(--violet-light) 0%, #6d28d9 55%, var(--violet-deep) 100%);
  color: #fff;
  padding-block: 20px 56px;
}

.page-header .site-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.page-header .logo {
  color: #fff;
}

.page-header .site-bar a:not(.logo) {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.page-header h1 {
  font-size: clamp(34px, 4.6vw, 48px);
  font-weight: 800;
}

.page-header p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.85);
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding-block: 56px 80px;
}

.prose h2 {
  font-size: 26px;
  font-weight: 800;
  margin-top: 44px;
}

.prose h3 {
  font-size: 19px;
  font-weight: 700;
  margin-top: 28px;
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 14px;
  color: var(--text-secondary);
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

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

.prose strong {
  color: var(--text);
}

.prose .summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-top: 0;
}

.prose .summary ul {
  margin-top: 8px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 15px;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.prose th {
  color: var(--text);
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
}
