/* ══════════════════════════════════════════════════════════════════
   Seen. — base design tokens & shared classes
   Loaded by every public-facing HTML page.
   Page-specific styles live in each page's <style> block.
   ══════════════════════════════════════════════════════════════════ */

:root {
  /* ── COLOR ───────────────────────────────────────── */
  --aubergine:     #2b1640;
  --aubergine-mid: #3a1f54;
  --aubergine-lt:  #4a2d68;
  --gold:          #c9922a;
  --gold-lt:       #fdc33a;
  --gold-text:     #8b6914;  /* accessible gold for text on cream/white (4.72:1) */
  --gold-pale:     #f5e8cc;
  --teal:          #4a8b88;
  --teal-lt:       #7dbcb9;
  --cream:         #faf6f0;
  --cream-mid:     #f2ebe0;
  --cream-dark:    #e8ddd0;
  --text:          #5a4a3a;
  --text-mid:      #5a4a3a;
  --text-light:    #8a7a6a;
  --muted:         #9a8878;

  /* ── TYPE SCALE ──────────────────────────────────── */
  --text-display:     clamp(3rem, 8vw, 6.5rem);
  --text-display-cap: 12rem;
  --text-h1:          clamp(2rem, 4vw, 3rem);
  --text-h2:          clamp(1.4rem, 3vw, 2rem);
  --text-lead:        clamp(1.15rem, 2.5vw, 1.45rem);
  --text-body:        1rem;
  --text-body-sm:     0.88rem;
  --text-label:       0.72rem;

  /* ── LINE HEIGHT ─────────────────────────────────── */
  --lh-tight:     1;
  --lh-heading:   1.2;
  --lh-prose:     1.5;
  --lh-cormorant: 1.75;
  --lh-body:      1.8;

  /* ── LETTER SPACING ──────────────────────────────── */
  --ls-tight:    -0.02em;
  --ls-eyebrow:   0.12em;
  --ls-wide:      0.2em;

  /* ── FONT WEIGHT ─────────────────────────────────── */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semi:     600;

  /* ── BOTTOM NAV ──────────────────────────────────── */
  --bottom-nav-h: 64px;
}

/* ── SECTION UTILITIES — sitewide ── */
.section {
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid var(--cream-dark);
}

.section-h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--text-h1);
  font-weight: var(--fw-light);
  color: var(--aubergine);
  margin-bottom: 2rem;
}

/* ── FOOTER — sitewide ── */
.footer {
  background: var(--aubergine);
  border-top: 1px solid rgba(232,185,106,0.1);
  padding: 40px 48px;
  text-align: center;
}
.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: var(--fw-light);
  color: var(--gold-lt);
  display: block;
  margin-bottom: 10px;
}
.footer-tagline {
  font-size: var(--text-label);
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold-lt); }
.footer-copyright {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.25);
  margin-top: 20px;
  letter-spacing: 0.06em;
}

/* ── BOTTOM NAV — gated section (Profile, Tracker, Account) ──

   Convention: shared components that use a generic element selector
   as their root (`<nav>`, `<header>`, etc.) must explicitly reset
   every property a page-local element selector could declare, even
   properties not currently observed leaking. Future page-level rules
   will leak otherwise. See spec Decision 2 "Defensive CSS reset in
   the shared rule" for full context. The bug that prompted this rule:
   `seen-symptoms.html` carries a generic `nav { position: sticky;
   top: 0 }` declaration; class specificity wins for `position`, but
   `top: 0` cascaded through the bottom-nav rule and dragged the bar
   to the top of the viewport.

   Defensively reset here: top, right, bottom, left, width, margin,
   padding, border (then re-add only the border-top we want). */
.seen-bottom-nav {
  position: fixed;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  width: auto;
  height: var(--bottom-nav-h);
  margin: 0;
  padding: 0;
  background: var(--aubergine);
  border: none;
  border-top: 1px solid rgba(232,185,106,0.15);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.seen-bottom-nav__btn {
  flex: 1;
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  color: rgba(232,185,106,0.4);
  transition: color 0.2s;
  padding: 0;
  font-family: inherit;
}
.seen-bottom-nav__btn svg { width: 20px; height: 20px; }
.seen-bottom-nav__btn-label {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.seen-bottom-nav__btn.is-active { color: var(--gold-lt); }
.seen-bottom-nav__btn.is-disabled,
.seen-bottom-nav__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Desktop hover rollover. Wrapped in (hover: hover) so the state does not
   get stuck on tap on touch devices that emulate hover. Inactive baseline
   alpha is 0.4; mid-state on hover lifts to 0.65. */
@media (hover: hover) {
  .seen-bottom-nav__btn:not(.is-active):not(.is-disabled):not(:disabled):hover {
    color: rgba(232, 185, 106, 0.65);
  }
}

/* Tight viewports: the 6-item Tracker bar (LOG · SAVE · HISTORY · PATTERNS ·
   EXPORT · RESTORE) needs to fit at iPhone SE / 12 mini width. Per spec
   Decision 15, shrink icons 20px to 18px and tighten icon-to-label gap by
   2px (4px to 2px). Label suppression is the secondary fallback if this
   is still insufficient; not yet enabled. */
@media (max-width: 375px) {
  .seen-bottom-nav__btn { gap: 2px; }
  .seen-bottom-nav__btn svg { width: 18px; height: 18px; }
}

/* Screen-reader-only utility */
.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;
}
