/* =========================================================================
   Sabine River Partners — Base styles & components
   -------------------------------------------------------------------------
   Consumes tokens.css. Add new components below in their own labelled block
   so the file stays scannable.
   ========================================================================= */

/* ---------- Reset (modern, minimal) ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
a { color: var(--color-link); text-decoration: none; transition: color var(--duration-fast) var(--ease-standard); }
a:hover { color: var(--color-link-hover); text-decoration: underline; text-underline-offset: 3px; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--color-brand-600); color: #fff;
  padding: var(--space-3) var(--space-5);
  font-weight: var(--weight-semibold); border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Type ------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
h1, .h1 { font-size: clamp(36px, 5.2vw, var(--text-5xl)); font-weight: var(--weight-black); }
h2, .h2 { font-size: clamp(28px, 3.6vw, var(--text-4xl)); }
h3, .h3 { font-size: clamp(22px, 2.4vw, var(--text-2xl)); }
h4, .h4 { font-size: var(--text-xl); }
h5, .h5 { font-size: var(--text-lg); }
h6, .h6 { font-size: var(--text-md); }

p { margin: 0 0 var(--space-4); text-wrap: pretty; }
.lead { font-size: var(--text-lg); color: var(--color-text-soft); line-height: var(--leading-relaxed); }
.muted { color: var(--color-text-muted); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-brand-600);
  margin-bottom: var(--space-3);
  display: inline-block;
}
.eyebrow--on-dark { color: #79b4e0; }

/* ---------- Layout ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }
.container--base   { max-width: var(--container-base); }

.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--alt  { background: var(--color-surface-alt); }
.section--dark {
  background: var(--color-surface-dark);
  color: var(--color-text-on-dark);
}
.section--dark h1, .section--dark h2, .section--dark h3,
.section--dark h4, .section--dark h5, .section--dark h6 { color: #fff; }
.section--dark .lead, .section--dark p { color: var(--color-text-on-dark-muted); }

.section-header { max-width: 760px; margin-bottom: var(--space-12); }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Stack helper for vertical spacing */
.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

/* ---------- Buttons --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--color-brand-500);
  color: #fff;
}
.btn--primary:hover { background: var(--color-brand-600); color: #fff; }

.btn--secondary {
  background: transparent;
  color: var(--color-brand-600);
  border-color: var(--color-brand-500);
}
.btn--secondary:hover { background: var(--color-brand-500); color: #fff; }

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-line-strong);
}
.btn--ghost:hover { border-color: var(--color-ink-700); color: var(--color-text); }

.btn--on-dark {
  background: #fff; color: var(--color-ink-900);
}
.btn--on-dark:hover { background: var(--color-brand-100); color: var(--color-ink-900); }

.btn--lg { padding: 18px var(--space-8); font-size: var(--text-base); }

/* ---------- Header / Nav --------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--color-line);
}
.site-header__inner {
  display: flex; align-items: center; gap: var(--space-8);
  height: 76px;
}
.site-header__logo {
  display: flex; align-items: center;
}
.site-header__logo img { height: 36px; width: auto; }

.site-nav {
  display: flex; align-items: center; gap: var(--space-6);
  margin-left: auto;
}
.site-nav__list {
  display: flex; gap: var(--space-1);
  list-style: none; margin: 0; padding: 0;
}
.site-nav__link {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-ink-700);
  border-radius: var(--radius-md);
}
.site-nav__link:hover, .site-nav__link[aria-current="page"] {
  color: var(--color-ink-900);
  background: var(--color-brand-050);
  text-decoration: none;
}

/* Dropdown */
.has-dropdown { position: relative; }
.has-dropdown > .site-nav__link::after {
  content: ""; display: inline-block; width: 8px; height: 8px;
  margin-left: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 280px;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-ink-700);
  border-radius: var(--radius-md);
}
.dropdown a:hover { background: var(--color-brand-050); color: var(--color-ink-900); text-decoration: none; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none; border: 1px solid var(--color-line-strong);
  padding: 10px 12px; border-radius: var(--radius-md);
}
.nav-toggle__bar {
  display: block; width: 22px; height: 2px;
  background: var(--color-ink-900);
}
.nav-toggle__bar + .nav-toggle__bar { margin-top: 5px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 0; }
  .site-nav { display: none; }
  .site-nav.is-open {
    display: flex;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--color-line);
    padding: var(--space-4) var(--gutter);
    gap: var(--space-2);
  }
  .site-nav.is-open .site-nav__list { flex-direction: column; gap: 0; width: 100%; }
  .site-nav.is-open .site-nav__link { padding: var(--space-3); }
  .site-nav.is-open .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; padding: 0 0 0 var(--space-4);
    background: transparent;
  }
  .site-nav.is-open .btn { align-self: flex-start; }
}

