@import './brand/tokens.css';

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: rgb(var(--purple-footer)); overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: rgb(var(--ink));
  background: rgb(var(--cream));
  -webkit-font-smoothing: antialiased;
}
p   { margin: 0; }
a   { color: inherit; }
svg { display: block; }

/* ─── Anchor offsets ─────────────────────────────────────────────────────── */
#build, #main, #commitments, #engage { scroll-margin-top: calc(var(--nav-h) + 8px); }

/* Section-specific padding overrides (tighter than the default .section clamp) */
#commitments { padding-top: 40px; }
#engage      { padding-top: 56px; padding-bottom: 48px; }

/* ─── Skip link ──────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: rgb(var(--purple));
  color: #fff;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
}
.skip-link:focus { left: 8px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

a[target="_blank"]::after {
  content: ' (opens in new tab)';
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* ─── Focus indicators ───────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgb(var(--purple));
  outline-offset: 3px;
}
#engage a:focus-visible,
#engage button:focus-visible,
footer a:focus-visible {
  outline-color: rgb(var(--text-on-dark-dim));
}

/* ─── Keyframes ──────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  @keyframes pm-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
  }
  @keyframes pm-rise {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes cue-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(5px); }
  }
}

/* ─── Layout helpers ─────────────────────────────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.section        { padding: clamp(72px, 10vw, 130px) clamp(20px, 5vw, 64px); }
.section--alt   { background: rgb(var(--cream-alt)); }
.section--story { border-top: 1px solid rgb(var(--purple) / 0.07); }
.section--dark  { background: rgb(var(--purple-deep)); color: rgb(var(--text-on-dark)); }

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.section-intro {
  max-width: 720px;
  margin-bottom: clamp(44px, 6vw, 64px);
}
#commitments .section-intro {
  margin-bottom: clamp(24px, 3vw, 36px);
}

.br--mobile              { display: none; }
.hero-tagline--mobile { display: none; }

/* ─── Typography ─────────────────────────────────────────────────────────── */

.section-h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.5px;
  margin: 0 0 22px;
  color: rgb(var(--purple-deep));
}

.section-lead {
  font-size: 17px;
  line-height: 1.65;
  color: rgb(var(--text-body));
  margin: 0;
}

.body-stack {
  font-size: 17px;
  line-height: 1.72;
  color: rgb(var(--text-body));
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.purple-text { color: rgb(var(--purple)); font-weight: 600; }
.section-h2 .purple-text { font-weight: 700; }

.inline-link {
  color: rgb(var(--purple));
  font-weight: 500;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.inline-link:hover { text-decoration: underline; }

/* ─── NAV ────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  padding: 0 clamp(20px, 5vw, 64px);
  overflow: visible;
  backdrop-filter: blur(0px);
  background: rgb(var(--cream) / 0);
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease,
              box-shadow 0.3s ease, border-color 0.3s ease;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav.nav--scrolled {
  backdrop-filter: blur(12px);
  background: rgb(var(--cream) / 0.82);
  border-color: rgb(var(--purple) / 0.08);
  box-shadow: 0 2px 24px -8px rgb(var(--purple-deep) / 0.12);
}

.nav-logo,
.footer-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo {
  color: rgb(var(--ink));
  visibility: hidden;
  transition: visibility 0s 0.4s; /* wait for opacity fade-out before hiding from tab order */
}
.nav--scrolled .nav-logo {
  visibility: visible;
  transition: visibility 0s; /* reveal immediately so opacity can animate in */
}

/* Spiral — fades in with wordmark as you scroll past hero */
.nav-logo .lockup-spiral {
  opacity: 0;
  transform: scale(0.7);
  transition:
    transform 0.5s cubic-bezier(0.34, 1.3, 0.64, 1),
    opacity   0.4s ease;
}
.nav--scrolled .nav-logo .lockup-spiral {
  opacity: 1;
  transform: scale(1);
}

/* Wordmark — clips in from the spiral on scroll */
.nav-logo .lockup-wordmark {
  overflow: hidden;
  max-width: 0;
  clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
  opacity: 0;
  transform: translateX(-8px);
  transition:
    clip-path 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity   0.32s ease,
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.08s;
}
.nav--scrolled .nav-logo .lockup-wordmark {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  opacity: 1;
  transform: translateX(0);
  max-width: 340px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
}

.nav-link {
  text-decoration: none;
  color: rgb(var(--text-body));
  font-size: 15px;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  right: 50%;
  height: 1px;
  background: rgb(var(--purple));
  transition: left 0.25s ease, right 0.25s ease;
}
.nav-link:hover::after { left: 0; right: 0; }
.nav-link:hover        { color: rgb(var(--purple-deep)); }

.nav-cta {
  text-decoration: none;
  color: #fff;
  background: rgb(var(--purple));
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover {
  background: rgb(var(--purple-dark));
  transform: translateY(-1px);
}

/* Hamburger (desktop: hidden) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgb(var(--purple-deep));
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── HERO ───────────────────────────────────────────────────────────────── */

/* Brand row (spiral + h1) — desktop: stacked; mobile: side by side */
.hero-brand { margin-bottom: 18px; }

.hero-spiral--mobile {
  display: none;
  color: rgb(var(--purple));
  flex-shrink: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-spiral--mobile { animation: pm-spin 10s linear infinite; }
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px clamp(20px, 5vw, 64px) 80px;
  overflow: hidden;
}

.hero-wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 78% 18%, rgb(var(--purple-wash)) 0%, rgb(var(--cream)) 58%);
}

