/* Atmo Engine Pro site. Dark by default (a wallpaper app is shown at night
   as often as by day), light when the visitor's device asks for it. */
:root {
  color-scheme: dark light;
  --bg: #0b0a12;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --text: #f3f1fa;
  --muted: #aaa6bd;
  --line: rgba(255, 255, 255, 0.10);
  --primary: #7c3aed;
  --primary-2: #6d28d9;
  --on-primary: #ffffff;
  --link: #c4b5fd;
  --cyan: #22d3ee;
  --magenta: #e879f9;
  --check: #22d3ee;
  --kicker: #e879f9;
  --warn-bg: rgba(250, 204, 21, 0.08);
  --warn-line: rgba(250, 204, 21, 0.28);
  --warn-icon: #facc15;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 30px 80px -30px rgba(124, 58, 237, 0.55);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --wrap: 1120px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf7ff;
    --surface: #ffffff;
    --surface-strong: #f6f2ff;
    --text: #15121f;
    --muted: #4d4862;
    --line: #e7e0f7;
    --link: #6d28d9;
    --check: #0e7490;
    --kicker: #a21caf;
    --warn-bg: #fffbea;
    --warn-line: #f2dd8b;
    --warn-icon: #a16207;
    --shadow: 0 30px 70px -35px rgba(109, 40, 217, 0.45);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The Atmosphere: soft colour clouds drifting behind every page, like the
   effect the app is named after. Gradients only, moved with transform. */
.aurora {
  position: fixed;
  inset: -20vmax;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
}
.aurora span {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  animation: drift 38s var(--ease) infinite alternate;
}
.aurora span:nth-child(1) { top: 0; left: 5%; background: radial-gradient(closest-side, rgba(124, 58, 237, 0.55), transparent); }
.aurora span:nth-child(2) { top: 25%; right: 0; background: radial-gradient(closest-side, rgba(232, 121, 249, 0.38), transparent); animation-duration: 46s; }
.aurora span:nth-child(3) { bottom: 0; left: 30%; background: radial-gradient(closest-side, rgba(34, 211, 238, 0.30), transparent); animation-duration: 52s; }
@media (prefers-color-scheme: light) { .aurora { opacity: 0.35; } }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vmax, -4vmax, 0) scale(1.12); }
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  z-index: 100;
}
.skip:focus { top: 12px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; }
header.site nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
header.site nav a:not(.button) {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 999px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
header.site nav a:not(.button):hover { color: var(--text); background: var(--surface-strong); }
header.site nav a[aria-current="page"] { color: var(--text); background: color-mix(in srgb, var(--primary) 26%, transparent); }
@media (max-width: 900px) {
  header.site nav a.optional { display: none; }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--on-primary);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(124, 58, 237, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}
.button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.button:active { transform: translateY(0) scale(0.98); }
.button.small { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.button.ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
.button.ghost:hover { background: var(--surface-strong); }

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.button .icon { width: 18px; height: 18px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
  padding: 72px 0 56px;
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 40px 0 24px; text-align: center; }
  .hero .actions, .hero .trust { justify-content: center; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--magenta)); }
h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 20px 0 18px;
  text-wrap: balance;
}
.gradient-text {
  background: linear-gradient(100deg, #c4b5fd 0%, var(--magenta) 45%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-color-scheme: light) {
  .gradient-text { background-image: linear-gradient(100deg, #6d28d9 0%, #a21caf 50%, #0e7490 100%); }
}
.lead {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 28px;
}
@media (max-width: 900px) { .lead { margin-left: auto; margin-right: auto; } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust .icon { width: 18px; height: 18px; color: var(--check); }

/* Phone mock-up: a lock screen whose clock sits behind the mountain. */
.phone {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 9 / 19;
  margin: 0 auto;
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(160deg, #2a2733, #0d0c12);
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}
.phone::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  width: 26%;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #050507;
  z-index: 3;
}
.screen {
  position: relative;
  height: 100%;
  border-radius: 35px;
  overflow: hidden;
  background: linear-gradient(180deg, #1d1446 0%, #4b1d6b 45%, #b44a8d 78%, #f19a8b 100%);
  isolation: isolate;
  container-type: inline-size;
}
.screen .glow {
  position: absolute;
  border-radius: 50%;
  animation: drift 18s var(--ease) infinite alternate;
}
.screen .glow.a { width: 70%; aspect-ratio: 1; top: 8%; left: -12%; background: radial-gradient(closest-side, rgba(34, 211, 238, 0.55), transparent); }
.screen .glow.b { width: 80%; aspect-ratio: 1; top: 30%; right: -25%; background: radial-gradient(closest-side, rgba(232, 121, 249, 0.6), transparent); animation-duration: 24s; }
.screen .date {
  position: absolute;
  top: 17%;
  width: 100%;
  text-align: center;
  font-size: 5cqi;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.9);
}
.screen .clock {
  position: absolute;
  top: 21%;
  width: 100%;
  text-align: center;
  font-size: 36cqi;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
}
.screen .subject {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 72%;
}
.screen .stock {
  position: absolute;
  top: 9%;
  left: 9%;
  font-size: 15cqi;
  font-weight: 300;
  line-height: 1;
  color: #fff;
  z-index: 2;
}

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 680px; margin: 0 0 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 12px 0 14px;
  text-wrap: balance;
}
h3 { font-size: 19px; letter-spacing: -0.01em; margin: 0 0 6px; }
.kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kicker);
}
.muted { color: var(--muted); }
.small { font-size: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature { transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease); }
.feature:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); background: var(--surface-strong); }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.badge-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #c026d3);
  box-shadow: 0 10px 24px -10px rgba(192, 38, 211, 0.8);
}

