/* ============================================================
   FocusLock — landing page.
   Same night sky as the app: near-black navy, violet aura,
   starlit glass panels. No web fonts, no trackers, no frameworks.
   ============================================================ */

:root {
  --bg: #05070f;
  --panel: rgba(20, 26, 50, 0.62);
  --panel-solid: #0c1124;
  --stroke: rgba(150, 185, 255, 0.18);
  --stroke-bright: rgba(190, 220, 255, 0.45);
  --text: #eef2ff;
  --muted: #98a6c9;
  --violet: #b49aff;
  --cyan: #7fb2ff;
  --green: #6dffab;
  --maxw: 1120px;
  --edge: max(16px, env(safe-area-inset-left), calc((100vw - var(--maxw)) / 2));
  --edge-right: max(16px, env(safe-area-inset-right), calc((100vw - var(--maxw)) / 2));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* A class with its own `display` outranks the browser's [hidden] rule, which
   would leave hidden elements on screen. Keep `hidden` meaning hidden. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  /* anchors land below the sticky header instead of behind it */
  scroll-padding-top: 76px;
  /* iOS enlarges text on rotation without this */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(900px 700px at 12% -10%, rgba(94, 64, 186, 0.22), transparent 62%),
    radial-gradient(800px 560px at 88% 8%, rgba(40, 135, 188, 0.17), transparent 64%),
    var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(180, 154, 255, 0.11), transparent 22%),
    radial-gradient(circle at 74% 48%, rgba(127, 178, 255, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%);
  opacity: 0.85;
}

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

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: 'Cascadia Mono', Consolas, monospace;
  font-size: 0.9em;
  background: rgba(8, 12, 26, 0.9);
  border: 1px solid var(--stroke);
  border-radius: 6px;
  padding: 1px 6px;
  /* file paths are long and have no spaces to break at */
  overflow-wrap: anywhere;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  /* the max() keeps the bar clear of a notch in landscape */
  padding: 12px var(--edge-right) 12px var(--edge);
  background:
    linear-gradient(180deg, rgba(11, 14, 30, 0.9), rgba(5, 7, 15, 0.76));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--stroke);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.24);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text);
}

.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }

.topbar nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14.5px;
}