.hero-spiral--desktop {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: min(70vw, 760px);
  pointer-events: none;
  z-index: 0;
}
.hero-spiral--desktop svg {
  display: block;
  width: 100%;
  opacity: 0.4;
  color: rgb(var(--purple));
}
@media (prefers-reduced-motion: no-preference) {
  .hero-spiral--desktop svg { animation: pm-spin 120s linear infinite; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-content { animation: pm-rise 0.8s cubic-bezier(0.4, 0, 0.2, 1) both; }
}

.hero-h1 {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: clamp(32px, 8vw, 94px);
  line-height: 0.98;
  letter-spacing: -1px;
  margin: 0;
  color: rgb(var(--ink));
}

.hero-tagline {
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.45;
  font-weight: 400;
  color: rgb(var(--ink-soft));
  margin: 0 0 16px;
  max-width: 580px;
}

.hero-scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgb(var(--purple) / 0.7);
  text-decoration: none;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition: color 0.2s ease;
  z-index: 1;
}
.hero-scroll-cue:hover { color: rgb(var(--purple) / 0.9); }

@media (prefers-reduced-motion: no-preference) {
  .hero-scroll-chevron { animation: cue-bounce 2.2s ease-in-out 1.2s infinite; }
}

/* ─── What We Build — cards ──────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.vertical-card {
  background: #fff;
  border: 1px solid rgb(var(--purple-deep) / 0.07);
  border-radius: var(--radius-card);
  padding: 30px 28px 32px;
  display: flex;
  flex-direction: column;
  min-height: 248px;
  position: relative;
  box-shadow: 0 0 0 0 rgb(var(--purple-shadow) / 0);
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.55s ease;
  overflow: hidden;
}
.vertical-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px -24px rgb(var(--amber) / 0.55);
  border-color: rgb(var(--amber) / 0.45);
}

.card-h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 23px;
  line-height: 1.15;
  margin: 0 0 14px;
  color: rgb(var(--purple-deep));
  letter-spacing: -0.2px;
}

.card-body {
  font-size: 15px;
  line-height: 1.62;
  color: rgb(var(--text-body));
}

/* ─── Why We Exist — photo ───────────────────────────────────────────────── */
.story-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-photo);
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgb(var(--purple-shadow) / 0.6);
}
.story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.story-photo:hover img { transform: scale(1.03); }

.story-photo-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 26px;
  background: linear-gradient(
    to top,
    rgb(var(--purple-deep) / 0.82) 0%,
    rgb(var(--purple-deep) / 0.3) 35%,
    transparent 60%
  );
  pointer-events: none;
}
.story-photo-caption span {
  font-size: 12px;
  letter-spacing: 1px;
  color: rgb(var(--white) / 0.88);
}

/* ─── Commitments ────────────────────────────────────────────────────────── */
.commitments-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 24px);
  position: relative;
}

/* Track is invisible to the grid — its children slot directly into .commitments-layout */
.commitments-track { display: contents; }
.commitments-track .commitment-pillar:nth-child(1) { grid-column: 1; grid-row: 1; }
.commitments-track .commitment-pillar:nth-child(2) { grid-column: 2; grid-row: 1; }
.commitments-track .commitment-pillar:nth-child(3) { grid-column: 1; grid-row: 3; }
.commitments-track .commitment-pillar:nth-child(4) { grid-column: 2; grid-row: 3; }
.commitment-pillar--foundation { grid-column: 1 / -1; grid-row: 2; }

