/* Lullaby — website styles.
   Palette and radii mirror the app (lullaby_app: lib/core/theme/app_colors.dart,
   app_theme.dart): deep indigo grounds, lavender primary, mint, peach and gold. */

/* To use the app's exact typeface, drop Playpen Sans .woff2 files (SIL Open
   Font License, fonts.google.com/specimen/Playpen+Sans) into src/assets/fonts/ and
   uncomment:
@font-face { font-family: "Playpen Sans"; src: url("/assets/fonts/PlaypenSans-Variable.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
*/

:root {
  --bg: #0a0e1f;
  --bg-elevated: #111633;
  --surface: #171d3d;
  --card: #1c2349;
  --card-high: #262e5c;
  --hairline: rgb(255 255 255 / 0.09);
  --hairline-strong: rgb(255 255 255 / 0.16);

  --text: #f4f5ff;
  --text-2: #a7add1;
  --text-3: #8a91b8;

  --primary: #b3a5ff;
  --primary-deep: #7c6cf0;
  --on-primary: #14103a;
  --mint: #7ee0d0;
  --peach: #ffb88c;
  --gold: #f6c76a;
  --rose: #f7a1c4;
  --blue: #7fb4ff;
  --green: #7edb9c;

  --radius-s: 14px;
  --radius-m: 20px;
  --radius-l: 28px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;

  --font: "Playpen Sans", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

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

p {
  margin: 0;
}

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

a:hover {
  color: #cfc6ff;
}

strong {
  font-weight: 800;
  color: var(--text);
}

::selection {
  background: rgb(179 165 255 / 0.35);
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2 * var(--gutter), 780px);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Night sky behind every page — the app's NightSkyBackground. */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 85% -10%, rgb(124 108 240 / 0.28), transparent 65%),
    radial-gradient(700px 500px at -10% 30%, rgb(247 161 196 / 0.08), transparent 70%),
    linear-gradient(180deg, #1b1f4b 0%, #0a0e1f 70%);
}

.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stars .tw {
  animation: twinkle 6s ease-in-out infinite;
}
.stars .tw2 { animation-delay: -1s; animation-duration: 7s; }
.stars .tw3 { animation-delay: -2s; }
.stars .tw4 { animation-delay: -3s; animation-duration: 8s; }
.stars .tw5 { animation-delay: -4s; }
.stars .tw6 { animation-delay: -5s; animation-duration: 5s; }

@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stars .tw {
    animation: none;
  }
}