.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid rgba(180, 154, 255, 0.55);
  background: linear-gradient(160deg, rgba(122, 88, 220, 0.95), rgba(72, 52, 160, 0.95));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: 0 0 18px rgba(140, 100, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 0.25s cubic-bezier(0.34, 1.7, 0.5, 1), box-shadow 0.25s, border-color 0.25s, filter 0.25s;
  will-change: transform;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(220, 205, 255, 0.85);
  box-shadow: 0 0 28px rgba(150, 110, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  filter: saturate(1.08);
  text-decoration: none;
}

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

.btn-small { padding: 8px 15px; font-size: 14px; border-radius: 10px; }
.btn-big { padding: 15px 28px; font-size: 16.5px; }

.btn-ghost {
  background: rgba(20, 26, 50, 0.75);
  border-color: var(--stroke);
  color: var(--text);
  box-shadow: none;
}

.btn-ghost:hover { border-color: var(--stroke-bright); box-shadow: 0 0 18px rgba(120, 160, 255, 0.25); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  --hero-bg-x: 0px;
  --hero-bg-y: 0px;
  --hero-shot-y: 0px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
  padding: 84px var(--edge-right) 96px var(--edge);
  min-height: clamp(720px, 92vh, 980px);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/hero.jpg');
  background-image: image-set(url('assets/hero.webp') type('image/webp'), url('assets/hero.jpg') type('image/jpeg'));
  background-size: cover;
  background-position: 65% 40%;
  z-index: -2;
  will-change: transform;
}

/* Keeps the headline readable over the nebula and fades the sky into the page. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 15, 0.97) 0%, rgba(5, 7, 15, 0.82) 42%, rgba(5, 7, 15, 0.45) 100%),
    linear-gradient(180deg, rgba(5, 7, 15, 0.5) 0%, rgba(5, 7, 15, 0) 30%, rgba(5, 7, 15, 0.95) 100%);
  z-index: -1;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.5rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #c9b4ff 0%, #ffffff 42%, #8fc4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 17.5px;
  color: #c3cfe8;
  max-width: 34em;
  margin-bottom: 30px;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }

.fineprint { font-size: 13.5px; color: var(--muted); }

.platform-note {
  margin-top: 12px;
  font-size: 13.5px;
  color: #ffd9a1;
  background: rgba(70, 52, 20, 0.5);
  border: 1px solid rgba(255, 200, 120, 0.3);
  border-radius: 10px;
  padding: 8px 12px;
  display: inline-block;
}

.hero-copy { max-width: 620px; }

.hero-shot {
  position: relative;
  transform: translate3d(0, var(--hero-shot-y), 0);
  will-change: transform;
}

.hero-shot::before,
.hero-shot::after {
  content: '';
  position: absolute;
  inset: 7% 2% 5%;
  border-radius: 28px;
  pointer-events: none;
}

.hero-shot::before {
  background:
    radial-gradient(closest-side, rgba(180, 154, 255, 0.36), rgba(180, 154, 255, 0) 72%),
    radial-gradient(closest-side at 72% 22%, rgba(127, 178, 255, 0.25), rgba(127, 178, 255, 0) 60%);
  filter: blur(26px);
  transform: scale(1.12);
}

.hero-shot::after {
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* the app window, floating in its own aura */
.hero-shot img {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  border: 1px solid var(--stroke-bright);
  box-shadow: 0 0 70px rgba(130, 90, 255, 0.3), 0 30px 70px rgba(0, 0, 8, 0.7);
}

/* ---------- stat strip ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background:
    linear-gradient(90deg, transparent, rgba(127, 178, 255, 0.4), transparent),
    var(--stroke);
  border-block: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.strip-item {
  position: relative;
  background:
    linear-gradient(180deg, rgba(16, 22, 48, 0.88), rgba(5, 7, 15, 0.96));
  padding: 22px 20px;
  text-align: center;
  overflow: hidden;
}

.strip-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(180, 154, 255, 0.16), transparent 58%);
  opacity: 0;
  transition: opacity 0.25s;
}

.strip-item:hover::before {
  opacity: 1;
}

.strip-item strong { display: block; font-size: 19px; letter-spacing: 0.2px; }
.strip-item span { font-size: 13px; color: var(--muted); }

/* ---------- sections ---------- */
.section {
  position: relative;
  padding: 84px var(--edge-right) 84px var(--edge);
}

.section h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.3px;
  margin-bottom: 34px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 18px;
}

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.6, 0.5, 1), border-color 0.3s, box-shadow 0.3s;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(180, 154, 255, 0.13), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 32%);
  opacity: 0.55;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--stroke-bright);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24), 0 0 30px rgba(120, 160, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.card h3 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  margin-bottom: 10px;
}

.card p { font-size: 15px; color: #b9c6e2; }

.card p { position: relative; }

/* ---------- gallery ---------- */
.gallery {
  display: grid;
  /* minmax(0, ...) so a narrow screen can shrink the column below the
     screenshot's natural width instead of overflowing the page. */
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 40px;
  padding-top: 0;
  perspective: 1200px;
}

.gallery figure {
  position: relative;
  text-align: center;
}

.shot-frame {
  position: relative;
  display: block;
  width: min(100%, 370px);
  margin: 0 auto 16px;
  padding: 12px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    rgba(10, 14, 30, 0.7);
  border: 1px solid rgba(190, 220, 255, 0.22);
  box-shadow: 0 24px 70px rgba(0, 0, 8, 0.55), 0 0 70px rgba(85, 90, 210, 0.18);
  transform: rotateX(2deg) rotateY(-2deg);
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.5, 1), box-shadow 0.35s, border-color 0.35s;
}

.gallery figure:nth-child(even) .shot-frame {
  transform: rotateX(2deg) rotateY(2deg);
}

.shot-frame::before {
  content: '';
  position: absolute;
  inset: 8%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(127, 178, 255, 0.28), transparent 72%);
  filter: blur(28px);
}

