/* LimitlessMind — shared base styles (tokens, reset, type, chrome, controls, utilities)
 * Fonts: Sora (headings) / Figtree (body) / IBM Plex Mono (prices). Light + dark via prefers-color-scheme.
 * Breakpoints: 640 / 900 / 1200. Container max 1200px, 20px side padding.
 */
@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&family=Figtree:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

/* ---------- tokens ---------- */
:root {
  --bg: #F6F8F6; --surface: #FFFFFF; --ink: #17221D; --muted: #5D6C64;
  --accent: #0B6E54; --accent-ink: #FFFFFF; --accent-soft: #E3F0EA; --accent-hover: #095B45;
  --line: #E1E7E2; --line-strong: #C9D3CC; --warn: #9C4A00; --danger: #B3261E; --danger-soft: #FBE9E7;
  --shadow: 0 8px 28px rgba(23, 34, 29, .09); --shadow-sm: 0 2px 8px rgba(23, 34, 29, .06);
  --radius: 10px; --radius-sm: 8px; --radius-pill: 999px;
  --font-head: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --header-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1412; --surface: #151D19; --ink: #E7EEE9; --muted: #94A39B;
    --accent: #43C298; --accent-ink: #0B1A14; --accent-soft: #1B2A24; --accent-hover: #5CD1AA;
    --line: #233029; --line-strong: #33443B; --warn: #F0A868; --danger: #F2B8B5; --danger-soft: #3A1D1B;
    --shadow: 0 8px 28px rgba(0, 0, 0, .4); --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1412; --surface: #151D19; --ink: #E7EEE9; --muted: #94A39B;
  --accent: #43C298; --accent-ink: #0B1A14; --accent-soft: #1B2A24; --accent-hover: #5CD1AA;
  --line: #233029; --line-strong: #33443B; --warn: #F0A868; --danger: #F2B8B5; --danger-soft: #3A1D1B;
  --shadow: 0 8px 28px rgba(0, 0, 0, .4); --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--font-body); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
body > main { flex: 1; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ---------- typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 18px; font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 1em; }
small, .small { font-size: 13.5px; }
.muted { color: var(--muted); }
.lead { font-size: 18px; color: var(--muted); max-width: 62ch; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mono, .price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.price { font-weight: 500; white-space: nowrap; }
.price--lg { font-size: 22px; font-weight: 600; }
.price--muted { color: var(--muted); font-weight: 400; }
.price-strike { text-decoration: line-through; color: var(--muted); font-weight: 400; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
.section { padding-block: 32px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid { display: grid; gap: 16px; }
@media (max-width: 640px) { .container { padding-inline: 16px; } .section { padding-block: 24px; } }

/* ---------- header ---------- */
.lm-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.lm-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.lm-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.lm-brand__logo { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.lm-brand__word { font-family: var(--font-head); font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.lm-brand__word b { color: var(--accent); }
.lm-nav { display: flex; align-items: center; gap: 4px; }
.lm-nav__link {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-pill);
  color: var(--ink); text-decoration: none; font-weight: 500; position: relative; line-height: 1;
}
.lm-nav__link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lm-nav__link:hover { background: var(--accent-soft); color: var(--accent); }
.lm-nav__link.is-active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.lm-nav__link.is-active:hover { background: var(--accent-hover); color: var(--accent-ink); }
.lm-nav__badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--accent-ink); font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.lm-nav__link.is-active .lm-nav__badge { background: var(--accent-ink); color: var(--accent); }
.lm-nav__badge.is-empty { opacity: .55; }
@media (max-width: 640px) {
  :root { --header-h: 58px; }
  .lm-brand__word { font-size: 18px; }
  .lm-brand__logo { width: 34px; height: 34px; }
  .lm-brand { min-height: 44px; } /* 44px tap target; centred in the 58px bar, no visual change */
  .lm-nav__link { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 10px; min-width: 44px; min-height: 44px; font-size: 12px; border-radius: var(--radius-sm); }
  .lm-nav__link svg { width: 22px; height: 22px; }
  .lm-nav__badge { position: absolute; top: 0; right: 2px; min-width: 18px; height: 18px; font-size: 11px; }
}
@media (max-width: 380px) { .lm-brand__word { display: none; } }

/* ---------- footer ---------- */
.lm-footer { border-top: 1px solid var(--line); margin-top: 48px; color: var(--muted); font-size: 13.5px; }
.lm-footer__inner { padding-block: 26px; text-align: center; }
.lm-footer__inner p { margin: 0 0 6px; }
.lm-footer__disclaimer { color: var(--ink); font-size: 14px; }
.lm-footer__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.lm-footer__fine { font-size: 12.5px; }
@media (max-width: 640px) {
  .lm-footer__meta { flex-direction: column; gap: 4px; }
  .lm-footer__meta [aria-hidden] { display: none; }
  /* 44px tap target for footer links: pad the hit area, pull it back with negative margins so nothing shifts */
  .lm-footer a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding-block: 12px; margin-block: -12px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .05s;
  user-select: none; -webkit-user-select: none;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; }
.btn-danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13.5px; }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary:focus-visible { outline-color: var(--ink); }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field .optional { color: var(--muted); font-weight: 400; }
.input, .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 88px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.field .hint, .hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.field .error, .error { display: block; font-size: 12.5px; color: var(--danger); margin-top: 6px; font-weight: 500; }
.field .error:empty { display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea, .input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.field.invalid label { color: var(--danger); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-weight: 500; }
.choice:hover { border-color: var(--accent); }
.choice.is-selected, .choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin: 0; }

/* qty stepper */
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.qty button { width: 40px; min-height: 40px; border: 0; background: transparent; color: var(--ink); font-size: 18px; font-weight: 600; }
.qty button:hover { background: var(--accent-soft); color: var(--accent); }
.qty button:disabled { opacity: .4; cursor: not-allowed; background: transparent; color: var(--ink); }
.qty input { width: 52px; border: 0; border-inline: 1px solid var(--line); text-align: center; background: transparent; font-family: var(--font-mono); font-variant-numeric: tabular-nums; -moz-appearance: textfield; padding: 0; min-height: 40px; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card--pad { padding: 20px; }
.card--flat { box-shadow: none; }
.card--raised { box-shadow: var(--shadow); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; line-height: 1.6; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.badge--neutral { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge--warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.notice { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.notice--accent { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.notice--warn { border-color: var(--warn); color: var(--warn); }
.notice--danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.table { width: 100%; border-collapse: collapse; }
.table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .r, .r { text-align: right; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- utilities ---------- */
.visually-hidden, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.flex-1 { flex: 1; min-width: 0; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.hide-mobile { } .show-mobile { display: none; }
@media (max-width: 640px) { .hide-mobile { display: none !important; } .show-mobile { display: initial; } }