/* ── Buttons & small components ───────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 52px;
  padding: 0 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

.btn--primary {
  background: linear-gradient(135deg, #c6bbff, #9c8dfa);
  color: var(--on-primary);
  box-shadow: 0 10px 28px -12px rgb(124 108 240 / 0.9);
}

.btn--primary:hover {
  color: var(--on-primary);
  box-shadow: 0 14px 34px -12px rgb(124 108 240 / 1);
}

.btn--sm {
  min-height: 40px;
  padding: 0 1rem;
  font-size: 0.9375rem;
}

.btn--block {
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow .icon {
  width: 1.1em;
  height: 1.1em;
  color: var(--gold);
}

.lead {
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
}

.card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  background: linear-gradient(180deg, rgb(28 35 73 / 0.72), rgb(23 29 61 / 0.62));
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.chip-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgb(var(--tone) / 0.14);
  color: rgb(var(--tone));
  box-shadow: 0 0 0 1px rgb(var(--tone) / 0.22) inset;
}

.chip-icon .icon {
  width: 24px;
  height: 24px;
}

.tone-lavender { --tone: 179 165 255; }
.tone-rose { --tone: 247 161 196; }
.tone-gold { --tone: 246 199 106; }
.tone-mint { --tone: 126 224 208; }
.tone-peach { --tone: 255 184 140; }
.tone-blue { --tone: 127 180 255; }
.tone-green { --tone: 126 219 156; }
.tone-slate { --tone: 185 196 232; }

.fineprint {
  max-width: 760px;
  margin: 28px auto 0;
  color: var(--text-3);
  font-size: 0.9375rem;
  text-align: center;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 800;
  text-decoration: none;
}

.link-arrow .icon {
  transition: transform 0.2s ease;
}

.link-arrow:hover .icon {
  transform: translateX(3px);
}

/* Store buttons */

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-buttons--center {
  justify-content: center;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 56px;
  padding: 0 1.4rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #c6bbff, #9c8dfa);
  color: var(--on-primary);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 30px -14px rgb(124 108 240 / 0.95);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.store-btn:hover {
  color: var(--on-primary);
  transform: translateY(-1px);
}

.store-btn--soon {
  background: rgb(255 255 255 / 0.05);
  color: var(--text-2);
  box-shadow: 0 0 0 1px var(--hairline-strong) inset;
  cursor: default;
}

.store-btn--soon:hover {
  color: var(--text-2);
  transform: none;
}

.store-badge img {
  height: 52px;
  width: auto;
}

.store-buttons--compact .store-btn {
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 14px;
  font-size: 0.875rem;
}

/* ── Language suggestion ──────────────────────────────────────────────── */

.lang-suggest {
  position: relative;
  z-index: 60;
  background: linear-gradient(90deg, #3a2a6b, #1b1b45);
  border-bottom: 1px solid var(--hairline);
  font-size: 0.9375rem;
}

.lang-suggest[hidden] {
  display: none;
}

.lang-suggest__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding-block: 8px;
}

.lang-suggest__inner > .icon {
  color: var(--primary);
}

.lang-suggest__text {
  color: var(--text);
}

.lang-suggest__action {
  font-weight: 800;
  white-space: nowrap;
}

.lang-suggest__close {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.lang-suggest__close:hover {
  background: rgb(255 255 255 / 0.08);
  color: var(--text);
}

/* ── Header ───────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--hairline);
  background: rgb(10 14 31 / 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.375rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.site-nav a,
.menu__panel > a:not(.btn) {
  padding: 8px 14px;
  border-radius: 12px;
  color: var(--text-2);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.menu__panel > a:not(.btn):hover,
.menu__panel > a[aria-current="page"] {
  background: rgb(255 255 255 / 0.06);
  color: var(--text);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.dropdown {
  position: relative;
}

.dropdown > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--text-2);
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

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

.dropdown > summary:hover,
.dropdown[open] > summary {
  background: rgb(255 255 255 / 0.07);
  color: var(--text);
}

.dropdown .icon--chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.dropdown[open] .icon--chevron {
  transform: rotate(180deg);
}

.dropdown__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--hairline-strong);
  border-radius: 16px;
  background: #151a3a;
  box-shadow: 0 24px 48px -16px rgb(0 0 0 / 0.7);
  list-style: none;
}

/* 14 languages: two columns where there is room, and never taller than the screen. */
.lang-menu .dropdown__panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 480px) {
  .lang-menu .dropdown__panel {
    grid-template-columns: 1fr;
  }
}

.lang-menu .dropdown__panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.lang-menu .dropdown__panel a:hover {
  background: rgb(255 255 255 / 0.07);
}

.lang-menu .dropdown__panel a[aria-current] {
  color: var(--primary);
}

.lang-menu .dropdown__panel .icon {
  width: 18px;
  height: 18px;
}

.menu {
  display: none;
}

.menu .icon--close,
.menu[open] .icon--open {
  display: none;
}

.menu[open] .icon--close {
  display: block;
}

.menu__panel {
  display: grid;
  gap: 4px;
  width: min(80vw, 280px);
  padding: 10px;
}

.menu__panel .btn {
  margin-top: 6px;
}

@media (max-width: 860px) {
  .site-nav,
  .site-header__cta {
    display: none;
  }

  .menu {
    display: block;
  }
}

/* ── Sections ─────────────────────────────────────────────────────────── */

.section {
  padding-block: clamp(64px, 9vw, 112px);
}

.section--tight {
  padding-top: clamp(24px, 4vw, 40px);
}

.section__head {
  max-width: 760px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}

.section__head h2 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.9rem);
}

.section__head .lead {
  margin-top: 16px;
}

.section__more {
  margin-top: 28px;
  text-align: center;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: clamp(28px, 6vw, 72px) clamp(56px, 8vw, 104px);
  /* Clouds and tilted phones may poke past the edge; never scroll sideways. */
  overflow-x: clip;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero__title {
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.9rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.025em;
  hyphens: manual;
}

.hero__accent {
  display: block;
  margin-top: 0.08em;
  background: linear-gradient(90deg, var(--primary) 0%, var(--rose) 55%, var(--peach) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 560px;
  margin: 22px 0 30px;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
}

.hero__notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 700;
}

.hero__notes li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__notes .icon {
  color: var(--mint);
}

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 600px;
}

/* The moon rises behind the phones, like the one in the app's header. */
.hero__moon {
  position: absolute;
  top: -34px;
  left: -2%;
  z-index: 0;
  width: 170px;
  animation: float 9s ease-in-out infinite;
}

