/* ============================================================
   ColonSmart — Base / shared styles
   ------------------------------------------------------------
   Loaded on every page AFTER tokens.css. Contains the reset,
   typography, buttons, header/nav, footer, and reusable layout
   primitives (.section, .container, .eyebrow, .card grids).
   Page-specific styles live in pages.css.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--navy);
  background: var(--ivory);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* ---- Layout primitives ---- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: var(--s-7) 0; }
.section--tight { padding: var(--s-6) 0; }
.section--mint { background: var(--mint); }
.section--navy { background: var(--navy); color: #fff; }
.section--ivory { background: var(--ivory); }
.center { text-align: center; }
.mw-640 { max-width: 640px; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---- Typography ---- */
h1, h2, h3, h4 { letter-spacing: -.025em; line-height: 1.08; font-weight: 800; margin: 0; }
.h-xl { font-size: clamp(38px, 5.2vw, 60px); }
.h-lg { font-size: clamp(30px, 3.8vw, 44px); }
.h-md { font-size: clamp(23px, 2.4vw, 30px); letter-spacing: -.02em; }
.h-sm { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--slate); }
.muted { color: var(--slate); }
.balance { text-wrap: balance; }
.pretty { text-wrap: pretty; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--teal-700); background: var(--mint);
  padding: 8px 14px; border-radius: var(--r-pill);
}
.section--navy .eyebrow { background: rgba(255,255,255,.08); color: #7fded2; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  cursor: pointer; font-weight: 700; font-size: 16px; line-height: 1;
  border-radius: var(--r-pill); padding: 16px 28px;
  border: 1.5px solid transparent; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); background: var(--teal-700); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--border); }
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-lg { padding: 18px 34px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--teal-700); font-weight: 700; cursor: pointer; padding: 0; }

/* ============================================================
   HEADER / NAV  (markup injected by components.js)
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ivory) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.brand__mark { width: 32px; height: 32px; border-radius: 10px; background: var(--teal); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.brand__mark svg { width: 18px; height: 18px; color: #fff; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav__links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: inline-block; padding: 9px 14px; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600; color: var(--slate);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav__links a:hover { background: var(--mint); color: var(--navy); }
.nav__links a.is-active { color: var(--navy); background: var(--mint); }
.nav__actions { display: flex; align-items: center; gap: 12px; margin-left: 16px; }
.nav__toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border);
  background: #fff; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center;
}
.nav__toggle svg { width: 22px; height: 22px; color: var(--navy); }

/* Mobile menu drawer */
.mobile-menu {
  display: none; position: fixed; inset: 76px 0 0; z-index: 49;
  background: var(--ivory); padding: 24px;
  flex-direction: column; gap: 6px;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.mobile-menu.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-menu a { font-size: 19px; font-weight: 700; padding: 16px 12px; border-radius: 14px; color: var(--navy); }
.mobile-menu a:hover, .mobile-menu a.is-active { background: var(--mint); }
.mobile-menu .btn { margin-top: 14px; }

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__actions .btn { display: none; }
  .nav__toggle { display: flex; }
  .mobile-menu { display: flex; }
}

/* ============================================================
   REUSABLE CARD GRIDS
   ============================================================ */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 30px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card--lift:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card__ic {
  width: 50px; height: 50px; border-radius: 14px; background: var(--mint);
  display: grid; place-items: center; color: var(--teal-700); margin-bottom: 20px;
}
.card__ic svg { width: 25px; height: 25px; }
.card h3 { margin: 0 0 9px; }
.card p { margin: 0; color: var(--slate); font-size: 15.5px; line-height: 1.6; }

/* section heading block */
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head p { margin: 16px 0 0; }

/* ============================================================
   FOOTER  (markup injected by components.js)
   ============================================================ */
.site-footer { background: var(--navy); color: #cdd9e3; padding: var(--s-7) 0 var(--s-4); }
.site-footer a { color: #cdd9e3; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.1); }
.site-footer .brand { color: #fff; }
.footer-brand p { color: #9fb3c4; max-width: 320px; font-size: 15px; margin: 18px 0 0; }
.footer-col h4 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #7fded2; margin-bottom: 16px; font-weight: 700; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 15px; }
.footer-legal { padding-top: 32px; display: grid; gap: 18px; }
.disclaimer { font-size: 13.5px; line-height: 1.6; color: #8ea4b5; }
.disclaimer strong { color: #cdd9e3; }
.footer-alert {
  display: flex; gap: 13px; align-items: flex-start;
  background: rgba(249,115,91,.12); border: 1px solid rgba(249,115,91,.32);
  border-radius: var(--r-md); padding: 16px 18px; color: #ffd9d0; font-size: 14px; line-height: 1.55;
}
.footer-alert svg { width: 20px; height: 20px; color: var(--coral); flex-shrink: 0; margin-top: 1px; }
.footer-alert strong { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: 13.5px; color: #7e93a4; }

@media (max-width: 760px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}

/* ============================================================
   SCROLL-REVEAL  (toggled by components.js IntersectionObserver)
   Respects reduced-motion: content is visible by default if JS
   off or motion reduced.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .reveal.is-in { opacity: 1; transform: none; }
  .reveal[data-delay="1"] { transition-delay: .08s; }
  .reveal[data-delay="2"] { transition-delay: .16s; }
  .reveal[data-delay="3"] { transition-delay: .24s; }
}

/* ---- generic responsive grid collapse ---- */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: var(--s-6) 0; }
  .card { padding: 24px; }
}
