:root {
  color-scheme: dark;
  --ink: #f6f6f3;
  --muted: #8d8d86;
  --faint: #5e5e58;
  --card: #101010;
  --line: #2a2a28;
  --danger: #ffb4a8;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #000;
}

body {
  min-height: 100dvh;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

button, a, input { -webkit-tap-highlight-color: transparent; }

button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- flashlight ---------- */

html:has(body.page-light) {
  height: 100%;
  background: #000;
}

body.page-light {
  height: 100%;
  overflow: hidden;
  background: radial-gradient(920px 640px at 50% 42%, #1c1c1c 0%, #000 64%);
}

html:has(body.page-light).is-on {
  background: #fff;
  color-scheme: light;
}

html.is-on body.page-light {
  background: #fff;
}

.stage {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  position: relative;
  padding:
    calc(72px + env(safe-area-inset-top))
    24px
    calc(72px + env(safe-area-inset-bottom));
}

html.is-on .stage {
  visibility: hidden;
}

.brand, .domain {
  position: absolute;
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
}

.brand {
  top: calc(28px + env(safe-area-inset-top));
  color: var(--muted);
}

.domain {
  bottom: calc(22px + env(safe-area-inset-bottom));
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: none;
  font-weight: 500;
}

.power {
  width: 196px;
  height: 196px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 50% 42%, #2a2a2a 0%, #0a0a0a 68%);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow:
    0 0 0 10px rgba(255, 255, 255, 0.03),
    0 30px 80px rgba(0, 0, 0, 0.45);
  transition: transform 120ms ease, background 120ms ease;
}

.power svg {
  width: 64px;
  height: 64px;
}

.power:hover { transform: scale(1.02); }
.power:active { transform: scale(0.96); }

@media (prefers-reduced-motion: no-preference) {
  .power {
    animation: idle 3.6s ease-in-out infinite;
  }
  .power:hover, .power:active { animation: none; }
}

@keyframes idle {
  50% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0.045), 0 30px 80px rgba(0, 0, 0, 0.45); }
}

.free, .plan, .notice {
  margin: 0;
  text-align: center;
}

.free {
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.plan, .notice {
  font-size: 13px;
  color: var(--muted);
  max-width: 260px;
}

.notice { color: #fff; }

.off-btn {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.off-btn[hidden] { display: none; }

html.sheet-open .off-btn {
  opacity: 0;
  pointer-events: none;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  background: rgba(255, 255, 255, 0.28);
}

.sheet[hidden] { display: none; }

.card {
  background: var(--card);
  color: #fff;
  border-radius: 28px 28px 0 0;
  padding: 28px 22px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 80px rgba(0, 0, 0, 0.18);
}

@media (prefers-reduced-motion: no-preference) {
  .card { animation: rise 320ms cubic-bezier(0.2, 0.8, 0.2, 1); }
}

@keyframes rise {
  from { transform: translateY(24px); opacity: 0.4; }
}

.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card h2 {
  margin: 0;
  font-size: 64px;
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-weight: 560;
}

.card h2 span {
  font-size: 18px;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 550;
  margin-left: 4px;
}

.pitch {
  margin: 14px 0 22px;
  color: #c8c8c2;
  font-size: 16px;
  line-height: 1.45;
  max-width: 28ch;
}

.pay, .checkout button[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  border: 0;
  cursor: pointer;
}

.pay:active, .checkout button[type="submit"]:active { transform: scale(0.99); }

.gateway-name {
  margin: 10px 0 0;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ghost {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: transparent;
  border: 0;
  color: #bdbdb6;
  min-height: 44px;
  cursor: pointer;
}

@media (min-width: 720px) {
  .sheet {
    align-items: center;
    justify-items: center;
    background: rgba(255, 255, 255, 0.62);
  }
  .card {
    width: min(420px, calc(100% - 48px));
    border-radius: 28px;
    padding: 32px 28px 22px;
  }
}

/* ---------- payment gateway ---------- */

body.page-gate {
  background: #070707;
  color: var(--ink);
}

.gate {
  width: min(440px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 0 calc(36px + env(safe-area-inset-bottom));
}

.gate-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.wordmark {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.04em;
  font-weight: 650;
}

.mode {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d6ff86;
  border: 1px solid #314010;
  background: #141a0c;
  border-radius: 999px;
  padding: 5px 8px;
}

.amount {
  margin: 0;
  font-size: clamp(56px, 16vw, 76px);
  line-height: 0.88;
  letter-spacing: -0.06em;
  font-weight: 560;
}

.per {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.line span { color: var(--muted); }

.checkout { margin-top: 22px; display: grid; gap: 12px; }

label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input {
  width: 100%;
  background: #101010;
  border: 1px solid #2c2c2a;
  border-radius: 12px;
  padding: 14px 12px;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #fff;
}

input:focus {
  border-color: #fff;
  outline: none;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.error {
  margin: 0;
  min-height: 1.2em;
  color: var(--danger);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.fine {
  margin: 14px 0 0;
  color: #9a9a94;
  font-size: 12px;
  line-height: 1.45;
}

.receipt { display: grid; gap: 8px; }
.receipt[hidden] { display: none; }

.receipt h2 {
  margin: 8px 0 0;
  font-size: 36px;
  letter-spacing: -0.04em;
}

.receipt p { margin: 0; color: #c8c8c2; line-height: 1.45; }

.receipt a {
  margin-top: 12px;
}

.back {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.back:hover { color: #fff; }