.commitment-pillar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto 1fr;
  align-items: center;
  column-gap: clamp(12px, 2vw, 18px);
  row-gap: 10px;
  padding: 24px;
  background: rgb(var(--purple) / 0.08);
  border: 1px solid rgb(var(--purple) / 0.22);
  border-radius: var(--radius-card);
  transition: background 0.25s ease;
}
.commitment-pillar:hover {
  background: rgb(var(--purple) / 0.13);
}
.commitment-pillar .commitment-icon-wrap { grid-column: 2; grid-row: 1; }
.commitment-pillar .pillar-h3           { grid-column: 3; grid-row: 1; }
.commitment-pillar .section-lead        { grid-column: 1 / -1; grid-row: 2; }

.commitment-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgb(var(--purple) / 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--purple));
  transition: background 0.25s ease, transform 0.25s ease;
}
.commitment-pillar:hover .commitment-icon-wrap {
  background: rgb(var(--purple) / 0.15);
  transform: translateY(-2px);
}

.pillar-h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  margin: 0;
  color: rgb(var(--purple-deep));
}
.pillar-h3 a {
  color: inherit;
  text-decoration: none;
}
.pillar-h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}
.pillar-h3 a:hover,
.pillar-h3 a:focus-visible {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.commitment-pillar .inline-link {
  position: relative;
  z-index: 1;
}

/* Governance card — amber variant, spans both columns */
.commitment-pillar--foundation {
  max-width: 70%;
  margin: 0 auto;
  border: 1px solid rgb(var(--amber) / 0.40);
  background: rgb(var(--amber-gold) / 0.17);
}
.commitment-pillar--foundation:hover { background: rgb(var(--amber-gold) / 0.24); }
.commitment-pillar--foundation .commitment-icon-wrap {
  background: rgb(var(--amber-gold) / 0.24);
  color: rgb(var(--amber));
}
.commitment-pillar--foundation:hover .commitment-icon-wrap {
  background: rgb(var(--amber-gold) / 0.34);
}
.commitment-pillar--foundation .section-lead { font-size: 17px; text-align: center; }
.pillar-body-line2 { display: block; margin-top: 0.5em; }


/* ─── Engage ─────────────────────────────────────────────────────────────── */
.engage-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.engage-h2 { color: #fff; max-width: 760px; }
.engage-h2-regular { font-weight: 400; }
.engage-h2-accent  { font-weight: 700; color: rgb(var(--purple-mid)); }

.tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgb(var(--white) / 0.12);
}

.tab-btn {
  appearance: none;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 18px;
  margin-bottom: -1px;
  color: rgb(var(--text-on-dark) / 0.65);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.tab-btn:hover               { color: rgb(var(--text-on-dark) / 0.88); }
.tab-btn[aria-selected="true"] {
  color: #fff;
  border-bottom-color: rgb(var(--amber-gold));
}

/* Stack panels in the same grid cell; hide all but the active one */
.tab-panels { display: grid; }
.tab-panel  { grid-area: 1 / 1; }
.tab-panel[inert] {
  visibility: hidden;
  pointer-events: none;
}
.tab-panel:not([inert]) { animation: pm-rise 0.4s ease both; }

.engage-body {
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.6;
  font-weight: 300;
  color: rgb(var(--text-on-dark-dim));
  margin: 0 0 24px;
  max-width: 760px;
}
.engage-body--mobile { display: none; color: rgb(var(--text-on-dark-dim)); font-weight: 300; }
.engage-brand      { color: #fff; font-weight: 600; }

.engage-email-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: rgb(var(--amber-gold));
  font-size: clamp(19px, 2vw, 22px);
  font-weight: 500;
  transition: opacity 0.2s ease;
}
.engage-email-link:hover { opacity: 0.8; text-decoration: underline; }
.engage-body a, .engage-body--mobile a {
  color: rgb(var(--amber-gold));
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.engage-body a:hover, .engage-body--mobile a:hover { text-decoration: underline; }

/* ─── Scroll entrance animations ─────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity   0.6s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: var(--delay, 0s);
  }
  .animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .vertical-card.is-visible {
    transition:
      opacity      0.6s cubic-bezier(0.4, 0, 0.2, 1),
      transform    0.6s cubic-bezier(0.4, 0, 0.2, 1),
      box-shadow   0.55s cubic-bezier(0.4, 0, 0.2, 1),
      border-color 0.55s ease;
    transition-delay: 0s;
  }
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  background: rgb(var(--purple-footer));
  color: rgb(var(--footer-text));
  padding: clamp(32px, 4vw, 48px) clamp(20px, 5vw, 64px) 40px;
}


.footer-location {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  font-size: 15px;
  color: rgb(var(--footer-text-mid));
}

.footer-texas-flag {
  width: 44px;
  height: 44px;
  display: block;
  flex-shrink: 0;
  filter: invert(0.6);
  cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
  .footer-texas-flag {
    animation: texas-idle 4s ease-in-out infinite;
  }
  .footer-texas-flag:hover {
    animation: texas-shimmer 1.4s ease-in-out infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  .footer-texas-flag:hover {
    filter: invert(0.6) brightness(1.5);
  }
}

@keyframes texas-idle {
  0%   { filter: invert(0.6); }
  10%  { filter: invert(0.5) brightness(2.0) drop-shadow(0 0 5px rgb(var(--purple-accent) / 0.5)); }
  22%  { filter: invert(0.6); }
  100% { filter: invert(0.6); }
}

@keyframes texas-shimmer {
  0%, 100% { filter: invert(0.6); }
  50%       { filter: invert(0.6) brightness(1.5) drop-shadow(0 0 7px rgb(var(--purple-accent))); }
}

/* ─── Easter egg: cowboy rider ──────────────────────────────────── */
#cowboy-rider {
  position: fixed;
  bottom: 80px;
  z-index: 9999;
  pointer-events: none;
  user-select: none;
}
@media (prefers-reduced-motion: no-preference) {
  #cowboy-rider {
    --cowboy-speed: 6s;
    animation: cowboy-ride var(--cowboy-speed) linear forwards;
  }
}

.cowboy-rider-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (prefers-reduced-motion: no-preference) {
  .cowboy-rider-inner {
    animation: cowboy-gallop 0.22s ease-in-out infinite alternate;
  }
}

.cowboy-hat-emoji   { font-size: 2.2rem; line-height: 1; position: relative; top: 12px; left: -5px; }
.cowboy-horse-emoji { font-size: 4.5rem; line-height: 1; display: block; transform: scaleX(-1); }

@keyframes cowboy-ride {
  from { transform: translateX(-220px); }
  to   { transform: translateX(110vw); }
}

@keyframes cowboy-gallop {
  from { transform: translateY(0)     rotate(0deg); }
  to   { transform: translateY(-10px) rotate(2deg); }
}

.yeehaw-pop {
  position: fixed;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgb(var(--purple-accent));
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 9999;
}
@media (prefers-reduced-motion: no-preference) {
  .yeehaw-pop {
    animation: yeehaw-float 1.2s ease-out forwards;
  }
}

@keyframes yeehaw-float {
  0%   { opacity: 1; transform: translateY(0)     scale(1);   }
  60%  { opacity: 1; transform: translateY(-40px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-80px) scale(0.9); }
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.footer-social-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgb(var(--footer-text-mid));
  margin: 0;
}
.footer-social-links {
  display: flex;
  gap: 16px;
  align-items: center;
}
.footer-social-link {
  color: rgb(var(--footer-text-mid));
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}
.footer-social-link:hover { color: rgb(var(--footer-text)); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgb(var(--purple-accent) / 0.12);
}

.footer-copy { margin: 0; font-size: 14px; color: rgb(var(--footer-text-mid)); }

.footer-legal {
  display: flex;
  gap: 30px;
  align-items: center;
}
.footer-legal a {
  font-family: var(--font-sans);
  font-size: 15px;
  color: rgb(var(--footer-text-mid));
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.footer-legal a:hover { color: rgb(var(--text-on-dark)); }

/* ─── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* NAV — hamburger + drawer */
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px 0 20px;
    background: rgb(var(--cream) / 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgb(var(--purple) / 0.1);
    box-shadow: 0 8px 24px -8px rgb(var(--purple-deep) / 0.1);
  }
  .nav-links.nav-drawer--open { display: flex; }

  .nav:has(.nav-drawer--open) {
    backdrop-filter: blur(12px);
    background: rgb(var(--cream) / 0.97);
    border-color: rgb(var(--purple) / 0.08);
    box-shadow: 0 2px 24px -8px rgb(var(--purple-deep) / 0.12);
  }

  .nav-link {
    padding: 13px clamp(20px, 5vw, 32px);
    font-size: 16px;
  }
  .nav-link::after { display: none; }

  .nav-cta {
    margin: 10px clamp(20px, 5vw, 32px) 0;
    text-align: center;
    justify-content: center;
  }

  /* HERO */
  .br--desktop  { display: none; }
  .hide--mobile { display: none; }
  .hero-tagline--desktop { display: none; }
  .hero-tagline--mobile  { display: block; }

  .hero {
    min-height: 0;
    padding-top: 88px;
    padding-bottom: 32px;
  }
  .hero-spiral--desktop { display: none; }
  .hero-scroll-cue  { display: none; }

  .hero-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    margin-bottom: 14px;
  }
  .hero-spiral--mobile { display: block; width: 80px; height: 80px; }
  .hero-h1           { margin: 0 0 0 4px; }
  .hero-tagline      { text-align: center; }

  /* BETS section */
  #build.section         { padding-top: 36px; padding-bottom: 36px; }
  #build .section-intro  { margin-bottom: 20px; }

  .card-grid,
  .commitments-track {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 14px;
    margin-left:  calc(-1 * clamp(20px, 5vw, 64px));
    margin-right: calc(-1 * clamp(20px, 5vw, 64px));
    padding-left:  20px;
    padding-right: clamp(20px, 5vw, 64px);
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .card-grid::-webkit-scrollbar,
  .commitments-track::-webkit-scrollbar { display: none; }
  .card-grid { scroll-padding-left: 20px; }

  .vertical-card {
    scroll-snap-align: start;
    flex: 0 0 80vw;
    min-height: 0;
    box-shadow: 0 4px 16px -4px rgb(var(--purple-shadow) / 0.15);
  }

  /* COMMITMENTS section — 4-card carousel + governance below */
  .commitments-layout { display: block; }
  .commitments-track .commitment-pillar {
    flex: 0 0 80vw;
    scroll-snap-align: center;
    grid-column: auto;
    grid-row: auto;
  }
  .commitments-track .commitment-pillar {
    grid-template-columns: auto 1fr;
    align-content: start;
  }
  .commitments-track .commitment-pillar .commitment-icon-wrap { grid-column: 1; grid-row: 1; }
  .commitments-track .commitment-pillar .pillar-h3   { grid-column: 2; grid-row: 1; }
  .commitments-track .commitment-pillar .section-lead { grid-column: 1 / -1; grid-row: 2; }
  .commitment-pillar--foundation {
    max-width: 100%;
    margin-top: 0;
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: auto 1fr;
  }
  .commitment-pillar--foundation .commitment-icon-wrap { grid-column: 1; grid-row: 1; }
  .commitment-pillar--foundation .pillar-h3   { grid-column: 2; grid-row: 1; }
  .commitment-pillar--foundation .section-lead { grid-column: 1 / -1; grid-row: 2; }
  /* track has padding-bottom: 16px, so add that to margin-bottom to balance */
  .commitments-layout .carousel-dots {
    margin-top: 20px;
    margin-bottom: 36px;
  }
  .commitments-layout .carousel-dot { background: rgb(var(--purple) / 0.2); }
  .commitments-layout .carousel-dot.is-active { background: rgb(var(--purple)); }
  .commitment-pillar .pillar-h3   { font-size: 18px; }
  .commitment-pillar .section-lead { font-size: 15px; }

  /* Skip fade-in for carousel items (off-screen items never intersect) */
  .commitments-track .commitment-pillar.animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Skip IntersectionObserver for clipped carousel items */
  .card-grid .vertical-card.animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Carousel dots (JS-injected) */
  .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
    margin-bottom: 8px;
  }
  .carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgb(var(--amber) / 0.2);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
  }
  .carousel-dot.is-active { background: rgb(var(--amber)); transform: scale(1.35); }

  /* ENGAGE tabs */
  .tab-strip { flex-wrap: nowrap; gap: 0; }
  .tab-btn   { flex: 1; padding: 10px 12px; font-size: 14px; text-align: center; }
  .engage-body       { display: none; }
  .engage-body--mobile { display: block; font-size: 15px; line-height: 1.55; margin-bottom: 16px; }

  .engage-email-link {
    display: flex;
    justify-content: center;
    padding-top: 24px;
  }

  /* TYPOGRAPHY overrides */
  .section-h2 {
    font-size: clamp(26px, 6.5vw, 38px);
    text-align: center;
  }
  .section-lead            { text-align: center; }
  .card-h3, .card-body     { text-align: center; }

  /* FOOTER */
  .footer                { padding-bottom: 20px; }
  .footer-top            { flex-direction: column; align-items: center; gap: 20px; text-align: center; }
  .footer-bottom         { flex-direction: column; align-items: center; gap: 14px; }
  .footer-location       { justify-content: center; }
  .footer-copy           { white-space: normal; width: 100%; text-align: center; }
  .footer-legal          { flex-wrap: wrap; justify-content: center; gap: 14px 24px; }
}
