/* ==========================================================================
   LeaderScale — Shared Components
   Every value here comes from tokens.css. No raw hex values below this line.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--green); color: var(--ink);
  padding: 12px 20px; border-radius: 0 0 var(--r-sm) 0;
  font-family: var(--font-display); font-weight: 600;
}
.skip:focus { left: 0; }

/* --- Layout ------------------------------------------------------------ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: calc(var(--section-y) * .62) 0; }

/* --- Typography -------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-heading);
  font-weight: 600;
}
.display { font-size: var(--fs-display); font-weight: 700; letter-spacing: var(--track-display); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }
.lead { color: var(--text-dim); font-size: var(--fs-lead); line-height: 1.55; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--green);
  font-weight: 500;
  display: inline-block;
}
.eyebrow--blue { color: var(--blue); }
.eyebrow--dim  { color: var(--text-dimmer); }

.sec-head { max-width: 60rem; }
.sec-head h2 { margin-top: 14px; }
.sec-head p  { margin-top: 16px; max-width: 62ch; }
.sec-head--center { margin-inline: auto; text-align: center; }

/* --- Buttons and links ------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: .97rem;
  padding: 13px 22px; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.btn--primary { background: var(--green); color: var(--ink); }
.btn--primary:hover { background: var(--green-bright); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--green); color: var(--green); }
.btn--block { width: 100%; justify-content: center; }

.arrow {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--green); font-weight: 600;
  font-family: var(--font-display); font-size: .96rem;
  transition: gap var(--t-base) var(--ease);
}
.arrow:hover { gap: 12px; }
.arrow--blue { color: var(--blue); }

/* --- Signal bar (signature element) ------------------------------------ */
.signal { display: flex; gap: 5px; align-items: center; }
.signal > span {
  height: 7px; border-radius: var(--r-pill); flex: 1;
  background: var(--surface-2); position: relative; overflow: hidden;
}
.signal > span > i {
  position: absolute; inset: 0; border-radius: var(--r-pill);
  transform-origin: left; transform: scaleX(0);
  transition: transform var(--t-signal) var(--ease);
}
.signal.is-lit > span:nth-child(1) > i { background: var(--red);   transform: scaleX(1); transition-delay: .05s; }
.signal.is-lit > span:nth-child(2) > i { background: var(--amber); transform: scaleX(1); transition-delay: .25s; }
.signal.is-lit > span:nth-child(3) > i { background: var(--green); transform: scaleX(1); transition-delay: .45s; }

/* --- Header ------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.18rem; letter-spacing: var(--track-heading);
}
.brand__mark {
  width: 26px; height: 26px; border-radius: 7px; position: relative; flex: none;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  box-shadow: 0 0 0 1px var(--green-edge), var(--shadow-btn);
}
.brand__mark::after {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px;
  height: 3px; border-radius: 2px; background: var(--ink);
  box-shadow: 0 -6px 0 -1px var(--ink), 0 -11px 0 -2px var(--ink);
  opacity: .85;
}
.brand__logo { height: 22px; width: auto; flex: none; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-size: .93rem; color: var(--text-dim); font-weight: 500; transition: color var(--t-fast); }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--text); }
.nav__cta { display: flex; align-items: center; gap: 14px; }
.nav__toggle {
  display: none; background: none; border: 1px solid var(--line-strong);
  color: var(--text); width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
}

/* --- Panels and cards -------------------------------------------------- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 34px;
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 30px;
  transition: transform var(--t-base) var(--ease), border-color var(--t-base);
}
.card__k { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--green); }
.card__k--blue { color: var(--blue); }
.card h4 { font-size: 1.22rem; margin: 13px 0 0; }
.card p { margin-top: 11px; color: var(--text-dim); font-size: .95rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* --- Symptom lists ----------------------------------------------------- */
.symptoms { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.symptoms__cap {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-dimmer);
}
.symptoms ul { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 13px; }
.symptoms li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--text); }
.symptoms li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); margin-top: 8px; flex: none;
  box-shadow: 0 0 0 4px var(--red-wash);
}
.symptoms--green li::before { background: var(--green); box-shadow: 0 0 0 4px var(--green-wash); }