/* Before / after */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 600px; margin: 0 auto; }
.compare figure { margin: 0; text-align: center; }
.compare .phone { width: 100%; max-width: 240px; border-radius: 38px; padding: 10px; }
.compare .phone::before { top: 18px; height: 16px; }
.compare .screen { border-radius: 29px; }
.compare figcaption { margin-top: 16px; font-weight: 600; }
.compare figcaption span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
@media (max-width: 520px) { .compare { gap: 14px; } }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-top: 72px; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 26px;
  left: 28px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #c026d3);
}
.steps li p { margin: 0; color: var(--muted); font-size: 15px; }

/* Profile links: pill-shaped, at least 44px tall to tap */
.link-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.link-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.link-list a:hover { background: var(--surface-strong); border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); transform: translateY(-2px); }
.link-list .icon { width: 18px; height: 18px; color: var(--link); }
.card > .actions { margin-top: 18px; }

/* Lists with check marks */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks .icon { color: var(--check); margin-top: 2px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

.note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
}
.note .icon { color: var(--warn-icon); margin-top: 2px; }
.note p { margin: 0; font-size: 15px; }
.stack { display: grid; gap: 16px; }

/* Pricing */
.pricing {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 44px 32px;
}
.pricing::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary), var(--magenta), var(--cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.pricing .amount { font-size: clamp(46px, 13vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 12px 0 6px; }
.pricing .amount small { font-size: 20px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.pricing .checks { text-align: left; max-width: 360px; margin: 26px auto 30px; }
.pricing .button { width: 100%; max-width: 360px; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.faq details[open] { background: var(--surface-strong); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  min-height: 56px;
  font-weight: 600;
  font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform 0.25s var(--ease); color: var(--muted); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details > div { padding: 0 22px 20px; color: var(--muted); }
.faq details > div p { margin: 0; }

/* Releases page */
.releases > h1:first-child { font-size: clamp(34px, 5vw, 48px); margin-top: 48px; }
.releases { max-width: 820px; }
.release-list { display: grid; gap: 16px; margin: 28px 0 0; }
.release-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.release-head h3 { font-size: 24px; margin: 0; }
.release p.small { margin: 4px 0 14px; }
.release .notes { margin: 0 0 20px; padding-left: 20px; color: var(--muted); }
.release .notes li { margin: 4px 0; }
.release.latest { border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.badge.stable { background: color-mix(in srgb, var(--primary) 22%, transparent); color: var(--link); }
.badge.beta { background: var(--warn-bg); color: var(--warn-icon); border: 1px solid var(--warn-line); }

.center-link { text-align: center; margin: 28px 0 0; }
#releases .release-list { max-width: 820px; margin: 0 auto; }

/* Bottom pill navigation on small screens, where the header links don't fit.
   Floats above the system gesture bar (safe area) and marks where you are. */
.bottom-nav { display: none; }
@media (max-width: 900px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 60;
    width: min(460px, calc(100% - 24px));
    padding: 6px;
    gap: 2px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.65);
  }
  .bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 54px;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
  }
  .bottom-nav .icon { width: 22px; height: 22px; }
  .bottom-nav a[aria-current="page"] {
    color: var(--text);
    background: color-mix(in srgb, var(--primary) 30%, transparent);
  }
  body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  section { padding: 44px 0; }
  .section-head { margin-bottom: 28px; }
  .release .button { width: 100%; }
  html { scroll-padding-bottom: 100px; }
  footer.site { padding-bottom: 24px; }
}

/* Policy pages */
main > .wrap > h1:first-child { font-size: clamp(34px, 5vw, 48px); margin-top: 48px; }
main > .wrap:not(.releases):has(> h1:first-child) { max-width: 820px; }
main > .wrap:not(.releases):has(> h1:first-child) h2 { font-size: 24px; margin-top: 40px; }
main > .wrap:not(.releases):has(> h1:first-child) li { margin: 6px 0; }

/* Footer */
footer.site {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 14px;
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
footer.site a { color: var(--muted); text-decoration: none; padding: 6px 0; }
footer.site a:hover { color: var(--text); }
footer.site p { flex-basis: 100%; margin: 12px 0 0; }

/* Appear on scroll, only when JavaScript runs, so nothing stays hidden without it. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
