/* ============================================================
 * REEVE SIGN — Shared Components
 * Loaded after tokens.css.
 * Lean by design — only what's used.
 * Sprints add to this file as they need (Codex-reviewed per sprint).
 * Last update: 2026-05-24 (Sprint 0)
 * ============================================================ */

/* ──── RESET / GLOBAL ──── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  /* Floor against horizontal scroll. Any single misbehaving element (a wide
     SVG, a long unbroken email, a poorly-sized hero word) used to push the
     entire page sideways on mobile. `overflow-x: clip` is the modern fix —
     unlike `overflow-x: hidden`, it doesn't break `position: sticky` on the
     nav, and doesn't create a new scroll container. */
  overflow-x: clip;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex; flex-direction: column;
}

button { all: unset; box-sizing: border-box; cursor: pointer; user-select: none; display: inline-flex; align-items: center; }
input, textarea, select { font-family: inherit; outline: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* Honour the HTML `hidden` attribute even when author CSS sets `display:`
   on the same selector. Without this, a rule like `.sg-state { display:
   flex }` overrides the user-agent `[hidden] { display: none }` and the
   element renders even though the markup says hidden. Two-day signer
   "dead box" bug. */
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Used for italic accent words inside serif headings */
.accent {
  font-style: italic;
  color: var(--gold-dark);
}

/* ──── LOGO MARK ──── */
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gold-grad);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
  color: #0D0D0D;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.logo-mark-lg { width: 48px; height: 48px; border-radius: 12px; font-size: 20px; }
.logo-mark-xl { width: 60px; height: 60px; border-radius: 14px; font-size: 25px; }

/* ──── BUTTONS ──── */
.btn {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 13px;
  gap: 8px;
  transition: opacity var(--t-fast), background var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  justify-content: center;
}
.btn-lg { padding: 13px 22px; font-size: 14px; }
.btn[disabled], .btn:disabled { opacity: 0.40; cursor: not-allowed; transform: none !important; }

.btn-mint { background: var(--mint); color: white; }
.btn-mint:hover:not(:disabled) { background: var(--mint-dark); }

.btn-gold { background: var(--gold-grad); color: #0D0D0D; }
.btn-gold:hover:not(:disabled) { opacity: 0.92; }

.btn-dark { background: var(--bg-dark-2); color: white; }
.btn-dark:hover:not(:disabled) { background: var(--bg-dark-hover); }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-default);
}
.btn-outline:hover:not(:disabled) { border-color: var(--text-primary); color: var(--text-primary); }

.btn-ghost { color: var(--text-secondary); background: transparent; padding: 10px 14px; }
.btn-ghost:hover:not(:disabled) { color: var(--text-primary); background: var(--bg-muted); }

/* ──── ICON ──── */
.icon { width: 14px; height: 14px; flex-shrink: 0; }
.icon-sm { width: 12px; height: 12px; }
.icon-lg { width: 16px; height: 16px; }

/* ──── EYEBROW PILL ──── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em;
  font-weight: 700;
  padding: 6px 12px; border-radius: var(--radius-pill);
}
.eyebrow-gold {
  background: var(--gold-faint);
  border: 1px solid rgba(201,168,76,0.30);
  color: var(--gold-dark);
}
.eyebrow-mint {
  background: var(--mint-faint);
  color: var(--mint-dark);
}
.eyebrow-success {
  background: var(--success-bg);
  color: var(--success-text);
}

/* ──── CONTAINERS ──── */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; width: 100%; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; width: 100%; }

/* ──── FOCUS RING (accessibility) ──── */
:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}
button:focus-visible { outline-offset: 3px; }

/* ──── SR-ONLY (accessibility) ──── */
.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;
}

/* ──── SAFE-AREA UTILITIES (iPhone notch / home indicator) ──── */
/* Apply to any sticky top bar: .sg-top, .vf-top, .app-shell-header, etc. */
.safe-pad-top    { padding-top:    env(safe-area-inset-top); }
.safe-pad-bottom { padding-bottom: env(safe-area-inset-bottom); }
.safe-pad-x      { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

/* ──── MOBILE BASELINE ──── */
@media (max-width: 600px) {
  body { font-size: 15px; }
  /* Prevent iOS Safari auto-zoom on input focus (triggers <16px) */
  input, textarea, select {
    font-size: 16px !important;
  }
  /* iOS / WCAG minimum tap target = 44px. Bump every shared .btn on mobile. */
  .btn { min-height: 44px; }
  .btn-lg { min-height: 48px; }
  /* Honour bottom safe-area on the document body so sticky bars + fixed bottom CTAs
     don't sit under the iPhone home indicator. Pages that don't have bottom CTAs
     are unaffected (zero or near-zero inset on most viewports). */
  body { padding-bottom: env(safe-area-inset-bottom); }
}
