/* CalmLingo marketing — mirrors mobile theme (see src/constants/colors.ts, Splash/Welcome) */

:root {
  --splash-deep: #052c3a;
  --night-deep: #070239;
  --night-lilac: #938fda;
  --text-primary: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --card-stories: #886acd;
  --card-podcasts: #3d76c8;
  --card-dialogues: #1b5871;
  --card-meditations: #c9896b;
  --radius-pill: 999px;
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.35);
  --font: "Nunito", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--night-deep);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Lake artwork — same asset as in-app Terms/Privacy (ImageBackground lake_top) */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--night-deep);
  background-image: radial-gradient(ellipse 100% 80% at 50% 100%, rgba(5, 44, 58, 0.5) 0%, transparent 55%),
    linear-gradient(180deg, rgba(7, 2, 57, 0.25) 0%, rgba(7, 2, 57, 0.15) 40%, rgba(7, 2, 57, 0.4) 100%),
    url("assets/images/backgrounds/lake_top.png");
  background-size: cover;
  /* Nudge focal band (horizon / mountains) upward vs. center top — more sky cropped, mid-scene higher */
  background-position: center 15%;
  background-repeat: no-repeat;
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.35;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Nav */
.site-header {
  padding: 0.6rem 0 0.5rem;
  position: relative;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  width: 52px;
  height: 52px;
  object-fit: contain;
  object-position: center;
  display: block;
  flex-shrink: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow:
    0 1px 3px rgba(255, 210, 130, 0.45),
    0 6px 20px rgba(232, 180, 80, 0.35),
    0 14px 40px rgba(200, 150, 50, 0.22);
}

.logo-text {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

/* Hero */
.hero {
  padding: 1rem 0 1rem;
  text-align: center;
}

@media (min-width: 900px) {
  .hero {
    padding: 1rem 0 2.5rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(147, 143, 218, 0.15);
  border: 1px solid rgba(147, 143, 218, 0.35);
  color: var(--night-lilac);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  animation: fade-up 0.8s ease-out both;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.75rem, 8vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35);
  animation: fade-up 0.8s ease-out 0.08s both;
}

.hero-lead {
  margin: 0 auto 2rem;
  max-width: 36rem;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--night-lilac);
  animation: fade-up 0.8s ease-out 0.16s both;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
  animation: fade-up 0.8s ease-out 0.32s both;
}

.store-badge-block {
  display: block;
  cursor: default;
  user-select: none;
}

.store-badge-visual {
  position: relative;
  display: inline-block;
  vertical-align: top;
  opacity: 0.92;
}

.store-badge-visual img {
  display: block;
  width: 144px;
  height: 48px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

@media (min-width: 640px) {
  .store-badge-visual img {
    width: 162px;
    height: 54px;
  }
}

.store-soon-badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(18%, -42%);
  padding: 0.2rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--night-deep);
  background: linear-gradient(135deg, #fff5e6 0%, #f0d090 45%, #e8a84a 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  line-height: 1.2;
  pointer-events: none;
}

.store-hint {
  margin: 0.65rem auto 0;
  max-width: 28rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
  animation: fade-up 0.8s ease-out 0.4s both;
}

/* Language availability (matches in-app learning languages) */
.languages {
  padding: 0.35rem 0 calc(clamp(2.25rem, 10vh, 5.5rem) + env(safe-area-inset-bottom, 0px));
  margin-top: -0.35rem;
  text-align: center;
}

.languages .languages__heading {
  margin-bottom: 0.85rem;
  margin-top: 0;
}

.languages__flags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 0.65rem;
  justify-content: center;
  align-items: flex-start;
}

.languages__flags > li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-width: 3.75rem;
}

.languages__flag-wrap {
  display: inline-block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: none;
  transition: transform 0.25s ease;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.42),
    0 8px 22px rgba(0, 0, 0, 0.32),
    0 18px 40px rgba(7, 2, 57, 0.28);
  background: rgba(0, 0, 0, 0.15);
}

.languages__flags > li:hover .languages__flag-wrap {
  transform: translateY(-4px);
}

.languages__flag-wrap:hover {
  transform: translateY(-4px);
}

.languages__flag-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.languages__label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Feature strip */
.features {
  padding: 1.75rem 0 4rem;
}

.features-title {
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  position: relative;
  border-radius: 1.25rem;
  padding: 1.4rem 1.25rem;
  overflow: hidden;
  min-height: 140px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: linear-gradient(145deg, var(--accent), transparent 70%);
  pointer-events: none;
}

.feature-card--stories {
  --accent: var(--card-stories);
}
.feature-card--podcasts {
  --accent: var(--card-podcasts);
}
.feature-card--dialogues {
  --accent: var(--card-dialogues);
}
.feature-card--meditations {
  --accent: var(--card-meditations);
}

.feature-card h3 {
  position: relative;
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.feature-card p {
  position: relative;
  margin: 0;
  font-size: 0.925rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--night-lilac);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer__meta {
  margin: 0;
}

.site-footer__legal {
  margin: 0.85rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
}

.site-footer__sep {
  opacity: 0.45;
  user-select: none;
}

/* Legal document pages */
.legal-main {
  padding: 1rem 0 3.5rem;
}

.legal-doc {
  max-width: 42rem;
  margin: 0 auto;
}

.legal-doc > * {
  animation: fade-up 0.7s ease-out 0.06s both;
}

.legal-doc > *:nth-child(1) { animation-delay: 0.04s; }
.legal-doc > *:nth-child(2) { animation-delay: 0.10s; }
.legal-doc > *:nth-child(3) { animation-delay: 0.16s; }
.legal-doc > *:nth-child(4) { animation-delay: 0.22s; }
.legal-doc > *:nth-child(5) { animation-delay: 0.28s; }
.legal-doc > *:nth-child(6) { animation-delay: 0.34s; }
.legal-doc > *:nth-child(7) { animation-delay: 0.40s; }
.legal-doc > *:nth-child(8) { animation-delay: 0.46s; }

.legal-doc .legal-meta {
  margin: 0 0 1.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.legal-doc h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.legal-doc h2 {
  margin: 2.25rem 0 0.65rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.legal-doc h2:first-of-type {
  margin-top: 1.75rem;
}

.legal-doc .legal-subsection {
  margin: 0.85rem 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.88);
}

.legal-doc h2 + .legal-subsection {
  margin-top: 0.5rem;
}

.legal-footer-contact {
  margin: 2.5rem 0 0;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.legal-footer-contact a {
  font-weight: 700;
}

.legal-doc p,
.legal-doc li {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.legal-doc ul,
.legal-doc ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.legal-doc li::marker {
  color: var(--night-lilac);
}

.legal-doc a {
  color: var(--night-lilac);
}

.legal-doc strong {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
