/* ─────────────────────────────────────────────────────────────
   Tare website — styles
   Brand: scientific, anti-bullshit, AU-native, editorial, restrained.
   Colour tokens mirror the canonical Luminous palette in
   src-tare/theme/tokens.ts (May 2026 palette harmonisation) so app
   + site feel like one product. See docs/design/UI_DESIGN_SPEC.md.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Surface (Luminous) */
  --bg: #F8F9FA;
  --surface: #FFFFFF;
  --surface-raised: #F3F4F5;
  --surface-high: #E7E8E9;
  --border: #C5C6CD;
  --border-strong: #75777D;

  /* Text */
  --text-primary: #191C1D;
  --text-secondary: #45474C;
  --text-muted: #75777D;
  --text-subtle: #75777D;

  /* Anchor — single neutral chrome colour. Not a brand hue. */
  --primary: #091426;
  --on-primary: #FFFFFF;
  /* Aliases kept for backwards-compat with existing rules */
  --slate: #091426;
  --slate-dark: #091426;

  /* Accent well — five hues at equal perceptual lightness.
     Verdicts and retailers alias these; nothing else does. */
  --accent-red: #B47276;
  --accent-amber: #A38959;
  --accent-green: #5E9880;
  --accent-blue: #6B83AC;
  --accent-mint: #5E9C8E;

  /* Semantic aliases (= accent well) */
  --success: var(--accent-green);
  --warning: var(--accent-amber);
  --danger: var(--accent-red);

  /* Retailer marks — IGA is amber, not red (would collide with Coles) */
  --coles: var(--accent-red);
  --woolworths: var(--accent-green);
  --aldi: var(--accent-blue);
  --iga: var(--accent-amber);

  /* Verdict pills — filled, per canonical-preview.html (Luminous) */
  --buy-bg: var(--accent-green);
  --buy-fg: #FFFFFF;
  --ok-bg: var(--surface-high);
  --ok-fg: var(--text-secondary);
  --wait-bg: var(--accent-amber);
  --wait-fg: #FFFFFF;
  --over-bg: var(--accent-red);
  --over-fg: #FFFFFF;

  /* Geometry — radius scale from tokens.ts */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* Type */
  --font: 'DM Sans', -apple-system, 'SF Pro Rounded', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--slate); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 700; }

.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;
}

/* ── Masthead ───────────────────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 32px;
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--slate-dark); font-weight: 800;
}
.brand-mark {
  font-family: 'DM Sans', monospace; font-weight: 700; font-size: 13px;
  letter-spacing: 0.02em;
  background: var(--slate-dark); color: #fff;
  padding: 4px 8px; border-radius: 6px;
}
.brand-name { font-size: 18px; letter-spacing: -0.01em; }
.masthead-nav { display: flex; align-items: center; gap: 28px; }
.masthead-nav a:not(.cta) { color: var(--text-secondary); font-weight: 500; font-size: 14px; }
.mobile-menu { display: none; }
.mobile-menu summary {
  width: 42px; height: 42px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  cursor: pointer;
  list-style: none;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary span {
  width: 16px; height: 2px;
  background: var(--slate-dark);
  border-radius: 999px;
}
.mobile-menu nav {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  display: grid;
  gap: 4px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 44px rgba(9, 20, 38, 0.14);
}
.mobile-menu nav a {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
}
.mobile-menu nav a:hover {
  background: var(--surface-raised);
  text-decoration: none;
}

/* ── CTAs ───────────────────────────────────────────────────── */
.cta {
  display: inline-block;
  background: var(--slate-dark); color: #fff;
  font-weight: 700; font-size: 16px;
  padding: 14px 24px; border-radius: var(--radius-pill);
  border: 1px solid var(--slate-dark);
  transition: transform 0.12s ease, background 0.12s ease;
}
.cta:hover { background: #1a2540; text-decoration: none; transform: translateY(-1px); }
.cta-ghost {
  background: transparent; color: var(--slate-dark);
  border-color: var(--border-strong);
}
.cta-ghost:hover { background: var(--surface-raised); }
.cta-sm { padding: 8px 14px; font-size: 14px; }

/* Disabled CTA — reserved for unavailable store buttons (not clickable) */
.cta-disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}
.cta-disabled:hover { transform: none; }