/* --- Testimonials ------------------------------------------------------ */
.quote__text {
  font-family: var(--font-display); font-size: 1.06rem; line-height: 1.45;
  color: var(--text); margin-top: 13px; font-weight: 500;
}
.who { display: flex; align-items: center; gap: 11px; margin-top: 16px; }
.who__av {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--blue), var(--green-deep));
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; color: var(--text); font-size: .9rem;
}
.who b { font-size: .92rem; }
.who span { display: block; color: var(--text-dim); font-size: .8rem; }
/* .who span above was clobbering .who__av's own display:grid, which is why the
   avatar initials sat in the top-left corner instead of centred. Specificity
   collision, exactly the kind CLAUDE.md warns about. This restates the grid at
   a higher specificity. NOTE: this is a real bug in the dark build too, so port
   these two lines back into the dark folder's site.css. */
.who .who__av { display: grid; place-items: center; line-height: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tags span {
  font-family: var(--font-mono); font-size: 11px; color: var(--green);
  background: var(--green-wash); border: 1px solid var(--green-edge);
  border-radius: var(--r-pill); padding: 6px 11px;
}

/* --- Page hero (interior pages) ---------------------------------------- */
.page-hero { position: relative; padding: 76px 0 56px; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; left: 50%; top: -160px;
  width: 900px; height: 560px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--green-wash), transparent 62%);
  pointer-events: none;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { margin-top: 16px; max-width: 17ch; font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; letter-spacing: var(--track-display); }
.page-hero .lead { margin-top: 20px; max-width: 58ch; }
.page-hero__cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

/* --- Forms ------------------------------------------------------------- */
.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dimmer); margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; font-family: var(--font-body); font-size: .95rem;
  transition: border-color var(--t-fast);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: none; }
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dimmer); }
.form-note { font-size: var(--fs-caption); color: var(--text-dimmer); margin-top: 12px; }

/* --- Footer ------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 64px 0 34px; }
.foot-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 34px; }
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { color: var(--text-dim); font-size: .9rem; max-width: 30ch; }
.foot-brand .eyebrow { margin-top: 16px; }
.foot-col h5 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-dimmer); margin-bottom: 15px; font-weight: 600;
}
.foot-col a { display: block; color: var(--text-dim); font-size: .9rem; padding: 5px 0; transition: color var(--t-fast); }
.foot-col a:hover { color: var(--green); }
.foot-bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  flex-wrap: wrap; gap: 14px;
}
.foot-bottom span { color: var(--text-dimmer); font-size: var(--fs-caption); }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--text-dim);
  font-size: .75rem; font-family: var(--font-mono);
}
.socials a:hover { color: var(--green); border-color: var(--green); }
.foot-legal { display: flex; gap: 18px; }
.foot-legal a { color: var(--text-dimmer); font-size: var(--fs-caption); transition: color var(--t-fast); }
.foot-legal a:hover { color: var(--green); }

/* --- CTA band ---------------------------------------------------------- */
.band { position: relative; text-align: center; overflow: hidden; padding: 96px 0; }
.band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 120%, var(--green-wash), transparent 60%);
}
.band .wrap { position: relative; z-index: 1; }
.band h2 { max-width: 20ch; margin: 16px auto 0; }
.band h2 em { font-style: normal; color: var(--green); }
.band p { max-width: 56ch; margin: 20px auto 0; }
.band__cta { margin-top: 30px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.band .signal { max-width: 320px; margin: 32px auto 0; }

/* --- Utilities --------------------------------------------------------- */
.mt-s { margin-top: 14px; }
.mt-m { margin-top: 26px; }
.mt-l { margin-top: 42px; }
.stack-gap { display: grid; gap: 22px; }

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 920px) {
  .nav__links, .nav__cta .btn { display: none; }
  .nav__toggle { display: grid; place-items: center; }
  .nav__links.is-open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 6px;
    background: var(--bg-soft); padding: 18px var(--gutter);
    border-bottom: 1px solid var(--line);
  }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr; }
  .panel, .card { padding: 24px; }
  .band { padding: 68px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .signal > span > i { transform: scaleX(1) !important; }
}
