/* =============================================================
   EXCEN — base.css
   Reset, typography, buttons, chips, inputs, shared utilities.
   Mobile-first: base rules target small screens; min-width
   media queries scale up.
   ============================================================= */

*, *::before, *::after { box-sizing: border-box; }

/* overflow-x: clip lives on <html> (the scroll root) — NOT on <body> —
   so it contains the bleeding hero streaks without breaking the
   sticky header (a non-visible overflow on body makes body the sticky
   container and the header scrolls away). */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--ex-font-sans);
  font-size: var(--ex-text-base);
  line-height: var(--ex-lh-normal);
  color: var(--ex-text);
  background: var(--ex-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* .ex-body class raises specificity so the page background always wins,
   even against generic `html, body { background: transparent }` resets. */
body.ex-body { background: var(--ex-white); }

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

/* ---------- HEADINGS ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--ex-font-display);
  color: var(--ex-ink);
  margin: 0;
  letter-spacing: var(--ex-tracking-tight);
  text-wrap: balance;
}
h1 { font-size: var(--ex-text-3xl); font-weight: 700; line-height: var(--ex-lh-tight); }
h2 { font-size: var(--ex-text-2xl); font-weight: 600; line-height: var(--ex-lh-tight); }
h3 { font-size: var(--ex-text-xl); font-weight: 600; line-height: var(--ex-lh-snug); letter-spacing: -0.01em; }
h4 { font-size: var(--ex-text-lg); font-weight: 500; line-height: var(--ex-lh-snug); letter-spacing: 0; }

p { margin: 0 0 var(--ex-space-4); line-height: var(--ex-lh-relaxed); text-wrap: pretty; }
strong, b { color: var(--ex-ink); font-weight: 600; }

/* ---------- LAYOUT HELPERS ---------- */
.ex-container { width: 100%; max-width: var(--ex-content-wide); margin: 0 auto; padding-inline: var(--ex-space-5); }
.ex-narrow { max-width: var(--ex-content-narrow); }

.ex-section { padding-block: var(--ex-space-8); }
@media (min-width: 768px) { .ex-section { padding-block: var(--ex-space-9); } }
.ex-section--tight { padding-block: var(--ex-space-7); }

.ex-section--sand { background: var(--ex-sand); }
.ex-section--mist { background: var(--ex-mist); }
.ex-section--cloud { background: var(--ex-cloud); }
.ex-section--dark {
  background: var(--ex-charcoal);
  color: var(--ex-on-dark);
  position: relative;
  overflow: hidden;
}
.ex-section--dark h1, .ex-section--dark h2, .ex-section--dark h3, .ex-section--dark h4 { color: var(--ex-white); }
.ex-section--dark p { color: var(--ex-on-dark-muted); }
.ex-section--dark strong { color: var(--ex-white); }

/* ---------- EYEBROW + SECTION HEAD ---------- */
.ex-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--ex-space-2);
  font-size: var(--ex-text-xs);
  font-weight: 700;
  letter-spacing: var(--ex-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ex-red);
  margin: 0 0 var(--ex-space-3);
}
.ex-eyebrow::before {
  content: "";
  width: 26px; height: 3px; border-radius: 2px;
  background: var(--ex-gradient);
}
.ex-eyebrow--center { justify-content: center; }
.ex-section--dark .ex-eyebrow { color: var(--ex-orange-light); }

.ex-section-head { max-width: 640px; margin-bottom: var(--ex-space-7); }
.ex-section-head--center { margin-inline: auto; text-align: center; }
.ex-section-head p { font-size: var(--ex-text-md); color: var(--ex-text); margin-bottom: 0; }
.ex-section--dark .ex-section-head p { color: var(--ex-on-dark-muted); }

/* ---------- STREAK MOTIF (echoes the 3 logo streaks) ---------- */
.ex-streaks { display: inline-flex; flex-direction: column; gap: 5px; }
.ex-streaks span { display: block; height: 4px; border-radius: 3px; background: var(--ex-gradient); }
.ex-streaks span:nth-child(1) { width: 44px; }
.ex-streaks span:nth-child(2) { width: 30px; }
.ex-streaks span:nth-child(3) { width: 38px; }

/* ---------- BUTTONS ---------- */
.ex-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ex-space-2);
  font-family: var(--ex-font-sans);
  font-size: var(--ex-text-base);
  font-weight: 600;
  padding: 14px 26px;
  border-radius: var(--ex-radius-pill);
  border: 0;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
  line-height: 1;
}
.ex-btn:active { transform: translateY(1px); }
.ex-btn svg { width: 18px; height: 18px; }

