/* StakeReloadXS canonical design system.
   One stylesheet for every page; mobile-first, fluid, no framework or build step. */
:root {
  --bg: #000;
  --surface: #111;
  --surface-2: #1c1c1c;
  --line: #2b2b2b;
  --text: #f3f4f6;
  --muted: #a3a3a3;
  --accent: #dc2626;
  --accent-strong: #b91c1c;
  --ok: #22c55e;
  --radius: 0.5rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 70rem;
  --header-h: 4rem;
  --tap: 2.75rem; /* 44px minimum touch target */
  --font: Poppins, Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
[hidden] { display: none !important; }
main { flex: 1 0 auto; }
img, svg, video, iframe { max-width: 100%; height: auto; }
iframe { border: 0; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.75rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 6vw + 0.5rem, 4.5rem); font-weight: 600; }
h2 { font-size: clamp(1.625rem, 3vw + 0.75rem, 2.5rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 500; }
p { margin: 0 0 1rem; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.center { text-align: center; }
.skip-link { position: absolute; top: 0; left: 0; z-index: 100; background: var(--accent-strong); color: #fff; padding: 0.75rem 1rem; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.skip-link:focus { clip-path: none; width: auto; height: auto; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Layout */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(2.5rem, 7vw, 5rem); }
.section-head { max-width: 40rem; margin: 0 auto clamp(1.5rem, 4vw, 3rem); text-align: center; }
.grid { display: grid; gap: clamp(1rem, 3vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.stack > * + * { margin-top: 1rem; }

/* Header + navigation */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; min-height: var(--tap); }
.brand img { width: 3rem; height: 3rem; display: block; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap);
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
  color: #fff; cursor: pointer;
}
.nav-toggle svg { width: 1.5rem; height: 1.5rem; }
.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: 0.5rem var(--gutter) 1rem; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.site-nav a { display: flex; align-items: center; min-height: var(--tap); padding: 0 0.25rem; text-decoration: none; border-bottom: 1px solid var(--surface-2); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav .nav-icon { width: 1.125rem; height: 1.125rem; margin-right: 0.5rem; flex-shrink: 0; }

@media (min-width: 56.25em) { /* 900px */
  .nav-toggle { display: none; }
  .site-nav { display: block; position: static; background: none; border: 0; padding: 0; max-height: none; overflow: visible; }
  .site-nav ul { flex-direction: row; gap: clamp(1rem, 2.5vw, 2.25rem); }
  .site-nav a { border: 0; padding: 0; }
}

/* Buttons + forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--tap); padding: 0.65rem 1.5rem;
  border: 0; border-radius: var(--radius);
  background: var(--accent-strong); color: #fff;
  font: inherit; font-weight: 500; text-decoration: none; text-align: center; cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-ghost { background: var(--surface-2); }
.btn-ghost:hover { background: #2a2a2a; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.field { display: block; margin-bottom: 1rem; }
.field > span { display: block; margin-bottom: 0.25rem; }
.input {
  width: 100%; min-height: var(--tap); padding: 0.6rem 0.75rem;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 1rem; /* 16px prevents iOS zoom-on-focus */
}
.input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
textarea.input { resize: vertical; }

/* Cards */
.card { background: var(--surface); border: 1px solid transparent; border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 1.75rem); display: flex; flex-direction: column; text-align: left; min-width: 0; }
.card:hover { border-color: var(--accent); }
.card .btn { margin-top: auto; }
.card p:last-of-type { margin-bottom: 1.5rem; }
.card img.icon { width: 3rem; height: 3rem; margin-bottom: 1rem; }
.price { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 600; margin-bottom: 0.5rem; }
.stat strong { display: block; font-size: 1.75rem; color: var(--accent); }

/* Hero: min-height (never fixed) so short landscape screens never clip content */
.hero {
  position: relative; text-align: center;
  padding-block: clamp(2.5rem, 8vw, 6rem);
  min-height: min(32rem, 85svh);
  display: flex; align-items: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(220, 38, 38, 0.28), transparent 65%), var(--bg);
}
.hero .container { max-width: 56rem; }
.hero .lead { color: var(--muted); font-size: clamp(1rem, 1.5vw + 0.5rem, 1.25rem); max-width: 40rem; margin-inline: auto; }
.hero .btn-row { margin-top: 1.5rem; }
.hero-compact { min-height: 0; }

.media { border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.media img { display: block; width: 100%; }
.video { position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 50rem; margin-inline: auto; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.lines { max-width: 40rem; margin-inline: auto; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.line > :first-child { min-width: 0; flex: 1 1 10rem; }
.qty { display: inline-flex; align-items: center; gap: 0.25rem; }
.qty button { width: var(--tap); height: var(--tap); border: 0; border-radius: var(--radius); background: var(--surface-2); color: #fff; font-size: 1.25rem; cursor: pointer; }
.qty span { min-width: 2rem; text-align: center; }
.total { display: flex; justify-content: space-between; font-size: 1.25rem; padding: 1rem 0; }
.panel { background: var(--surface); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); }
pre.summary { background: var(--surface-2); border-radius: var(--radius); padding: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; font-size: 0.875rem; }
.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.faq details { border-bottom: 1px solid var(--line); padding: 0.75rem 0; }
.faq summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 500; }

/* Footer */
.site-footer { background: var(--surface); margin-top: clamp(2rem, 6vw, 5rem); padding-block: 2.5rem calc(2rem + env(safe-area-inset-bottom)); flex-shrink: 0; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.site-footer h4 { font-size: 1.125rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--muted); text-decoration: none; }
.site-footer li a:hover { color: var(--accent); }
.site-footer .social-icon { width: 1.125rem; height: 1.125rem; margin-right: 0.5rem; flex-shrink: 0; }
.copyright { text-align: center; color: var(--muted); border-top: 1px solid var(--line); margin: 2rem 0 0; padding-top: 1.5rem; font-size: 0.875rem; }

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

/* Policy pages: readable line length and simple tables */
.policy { max-width: 46rem; }
.policy h2 { margin-top: 2rem; font-size: 1.25rem; }
.policy table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.policy th, .policy td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--line); }

/* Expanding help launcher (assets/js/layout.js). Bottom-left keeps clear of the tawk.to bubble. */
.chat-widget { position: fixed; left: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 50; display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 0.5rem; }
.chat-toggle { min-height: var(--tap); min-width: var(--tap); padding: 0 1rem; border: 0; border-radius: 999px; background: var(--accent-strong); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 4px 16px rgb(0 0 0 / 0.4); }
.chat-toggle:hover { background: var(--accent); }
.chat-panel { background: var(--surface); border: 1px solid var(--surface-2); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; width: min(16rem, calc(100vw - 2rem)); box-shadow: 0 8px 24px rgb(0 0 0 / 0.5); }
.chat-panel[hidden] { display: none; }
.chat-lead { margin: 0 0 0.25rem; color: var(--muted); font-size: 0.9rem; }
.chat-panel .btn { width: 100%; justify-content: center; }
.chat-status { margin: 0; color: var(--muted); font-size: 0.85rem; }
.chat-status:empty { display: none; }