.shot-frame:hover {
  transform: translateY(-6px) rotateX(0) rotateY(0);
  border-color: rgba(190, 220, 255, 0.42);
  box-shadow: 0 34px 90px rgba(0, 0, 8, 0.62), 0 0 90px rgba(125, 105, 245, 0.25);
}

.gallery img {
  margin: 0 auto;
  width: 100%;
  max-width: none;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  box-shadow: 0 16px 40px rgba(0, 0, 8, 0.48);
}

.gallery figcaption {
  max-width: 440px;
  margin: 0 auto;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- steps ---------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: 26px; max-width: 760px; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 62px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(180, 154, 255, 0.5);
  background: rgba(60, 42, 120, 0.5);
  color: #e6dcff;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(150, 110, 255, 0.25);
}

.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { font-size: 15.5px; color: #b9c6e2; margin-bottom: 12px; }

/* ---------- honest + faq ---------- */
.honest {
  background:
    radial-gradient(620px 360px at 16% 0%, rgba(180, 154, 255, 0.13), transparent 64%),
    rgba(12, 17, 36, 0.65);
  border-block: 1px solid var(--stroke);
}

.honest p { max-width: 62ch; font-size: 16.5px; color: #c3cfe8; }
.honest p + p { margin-top: 14px; }

details {
  position: relative;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--panel);
  padding: 4px 18px;
  margin-bottom: 12px;
  max-width: 820px;
  overflow: hidden;
}

details[open] {
  border-color: var(--stroke-bright);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

summary::before {
  content: '+';
  color: var(--violet);
  font-weight: 700;
  font-size: 19px;
  width: 16px;
}

details[open] summary::before { content: '–'; }

details p { font-size: 15.5px; color: #b9c6e2; padding: 0 0 16px 26px; max-width: 70ch; }

/* ---------- closer ---------- */
.closer {
  text-align: center;
  padding: 96px var(--edge-right) 104px var(--edge);
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(90, 60, 190, 0.35), rgba(5, 7, 15, 0) 70%),
    var(--bg);
}

.closer img { margin: 0 auto 18px; border-radius: 20px; }
.closer h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 26px; }
.closer .fineprint { margin-top: 14px; }

footer {
  border-top: 1px solid var(--stroke);
  padding: 26px 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

/* ============================================================
   MOTION
   The same vocabulary as the app: a sky that turns, light that
   sweeps, things that breathe. Every animation is transform or
   opacity on its own layer, and all of it is switched off under
   prefers-reduced-motion at the end of this file.
   ============================================================ */

/* the nebula photo drifts and breathes, very slowly */
.hero::before { animation: nebula 90s ease-in-out infinite alternate; }

@keyframes nebula {
  from { transform: translate3d(calc(var(--hero-bg-x) - 10px), var(--hero-bg-y), 0) scale(1.06); }
  to   { transform: translate3d(calc(var(--hero-bg-x) + 10px), calc(var(--hero-bg-y) - 12px), 0) scale(1.11); }
}

/* the star layer sits over the veil but under the text */
.hero .sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-copy,
.hero-shot { position: relative; z-index: 1; }

.nebula-haze {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(34px);
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: haze 18s ease-in-out infinite alternate;
}

.nebula-haze.h1 {
  left: 48%;
  top: 4%;
  background: radial-gradient(circle, rgba(180, 154, 255, 0.62), rgba(180, 154, 255, 0) 68%);
}

.nebula-haze.h2 {
  right: -10%;
  bottom: 2%;
  background: radial-gradient(circle, rgba(70, 190, 255, 0.42), rgba(70, 190, 255, 0) 66%);
  animation-delay: -8s;
}

@keyframes haze {
  from { transform: translate3d(-2%, 1%, 0) scale(0.94); }
  to   { transform: translate3d(3%, -2%, 0) scale(1.06); }
}

/* each layer is one element: the stars are a painted box-shadow list,
   and only the layer's opacity animates */
.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: transparent;
}

.s1 {
  box-shadow:
    60px 90px 0 0 #ffffff, 180px 220px 0 0 #dce8ff, 320px 60px 0 0 #ffffff,
    430px 300px 0 0 #eaf2ff, 520px 150px 0 0 #ffffff, 90px 380px 0 0 #dce8ff,
    250px 470px 0 0 #ffffff, 610px 420px 0 0 #eaf2ff, 700px 120px 0 0 #ffffff,
    780px 330px 0 0 #dce8ff, 860px 210px 0 0 #ffffff, 960px 460px 0 0 #eaf2ff,
    1050px 90px 0 0 #ffffff, 1140px 280px 0 0 #dce8ff, 1220px 400px 0 0 #ffffff,
    150px 540px 0 0 #eaf2ff, 480px 590px 0 0 #ffffff, 820px 560px 0 0 #dce8ff,
    1180px 620px 0 0 #ffffff;
  animation: twinkle 5s ease-in-out infinite;
}

.s2 {
  width: 1px;
  height: 1px;
  box-shadow:
    120px 160px 0 0 rgba(180, 205, 255, 0.85), 270px 320px 0 0 rgba(200, 215, 255, 0.75),
    390px 110px 0 0 rgba(180, 205, 255, 0.8), 560px 250px 0 0 rgba(200, 215, 255, 0.7),
    650px 520px 0 0 rgba(180, 205, 255, 0.8), 740px 200px 0 0 rgba(200, 215, 255, 0.7),
    900px 350px 0 0 rgba(180, 205, 255, 0.75), 1010px 170px 0 0 rgba(200, 215, 255, 0.7),
    1100px 500px 0 0 rgba(180, 205, 255, 0.8), 1260px 230px 0 0 rgba(200, 215, 255, 0.7),
    40px 260px 0 0 rgba(180, 205, 255, 0.7), 340px 620px 0 0 rgba(200, 215, 255, 0.7),
    960px 640px 0 0 rgba(180, 205, 255, 0.75);
  animation: twinkle 7.5s ease-in-out infinite;
  animation-delay: -3s;
}

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

/* a comet crosses now and then */
.hero .comet {
  position: absolute;
  top: 12%;
  right: -120px;
  width: 90px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(160, 200, 255, 0.35) 40%, rgba(160, 200, 255, 0));
  opacity: 0;
  animation: comet 19s linear infinite;
}