.ex-btn--primary { background: var(--ex-red); color: #fff; box-shadow: 0 10px 24px -12px var(--ex-red); }
.ex-btn--primary:hover { background: var(--ex-red-dark); box-shadow: 0 14px 30px -12px var(--ex-red-dark); }

.ex-btn--gradient { background: var(--ex-gradient); color: #fff; background-size: 140% 100%; box-shadow: 0 12px 28px -12px var(--ex-orange-dark); }
.ex-btn--gradient:hover { background-position: 100% 0; }

.ex-btn--dark { background: var(--ex-ink); color: #fff; }
.ex-btn--dark:hover { background: var(--ex-ink-deep); }

.ex-btn--ghost { background: transparent; color: var(--ex-ink); border: 1.5px solid var(--ex-border); }
.ex-btn--ghost:hover { border-color: var(--ex-red); color: var(--ex-red); }

.ex-btn--ghost-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.45); }
.ex-btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

.ex-btn--lg { padding: 17px 34px; font-size: var(--ex-text-md); }
.ex-btn--block { width: 100%; }

/* ---------- CHIP ---------- */
.ex-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--ex-space-2);
  background: var(--ex-ink);
  color: #fff;
  font-size: var(--ex-text-xs);
  font-weight: 700;
  letter-spacing: var(--ex-tracking-eyebrow);
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: var(--ex-radius-pill);
}
.ex-chip--brand { background: var(--ex-gradient); }
.ex-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ex-orange); }
.ex-chip--brand .ex-chip__dot { background: #fff; }

/* ---------- INPUTS ---------- */
.ex-input, .ex-textarea {
  font-family: var(--ex-font-sans);
  font-size: var(--ex-text-base);
  padding: 13px 18px;
  border-radius: var(--ex-radius);
  border: 1.5px solid var(--ex-border);
  background: var(--ex-white);
  color: var(--ex-ink);
  outline: none;
  width: 100%;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.ex-input { height: 50px; }
.ex-input::placeholder, .ex-textarea::placeholder { color: var(--ex-text-muted); }
.ex-input:focus, .ex-textarea:focus { border-color: var(--ex-red); box-shadow: 0 0 0 4px var(--ex-red-tint); }
.ex-textarea { min-height: 132px; resize: vertical; }
.ex-label { display: block; font-size: var(--ex-text-sm); font-weight: 600; color: var(--ex-ink); margin-bottom: var(--ex-space-2); }
.ex-label .req { color: var(--ex-red); }

/* ---------- CARD ---------- */
.ex-card {
  background: var(--ex-white);
  border-radius: var(--ex-radius-lg);
  border: 1px solid var(--ex-border);
  overflow: hidden;
  transition: box-shadow 220ms ease, transform 220ms ease, border-color 220ms ease;
}
.ex-card:hover { box-shadow: var(--ex-shadow-card-hover); transform: translateY(-4px); border-color: transparent; }

/* ---------- BUTTON GROUP ---------- */
.ex-btn-group { display: flex; flex-wrap: wrap; gap: var(--ex-space-3); }
.ex-btn-group--center { justify-content: center; }

/* ---------- LAYOUT UTILITIES ---------- */
/* lift content above a section's decorative streaks */
.ex-layer-up { position: relative; z-index: 1; }

/* vertical stack */
.ex-stack { display: flex; flex-direction: column; gap: var(--ex-space-7); }
.ex-stack--lg { gap: var(--ex-space-8); }

/* action row below a content block */
.ex-actions { margin-top: var(--ex-space-6); }
.ex-actions--sm { margin-top: var(--ex-space-5); }
.ex-actions--lg { margin-top: var(--ex-space-7); }
.ex-actions--center { text-align: center; }

/* photo that fills a circular avatar (faces pre-cropped centered) */
.ex-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- ACCESSIBILITY ---------- */
.ex-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--ex-orange); outline-offset: 2px; border-radius: 4px; }

/* ---------- REVEAL ON SCROLL ----------
   Content is always visible (no opacity dependency) so it renders
   reliably in every context. The gentle lift only enhances; it
   never hides content. */
.ex-reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .ex-reveal { transform: translateY(16px); transition: transform 600ms cubic-bezier(0.22,1,0.36,1); }
  .ex-reveal.is-in { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
