/* ========================================================================
   Elephant Accountability — Brand Tokens
   Single source of truth for color, typography, and shared component styles.
   Mirrors mockup-sandbox/_shared/tokens.css.
   v0.9 methodology — Updated 2026-05-01.
   ======================================================================== */

:root {
  /* Color palette */
  --ea-teal:        #1A6B7A;  /* Primary brand ink */
  --ea-cream:       #F1ECDD;  /* Page background, headline reverse */
  --ea-ink:         #1A1A1A;  /* Body / heading ink */
  --ea-oxblood:     #8C3A2E;  /* Failure / dispute accent (used sparingly) */
  --ea-paper-light: #F8F4E8;  /* Card / hover surfaces */
  --ea-gray-300:    #C9C5BB;  /* Hairline rules, borders */
  --ea-gray-500:    #3D3D3D;  /* Mono / eyebrow text */
  --ea-ink-soft:    #3D3D3D;  /* De-emphasised body text */
  --ea-ink-muted:   #666666;  /* Placeholder text */

  /* Typography stack */
  --ea-font-serif:  'Source Serif 4', Georgia, serif;
  --ea-font-sans:   'Inter', system-ui, -apple-system, sans-serif;
  --ea-font-mono:   'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Base reset + page chrome */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--ea-cream);
  color: var(--ea-ink);
  font-family: var(--ea-font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--ea-teal);
  color: var(--ea-cream);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ea-teal); }

img, svg { display: block; max-width: 100%; }

/* Typography classes — match the mockup names so direct ports work */
.ea-display-64 {
  font-family: var(--ea-font-serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: clamp(48px, 5vw, 64px);
  line-height: 1.05;
  color: var(--ea-ink);
}
.ea-display-36 {
  font-family: var(--ea-font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
  color: var(--ea-ink);
}
.ea-heading-24 {
  font-family: var(--ea-font-serif);
  font-weight: 600;
  letter-spacing: -0.005em;
  font-size: 24px;
  line-height: 1.2;
  color: var(--ea-ink);
}
.ea-lead-19 {
  font-family: var(--ea-font-serif);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ea-ink-soft);
}
.ea-body-16 {
  font-family: var(--ea-font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ea-ink);
}
.ea-ui-14 {
  font-family: var(--ea-font-sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ea-ink);
}
.ea-mono-12 {
  font-family: var(--ea-font-mono);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ea-gray-500);
}
.ea-eyebrow-11 {
  font-family: var(--ea-font-mono);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ea-gray-500);
}

/* Buttons — square corners, no shadow, institutional restraint */
.ea-button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ea-teal);
  color: var(--ea-cream);
  border: 1px solid var(--ea-teal);
  border-radius: 0;
  font-family: var(--ea-font-sans);
  font-weight: 500;
  font-size: 14px;
  padding: 12px 24px;
  cursor: pointer;
  transition: filter 120ms ease;
  text-decoration: none;
}
.ea-button-primary:hover { filter: brightness(0.88); color: var(--ea-cream); }

.ea-button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--ea-ink);
  border: 1px solid var(--ea-gray-300);
  border-radius: 0;
  font-family: var(--ea-font-sans);
  font-weight: 500;
  font-size: 14px;
  padding: 12px 24px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease;
}
.ea-button-outline:hover { background-color: var(--ea-paper-light); color: var(--ea-ink); }

/* Inputs */
.ea-input {
  border: 1px solid var(--ea-gray-300);
  background-color: var(--ea-paper-light);
  border-radius: 0;
  color: var(--ea-ink);
  font-family: var(--ea-font-mono);
  font-size: 12px;
  padding: 12px 14px;
  width: 100%;
}
.ea-input::placeholder { color: var(--ea-ink-muted); }
.ea-input:focus {
  border-color: var(--ea-teal);
  outline: none;
  box-shadow: none;
}

/* ========================================================================
   Shell — header + footer applied site-wide
   ======================================================================== */

.ea-shell { min-height: 100vh; display: flex; flex-direction: column; }
.ea-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; width: 100%; }

.ea-header {
  border-bottom: 1px solid var(--ea-gray-300);
  background-color: var(--ea-cream);
  position: sticky;
  top: 0;
  z-index: 50;
}
.ea-header-inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.ea-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.ea-lockup:hover { opacity: 0.85; color: inherit; }
.ea-lockup-seal {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--ea-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  background-color: transparent;
}
.ea-lockup-seal img { width: 280%; height: 280%; transform: scale(0.85) translate(1%, -1%); object-fit: none; }
.ea-lockup-text { display: flex; flex-direction: column; gap: 2px; }
.ea-lockup-name {
  font-family: var(--ea-font-serif);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ea-ink);
}
.ea-lockup-sub {
  font-family: var(--ea-font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ea-gray-500);
}