.cta-row { display: flex; gap: 14px; margin: 24px 0 12px; flex-wrap: wrap; }
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.trust-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 80px 32px 60px;
  max-width: 920px; margin: 0 auto;
  text-align: left;
}
.eyebrow, .section-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--text-muted); text-transform: uppercase; margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 24px;
}
.lede {
  font-size: 19px; color: var(--text-secondary);
  max-width: 56ch; line-height: 1.55;
  margin: 0 0 8px;
}
.lede-sm {
  font-size: 16px; color: var(--text-secondary);
  max-width: 50ch; margin: 0 0 24px;
}
.meta-line {
  font-size: 13px; color: var(--text-muted); font-weight: 500;
  margin: 16px 0 0;
}

/* ── Content blocks ─────────────────────────────────────────── */
.block {
  max-width: 920px; margin: 0 auto;
  padding: 64px 32px;
  border-top: 1px solid var(--border);
}
.block h1,
.block h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1; letter-spacing: -0.015em;
  font-weight: 800; margin: 0 0 24px;
}
.block p { font-size: 17px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 18px; }
.block h3 {
  font-size: 18px;
  line-height: 1.2;
  margin: 10px 0 8px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.process-step {
  min-height: 190px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.process-step p {
  font-size: 15px;
  margin: 0;
}
.step-index {
  display: inline-flex;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

/* ── Verdict block ──────────────────────────────────────────── */
.verdict-block { background: var(--surface-raised); }
.verdict-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}
.verdict-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}
.verdict-card p { font-size: 15px; margin: 16px 0 0; color: var(--text-primary); }
.verdict-meter {
  height: 8px;
  margin-top: 18px;
  background: var(--surface-high);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.meter-low { width: 22%; background: var(--accent-green); }
.meter-mid { width: 48%; background: var(--border-strong); }
.meter-high { width: 72%; background: var(--accent-amber); }
.meter-over { width: 92%; background: var(--accent-red); }
.verdict-chip {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--radius-pill);
}
.verdict-buy .verdict-chip { background: var(--buy-bg); color: var(--buy-fg); }
.verdict-ok .verdict-chip { background: var(--ok-bg); color: var(--ok-fg); }
.verdict-wait .verdict-chip { background: var(--wait-bg); color: var(--wait-fg); }
.verdict-over .verdict-chip { background: var(--over-bg); color: var(--over-fg); }

/* ── Brief samples ──────────────────────────────────────────── */
.brief-samples {
  list-style: none; padding: 0; margin: 24px 0;
  display: grid; gap: 12px;
}
.brief-samples li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--slate);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 16px; font-weight: 500;
  color: var(--text-primary);
}

/* ── Privacy block ──────────────────────────────────────────── */
.privacy-block { background: var(--slate-dark); }
.privacy-block .section-eyebrow { color: rgba(255,255,255,0.6); }
.privacy-block h2 { color: #fff; }
.privacy-block p { color: rgba(255,255,255,0.85); }
.privacy-block .meta-line { color: rgba(255,255,255,0.55); }
.privacy-block a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.trust-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}
.trust-list li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.85);
}
.trust-list strong {
  color: #fff;
}
.trust-list span {
  color: rgba(255,255,255,0.78);
}

/* ── Coverage / retailer pills ──────────────────────────────── */
.retailer-row {
  display: flex; flex-wrap: wrap; gap: 18px; margin: 16px 0 28px;
}
/* Letter chip + 1.5pt tinted border on surfaceRaised — mirrors the
   app's RetailerMark. Accent border carries identity; letter stays
   neutral text. IGA = amber (off red to clear the Coles collision). */
.retailer-mark { display: inline-flex; align-items: center; gap: 10px; }
.retailer-chip {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--surface-raised);
  border: 1.5px solid var(--rc, var(--border-strong));
  color: var(--text-primary);
  font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
}
.retailer-name { font-size: 15px; font-weight: 600; color: var(--text-secondary); }

/* ── FAQ ────────────────────────────────────────────────────── */
details {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
details summary {
  cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; justify-content: space-between;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '+'; font-size: 22px; font-weight: 400; color: var(--text-muted);
  margin-left: 16px; transition: transform 0.2s ease;
}
details[open] summary::after { content: '−'; }
details p { font-size: 15px; color: var(--text-secondary); margin-top: 12px; }

/* ── Download / waitlist ────────────────────────────────────── */
.download-block {
  max-width: none;
  background: var(--slate);
  color: #fff;
  border-top-color: var(--slate-dark);
  padding: 0;
}
.download-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 72px 32px;
}
.download-block .section-eyebrow { color: rgba(255,255,255,0.6); }
.download-block h2 { color: #fff; }
.download-block p { color: rgba(255,255,255,0.85); }
.download-block .cta {
  background: #fff; color: var(--slate-dark); border-color: #fff;
}
.download-block .cta:hover { background: rgba(255,255,255,0.92); }
.download-block .cta-ghost {
  background: transparent; color: #fff; border-color: rgba(255,255,255,0.4);
}
.download-block .cta-ghost:hover { background: rgba(255,255,255,0.1); }
.store-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 8px;
}
.store-status span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  color: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
}

