/* ───────────────────────────────────────────────────────────
   Fungalscan marketing site - shared tokens & layout
   Mirrors the iOS app: warm off-white, soft cards, iOS blue.
   Light is default; dark via prefers-color-scheme.
   ─────────────────────────────────────────────────────────── */

:root {
  /* verdict tones - constant across themes */
  --safe:        #1FAE5B;
  --safe-soft:   #E4F4EB;
  --caution:     #E89B2C;
  --caution-soft:#FBEFD8;
  --avoid:       #DC3545;
  --avoid-soft:  #FAE2E5;

  /* brand */
  --brand:       #0A84FF;
  --brand-alt:   #5E5CE6;

  /* neutrals - light */
  --bg:          #FAF8F4;
  --bg-2:        #F4F1EA;
  --card:        #FFFFFF;
  --text:        #1C1C1E;
  --muted:       rgba(60,60,67,0.62);
  --subtle:      rgba(60,60,67,0.42);
  --border:      rgba(0,0,0,0.06);
  --divider:     rgba(0,0,0,0.08);
  --fill:        rgba(0,0,0,0.04);
  --fill-strong: rgba(0,0,0,0.08);

  /* shadows */
  --shadow-card:    0 1px 2px rgba(0,0,0,0.04);
  --shadow-feature: 0 14px 36px rgba(0,0,0,0.10);
  --shadow-button:  0 10px 24px rgba(10,132,255,0.30);

  /* type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0E0E10;
    --bg-2:        #2A2A2C;
    --card:        #1C1C1E;
    --text:        #FFFFFF;
    --muted:       rgba(235,235,245,0.62);
    --subtle:      rgba(235,235,245,0.42);
    --border:      rgba(255,255,255,0.06);
    --divider:     rgba(255,255,255,0.08);
    --fill:        rgba(255,255,255,0.06);
    --fill-strong: rgba(255,255,255,0.12);

    --shadow-card:    0 1px 2px rgba(0,0,0,0.3);
    --shadow-feature: 0 14px 36px rgba(0,0,0,0.5);
  }
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* containers */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 22px; }

/* type scale */
h1, h2, h3, h4 { margin: 0; font-weight: 700; color: var(--text); letter-spacing: -0.5px; text-wrap: balance; }
.display    { font-size: clamp(32px, 6.2vw, 64px); line-height: 1.04; letter-spacing: -1.6px; font-weight: 700; }
.display-md { font-size: clamp(28px, 4.4vw, 42px); line-height: 1.08; letter-spacing: -1px;   font-weight: 700; }
.heading    { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.18; letter-spacing: -0.6px; font-weight: 700; }
.heading-sm { font-size: 19px; line-height: 24px; letter-spacing: -0.3px; font-weight: 600; }
.body-lg    { font-size: 17px; line-height: 26px; color: var(--muted); font-weight: 400; letter-spacing: -0.1px; }
.body       { font-size: 15px; line-height: 22px; color: var(--muted); }
.body-emph  { font-size: 15.5px; line-height: 22px; font-weight: 600; letter-spacing: -0.2px; }
.caption    { font-size: 12.5px; line-height: 17px; color: var(--subtle); }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--muted);
}

/* primary button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 16px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.1px;
  border: 0; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .15s;
  font-family: inherit; text-decoration: none;
}
.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: var(--shadow-button);
}
.btn-primary:hover { transform: translateY(-1px); text-decoration: none; }
.btn-ghost {
  background: var(--fill); color: var(--text);
}
.btn-ghost:hover { background: var(--fill-strong); text-decoration: none; }
.btn-sm { padding: 9px 14px; font-size: 13.5px; border-radius: 12px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--text); font-weight: 700; font-size: 16.5px; letter-spacing: -0.4px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--brand);
  display: grid; place-items: center; color: #fff;
  position: relative;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 96px;
  padding: 40px 0 60px;
  background: var(--bg);
}
.site-footer .wrap {
  display: flex; flex-direction: column; gap: 26px;
}
.footer-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.footer-links {
  display: flex; gap: 22px; flex-wrap: wrap;
  font-size: 14px; font-weight: 500;
}
.footer-links a { color: var(--text); opacity: 0.78; }
.footer-disclaimer {
  font-size: 12.5px; line-height: 18px; color: var(--subtle);
  max-width: 760px;
}

/* card primitives */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--shadow-card);
}
.card-lg { border-radius: 24px; padding: 32px; }

/* sections */
section { padding: 80px 0; }
section.tight { padding: 60px 0; }
.section-eyebrow { margin-bottom: 14px; }

/* utility */
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }
.stack-sm > * + * { margin-top: 8px; }
.stack-md > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 28px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.divider { height: 1px; background: var(--divider); margin: 32px 0; border: 0; }

@media (max-width: 720px) {
  section { padding: 56px 0; }
  .card { padding: 22px; border-radius: 20px; }
  .card-lg { padding: 24px; }
  .site-footer { margin-top: 64px; padding: 36px 0 48px; }
}
