/* ==========================================================================
   bringmeback.app
   One hand-written stylesheet. No SCSS, no framework, no build step.

   The values here are ported from the Keep Me Out marketing design system
   (KeepMeOut-Website/src/styles/mk/), but only the Bring Me Back half of it:
   the teal, the phone frame, the card treatment, the type scale. Everything
   that was Keep Me Out chrome — the blue, the site header, the sticky install
   bar, the Play-stats strip, the review wall — is deliberately absent.

   That site sets html{font-size:20px} so 1rem == 20px, which is why its values
   are authored in px. Here the html font-size is left alone and the same px
   values are used directly, so browser zoom and user font settings behave.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  /* surfaces */
  --bg: #151719;
  --bg-deep: #0d0f12;
  --surface: #1c1f24;
  --surface-2: #22262b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* text */
  --ink: #eceded;
  --ink-2: #9ca9b3;
  --ink-3: #8b98a3;

  /* Bring Me Back */
  --bmb: #61d6c3;
  --bmb-soft: #82e9cc;
  --bmb-deep: #2c979d;
  --bmb-grad: linear-gradient(135deg, #82e9cc, #2c979d);
  --bmb-ink: #06201c;
  --glow: rgba(97, 214, 195, 0.14);

  --accent: var(--bmb);
  --focus: #7fc8ff;
  --gold: #ffc93c;

  /* shape */
  --r-xl: 32px;
  --r-lg: 24px;
  --r: 16px;
  --r-sm: 12px;
  --r-pill: 999px;
  --shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85);
}

/* --------------------------------------------------------------------------
   Reset + base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

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

::selection { background: rgba(97, 214, 195, 0.28); color: #fff; }

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

/* Skip link — visible only once focused. */
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--bmb); color: var(--bmb-ink);
  font-size: 15px; font-weight: 700; text-decoration: none;
  transition: top 0.15s ease;
}
.skip:focus { top: 16px; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: 1128px; margin: 0 auto; padding: 0 16px; }
.container-sm { width: 100%; max-width: 944px; margin: 0 auto; padding: 0 16px; }
.container-xs { width: 100%; max-width: 668px; margin: 0 auto; padding: 0 16px; }

@media (min-width: 481px) {
  .container, .container-sm, .container-xs { padding: 0 24px; }
}

.section { padding: 96px 0; position: relative; }
@media (max-width: 820px) { .section { padding: 72px 0; } }
@media (max-width: 640px) { .section { padding: 56px 0; } }

/* A hairline between sections, used sparingly — it is the only divider the
   page has, so the rhythm comes from whitespace rather than boxes. */
.section--ruled { border-top: 1px solid var(--line); }

/* --------------------------------------------------------------------------
   Type scale
   -------------------------------------------------------------------------- */
.h1 {
  font-size: clamp(40px, 5.2vw, 58px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--ink);
}
@media (max-width: 640px) { .h1 { font-size: 38px; line-height: 44px; } }

