/* Resist — shared theme for every public page.
   Mirrors the app: deep forest green in dark mode (the default), soft mint in
   light mode. Follows the visitor's system setting.
   Page layouts live in site.css (sub-pages) and inline in resist.html. */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/poppins-700.woff2") format("woff2"); }

/* ---------- Dark (default) ---------- */
:root {
  color-scheme: dark;

  /* Page */
  --bg: #081b14;
  --bg-deep: #06140e;
  --bg-glow: #0b2c1c;
  --bg-grad:
    radial-gradient(120% 70% at 50% 115%, rgba(22, 92, 52, 0.55), transparent 60%),
    linear-gradient(180deg, #081b14 0%, #08201a 55%, #072618 100%);

  /* Text */
  --fg: #eef5ef;
  --fg-soft: #c9d6cb;
  --muted: #899b8c;

  /* Surfaces */
  --surface: #12271f;
  --surface-2: #0f221a;
  --surface-hi: #173027;
  --well: #04140d;          /* sunken tracks, segmented-control backgrounds */
  --stroke: rgba(255, 255, 255, 0.06);
  --stroke-strong: rgba(255, 255, 255, 0.12);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.65), 0 4px 12px -6px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 30px 70px -24px rgba(0, 0, 0, 0.75), 0 12px 28px -14px rgba(0, 0, 0, 0.6);
  --shadow-phone: 0 50px 90px -30px rgba(0, 0, 0, 0.85), 0 20px 40px -20px rgba(0, 0, 0, 0.6);

  /* Accent */
  --accent: #57c176;            /* fills, bars, dots */
  --accent-text: #86d69b;       /* green text on dark */
  --accent-grad: linear-gradient(180deg, #6fd08b 0%, #48b86c 55%, #3daa61 100%);
  --accent-grad-hover: linear-gradient(180deg, #7ad895 0%, #52c276 55%, #45b268 100%);
  --on-accent: #082417;
  --accent-soft: rgba(87, 193, 118, 0.14);
  --accent-ring: rgba(87, 193, 118, 0.45);
  --track-off: #1a3025;
  --flame: #f0a35a;

  --danger: #ff8a80;
  --danger-soft: rgba(255, 138, 128, 0.12);

  --phone-bezel: #050c09;
  --shade: #010604;

  --easing: cubic-bezier(.22, .61, .36, 1);
  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Light ---------- */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg: #eff9e9;
    --bg-deep: #e3f2dd;
    --bg-glow: #d2ebd0;
    --bg-grad:
      radial-gradient(120% 70% at 50% 115%, rgba(150, 205, 150, 0.55), transparent 60%),
      linear-gradient(180deg, #f1faeb 0%, #e8f6e3 55%, #dcefd8 100%);

    --fg: #0d2619;
    --fg-soft: #2b4433;
    --muted: #546b59;

    --surface: #fdfefb;
    --surface-2: #f5faf2;
    --surface-hi: #ffffff;
    --well: #dfedde;
    --stroke: rgba(13, 38, 25, 0.07);
    --stroke-strong: rgba(13, 38, 25, 0.14);
    --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 18px 40px -20px rgba(40, 90, 50, 0.28), 0 4px 12px -6px rgba(40, 90, 50, 0.16);
    --shadow-pop: 0 30px 70px -26px rgba(40, 90, 50, 0.4), 0 12px 28px -14px rgba(40, 90, 50, 0.22);
    --shadow-phone: 0 50px 90px -34px rgba(30, 80, 45, 0.5), 0 20px 40px -22px rgba(30, 80, 45, 0.3);

    --accent: #1f9a55;
    --accent-text: #007a3f;
    --accent-grad: linear-gradient(180deg, #0a8f4c 0%, #007f40 55%, #00733a 100%);
    --accent-grad-hover: linear-gradient(180deg, #0d9a52 0%, #038946 55%, #007c3f 100%);
    --on-accent: #ffffff;
    --accent-soft: rgba(0, 122, 63, 0.1);
    --accent-ring: rgba(0, 122, 63, 0.4);
    --track-off: #cce5cd;
    --flame: #c96a1b;

    --danger: #c0392b;
    --danger-soft: rgba(192, 57, 43, 0.08);

    --phone-bezel: #0d1a12;
    --shade: #163322;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  /* Not background-attachment: fixed — it leaves a seam on long pages and
     iOS ignores it. The glow just sits at the bottom of the page instead. */
  background: var(--bg-grad);
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font-family: inherit; }
::selection { background: var(--accent-ring); color: var(--fg); }
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 10px;
}
.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;
}

/* ---------- Shared components ---------- */

/* The app's spaced-out wordmark */
.wordmark {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.42em;
  margin-right: -0.42em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
}
.wordmark:hover { text-decoration: none; color: var(--fg); }

/* Small uppercase label, like "THIS WEEK" / "URGE BANK" in the app */
.label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Soft raised card */
.card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

/* Pill tag, like "LVL 7 · TEMPERED STEEL" */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-text);
  background: var(--well);
  border: 1px solid var(--stroke);
  padding: 7px 14px;
  border-radius: 999px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px;
  border-radius: 999px;
  border: 0;
  background: var(--accent-grad);
  color: var(--on-accent);
  font-family: inherit; font-weight: 600; font-size: 15px;
  letter-spacing: 0.005em;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px var(--accent-ring), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 160ms var(--easing), filter 160ms var(--easing), box-shadow 160ms var(--easing);
}
.btn:hover { background: var(--accent-grad-hover); color: var(--on-accent); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--stroke-strong);
  box-shadow: var(--shadow-card);
}
.btn.ghost:hover { background: var(--surface-hi); color: var(--fg); }
.btn.small { height: 40px; padding: 0 18px; font-size: 14px; }

/* Store buttons */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 22px 0 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--stroke-strong);
  box-shadow: var(--shadow-card);
  color: var(--fg);
  text-decoration: none;
  transition: transform 160ms var(--easing), background 160ms var(--easing), border-color 160ms var(--easing);
}
a.store-btn:hover { background: var(--surface-hi); border-color: var(--accent-ring); text-decoration: none; color: var(--fg); }
a.store-btn:active { transform: scale(0.98); }
.store-btn svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--accent-text); }
.store-btn .lines { display: flex; flex-direction: column; line-height: 1.15; }
.store-btn .lines small { font-size: 11px; font-weight: 500; letter-spacing: 0.06em; color: var(--muted); }
.store-btn .lines span { font-size: 16px; font-weight: 600; }
.store-btn.soon { background: transparent; box-shadow: none; border-style: dashed; color: var(--muted); cursor: default; }
.store-btn.soon svg { color: var(--muted); }
