/* ============================================================
   Sleevenine Program — Shared Design Foundation: COMPONENTS
   Requires tokens.css. Mobile-first. Adapt per brand; do not
   cargo-cult — elevate, don't clone.
   ============================================================ */

/* ---- Reset-ish ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-600); }
:focus-visible {
  outline: 3px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Layout ---- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - 2.5rem, var(--container-narrow)); margin-inline: auto; }
.section { padding-block: var(--section-pad); }
.section-alt { background: var(--paper-2); }

/* ---- Type ---- */
.display, h1, h2 {
  font-family: var(--font-display);
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-tight);
  text-wrap: balance;
}
.hero-title { font-size: var(--text-hero); margin: 0 0 var(--s6); }
.h1 { font-size: var(--text-h1); margin: 0 0 var(--s4); }
.h2 { font-size: var(--text-h2); margin: 0 0 var(--s4); }
.h3 { font-size: var(--text-h3); font-weight: 650; margin: 0 0 var(--s2); line-height: var(--leading-snug); }
.lead { font-size: var(--text-lead); color: var(--ink-500); max-width: 42rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: var(--text-caption); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand-700); margin-bottom: var(--s4);
}
.eyebrow::before { content: ""; width: 1.5rem; height: 2px; background: var(--brand-600); border-radius: 2px; }
.muted { color: var(--ink-500); }
.small { font-size: var(--text-small); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-weight: 650; font-size: var(--text-body); line-height: 1;
  padding: 0.9rem 1.6rem; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), background var(--dur);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--brand-700); box-shadow: var(--shadow-lg); color: #fff; }
.btn-secondary {
  background: var(--paper); color: var(--ink-900);
  border-color: var(--line); box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--ink-400); color: var(--ink-900); }
.btn-lg { padding: 1.1rem 2.1rem; font-size: 1.0625rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s8); }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); padding-block: var(--s3);
}
.brandmark { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 750; font-size: 1.0625rem; color: var(--ink-950); text-decoration: none; }
.brandmark-mark {
  width: 2rem; height: 2rem; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-600), var(--accent-500));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-size: 1.1rem;
}
.nav-links { display: none; gap: var(--s6); list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-700); text-decoration: none; font-weight: 550; font-size: var(--text-small); }
.nav-links a:hover { color: var(--brand-700); }
@media (min-width: 56rem) { .nav-links { display: flex; } .nav-cta .btn { padding: 0.65rem 1.25rem; font-size: var(--text-small); } }
@media (max-width: 23rem) {
  .nav-inner { flex-wrap: wrap; }
  .nav-cta { width: 100%; }
  .nav-cta .btn { width: 100%; }
}

/* ---- Hero ---- */
.hero { padding-block: clamp(3rem, 2rem + 7vw, 6.5rem) var(--section-pad); position: relative; overflow: clip; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(42rem 26rem at 85% -5%, color-mix(in srgb, var(--brand-600) 10%, transparent), transparent 65%),
    radial-gradient(30rem 20rem at 8% 10%, color-mix(in srgb, var(--accent-500) 8%, transparent), transparent 60%);
}
.hero > .container { position: relative; }
.hero-copy { max-width: 46rem; }
.hero-proof { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); margin-top: var(--s8); padding: 0; list-style: none; }
.hero-proof li { display: flex; align-items: center; gap: var(--s2); font-size: var(--text-small); color: var(--ink-500); font-weight: 550; }
.hero-proof li::before { content: "✓"; color: var(--brand-600); font-weight: 800; }

/* ---- Feature grid ---- */
.grid-3 { display: grid; gap: var(--s6); grid-template-columns: 1fr; margin-top: var(--s8); }
@media (min-width: 56rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--s8);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius-md);
  background: var(--brand-50); color: var(--brand-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.35rem; margin-bottom: var(--s4);
}
.card p { color: var(--ink-500); margin: var(--s2) 0 0; font-size: var(--text-small); }

/* ---- Split / how-it-works ---- */
.steps { display: grid; gap: var(--s6); margin-top: var(--s8); counter-reset: step; }
@media (min-width: 56rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-top: var(--s8); border-top: 2px solid var(--line); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; top: calc(-1 * var(--s2)); left: 0;
  font-family: var(--font-display); font-size: 2.5rem; color: var(--brand-100);
  background: var(--paper); padding-right: var(--s3); line-height: 1;
}
.step p { color: var(--ink-500); font-size: var(--text-small); margin: var(--s2) 0 0; }