.hero__moon .moon {
  width: 100%;
  height: auto;
}

.cloud {
  position: absolute;
  color: rgb(255 255 255 / 0.09);
  pointer-events: none;
}

.cloud--front {
  width: 120px;
  left: -34px;
  bottom: 6px;
  color: rgb(38 46 92 / 0.95);
}

.cloud--back {
  z-index: 0;
  width: 220px;
  right: -40px;
  bottom: 40px;
}

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

@media (prefers-reduced-motion: reduce) {
  .hero__moon {
    animation: none;
  }
}

/* Phone frames around the real app screenshots (1206×2622). */
.phone {
  --w: 280px;
  flex: none;
  width: var(--w);
  margin: 0;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.168);
  background: linear-gradient(150deg, #2b3160 0%, #0c0e1f 38%, #05060d 100%);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.14) inset,
    0 40px 70px -30px rgb(0 0 0 / 0.9),
    0 0 90px -30px rgb(124 108 240 / 0.6);
}

.phone img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--w) * 0.137);
  background: var(--bg);
}

.phone--front {
  --w: clamp(240px, 23vw, 300px);
  position: relative;
  z-index: 2;
  transform: translateX(-16%) rotate(-3deg);
}

.phone--back {
  --w: clamp(210px, 20vw, 262px);
  position: absolute;
  z-index: 1;
  top: 9%;
  right: 0;
  transform: rotate(6deg);
}

@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__copy {
    text-align: center;
  }

  .hero__lead {
    margin-inline: auto;
  }

  .hero .store-buttons,
  .hero__notes {
    justify-content: center;
  }

  .hero__visual {
    min-height: 0;
    padding-block: 20px 8px;
  }

  .phone--front {
    --w: min(64vw, 280px);
    transform: translateX(-14%) rotate(-3deg);
  }

  .phone--back {
    --w: min(54vw, 236px);
    top: 12%;
    right: max(0px, calc(50% - 250px));
  }

  .hero__moon {
    width: 110px;
    left: max(0px, calc(50% - 240px));
  }
}

/* ── Stats ────────────────────────────────────────────────────────────── */