.ea-nav { display: flex; align-items: center; gap: 32px; }
.ea-nav a {
  font-family: var(--ea-font-sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--ea-ink-soft);
  transition: color 120ms ease;
}
.ea-nav a:hover { color: var(--ea-ink); }
.ea-nav a.active { color: var(--ea-teal); font-weight: 500; }
.ea-nav .external::after { content: " ↗"; }

@media (max-width: 720px) {
  .ea-nav { display: none; }
}

.ea-main { flex: 1; }

.ea-footer {
  border-top: 1px solid var(--ea-gray-300);
  background-color: var(--ea-paper-light);
  margin-top: 96px;
}
.ea-footer-inner {
  padding: 48px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}
.ea-footer-brand { display: flex; flex-direction: column; gap: 24px; min-width: 240px; }
.ea-footer-meta { display: flex; flex-direction: column; gap: 4px; }
.ea-footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.ea-footer-col { display: flex; flex-direction: column; gap: 12px; min-width: 180px; }
.ea-footer-col a {
  font-family: var(--ea-font-sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--ea-ink-soft);
}
.ea-footer-col a:hover { color: var(--ea-ink); }

/* ========================================================================
   Layout helpers used across pages (intentionally narrow — not Tailwind)
   ======================================================================== */

.ea-stack-32 > * + * { margin-top: 32px; }
.ea-stack-24 > * + * { margin-top: 24px; }
.ea-stack-16 > * + * { margin-top: 16px; }
.ea-stack-8  > * + * { margin-top: 8px; }

.ea-section { padding: 96px 0; }
.ea-section-tight { padding: 48px 0; }
.ea-rule { border: 0; border-top: 1px solid var(--ea-gray-300); margin: 0; }

.ea-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.ea-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 960px) {
  .ea-grid-3 { grid-template-columns: 1fr; }
  .ea-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .ea-grid-4 { grid-template-columns: 1fr; }
}

/* Tier card used on /get-started */
.ea-tier-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  background-color: var(--ea-cream);
  border: 1px solid var(--ea-gray-300);
  height: 100%;
  justify-content: space-between;
}
.ea-tier-card.inverse {
  background-color: var(--ea-ink);
  color: var(--ea-cream);
  border-color: var(--ea-ink);
  position: relative;
  overflow: hidden;
}
.ea-tier-card.inverse .ea-display-36,
.ea-tier-card.inverse .ea-heading-24,
.ea-tier-card.inverse .ea-body-16,
.ea-tier-card.inverse .ea-ui-14 { color: var(--ea-cream); }
.ea-tier-card.inverse .ea-mono-12 { color: var(--ea-paper-light); }
.ea-tier-card .check { display: inline-block; width: 16px; height: 16px; flex-shrink: 0; margin-top: 4px; }

.ea-tier-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--ea-teal);
  color: var(--ea-cream);
  font-family: var(--ea-font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
}

/* Verified state pill (used in tables and cards) */
.ea-state-listed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ea-font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ea-teal);
  background-color: var(--ea-paper-light);
  border: 1px solid var(--ea-teal);
  padding: 4px 10px;
}

/* Tabular blocks (Index page, Recently Listed) */
.ea-table { width: 100%; border-collapse: collapse; text-align: left; }
.ea-table th {
  font-family: var(--ea-font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ea-gray-500);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ea-gray-300);
}
.ea-table td {
  padding: 16px 0;
  border-bottom: 1px solid var(--ea-gray-300);
}
.ea-table tr:last-child td { border-bottom: 0; }
.ea-table tr:hover { background-color: var(--ea-paper-light); }
.ea-table .right { text-align: right; }

/* Honesty: skip-link + focus rings for keyboard users */
.ea-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background-color: var(--ea-ink);
  color: var(--ea-cream);
  padding: 12px 16px;
  z-index: 100;
}
.ea-skip:focus { left: 16px; top: 16px; color: var(--ea-cream); }

a:focus-visible,
button:focus-visible,
.ea-input:focus-visible {
  outline: 2px solid var(--ea-teal);
  outline-offset: 2px;
}