/* ---- CTA band ---- */
.cta-band {
  background: linear-gradient(135deg, var(--ink-950), var(--ink-900));
  color: #fff; border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 2rem + 4vw, 4.5rem);
  text-align: center; position: relative; overflow: clip;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(36rem 18rem at 50% -20%, color-mix(in srgb, var(--brand-600) 35%, transparent), transparent 70%);
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; margin: 0 0 var(--s4); font-size: var(--text-h2); }
.cta-band p { color: rgb(255 255 255 / 0.72); max-width: 36rem; margin: 0 auto var(--s6); }
.cta-band .btn-row { justify-content: center; }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--line); padding-block: var(--s12) var(--s8); margin-top: var(--section-pad); }
.footer-grid { display: grid; gap: var(--s8); grid-template-columns: 1fr; }
@media (min-width: 56rem) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer h2 { font-size: var(--text-caption); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-500); margin: 0 0 var(--s3); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.footer a { color: var(--ink-500); text-decoration: none; font-size: var(--text-small); }
.footer a:hover { color: var(--brand-700); }
.footer-base {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); justify-content: space-between;
  margin-top: var(--s12); padding-top: var(--s6); border-top: 1px solid var(--line);
  font-size: var(--text-caption); color: var(--ink-500);
}

/* ---- Utility ---- */
.kicker-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.divider { border: 0; border-top: 1px solid var(--line); margin: var(--s12) 0; }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s6); margin-top: var(--s8); }
@media (min-width: 56rem) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat-num { font-family: var(--font-display); font-size: var(--text-h2); color: var(--ink-950); }
.stat-label { font-size: var(--text-small); color: var(--ink-500); }

/* ============================================================
   Ported directory-page components (Site 8 consolidation).
   The directory pages' chrome and components, formerly split
   across /style.css + /brand-refresh.css + /quick-calculator.css,
   re-tokenized onto the system above. The root layer is retired;
   every page now loads this one system.
   ============================================================ */

/* ---- Directory chrome (header / main / footer elements) ---- */
.site-head, .site-main, .site-foot {
  width: min(100% - 2.5rem, 71.25rem);
  margin-inline: auto;
}
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); padding-block: 1.375rem;
  border-bottom: 1px solid var(--line);
}
.site-head .brand {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-weight: 700; font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem);
  letter-spacing: -0.025em; color: var(--ink-950); text-decoration: none;
}
.brand-glyph { width: 2rem; height: 2rem; flex: 0 0 2rem; }
.site-head nav, .site-foot nav { display: flex; gap: 1.375rem; flex-wrap: wrap; }
.site-head nav a { color: var(--ink-700); text-decoration: none; font-weight: 650; font-size: var(--text-small); }
.site-head nav a:hover { color: var(--brand-700); text-decoration: underline; }
.site-foot {
  border-top: 1px solid var(--line);
  padding-block: var(--s8) var(--s12);
  margin-top: var(--s16);
  color: var(--ink-500); font-size: var(--text-small);
}
.site-foot strong { color: var(--ink-900); font-size: var(--text-body); }
.site-foot nav a { color: var(--ink-500); text-decoration: none; font-weight: 650; }
.site-foot nav a:hover { color: var(--brand-700); text-decoration: underline; }