.stats__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-l);
  background: rgb(17 22 51 / 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.stats__list li {
  display: grid;
  gap: 2px;
  padding: 26px 20px;
  text-align: center;
}

.stats__list li + li {
  border-left: 1px solid var(--hairline);
}

.stats__list strong {
  font-size: clamp(2.2rem, 1.8rem + 1.6vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff1c1, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stats__list span {
  color: var(--text-2);
  font-weight: 700;
}

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

  .stats__list li:nth-child(3) {
    border-left: 0;
  }

  .stats__list li:nth-child(n + 3) {
    border-top: 1px solid var(--hairline);
  }
}

/* ── Features ─────────────────────────────────────────────────────────── */

/* Eight features: 4 × 2 on wide screens, 2 × 4 on tablets, one column on phones. */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

@media (max-width: 560px) {
  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.feature {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 26px 24px 28px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature:hover {
  transform: translateY(-2px);
  border-color: var(--hairline-strong);
}

.feature h3 {
  margin-top: 6px;
  font-size: 1.1875rem;
}

.feature p {
  color: var(--text-2);
  font-size: 1rem;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.category {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgb(var(--cat) / 0.12);
  box-shadow: 0 0 0 1px rgb(var(--cat) / 0.3) inset;
  color: rgb(var(--cat));
  font-weight: 800;
  font-size: 0.9375rem;
}

/* SoundCategory colours from the app. */
.cat-1 { --cat: 201 167 255; }
.cat-2 { --cat: 255 158 181; }
.cat-3 { --cat: 127 180 255; }
.cat-4 { --cat: 126 219 156; }
.cat-5 { --cat: 185 196 232; }
.cat-6 { --cat: 255 192 122; }

/* ── Screens ──────────────────────────────────────────────────────────── */

/* Four phones in a row; on narrow screens the row becomes a swipeable carousel. */
.screens {
  --screen-w: clamp(200px, 20vw, 236px);
  display: flex;
  gap: clamp(16px, 2.4vw, 40px);
  margin: 0;
  padding: 8px var(--gutter) 24px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.screens::-webkit-scrollbar {
  display: none;
}

/* Auto margins centre the row when it fits, without cutting it off when it scrolls. */
.screens__item:first-child {
  margin-left: auto;
}

.screens__item:last-child {
  margin-right: auto;
}

.screens__item {
  flex: none;
  width: var(--screen-w);
  scroll-snap-align: center;
  text-align: center;
}

.phone--sm {
  --w: var(--screen-w);
}

.screens__item h3 {
  margin-top: 22px;
  font-size: 1.125rem;
}

.screens__item p {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 0.9375rem;
}

/* ── How it works ─────────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 0 10px;
  text-align: center;
}

.step__num {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: var(--on-primary);
  font-size: 1.375rem;
  font-weight: 900;
  box-shadow: 0 0 0 8px rgb(124 108 240 / 0.15);
}

.step + .step::before {
  content: "";
  position: absolute;
  top: 28px;
  right: calc(50% + 44px);
  width: calc(100% - 88px + 22px);
  border-top: 2px dashed rgb(179 165 255 / 0.3);
}

.step h3 {
  font-size: 1.1875rem;
}

.step p {
  max-width: 300px;
  margin: 8px auto 0;
  color: var(--text-2);
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .step + .step::before {
    display: none;
  }
}

/* ── Tips ─────────────────────────────────────────────────────────────── */

.tips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tip {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
}

.tip .chip-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.tip p {
  color: var(--text);
  font-size: 1rem;
}

/* ── Premium ──────────────────────────────────────────────────────────── */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 900px;
  margin-inline: auto;
}

.plan {
  position: relative;
  padding: 32px 30px 34px;
}

.plan h3 {
  font-size: 1.375rem;
}

.plan__price {
  margin-top: 6px;
  color: var(--text-2);
  font-weight: 800;
}

.plan--premium {
  border: 0;
  background:
    linear-gradient(180deg, rgb(58 42 107 / 0.92), rgb(27 27 69 / 0.92)) padding-box,
    linear-gradient(135deg, var(--gold), #f08a5d) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 30px 60px -30px rgb(246 199 106 / 0.35);
}

.plan--premium .plan__price {
  color: var(--gold);
}

.pro-pill {
  position: absolute;
  top: 26px;
  right: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #f08a5d);
  color: #3b2404;
  font-size: 0.8125rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.pro-pill .icon {
  width: 16px;
  height: 16px;
}

.checklist {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.checklist .icon {
  margin-top: 2px;
  color: var(--mint);
}

.plan--premium .checklist .icon {
  color: var(--gold);
}

@media (max-width: 760px) {
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── FAQ ──────────────────────────────────────────────────────────────── */

.faq {
  display: grid;
  gap: 12px;
}

.faq__item {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  background: rgb(28 35 73 / 0.55);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.faq__item[open] {
  border-color: rgb(179 165 255 / 0.3);
  background: rgb(28 35 73 / 0.85);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

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

.faq__item .icon--chevron {
  color: var(--primary);
  transition: transform 0.2s ease;
}

.faq__item[open] .icon--chevron {
  transform: rotate(180deg);
}

.faq__answer {
  padding: 0 22px 20px;
  color: var(--text-2);
}

/* ── CTA ──────────────────────────────────────────────────────────────── */

.section--cta {
  padding-top: 0;
}

.cta {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: clamp(44px, 7vw, 76px) clamp(20px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid rgb(179 165 255 / 0.22);
  border-radius: 36px;
  background:
    radial-gradient(500px 280px at 50% 0%, rgb(124 108 240 / 0.45), transparent 70%),
    linear-gradient(180deg, #221f57, #141633);
  text-align: center;
}

.cta__moon {
  width: 96px;
  height: auto;
}

.cta h2 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
}

.cta p {
  max-width: 560px;
  margin-bottom: 10px;
  color: var(--text-2);
  font-size: 1.125rem;
}

/* ── Inner pages ──────────────────────────────────────────────────────── */

.page-hero {
  padding-block: clamp(40px, 7vw, 88px) clamp(28px, 4vw, 44px);
}

.page-hero h1 {
  font-size: clamp(2.3rem, 1.6rem + 2.8vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.page-hero .lead {
  margin-top: 16px;
}

.page-hero__inner > * {
  max-width: 780px;
}

.page-hero--center {
  text-align: center;
}

.not-found__moon {
  width: 120px;
  height: auto;
  margin: 0 auto 20px;
}

.not-found__langs {
  margin-top: 28px;
  color: var(--text-3);
}

/* Support */

.support {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.contact-card {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: grid;
  gap: 14px;
  padding: 28px;
}

.contact-card h2 {
  font-size: 1.5rem;
}

.contact-card p {
  color: var(--text-2);
  font-size: 1rem;
}

.contact-card .btn {
  overflow-wrap: anywhere;
}

.contact-card__note {
  font-size: 0.9375rem !important;
  text-align: center;
}

.contact-card h3 {
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-size: 1rem;
}

.link-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-weight: 700;
  text-decoration: none;
}

.link-list .icon {
  width: 18px;
  height: 18px;
}

.link-list--inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin-top: 28px;
}

.support__faq > h2 {
  font-size: 1.75rem;
}

.faq-group {
  margin-top: 28px;
}

.faq-group h3 {
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

  .contact-card {
    position: static;
  }
}

/* Legal */

.legal__meta {
  margin-top: 14px;
  color: var(--text-2);
  font-weight: 700;
}

.legal__langs,
.legal__note {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 0.9375rem;
}

.legal__layout {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-bottom: clamp(64px, 9vw, 112px);
}

.toc-wrap {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

/* A <details>, so it collapses on phones; site.js opens it on wide screens. */
.toc {
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  background: rgb(17 22 51 / 0.6);
}

.toc__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
}

.toc__title::-webkit-details-marker {
  display: none;
}

.toc .icon--chevron {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.toc[open] .icon--chevron {
  transform: rotate(180deg);
}

.toc ol {
  display: grid;
  gap: 2px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.toc a:hover {
  background: rgb(255 255 255 / 0.06);
  color: var(--text);
}

.prose {
  max-width: 740px;
  color: #d5d8f0;
}

.prose h2 {
  margin: 44px 0 14px;
  font-size: 1.5rem;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose h3 {
  margin: 28px 0 10px;
  font-size: 1.1875rem;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose p,
.prose ul {
  margin: 0 0 14px;
}

.prose ul {
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 8px;
}

.prose li::marker {
  color: var(--primary);
}

.prose a {
  overflow-wrap: anywhere;
}

.summary {
  margin-bottom: 8px;
  padding: 22px 24px 10px;
  border: 1px solid rgb(126 224 208 / 0.28);
  border-radius: var(--radius-m);
  background: rgb(126 224 208 / 0.07);
}

.summary .summary-title {
  margin-bottom: 10px;
  color: var(--mint);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.summary li::marker {
  color: var(--mint);
}

.back-to-top {
  margin-top: 40px;
  font-weight: 800;
}

.back-to-top a {
  text-decoration: none;
}

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

  .toc-wrap {
    position: static;
  }

  .toc {
    max-height: none;
  }
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  padding-top: 56px;
  border-top: 1px solid var(--hairline);
  background: rgb(6 8 20 / 0.72);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.8fr);
  gap: 32px;
}

.site-footer__brand {
  display: grid;
  align-content: start;
  gap: 14px;
}

.site-footer__brand > p {
  color: var(--text-2);
}

.site-footer__title {
  margin-bottom: 12px;
  color: var(--text-3);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer__col ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 14 languages: two columns instead of one long list. */
.site-footer__col--langs ul {
  display: block;
  columns: 2;
  column-gap: 24px;
}

.site-footer__col--langs li {
  break-inside: avoid;
  margin-bottom: 10px;
}

.site-footer__col a {
  color: var(--text-2);
  font-weight: 700;
  text-decoration: none;
}

.site-footer__col a:hover {
  color: var(--text);
}

.site-footer__bottom {
  display: grid;
  gap: 6px;
  margin-top: 44px;
  padding-block: 22px 30px;
  border-top: 1px solid var(--hairline);
  color: var(--text-3);
  font-size: 0.875rem;
}

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

  .site-footer__brand,
  .site-footer__col--langs {
    grid-column: 1 / -1;
  }
}

/* ── Print (legal pages) ──────────────────────────────────────────────── */

@media print {
  .sky,
  .site-header,
  .site-footer,
  .lang-suggest,
  .toc,
  .back-to-top,
  .skip-link {
    display: none !important;
  }

  body,
  .prose,
  .legal__meta,
  .legal__langs,
  .legal__note {
    background: #fff;
    color: #000;
  }

  .page-hero h1,
  .prose h2,
  .prose h3,
  strong {
    color: #000;
  }

  .legal__layout {
    display: block;
  }

  .summary {
    border-color: #999;
    background: none;
  }

  a {
    color: #000;
  }
}

/* CJK line breaking: Japanese wraps at phrase boundaries where the browser
   can tell them apart, Korean between words (not between syllables). */
:lang(ja) :is(h1, h2, h3, .hero__lead, p) {
  word-break: auto-phrase;
  line-break: strict;
}

:lang(ko) {
  word-break: keep-all;
}

:lang(zh) {
  line-break: strict;
}
