/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--orange-deep); box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--blue-deep);
  color: #fff;
}
.btn-secondary:hover { background: var(--blue); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--blue-deep); color: var(--blue-deep); }

.btn-ghost-light {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.22); }

.btn-sm { padding: 0.6rem 1.1rem; font-size: var(--fs-xs); }

/* ---- Signature device: vertical accent bar beside imagery ---- */
.accent-frame {
  position: relative;
  display: inline-block;
}
.accent-frame::before {
  content: '';
  position: absolute;
  top: 14px; bottom: -14px;
  left: -14px;
  width: 10px;
  background: var(--orange);
  z-index: 0;
  border-radius: 3px;
}
.accent-frame.accent-blue::before { background: var(--blue); }
.accent-frame img,
.accent-frame > .accent-frame-media {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: block;
}

/* ---- Cards ---- */
.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--orange-pale);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-4);
  color: var(--orange-deep);
}
.card-icon svg { width: 26px; height: 26px; stroke-width: 1.75; }

/* ---- Badge / pill ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--blue-pale);
  color: var(--blue-deep);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
}

/* ---- Stat ring (donut) ---- */
.stat-ring { position: relative; width: 132px; height: 132px; }
.stat-ring svg { transform: rotate(-90deg); }
.stat-ring-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.stat-ring-fg { fill: none; stroke: var(--orange); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }
.stat-ring-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-lg);
  color: var(--blue-deep);
}
/* On dark sections, the ring track and label need light colors or they
   disappear against the dark background (caught in condition-page QA,
   applies retroactively to homepage stats band too). */
.section-dark .stat-ring-bg { stroke: rgba(255,255,255,0.18); }
.section-dark .stat-ring-label { color: #fff; }

/* ---- Section dividers ---- */
.section { padding: var(--sp-9) 0; }
.section-tight { padding: var(--sp-7) 0; }
.section-alt { background: var(--mist); }
.section-dark {
  background: var(--blue-deep);
  color: rgba(255,255,255,0.92);
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .body-text { color: rgba(255,255,255,0.75); }

.hr-soft {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--sp-7) 0;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex; gap: var(--sp-2); align-items: center;
  font-size: var(--fs-xs); color: var(--ink-soft);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--blue-deep); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb svg { width: 12px; height: 12px; opacity: 0.5; }

/* ---- Reveal-on-scroll ----
   Defaults to visible; JS adds .js-reveal-ready to <html> once it has
   initialized IntersectionObserver, which is what actually arms the
   hidden-until-visible behavior. This way, if JS fails/is disabled,
   content is never stuck invisible. Travel distance and opacity floor
   are kept small (8px / 0.4) so that even mid-transition, or if an
   element never crosses the observer threshold, content stays legible
   rather than appearing as a blank gap. A JS-side safety net also
   force-reveals everything after 1.5s as a backstop. */
.reveal { opacity: 1; transform: none; }
html.js-reveal-ready .reveal {
  opacity: 0.4;
  transform: translateY(8px);
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
html.js-reveal-ready .reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html.js-reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- FAQ accordion ---- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
  background: none; border: none;
  padding: var(--sp-5) 0;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--ink);
}
.faq-q svg { flex-shrink: 0; width: 18px; height: 18px; transition: transform var(--dur-base) var(--ease); stroke: var(--blue-deep); }
.faq-q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-base) var(--ease);
}
.faq-a-inner { padding-bottom: var(--sp-5); color: var(--ink-soft); line-height: 1.7; }

/* ---- Forms ---- */
.field { margin-bottom: var(--sp-4); }
.field label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--sp-2);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  background: #fff;
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue);
}
.field textarea { resize: vertical; min-height: 110px; }

/* ---- Disclaimer / placeholder block ---- */
.disclaimer-block {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: var(--sp-4);
  margin-top: var(--sp-6);
}

.placeholder-block {
  text-align: center;
  padding: var(--sp-9) var(--sp-5);
  background: var(--mist);
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--line-strong);
}
.placeholder-block .h-section { margin-bottom: var(--sp-3); }