.h2 {
  font-size: clamp(30px, 3.8vw, 42px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
@media (max-width: 640px) { .h2 { font-size: 30px; line-height: 38px; } }

.h2--sm { font-size: 26px; line-height: 34px; }
@media (max-width: 640px) { .h2--sm { font-size: 24px; line-height: 32px; } }

.h3 { font-size: 22px; line-height: 30px; font-weight: 700; letter-spacing: -0.01em; }
@media (max-width: 640px) { .h3 { font-size: 20px; line-height: 28px; } }

.h3--sm { font-size: 18px; line-height: 26px; font-weight: 700; letter-spacing: -0.01em; }

.lead { font-size: 20px; line-height: 32px; color: var(--ink-2); }
@media (max-width: 640px) { .lead { font-size: 18px; line-height: 28px; } }

.body { font-size: 17px; line-height: 28px; color: var(--ink-2); }
@media (max-width: 640px) { .body { font-size: 16px; line-height: 26px; } }

.body--sm { font-size: 16px; line-height: 26px; color: var(--ink-2); }

.micro { font-size: 14px; line-height: 22px; font-weight: 500; color: var(--ink-3); }

.eyebrow {
  display: block;
  font-size: 13px; line-height: 20px;
  font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.textlink {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.textlink:hover { text-decoration-thickness: 2px; }

/* --------------------------------------------------------------------------
   Pills
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 12px; line-height: 20px; font-weight: 700;
  letter-spacing: 0.01em; white-space: nowrap;
}
.pill--free { background: rgba(97, 214, 195, 0.14); color: var(--bmb); }
.pill--premium { background: rgba(255, 201, 60, 0.14); color: var(--gold); }
.pill--platform { background: rgba(255, 255, 255, 0.06); color: var(--ink-2); }
.pill--new { background: var(--bmb); color: var(--bmb-ink); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)) var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  overflow: hidden;
}
@media (max-width: 640px) { .card { padding: 22px; border-radius: var(--r); } }

/* The corner glow that gives every card on the teal side its depth. */
.card--glow::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at 0% 0%, var(--glow), transparent 70%);
  pointer-events: none;
}
.card > * { position: relative; }

/* --------------------------------------------------------------------------
   Buttons + store badges
   -------------------------------------------------------------------------- */
.badges {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center;
}
.badge {
  display: inline-block;
  border-radius: 10px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.badge:hover { transform: translateY(-2px); }
.badge img { height: 54px; width: auto; }
@media (max-width: 640px) { .badge img { height: 48px; } }

/* --------------------------------------------------------------------------
   Phone frame
   Deliberately generic: no notch, no side buttons, nothing Apple-shaped.
   The elliptical radii are what make it read as a phone at any width.
   -------------------------------------------------------------------------- */
.phone { position: relative; width: var(--phone-w, 240px); max-width: 100%; }
.phone img { width: 100%; height: auto; border-radius: 10.5% / 5.2%; }
.phone--framed {
  padding: 3%;
  border-radius: 13% / 6.5%;
  background: linear-gradient(150deg, #2b3037, #0b0d10 60%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    var(--shadow);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 104px 0 88px;
  overflow: hidden;
}
@media (max-width: 820px) { .hero { padding: 72px 0 64px; } }

/* Two soft teal washes. They are the only "art" above the fold: the product
   shot is deliberately held back until the section below. */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(520px circle at 72% 38%, rgba(97, 214, 195, 0.20), transparent 70%),
    radial-gradient(620px circle at 8% 78%, rgba(44, 151, 157, 0.16), transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
}

.hero__lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.hero__lockup img { width: 56px; height: 56px; border-radius: 13px; }
.hero__wordmark { font-size: 21px; line-height: 28px; font-weight: 800; letter-spacing: -0.02em; }

.hero h1 { margin-bottom: 20px; }
.hero__sub { margin-bottom: 32px; max-width: 30em; }
.hero .badges { margin-bottom: 18px; }
.hero__meta { margin-bottom: 20px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* --------------------------------------------------------------------------
   The breathing ring — the page's signature.
   Runs the app's real 4-7-8 cadence. main.js drives the numeral and the phase
   word; the ring itself is scaled from JS so the timing is one source of truth.
   -------------------------------------------------------------------------- */
.breath {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: min(380px, 78vw);
  margin: 0 auto;
}
.breath__ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(97, 214, 195, 0.28);
  background: radial-gradient(circle at 50% 50%, rgba(97, 214, 195, 0.10), transparent 62%);
  transform: scale(0.88);
  will-change: transform;
}
.breath__ring--2 {
  inset: 12%;
  border-color: rgba(97, 214, 195, 0.18);
  background: none;
}
.breath__core { position: relative; text-align: center; }
.breath__count {
  display: block;
  font-size: 64px; line-height: 1; font-weight: 200;
  letter-spacing: -0.03em;
  color: var(--bmb);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) { .breath__count { font-size: 52px; } }
.breath__phase {
  display: block;
  margin-top: 12px;
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink-2);
}
.breath__note {
  margin-top: 26px;
  text-align: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.breath__note.is-shown { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .breath__ring { transform: scale(1); }
}

/* --------------------------------------------------------------------------
   Two-phone fan (the "what opens instead" section)
   -------------------------------------------------------------------------- */
.fan {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
}
@media (max-width: 640px) { .fan { min-height: 460px; } }

/* The teal disc the phones sit on. */
.fan::before {
  content: "";
  position: absolute;
  width: min(420px, 82vw); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(97, 214, 195, 0.16), transparent 68%);
}
.fan__phone { position: absolute; }
.fan__phone--back {
  --phone-w: 210px;
  transform: translate(84px, -26px) rotate(7deg);
  opacity: 0.72;
}
.fan__phone--front { --phone-w: 260px; transform: translate(-46px, 20px) rotate(-3deg); }
@media (max-width: 640px) {
  .fan__phone--back { --phone-w: 160px; transform: translate(74px, -34px) rotate(7deg); }
  .fan__phone--front { --phone-w: 210px; transform: translate(-34px, 16px) rotate(-3deg); }
}

/* Overlapping pair used by the patterns section. */
.stack { position: relative; display: grid; place-items: center; min-height: 520px; }
@media (max-width: 640px) { .stack { min-height: 430px; } }
.stack__phone { position: absolute; }
.stack__phone--back {
  --phone-w: 200px;
  transform: translate(-96px, -14px) rotate(-5deg);
  opacity: 0.66;
}
.stack__phone--front { --phone-w: 224px; transform: translate(52px, 16px) rotate(3deg); }
@media (max-width: 720px) {
  .stack__phone--back { display: none; }
  .stack__phone--front { --phone-w: 230px; transform: none; }
}

/* --------------------------------------------------------------------------
   Generic two-column split
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 44px; } }
.split--reverse > :first-child { order: 2; }
@media (max-width: 900px) { .split--reverse > :first-child { order: 0; } }

.head { margin-bottom: 40px; }
.head .h2 { margin-bottom: 16px; }
.head--center { text-align: center; max-width: 34em; margin-left: auto; margin-right: auto; }

/* --------------------------------------------------------------------------
   The question section — one sentence, nothing else.
   -------------------------------------------------------------------------- */
.question { text-align: center; padding: 128px 0; }
@media (max-width: 640px) { .question { padding: 88px 0; } }
.question__q {
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: 28px;
}
.question__q em {
  font-style: normal;
  background: var(--bmb-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
@media (forced-colors: active) {
  .question__q em { background: none; color: CanvasText; -webkit-text-fill-color: CanvasText; }
}

/* --------------------------------------------------------------------------
   Feature rows ("everything else, briefly")
   -------------------------------------------------------------------------- */
.rows { display: grid; gap: 0; }
.row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row__icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(97, 214, 195, 0.12);
  color: var(--bmb);
  flex: none;
}
.row__icon svg { width: 21px; height: 21px; }
.row__title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-bottom: 6px;
}

/* Free / Premium pause lists */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 720px) { .tiers { grid-template-columns: 1fr; gap: 22px; } }
.tier__label { margin-bottom: 16px; }
.tier__list { display: grid; gap: 12px; }
.tier__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 16px; line-height: 26px;
}
.tier__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bmb); transform: translateY(-3px);
}
.tier--premium .tier__dot { background: var(--gold); }
.tier__name { color: var(--ink); font-weight: 600; }
.tier__time { color: var(--ink-3); font-size: 14px; }

