/* Moonside's night: the icon's night sky (#252B5A to #4D5B9E), its cream moon (#FDF5DE) and the
   app's Nightlight blue. Light mode is the full palette; dark mode redefines the tokens only, so a
   component can never be half in one theme. System fonts: nothing is fetched from anyone else. */
:root {
  color-scheme: dark;
  --bg: #11142B;
  --panel: #1A1E3D;
  --text: #E4E7F5;
  --heading: #FDF5DE;
  --muted: #B3B9D8;
  --line: #2B3058;
  --accent: #98B2ED;
  --accent-fill: #415FAA;
  --accent-soft: #22284F;
  --night-1: #252B5A;
  --night-2: #4D5B9E;
  --moon: #FDF5DE;
  --ok: #63D3A0;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
main.wrap { padding-bottom: 4rem; }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { color: var(--heading); line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 .75rem; font-weight: 800; }
/* A page title gets the same room under the bar as the home page's hero */
main > h1 { margin-top: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 3rem 0 .75rem; font-weight: 750; }
h3 { font-size: 1.15rem; margin: 1.75rem 0 .4rem; font-weight: 700; }
p, li { max-width: 46rem; }
.lede { font-size: 1.2rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
ul, ol { padding-left: 1.3rem; }
li { margin: .35rem 0; }
strong { font-weight: 700; color: var(--heading); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--accent-soft); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

.skip { position: absolute; left: -999px; top: .5rem; background: var(--panel); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; }

/* Top bar */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem 1.25rem; min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; color: var(--heading); text-decoration: none; padding: .6rem 0; }
.brand img { border-radius: 9px; }
.links { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex: 1; }
.links a, .lang { color: var(--text); text-decoration: none; padding: .5rem .7rem; border-radius: 8px; display: inline-block; font-weight: 500; }
.links a:hover, .lang:hover { background: var(--accent-soft); }
.lang { margin-left: auto; color: var(--accent); font-weight: 600; }
@media (max-width: 760px) {
  .links { order: 3; flex: 0 0 100%; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: none; }
  .links a { white-space: nowrap; padding: .4rem .6rem; }
}

/* Hero: the night sky from the icon */
.hero {
  margin: 1.5rem 0 0;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: 24px;
  background: linear-gradient(160deg, var(--night-1), var(--night-2));
  color: var(--moon);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
  overflow: hidden;
}
.hero h1, .hero p { color: var(--moon); }
.hero .lede { color: rgba(253, 245, 222, .86); }
.hero a:not(.badge) { color: var(--moon); }
.hero-art { display: flex; justify-content: center; align-items: flex-end; gap: 1rem; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; border-radius: 18px; }
  .hero-art { order: 2; }
}

/* Store badges: Apple's and Google's own artwork, at Apple's 40 px minimum height */
.badges { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin: 1.5rem 0 .5rem; }
.badge { display: inline-flex; line-height: 0; }
.badge img { height: 48px; width: auto; }
.badge.play img { width: 181px; height: 70px; max-width: none; margin: -11px -10px; }
.badges + .small { margin-top: .25rem; }