.skip { position: absolute; top: -80px; left: 0; }
.skip:focus { top: 0; background: #fff; color: #111; padding: 10px; z-index: 100; }

/* ---- Directory hero / sections ---- */
.site-main .hero { padding-block: clamp(2.5rem, 1.5rem + 5vw, 4.5rem) var(--s12); }
.site-main .hero h1 { font-size: var(--text-hero); margin: 0 0 var(--s6); max-width: 16ch; }
.site-main section > h2 { font-size: var(--text-h2); margin: 0 0 var(--s4); }
.facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); margin: 0 0 var(--s12); padding: 0; }
.facts span { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--text-small); font-weight: 550; color: var(--ink-500); }
.facts span::before { content: "\2713"; color: var(--brand-600); font-weight: 800; }
.button {
  display: inline-block; background: var(--brand-700); color: #fff;
  padding: 0.85rem 1.5rem; border: 0; border-radius: var(--radius-pill);
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-md);
}
.button:hover { background: var(--brand-600); color: #fff; }

/* ---- Directory cards ---- */
.cards { display: grid; grid-template-columns: 1fr; gap: var(--s6); margin: var(--s8) 0 var(--s12); }
@media (min-width: 56rem) { .cards { grid-template-columns: repeat(2, 1fr); } }
a.card { display: block; text-decoration: none; color: var(--ink-900); }
a.card > span:first-child {
  font-family: var(--font-mono); font-size: var(--text-caption);
  letter-spacing: 0.06em; color: var(--brand-700); font-weight: 600;
}
a.card h2, a.card h3 { margin: var(--s2) 0; }
a.card > span:last-child { font-weight: 650; font-size: var(--text-small); color: var(--brand-600); }
a.card:hover > span:last-child { color: var(--brand-700); text-decoration: underline; }

/* ---- Prose (directory articles) ---- */
.prose { max-width: 50rem; margin: var(--s12) auto var(--s16); }
.prose h1 { font-size: var(--text-h1); margin: 0 0 var(--s4); }
.prose h2 { font-size: var(--text-h2); margin: var(--s12) 0 var(--s3); }
.prose h3 { font-size: var(--text-h3); margin: var(--s8) 0 var(--s2); }
.prose p, .prose li { max-width: 75ch; }
.prose .lead { margin-bottom: var(--s8); }
[data-related] ul { padding-left: 1.4rem; }
[data-related] li { margin-bottom: var(--s2); }

/* ---- Tool form ---- */
.tool {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.25rem, 1rem + 2vw, 1.75rem);
  margin: var(--s8) 0; box-shadow: var(--shadow-sm);
}
.fields { display: grid; grid-template-columns: 1fr; gap: var(--s4); margin: 0 0 var(--s6); border: 0; padding: 0; }
@media (min-width: 40rem) { .fields { grid-template-columns: 1fr 1fr; } }
.fields label, .tool label { font-size: var(--text-small); font-weight: 650; display: block; }
.tool input[type="number"], .tool input[type="email"], .announce input[type="email"] {
  display: block; width: 100%; margin-top: var(--s2);
  font: inherit; padding: 0.65rem 0.8rem;
  border: 1px solid var(--ink-400); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink-900);
}
.tool input[aria-invalid="true"], .announce input[aria-invalid="true"] { border-color: var(--error); outline: 2px solid var(--error); outline-offset: 1px; }
.tool > button[type="submit"], .announce button[type="submit"] {
  display: inline-block; background: var(--brand-700); color: #fff;
  padding: 0.8rem 1.5rem; border: 0; border-radius: var(--radius-pill);
  font: inherit; font-weight: 650; cursor: pointer; box-shadow: var(--shadow-md);
}
.tool > button[type="submit"]:hover, .announce button[type="submit"]:hover { background: var(--brand-600); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }
.actions [hidden] { display: none !important; }
button.secondary, .btn.secondary {
  background: transparent; color: var(--brand-700);
  border: 1px solid var(--brand-700); border-radius: var(--radius-pill);
  padding: 0.6rem 1.1rem; font: inherit; font-weight: 650; cursor: pointer;
}
button.secondary:hover { background: var(--brand-50); }
.note { font-size: var(--text-small); color: var(--ink-500); }
.print-note { display: none; }

/* ---- Record card (D2): the calculator's designed record ---- */
.record-card {
  border: 1.5px solid var(--ink-900); border-radius: var(--radius-md);
  background: var(--paper); padding: var(--s6); margin-top: var(--s8);
  box-shadow: var(--shadow-sm);
}
.record-kicker {
  font-family: var(--font-mono); font-size: var(--text-caption);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-700);
  margin: 0 0 var(--s3); font-weight: 600;
}
.record-card output {
  display: block; font-family: var(--font-mono); font-size: 1.0625rem;
  line-height: 1.9; white-space: pre-line; color: var(--ink-950);
}
.record-limits {
  border-top: 1px solid var(--line); margin: var(--s4) 0 0; padding-top: var(--s3);
  font-size: var(--text-small); color: var(--ink-500);
}

/* ---- Announcement capture (D3) ---- */
.announce {
  border-top: 2px solid var(--line); margin-top: var(--s12); padding-top: var(--s8);
  max-width: 50rem;
}
.announce h2 { font-size: var(--text-h2); margin: 0 0 var(--s3); }
.announce-form { margin-top: var(--s6); display: grid; gap: var(--s4); max-width: 32rem; }
.announce-consent { display: flex; gap: var(--s3); align-items: flex-start; font-weight: 550; }
.announce-consent input { width: 1.25rem; height: 1.25rem; flex: 0 0 1.25rem; margin-top: 0.2rem; }
.field-error { color: var(--error); font-size: var(--text-small); font-weight: 600; margin: var(--s2) 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.preview-badge {
  display: inline-block; background: #fef3c7; color: #92400e;
  border: 1px solid #f59e0b; border-radius: var(--radius-pill);
  font-size: var(--text-small); font-weight: 700; padding: 0.3rem 0.9rem;
}
.ref-line { font-size: var(--text-lead); }
.ref-line .mono { font-family: var(--font-mono); }