/* --------------------------------------------------------------------------
   Setup columns
   -------------------------------------------------------------------------- */
.setup { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 820px) { .setup { grid-template-columns: 1fr; } }
.setup__steps { display: grid; gap: 16px; margin-top: 18px; counter-reset: s; }
.setup__step {
  display: grid; grid-template-columns: auto 1fr; gap: 14px;
  font-size: 16px; line-height: 26px; color: var(--ink-2);
}
.setup__n {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(97, 214, 195, 0.12);
  color: var(--bmb);
  font-size: 13px; font-weight: 700;
}

/* --------------------------------------------------------------------------
   Limits — the honesty section. No cards, no glow, nothing decorative.
   -------------------------------------------------------------------------- */
.limits { display: grid; }
.limit {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.limit:last-child { border-bottom: 1px solid var(--line); }
.limit__title { margin-bottom: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Keep Me Out mention — deliberately subordinate.
   -------------------------------------------------------------------------- */
.pair { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
@media (max-width: 720px) { .pair { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Final CTA
   -------------------------------------------------------------------------- */
.final__panel {
  position: relative;
  background: var(--bg-deep);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  padding: 72px 48px;
  text-align: center;
  overflow: hidden;
}
@media (max-width: 640px) { .final__panel { padding: 48px 24px; border-radius: var(--r-lg); } }
.final__panel::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(600px circle at 50% 0%, rgba(97, 214, 195, 0.22), transparent 70%);
  pointer-events: none;
}
.final__panel > * { position: relative; }
.final__panel .h2 { margin-bottom: 16px; }
.final__panel .lead { margin-bottom: 32px; }
.final__panel .badges { justify-content: center; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
}
.footer__inner {
  display: flex; flex-wrap: wrap; gap: 16px 28px;
  align-items: center; justify-content: space-between;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer a { color: var(--ink-3); text-decoration: none; font-size: 14px; font-weight: 500; }
.footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* --------------------------------------------------------------------------
   Scroll reveal
   Opt-in, one-shot, and entirely skipped when the visitor prefers less motion
   (the .reveal class is only applied by main.js in that case — see below).
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
  }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Long-form pages (privacy, support)
   -------------------------------------------------------------------------- */
.doc { padding: 72px 0 96px; }
.doc__back { margin-bottom: 32px; display: inline-block; font-size: 14px; font-weight: 600; color: var(--ink-3); text-decoration: none; }
.doc__back:hover { color: var(--ink); }
.doc h1 { font-size: clamp(34px, 4.4vw, 46px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.doc__meta { color: var(--ink-3); font-size: 14px; margin-bottom: 48px; }
.doc h2 {
  font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.doc h3 { font-size: 18px; line-height: 26px; font-weight: 700; margin: 28px 0 10px; }
.doc p, .doc li { font-size: 16px; line-height: 27px; color: var(--ink-2); }
.doc p { margin-bottom: 16px; }
.doc ul { margin: 0 0 20px; }
/* The bullet is positioned rather than laid out as a grid/flex item, so that
   inline content inside the <li> — <strong>, links, plain text — stays in one
   continuous text flow. A grid here would promote every child element AND every
   bare text node to its own grid item and shatter the sentence. */
.doc ul li { position: relative; padding-left: 20px; }
.doc ul li + li { margin-top: 10px; }
.doc ul li::before {
  content: "";
  position: absolute; left: 0; top: 11px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--bmb);
}
.doc strong { color: var(--ink); font-weight: 600; }
.doc table {
  width: 100%; border-collapse: collapse; margin: 0 0 24px;
  font-size: 15px; line-height: 24px;
}
.doc th, .doc td {
  text-align: left; padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}
.doc th {
  color: var(--ink-3); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.doc__callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bmb);
  border-radius: var(--r-sm);
  padding: 20px 22px;
  margin: 0 0 24px;
}
.doc__callout p:last-child { margin-bottom: 0; }

/* Details / summary — used by the support page FAQ. */
.qa { border-top: 1px solid var(--line); }
.qa:last-of-type { border-bottom: 1px solid var(--line); }
.qa summary {
  cursor: pointer; list-style: none;
  padding: 20px 40px 20px 0;
  position: relative;
  font-size: 17px; line-height: 26px; font-weight: 600; color: var(--ink);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--bmb);
}
.qa[open] summary::after { content: "\2212"; }
.qa__body { padding: 0 0 22px; }
.qa__body p:last-child { margin-bottom: 0; }

/* 404 */
.notfound { min-height: 72vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