/* Phone frames around the app's real screens */
.phone {
  width: min(100%, 230px);
  border-radius: 34px;
  border: 7px solid #0B0F24;
  background: #0B0F24;
  box-shadow: var(--shadow);
  overflow: hidden;
  flex: 0 1 auto;
}
.phone img { display: block; width: 100%; height: auto; border-radius: 27px; }
.phone.small { width: min(100%, 180px); }
.phones { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; margin: 1.5rem 0; }
.phones figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .6rem; max-width: 230px; }
.phones figcaption { text-align: center; font-size: .95rem; color: var(--muted); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.15rem 1.25rem; margin: 0; }
.card h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.card .big { font-size: 2rem; font-weight: 800; color: var(--heading); letter-spacing: -.02em; display: block; margin-bottom: .25rem; }
.note { background: var(--accent-soft); border-radius: 14px; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.note p:last-child { margin-bottom: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Numbered steps */
.steps { list-style: none; padding: 0; margin: 1.5rem 0; counter-reset: step; display: grid; gap: 1rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; align-items: start; max-width: 46rem; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--accent-fill); color: #fff; font-weight: 800; }
.steps h3 { margin: .3rem 0 .2rem; }
.steps p { margin: 0; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { text-align: left; padding: .75rem .9rem; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; background: var(--accent-soft); font-weight: 700; }
tbody th { font-weight: 600; }
/* On a phone a row becomes a card: the row heading on top, then each cell under its column name */
@media (max-width: 640px) {
  .table-wrap thead { display: none; }
  .table-wrap tr { display: block; padding: .6rem 0; border-top: 1px solid var(--line); }
  .table-wrap tr:first-child { border-top: 0; }
  .table-wrap tbody th, .table-wrap td { display: block; border: 0; padding: .3rem .9rem; }
  .table-wrap tbody th { font-weight: 700; }
  .table-wrap td::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
}

/* FAQ: plain headings and paragraphs, so every answer can be quoted */
.faq h3 { margin-top: 2rem; }
.faq h3 + p { margin-top: .25rem; }

/* Calls to action */
.cta { margin: 3.5rem 0 0; padding: 2rem; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.cta h2 { margin-top: 0; }
.cta .badges { justify-content: center; }
.button { display: inline-block; background: var(--accent-fill); color: #fff; text-decoration: none; font-weight: 700; padding: .75rem 1.25rem; border-radius: 12px; }
.button:hover { filter: brightness(1.08); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--muted); font-size: .95rem; }
.foot-links { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.foot-links a { color: var(--text); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot p { max-width: none; }


/* The trust strip under the hero: facts the app can back, where other sites put ratings */
.facts { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem .75rem; }
.facts li { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; font-size: .92rem; font-weight: 600; margin: 0; }
.facts li::before { content: "✓ "; color: var(--ok); }

/* Atmosphere. Each page body carries one mood: mood-stars (the home hero, travel), mood-moon
   (how it works, pricing, 404) or mood-calm (the long reading pages: a faint glow at the top,
   never stars behind body text). Everything is CSS gradients; nothing is fetched. */
:root {
  --stars:
    radial-gradient(circle at 331px 154px, rgba(253,245,222,0.9) 1.0px, transparent 1.6px),
    radial-gradient(circle at 49px 74px, rgba(253,245,222,0.5) 1.3px, transparent 1.9px),
    radial-gradient(circle at 374px 596px, rgba(253,245,222,0.9) 0.6px, transparent 1.2px),
    radial-gradient(circle at 219px 38px, rgba(253,245,222,0.7) 0.6px, transparent 1.2px),
    radial-gradient(circle at 428px 71px, rgba(253,245,222,0.5) 0.8px, transparent 1.4px),
    radial-gradient(circle at 564px 434px, rgba(253,245,222,0.9) 0.6px, transparent 1.2px),
    radial-gradient(circle at 126px 228px, rgba(253,245,222,0.9) 1.6px, transparent 2.2px),
    radial-gradient(circle at 596px 63px, rgba(253,245,222,0.9) 1.3px, transparent 1.9px),
    radial-gradient(circle at 406px 50px, rgba(253,245,222,0.5) 0.8px, transparent 1.4px),
    radial-gradient(circle at 570px 136px, rgba(253,245,222,0.7) 1.0px, transparent 1.6px),
    radial-gradient(circle at 147px 553px, rgba(253,245,222,0.9) 0.6px, transparent 1.2px),
    radial-gradient(circle at 315px 573px, rgba(253,245,222,0.5) 1.6px, transparent 2.2px),
    radial-gradient(circle at 105px 595px, rgba(253,245,222,0.9) 1.3px, transparent 1.9px),
    radial-gradient(circle at 192px 381px, rgba(253,245,222,0.9) 0.6px, transparent 1.2px),
    radial-gradient(circle at 729px 64px, rgba(253,245,222,0.5) 1.3px, transparent 1.9px),
    radial-gradient(circle at 633px 210px, rgba(253,245,222,0.9) 1.0px, transparent 1.6px),
    radial-gradient(circle at 544px 437px, rgba(253,245,222,0.7) 1.0px, transparent 1.6px),
    radial-gradient(circle at 599px 464px, rgba(253,245,222,0.7) 1.0px, transparent 1.6px),
    radial-gradient(circle at 254px 184px, rgba(253,245,222,0.5) 1.6px, transparent 2.2px),
    radial-gradient(circle at 83px 588px, rgba(253,245,222,0.9) 1.0px, transparent 1.6px),
    radial-gradient(circle at 506px 351px, rgba(253,245,222,0.7) 1.6px, transparent 2.2px),
    radial-gradient(circle at 294px 74px, rgba(253,245,222,0.9) 0.6px, transparent 1.2px);
  --stars-twinkle:
    radial-gradient(circle at 428px 168px, rgba(253,245,222,0.5) 1.0px, transparent 1.6px),
    radial-gradient(circle at 500px 431px, rgba(253,245,222,0.9) 0.6px, transparent 1.2px),
    radial-gradient(circle at 79px 571px, rgba(253,245,222,0.7) 1.3px, transparent 1.9px),
    radial-gradient(circle at 348px 358px, rgba(253,245,222,0.7) 1.3px, transparent 1.9px),
    radial-gradient(circle at 593px 467px, rgba(253,245,222,0.5) 0.6px, transparent 1.2px),
    radial-gradient(circle at 276px 485px, rgba(253,245,222,0.9) 1.6px, transparent 2.2px),
    radial-gradient(circle at 66px 62px, rgba(253,245,222,0.9) 1.6px, transparent 2.2px),
    radial-gradient(circle at 317px 591px, rgba(253,245,222,0.7) 1.6px, transparent 2.2px),
    radial-gradient(circle at 291px 395px, rgba(253,245,222,0.7) 1.6px, transparent 2.2px);
}
main { position: relative; }
main::before, main::after { content: ""; position: absolute; pointer-events: none; z-index: -1; }
.hero { position: relative; isolation: isolate; }
.hero > * { position: relative; }

/* Stars: a sparse 900 x 600 field, repeated; a second, smaller layer twinkles. */
.sky { position: absolute; inset: 0; border-radius: inherit; background-image: var(--stars); background-size: 900px 600px; }
.sky-twinkle { background-image: var(--stars-twinkle); animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .2; } to { opacity: 1; } }
/* On a page without a hero the stars sit around the title only, never behind body text. */
.mood-stars main::before, .mood-stars main::after { content: none; }
.mood-stars main > h1 { position: relative; }
.mood-stars main > h1::before, .mood-stars main > h1::after {
  content: ""; position: absolute; inset: -3rem -1rem -1.5rem; z-index: -1; pointer-events: none;
  background-size: 900px 600px;
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.mood-stars main > h1::before { background-image: var(--stars); }
.mood-stars main > h1::after { background-image: var(--stars-twinkle); animation: twinkle 6s ease-in-out infinite alternate; }

/* Moonlight: a soft glow top right with a thin crescent in it. */
.mood-moon main::before { top: -6rem; left: 50%; width: 100vw; height: 36rem; transform: translateX(-50%); background: radial-gradient(26rem 14rem at 74% 13rem, rgba(152,178,237,.24), rgba(152,178,237,.06) 55%, transparent 100%); }
.mood-moon main::after { top: 3.5rem; right: 6%; width: 5.5rem; height: 5.5rem; border-radius: 50%; box-shadow: inset -1.3rem .5rem 0 0 rgba(253,245,222,.9), 0 0 3rem 1rem rgba(253,245,222,.08); }
@media (max-width: 760px) {
  .mood-moon main > h1 { padding-right: 4rem; }
  .mood-moon main::after { width: 3rem; height: 3rem; top: 1.25rem; right: 4%; box-shadow: inset -.75rem .25rem 0 0 rgba(253,245,222,.9), 0 0 2rem .6rem rgba(253,245,222,.08); }
}

/* Calm: only a faint glow where the title is. */
.mood-calm main::before { top: -6rem; left: 50%; width: 100vw; height: 28rem; transform: translateX(-50%); background: radial-gradient(28rem 11rem at 35% 10rem, rgba(152,178,237,.13), transparent 100%); }
.mood-calm main::after { content: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky-twinkle, .mood-stars main > h1::after { animation: none; opacity: .7; }
}