.hero .comet.c2 {
  top: 42%;
  width: 62px;
  animation-duration: 27s;
  animation-delay: -11s;
}

@keyframes comet {
  0%, 88% { transform: translate3d(0, 0, 0) rotate(143deg);          opacity: 0; }
  89%     { transform: translate3d(-70px, 52px, 0) rotate(143deg);   opacity: 0.9; }
  100%    { transform: translate3d(-720px, 540px, 0) rotate(143deg); opacity: 0; }
}

/* the app window floats, and its aura breathes with it */
.hero-shot img { animation: float 8s ease-in-out infinite alternate; }

@keyframes float {
  from { transform: translate3d(0, 6px, 0); box-shadow: 0 0 60px rgba(130, 90, 255, 0.24), 0 26px 60px rgba(0, 0, 8, 0.66); }
  to   { transform: translate3d(0, -6px, 0); box-shadow: 0 0 84px rgba(130, 90, 255, 0.36), 0 34px 78px rgba(0, 0, 8, 0.72); }
}

/* the headline's highlight and the numbers in the strip catch a
   travelling shine, the same one the app uses on its own figures */
h1 em,
.strip-item strong {
  background-size: 300% 100%;
  animation: shine 4.5s linear infinite;
}

.strip-item strong {
  background-image: linear-gradient(110deg,
    #cfd9ef 0%, #e8eeff 34%,
    #ffffff 44%, #f6faff 48%,
    #cfd9ef 58%, #aebbd8 78%, #cfd9ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.strip-item:nth-child(2) strong { animation-delay: -1.1s; }
.strip-item:nth-child(3) strong { animation-delay: -2.2s; }
.strip-item:nth-child(4) strong { animation-delay: -3.3s; }

@keyframes shine {
  0%   { background-position: 100% 0; }
  100% { background-position: -200% 0; }
}

/* a glint sweeps the download buttons */
.btn-big {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-big::after {
  content: '';
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: 0;
  width: 46px;
  background: linear-gradient(105deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 42%,
    rgba(255, 255, 255, 0.48) 50%,
    rgba(255, 255, 255, 0.2) 58%,
    rgba(255, 255, 255, 0) 100%);
  transform: translateX(-80px) skewX(-14deg);
  opacity: 0;
  pointer-events: none;
  animation: glint 5.5s ease-in-out infinite;
}

@keyframes glint {
  0%, 56%   { transform: translateX(-80px) skewX(-14deg); opacity: 0; }
  60%       { opacity: 1; }
  80%       { transform: translateX(340px) skewX(-14deg); opacity: 1; }
  81%, 100% { transform: translateX(340px) skewX(-14deg); opacity: 0; }
}

/* the glow behind the last call to action breathes — on its own layer,
   so it scales without repainting the section */
/* overflow:hidden because the glow below is wider than the section —
   without it the page gains a horizontal scrollbar */
.closer { position: relative; isolation: isolate; overflow: hidden; }

.closer::before {
  content: '';
  position: absolute;
  inset: -10% -20% 20%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(120, 80, 220, 0.3), rgba(120, 80, 220, 0) 100%);
  animation: closerglow 9s ease-in-out infinite alternate;
}

@keyframes closerglow {
  from { opacity: 0.55; transform: scale(0.94); }
  to   { opacity: 1;    transform: scale(1.08); }
}

/* ---- scroll reveals ----
   The `.js.motion-ok` gate matters more than the animation. Without it,
   a script failure or a no-JS visitor could strand the sales page invisible. */
@media (prefers-reduced-motion: no-preference) {
  .js.motion-ok .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition:
      opacity 0.65s ease,
      transform 0.65s cubic-bezier(0.18, 0.84, 0.28, 1);
    transition-delay: var(--reveal-delay, 0ms);
  }

  .js.motion-ok .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ---------- touch screens ----------
   A tap leaves :hover stuck on whatever was tapped, so the lifts belong to
   real pointers only. Anything that is a tap target also needs to be big
   enough to hit. */
@media (hover: none) {
  .btn:hover,
  .card:hover,
  .shot-frame:hover,
  .chip:hover,
  .mtab:hover,
  .topbar nav a:hover { transform: none; }
}

@media (pointer: coarse) {
  .btn-small { padding: 12px 18px; }
  summary { padding: 16px 0; }
  .topbar nav a { padding: 8px 0; }
}

/* ---------- iPhone safe areas ----------
   viewport-fit=cover lets the page paint under the notch and the home
   indicator; these put the content back inside them. The centring term stays
   in the max() so desktop layout is untouched. */
@supports (padding: env(safe-area-inset-left)) {
  .hero,
  .section,
  .closer {
    padding-left: max(16px, env(safe-area-inset-left), calc((100vw - var(--maxw)) / 2));
    padding-right: max(16px, env(safe-area-inset-right), calc((100vw - var(--maxw)) / 2));
  }

  footer {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(26px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- narrow screens ---------- */
@media (max-width: 900px) {
  .hero {
    /* minmax(0, 1fr), not 1fr: a column whose minimum is its content would
       refuse to shrink below the screenshot's width and push the page wider
       than the screen. */
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-top: 60px;
    padding-bottom: 70px;
  }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(5, 7, 15, 0.55) 0%, rgba(5, 7, 15, 0.82) 45%, rgba(5, 7, 15, 0.97) 100%);
  }
  .hero-shot img { width: 100%; max-width: 380px; margin: 0 auto; }
  .section { padding-top: 64px; padding-bottom: 64px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { gap: 12px; }
  .topbar nav { display: none; }
  .cta .btn { width: 100%; text-align: center; }
  .steps li { padding-left: 0; padding-top: 54px; }
  .steps li::before { top: 0; }
}

/* ---------- buy panel ----------
   Which payment methods appear is decided by api/options.php; the panel
   itself is always on the page, because every download button points at it.

   No max-width here, deliberately. .section is full-bleed and centres its
   content with --edge, a padding that grows to (100vw - 1120px) / 2 - so a
   border-box cap on the section subtracts that gutter from the text instead
   of from the margins. It cost the buy panel 800px of its 1040 at a 1920
   screen and left every paragraph 240px wide, reading as a column. Inner
   elements set their own measure below, which is how every other section
   here does it. */
.buy {
  text-align: center;
}

/* A measure wide enough that it never reads as a column, and no wider than
   the eye can track back to the start of the next line: 860px put 92
   characters on a line, which is a different kind of hard to read. */
.buy-lede {
  color: #c4cfea;
  width: 100%;
  max-width: 64ch;
  margin: 0 auto 30px;
  font-size: clamp(17px, 1.7vw, 19px);
  line-height: 1.72;
  text-wrap: pretty;
}

.buy-lede strong {
  color: var(--text);
  font-size: 1.15em;
}

.buy-methods {
  display: grid;
  gap: 22px;
  width: 100%;
  justify-items: center;
}

.buy-crypto {
  width: 100%;
  max-width: 580px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 22px;
  backdrop-filter: blur(6px);
}

.buy-crypto h3 { font-size: 18px; margin-bottom: 6px; }

.buy-note {
  color: var(--muted);
  font-size: 14px;
  margin: 0 auto 16px;
  max-width: min(100%, 680px);
}

.buy-form {
  display: grid;
  gap: 12px;
  width: 100%;
  justify-items: center;
}

.buy-form label {
  font-size: 13.5px;
  color: var(--muted);
  justify-self: start;
}

.buy-form input {
  width: 100%;
  max-width: 360px;
  /* 16px minimum, or iOS Safari zooms the whole page on focus */
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: rgba(5, 7, 15, 0.7);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 12px 14px;
}

.buy-form input:focus-visible {
  outline: none;
  border-color: var(--stroke-bright);
  box-shadow: 0 0 0 3px rgba(120, 160, 255, 0.22);
}

.buy-crypto .buy-form {
  max-width: 420px;
  margin-inline: auto;
}

.buy-providers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.buy-status {
  margin-top: 20px;
  font-size: 15px;
  color: var(--muted);
  min-height: 1.4em;
}

.buy-status[data-kind="wait"]  { color: var(--cyan); }
.buy-status[data-kind="warn"]  { color: #ffc98a; }

.buy-done {
  margin-top: 26px;
  margin-inline: auto;
  max-width: 580px;
  background: var(--panel);
  border: 1px solid var(--stroke-bright);
  border-radius: 14px;
  padding: 24px;
  width: 100%;
}

.buy-done h3 { color: var(--green); margin-bottom: 14px; }

.buy-key code {
  display: inline-block;
  /* A licence key is read aloud and typed in by hand, so it gets room and a
     font where 8 and B are not the same shape. */
  font-family: 'Cascadia Mono', Consolas, 'SFMono-Regular', ui-monospace, monospace;
  font-size: clamp(15px, 4.4vw, 21px);
  letter-spacing: 0.06em;
  background: rgba(5, 7, 15, 0.75);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  /* so it can be selected in one swipe on a phone */
  user-select: all;
  /* normal, not break-all: script.js puts a <wbr> after each dash, so the key
     wraps between groups and never through the middle of one. The longest
     unbreakable run is six characters, so it cannot overflow either. */
  word-break: normal;
  overflow-wrap: normal;
}

@media (max-width: 560px) {
  .buy-crypto { padding: 18px 14px; }
  .buy-providers .btn { width: 100%; }
}

/* The returning buyer's key box: a licence is the download, so it sits under
   the payment methods rather than hiding in a support page somewhere. */
.buy-again {
  margin-top: 30px;
  margin-inline: auto;
  max-width: 680px;
  padding-top: 26px;
  border-top: 1px solid var(--stroke);
}

.buy-again label {
  justify-self: center;
  text-align: center;
}

.buy-again input {
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The link to the shop, shown only on a mirror that cannot take a payment. */
.buy-note a { color: var(--cyan); }
