:root {
  --background: #15131c;
  --card: #21222d;
  --primary: #5b4e95;
  --secondary: #ffffff;
  --grey: #4f4f4f;
  --accent: #88b2ac;
  --radius: 18px;
  --max-width: 1200px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(136, 178, 172, 0.08), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(91, 78, 149, 0.22), transparent 45%),
    var(--background);
  color: var(--secondary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--secondary);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem clamp(1.25rem, 4vw, 3.5rem);
  background: rgba(21, 19, 28, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo {
  width: 40px;
  height: 40px;
}

.wordmark {
  font-size: 1rem;
  color: var(--secondary);
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(91, 78, 149, 0.15);
  color: var(--secondary);
}

.cta {
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(91, 78, 149, 0.35);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 2.5rem) 4rem;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: clamp(1.8rem, 5vw, 3.5rem);
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1rem, 4vw, 2.5rem);
}

.hero__content h1 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  margin: 0.4rem 0 0.6rem;
  letter-spacing: -0.5px;
}

.lede {
  color: rgba(255, 255, 255, 0.8);
  max-width: 620px;
  margin: 0 0 1.2rem;
  font-size: 1.05rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.3rem;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border 0.18s ease;
}

.button.primary {
  background: linear-gradient(120deg, var(--primary), #6f62c8);
  color: #fff;
  box-shadow: var(--shadow);
}

.button.primary:hover,
.button.primary:focus-visible {
  transform: translateY(-1px);
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--secondary);
  background: rgba(255, 255, 255, 0.04);
}

.button.ghost:hover,
.button.ghost:focus-visible {
  border-color: var(--accent);
}

.hero__visual {
  justify-self: center;
  width: min(420px, 100%);
}

.hero__image {
  width: 100%;
  height: auto;
  border-radius: 26px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
  object-fit: contain;
}

.accent-line {
  width: 120px;
  height: 3px;
  background: var(--primary);
  margin-bottom: 1rem;
}

.section {
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.section--primary {
  background: var(--primary);
  padding: clamp(1.8rem, 5vw, 3.2rem);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.section__header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.section__header h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.section__tagline {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.app-card {
  background: rgba(21, 19, 28, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  position: relative;
}

.app-card--sparkle .app-card__media {
  position: relative;
}

.sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  background: radial-gradient(circle, #fff 0%, #ffc107 60%, transparent 100%);
  border-radius: 50%;
  animation: sparkle 3s infinite ease-in-out;
  opacity: 0.85;
}

@keyframes sparkle {
  0%, 100% { transform: scale(0.8); opacity: 0.4; }
  50% { transform: scale(1.4); opacity: 1; }
}

#toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: var(--card);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 20;
}

#toast.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Privacy policy layout */
.policy-body {
  background: var(--background);
  color: var(--secondary);
}

.policy-main {
  max-width: 900px;
  margin: clamp(1.5rem, 4vw, 3rem) auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem) 3rem;
}

.policy-card {
  background: rgba(21, 19, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
  line-height: 1.7;
}

.policy-card h1 {
  margin: 0.2rem 0 0.6rem;
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
}

.policy-card h2 {
  margin-top: 1.2rem;
  margin-bottom: 0.35rem;
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
}

.policy-card p {
  margin: 0.4rem 0 0.6rem;
  color: rgba(255, 255, 255, 0.86);
}

.policy-card ul,
.policy-card ol {
  margin: 0.3rem 0 0.8rem 1.2rem;
  color: rgba(255, 255, 255, 0.86);
}

.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0;
}

.muted {
  color: rgba(255, 255, 255, 0.65);
}

.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.app-card__media img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.app-card__body {
  padding: 1rem 1.1rem 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.app-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.app-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.store-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.deeplink-row {
  margin: 0.2rem 0 0.6rem;
}

.deep-link {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--secondary);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.deep-link:hover,
.deep-link:focus-visible {
  border-color: var(--accent);
  color: #fff;
}

.app-download-section {
  margin: 0.4rem 0 0.8rem;
  display: grid;
  gap: 0.35rem;
}

.app-download-section h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--secondary);
}

/* Show-more details for app cards */
.app-details {
  margin-top: 0.3rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.35rem 0.75rem;
}

.app-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
}

.app-details[open] summary {
  color: var(--secondary);
}

.app-details__text {
  margin: 0.35rem 0 0.2rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.store-button {
  display: inline-flex;
  width: 150px;
}

.store-button img {
  width: 100%;
  height: auto;
}

.grid.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.6rem;
  align-items: start;
}

.contact-card {
  background: var(--card);
  border-radius: 18px;
  padding: 1.3rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.4rem;
}

.contact-list .label {
  display: inline-block;
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.35rem;
}

.contact-actions {
  margin-top: 0.8rem;
}

.footer {
  max-width: var(--max-width);
  margin: 2.5rem auto 3rem;
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.75);
}

.back-to-top {
  font-weight: 600;
}

@media (max-width: 820px) {
  .topbar {
    flex-wrap: wrap;
  }
  nav {
    width: 100%;
    justify-content: center;
  }
  .cta {
    width: 100%;
    text-align: center;
  }
  .hero__visual {
    order: -1;
  }
  .app-card__media img {
    height: 240px;
  }
}

@media (max-width: 520px) {
  .store-button {
    width: 130px;
  }
  .footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