/* ---------- Hero ------------------------------------------------------ */
.hero {
  padding-top: clamp(64px, 9vw, 120px);
  padding-bottom: clamp(64px, 9vw, 120px);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(30,115,190,0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(30,115,190,0.07), transparent 60%),
    var(--color-bg);
  border-bottom: 1px solid var(--color-line);
}
.hero__inner { max-width: 880px; }
.hero h1 { margin-bottom: var(--space-6); }
.hero__lead { font-size: clamp(18px, 1.8vw, 22px); color: var(--color-text-soft); max-width: 680px; }
.hero__cta { margin-top: var(--space-8); display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* Page-header (subpage hero) */
.page-header {
  padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(900px 500px at 90% 0%, rgba(30,115,190,0.10), transparent 60%),
    var(--color-bg);
  border-bottom: 1px solid var(--color-line);
}
.page-header h1 { max-width: 18ch; }
.page-header .lead { max-width: 60ch; }

/* ---------- Feature row (alternating image + text) ------------------ */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.feature-row + .feature-row { margin-top: clamp(64px, 9vw, 120px); }
.feature-row--reverse .feature-row__media { order: 2; }

.feature-row__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-brand-050);
  box-shadow: var(--shadow-md);
}
.feature-row__media img { width: 100%; height: auto; display: block; }

.feature-row h3 { margin-bottom: var(--space-4); }
.feature-row p { color: var(--color-text-soft); }
.feature-row .btn { margin-top: var(--space-6); }

@media (max-width: 720px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row--reverse .feature-row__media { order: 0; }
}

/* ---------- Pillars (3-up value props) ------------------------------ */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-8);
}
.pillar { padding: var(--space-2) 0; }
.pillar__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--color-brand-100);
  color: var(--color-brand-600);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
}
.pillar h4 { margin-bottom: var(--space-3); }
.pillar p { color: var(--color-text-soft); margin: 0; }

/* ---------- Card ----------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: box-shadow var(--duration-base) var(--ease-standard),
              transform var(--duration-base) var(--ease-standard);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h4 { margin: 0 0 var(--space-2); }
.card p { color: var(--color-text-soft); margin: 0; }

/* ---------- Brochure / CTA banner ------------------------------------ */
.cta-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
  padding: clamp(40px, 6vw, 64px);
  background: var(--color-brand-050);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
}
.cta-banner__media img { border-radius: var(--radius-lg); }
@media (max-width: 720px) {
  .cta-banner { grid-template-columns: 1fr; padding: var(--space-8); }
}

/* ---------- Footer --------------------------------------------------- */
.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark-muted);
  padding: clamp(56px, 7vw, 80px) 0 var(--space-8);
}
.site-footer a { color: var(--color-text-on-dark-muted); }
.site-footer a:hover { color: #fff; }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-12);
}
@media (max-width: 880px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

.site-footer__brand img { height: 40px; width: auto; margin-bottom: var(--space-5); }
.site-footer__about { font-size: var(--text-sm); line-height: var(--leading-relaxed); max-width: 38ch; }

.site-footer__heading {
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-5);
  font-family: var(--font-mono);
}
.site-footer__list { list-style: none; padding: 0; margin: 0; }
.site-footer__list li { margin-bottom: var(--space-3); font-size: var(--text-sm); }

.site-footer__bottom {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; gap: var(--space-4); flex-wrap: wrap;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-on-dark-muted);
}

/* ---------- Tag / Pill ----------------------------------------------- */
.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  background: var(--color-brand-100);
  color: var(--color-brand-700);
}
.tag--soon { background: #fde9d4; color: #8a4a17; }

/* ---------- Utilities ------------------------------------------------ */
.text-center { text-align: center; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* ---------- Print ---------------------------------------------------- */
@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  body { color: #000; background: #fff; }
}