.waitlist-form {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 8px;
}
.waitlist-form input {
  flex: 1 1 200px; min-width: 0;
  padding: 14px 16px;
  background: #fff; color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-pill);
  font: inherit; font-size: 15px;
}
.waitlist-form input:focus { outline: 2px solid #fff; outline-offset: 1px; }
.waitlist-form button {
  background: var(--slate-dark); color: #fff;
  border: 1px solid var(--slate-dark);
  font-family: inherit; font-weight: 700; font-size: 15px;
  padding: 14px 22px; border-radius: var(--radius-pill);
  cursor: pointer;
}
.waitlist-form button:hover { background: #000; }
.waitlist-form button:disabled { opacity: 0.5; cursor: not-allowed; }
.form-disclaimer {
  font-size: 12px; color: rgba(255,255,255,0.6);
  margin: 4px 0 0;
}
.form-disclaimer.error { color: #FCA5A5; }
.confirmation {
  font-size: 16px; font-weight: 700; color: #fff;
  background: rgba(255,255,255,0.1);
  padding: 18px 22px; border-radius: var(--radius-md);
  margin: 24px 0 0;
}
.confirmation-light {
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
}

.support-form {
  display: grid;
  gap: 12px;
  max-width: 620px;
  margin: 24px 0 8px;
}
.support-form label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.support-form label span {
  font-weight: 500;
  color: var(--text-muted);
}
.support-form input,
.support-form select,
.support-form textarea {
  width: 100%;
  padding: 13px 14px;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 15px;
}
.support-form textarea { resize: vertical; }
.support-form input:focus,
.support-form select:focus,
.support-form textarea:focus {
  outline: 2px solid var(--slate);
  outline-offset: 1px;
}
.support-form button {
  width: fit-content;
  background: var(--slate-dark);
  color: #fff;
  border: 1px solid var(--slate-dark);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 20px;
  cursor: pointer;
}
.support-form button:hover { background: #000; }
.support-form button:disabled { opacity: 0.5; cursor: not-allowed; }
.form-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}
.form-note.error { color: var(--danger); }

/* ── Community invite fallback ─────────────────────────────── */
.invite-hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  border-top: 0;
}
.invite-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(9, 20, 38, 0.08);
  padding: clamp(24px, 4vw, 40px);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--slate-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 32px 32px;
}
.footer-grid {
  max-width: 920px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer-brand { font-weight: 700; color: #fff; margin: 0 0 4px; }
.footer-line { font-size: 14px; color: rgba(255,255,255,0.6); margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: rgba(255,255,255,0.8); font-size: 14px; }
.footer-nav a:hover { color: #fff; }
.footer-social { display: flex; flex-direction: column; gap: 12px; }
.social-link {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 8px 14px; border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.social-link:hover {
  /* Discord blurple */
  background: #5865F2; border-color: #5865F2; color: #fff; text-decoration: none;
}
.social-link svg { flex-shrink: 0; }
.legal-line {
  max-width: 920px; margin: 40px auto 0;
  font-size: 12px; color: rgba(255,255,255,0.58); line-height: 1.55;
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .masthead { padding: 12px 16px; }
  .masthead-nav { gap: 10px; margin-left: auto; }
  .masthead-nav a:not(.cta) { display: none; }
  .masthead-nav .cta { padding: 9px 14px; font-size: 14px; white-space: nowrap; }
  .mobile-menu { display: block; position: relative; }
  .hero, .block { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 48px; padding-bottom: 32px; }
  .block { padding-top: 48px; padding-bottom: 48px; }
  .process-grid { grid-template-columns: 1fr; }
  .process-step { min-height: auto; }
  .verdict-grid { grid-template-columns: 1fr; }
  .trust-list li { grid-template-columns: 1fr; gap: 4px; }
  .download-inner { padding: 56px 20px; }
  .store-status { flex-direction: column; }
  .waitlist-form { flex-direction: column; }
  .waitlist-form input {
    width: 100%;
    flex: 0 0 auto;
    min-height: 52px;
  }
  .waitlist-form button { width: 100%; }
}
