/* ==========================================================================
   TEECSO Consulting, LLC — Design System
   Environmental · Economics · Sustainability
   ========================================================================== */

:root {
  /* ------------------------------------------------------------------
     Brand palette — Ocean Blue · White · Olive Green
     Every colour on the site resolves through these tokens, so the whole
     theme is retargetable from this one block. Contrast ratios noted
     against #FFFFFF are WCAG 2.1 measured values.
     ------------------------------------------------------------------ */

  /* Deep sea — dark surfaces, headings, footer */
  --ocean-deepest: #04222D;
  --ocean-deep:    #06303F;   /* 13.98:1 on white  */
  --ocean:         #0E6E95;   /*  5.70:1 on white — AA for body text */
  --ocean-light:   #1A8FBC;   /*  3.68:1 — large text / accents only */
  --ocean-mist:    #6FC2DF;   /* for use on dark surfaces            */

  /* Sky blue — header / footer surface gradient (brand request) */
  --sky-light: #6EC8F2;   /* bright sky blue, gradient start */
  --sky-mid:   #2E9BD6;
  --sky-deep:  #0B4A6F;   /* deep sky blue, gradient end — keeps footer text legible */
  --sky-scrim: rgba(3, 18, 30, 0.22); /* thin dark veil for text contrast over the gradient */

  /* Olive green — growth, sustainability, secondary accent */
  --olive-deep:  #5F6E33;     /*  5.58:1 on white — AA for body text */
  --olive:       #7C8C45;     /*  3.69:1 — large text / accents only */
  --olive-light: #9BAD5E;     /*  5.68:1 on --ocean-deep             */

  /* Neutrals */
  --bg:             #F6F9FA;
  --bg-sink:        #ECF2F4;
  --white:          #FFFFFF;
  --text:           #10242D;
  --text-secondary: #55686F;
  --border:         #D6E3E8;

  /* --------------------------------------------------------------
     Legacy aliases. The previous navy/teal/green names are used in
     ~1,400 places across the stylesheet and in page-level inline
     styles. Aliasing them (rather than find-and-replacing) keeps the
     retheme a single-block change and keeps older markup working.
     -------------------------------------------------------------- */
  --navy:        var(--ocean-deep);
  --navy-deep:   var(--ocean-deepest);
  --teal:        var(--ocean);
  --teal-light:  var(--ocean-light);
  --green:       var(--olive);
  --green-deep:  var(--olive-deep);

  /* Type */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.35rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.4vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.9rem + 2.2vw, 3.6rem);
  --step-5: clamp(3rem, 2.2rem + 3.6vw, 4.8rem);

  /* Layout */
  --container: 1240px;
  --container-narrow: 800px;
  --radius-sm: 3px;
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(6, 48, 63, 0.07);
  --shadow: 0 4px 20px rgba(6, 48, 63, 0.09);
  --shadow-lg: 0 18px 48px rgba(6, 48, 63, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
/* Bugfix: the reset previously only matched ul[class]/ol[class], so the
   nav and footer lists — which are plain <ul> — kept their default bullets
   and padding. Chrome renders those markers even on flex children, which is
   why a stray dot sat next to every nav item. Scoped resets below. */
ul[class], ol[class] { list-style: none; padding: 0; }
.main-nav ul,
.dropdown ul,
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.main-nav li::marker,
.site-footer li::marker { content: ""; }
img, picture, svg { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { color: var(--text); }
.lede { font-size: var(--step-1); color: var(--text-secondary); line-height: 1.55; }

/* Visible focus states everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding-block: 96px; }
.section--tight { padding-block: 64px; }
.section--alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section--navy { background: var(--navy); color: rgba(255,255,255,0.92); }
.section--navy h2, .section--navy h3, .section--navy h4 { color: var(--white); }
.section--navy .text-secondary { color: rgba(255,255,255,0.65); }

.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding-block: 64px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--teal);
  display: inline-block;
}
.section--navy .eyebrow { color: var(--olive-light); }
.section--navy .eyebrow::before { background: var(--green); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }

.text-secondary { color: var(--text-secondary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: var(--step--1);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-light); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.section--navy .btn-outline { color: var(--white); border-color: rgba(255,255,255,0.4); }
.section--navy .btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-ghost { color: var(--teal); font-weight: 600; gap: 6px; }
.btn-ghost::after { content: "→"; transition: transform .15s ease; }
.btn-ghost:hover::after { transform: translateX(4px); }
.btn-block { width: 100%; justify-content: center; }

.cta-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  /* No backdrop-filter here — see the ::before rule further down. It creates
     a containing block for position:fixed children, which collapsed the
     mobile menu panel to 52px. Pre-existing in v13. */
  background: linear-gradient(100deg, var(--sky-light) 0%, var(--sky-mid) 46%, var(--sky-deep) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  height: var(--header-h);
}
/* Thin dark scrim under the nav content only (not the ::before blur layer)
   so white nav text keeps AA contrast against the brighter, sky-light end
   of the gradient. */
.site-header .nav-wrap { position: relative; z-index: 1; }
.site-header::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--sky-scrim); pointer-events: none;
}
/* Header and footer share one ocean-blue surface; every element inside the
   header switches to light-on-dark. The dropdown/mobile menu panels stay
   white by design — see .dropdown and .main-nav.mobile-open below. */
.header-actions .btn-outline { color: var(--white); border-color: rgba(255, 255, 255, 0.45); }
.header-actions .btn-outline:hover { background: var(--white); color: var(--ocean-deep); }
.nav-wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
/* Real badge logo. Fixed box + object-fit reserves layout space before the
   image decodes, so the header never shifts (CLS = 0). */
.brand-mark {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: transform 0.45s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }
.site-header.is-stuck .brand-mark { width: 38px; height: 38px; }
@media (max-width: 480px) { .brand-mark { width: 38px; height: 38px; } }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-body); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--white); }
.brand-sub { font-family: var(--font-mono); font-weight: 600; font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.65); margin-top: 3px; }

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav a.nav-link, .main-nav button.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: var(--step--1);
  font-weight: 500;
  /* The header is a solid ocean-blue bar, so nav text is light-on-dark. */
  color: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
}
.main-nav a.nav-link:hover, .main-nav button.nav-link:hover, .main-nav a.nav-link.active { color: var(--white); }
.main-nav a.nav-link.active { font-weight: 600; }

.has-dropdown { position: relative; }
.chevron { width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-top: -3px; transition: transform .15s ease; }
.has-dropdown[data-open="true"] .chevron { transform: rotate(-135deg); margin-top: 3px; }

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  min-width: 240px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.has-dropdown[data-open="true"] .dropdown { display: flex; }
.dropdown a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  color: var(--text);
}
.dropdown a .dd-icon {
  width: 22px; height: 22px; border-radius: 6px; object-fit: cover;
  flex: none; margin-top: 1px;
}
.dropdown a .dd-text { display: flex; flex-direction: column; }
.dropdown a:hover { background: var(--bg); color: var(--teal); }
.dropdown a .dd-desc { display: block; font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.header-actions .btn { padding: 11px 22px; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  /* Transparent, not white — the bars are white too, and the button now
     sits on the ocean-blue header. A white fill made it a blank square with
     an invisible icon (caught in mobile QA). */
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { content: ""; display: block; width: 18px; height: 1.5px; background: var(--white); position: relative; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle::before { position: absolute; transform: translateY(-6px); }
.nav-toggle::after { position: absolute; transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { transform: rotate(-45deg); }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .header-actions .btn-outline { display: none; }
  .nav-toggle { display: flex; }

  .main-nav.mobile-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    background: var(--white);
    padding: 12px 20px 40px;
    overflow-y: auto;
    z-index: 400;
  }
  .main-nav.mobile-open > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  /* The panel itself is white (menus stay white per brand spec), so its
     links revert to dark text — they'd be unreadable using the header's
     white-on-blue colors. */
  .main-nav.mobile-open a.nav-link,
  .main-nav.mobile-open button.nav-link { color: var(--text); }
  .main-nav.mobile-open a.nav-link:hover,
  .main-nav.mobile-open button.nav-link:hover,
  .main-nav.mobile-open a.nav-link.active { color: var(--ocean); }
  .main-nav.mobile-open a.nav-link, .main-nav.mobile-open button.nav-link { width: 100%; padding: 14px 8px; border-bottom: 1px solid var(--border); justify-content: space-between; }
  .main-nav.mobile-open .dropdown { position: static; transform: none; box-shadow: none; border: none; padding: 4px 0 4px 14px; display: none; }
  .main-nav.mobile-open .has-dropdown[data-open="true"] .dropdown { display: flex; }
}

/* ---------- Video background band (same footage/size as index's hero) ---------- */
/* One full viewport tall, same as the animated video on index.html, placed
   right under the sticky header on every inner page so the brand motion is
   consistent site-wide; normal page content continues below it. */
.video-hero-bg {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: #03060c;
}
@supports (height: 100dvh) { .video-hero-bg { height: 100dvh; } }
.video-hero-bg .art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
.video-hero-bg .veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(140% 60% at 50% 40%, rgba(6,10,18,.30) 0%, rgba(6,10,18,.14) 50%, rgba(6,10,18,0) 100%),
    linear-gradient(180deg, rgba(6,10,18,.10) 0%, rgba(6,10,18,0) 30%, rgba(6,10,18,0) 60%, rgba(6,10,18,.55) 100%);
}
.video-hero-bg .video-hero-caption {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-inline: 24px;
}
.video-hero-bg .video-hero-caption h1 {
  color: #fff; font-size: var(--step-4); margin-bottom: 16px; max-width: 20ch;
  text-shadow: 0 4px 24px rgba(0,0,0,.55);
}
.video-hero-bg .video-hero-caption p {
  color: rgba(255,255,255,.88); max-width: 56ch; margin-inline: auto;
  font-size: var(--step-1); line-height: 1.6; text-shadow: 0 2px 14px rgba(0,0,0,.5);
}
@media (prefers-reduced-motion: reduce) { .video-hero-bg .art { display: block; } }

/* ---------- Home hero (video band, homepage only) ---------- */
.home-hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: #03060c;
}
@supports (height: 100dvh) { .home-hero { height: 100dvh; } }
.home-hero .art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
.home-hero .veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(140% 60% at 50% 40%, rgba(6,10,18,.34) 0%, rgba(6,10,18,.18) 50%, rgba(6,10,18,0) 100%),
    linear-gradient(180deg, rgba(6,10,18,.28) 0%, rgba(6,10,18,0) 28%, rgba(6,10,18,0) 62%, rgba(6,10,18,.42) 100%);
}
.home-hero-inner {
  position: relative; z-index: 1; width: 100%; max-width: 900px;
  margin-inline: auto; padding-inline: 24px; text-align: center; color: var(--white);
}
.home-hero-inner .eyebrow { justify-content: center; color: rgba(255,255,255,.88); }
.home-hero-inner .eyebrow::before { background: var(--white); }
.home-hero-inner h1 {
  color: var(--white); max-width: 18ch; margin-inline: auto; margin-bottom: 18px;
  text-shadow: 0 4px 30px rgba(0,0,0,.55);
}
.home-hero-inner .lede {
  color: rgba(255,255,255,.88); max-width: 56ch; margin-inline: auto; margin-bottom: 30px;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
}
.home-hero-inner .cta-row { justify-content: center; margin-bottom: 38px; }
.home-hero-inner .btn-outline { color: var(--white); border-color: rgba(255,255,255,.55); }
.home-hero-inner .btn-outline:hover { background: var(--white); color: var(--ocean-deep); }
.home-hero-feats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; list-style: none; padding: 0; margin: 0; }
.home-hero-feats li { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.92); font-size: var(--step--1); font-weight: 600; }
.home-hero-feats li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sky-light); flex: none; }
@media (max-width: 640px) { .home-hero-inner h1 { font-size: var(--step-4); } }
@media (prefers-reduced-motion: no-preference) {
  @keyframes home-hero-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
  .home-hero-inner .eyebrow  { animation: home-hero-rise .6s ease both .10s; }
  .home-hero-inner h1        { animation: home-hero-rise .7s ease both .20s; }
  .home-hero-inner .lede     { animation: home-hero-rise .7s ease both .32s; }
  .home-hero-inner .cta-row  { animation: home-hero-rise .7s ease both .42s; }
  .home-hero-feats           { animation: home-hero-rise .7s ease both .52s; }
}
/* Snapshot strip (metrics + venn diagram) directly under the video band */
.home-snapshot { padding-block: 64px; }
.home-snapshot .hero-metric-bridge { margin-top: 0; border-top: none; padding-top: 0; }

/* ---------- Short video galleries (project pages) ---------- */
.video-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px; margin-top: 8px;
}
.video-tile {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius);
  overflow: hidden; background: var(--navy-deep); cursor: pointer; border: none; padding: 0;
  display: block; width: 100%;
}
.video-tile img, .video-tile video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.video-tile .video-tile-scrim {
  position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,20,25,.05) 0%, rgba(6,20,25,.55) 100%);
}
.video-tile-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,0.92); color: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, background .15s ease;
}
.video-tile:hover .video-tile-play { transform: translate(-50%,-50%) scale(1.08); background: var(--white); }
.video-tile-play svg { width: 18px; height: 18px; margin-left: 2px; }
.video-tile-label {
  position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1;
  color: var(--white); font-size: 0.82rem; font-weight: 600;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}
.video-tile-soon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(6,20,25,0.88); color: rgba(255,255,255,0.85); font-size: 0.82rem;
  text-align: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.video-tile-soon.is-visible { opacity: 1; pointer-events: auto; }

/* ---------- Technology page: 3 tab icons + 1 shared photo album ---------- */
.tech-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
  margin-bottom: 32px;
}
.tech-tab {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 24px; min-width: 180px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.tech-tab:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tech-tab.is-active { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(28,154,155,0.15); }
.tech-tab-icon {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-deep); color: var(--sky-light);
}
.tech-tab-icon svg { width: 26px; height: 26px; }
.tech-tab-label { text-align: center; font-size: 0.88rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.tech-tab-label small { display: block; font-weight: 500; font-size: 0.72rem; color: var(--text-secondary); margin-top: 2px; }

.tech-album { max-width: 640px; margin-inline: auto; background: var(--navy-deep); border-radius: var(--radius); overflow: hidden; color: var(--white); }
.tech-album-stage { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #03060c; }
.tech-album-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tech-album-nav { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.tech-album-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: rgba(6,20,25,0.62); border: 1px solid rgba(255,255,255,0.35); color: var(--white);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.tech-album-btn:hover { background: rgba(6,20,25,0.85); }
.tech-album-btn svg { width: 18px; height: 18px; }
.tech-album-home { position: absolute; top: 12px; right: 12px; }
.tech-album-count {
  position: absolute; bottom: 12px; right: 14px; z-index: 1;
  font-size: 0.7rem; letter-spacing: 0.04em; color: rgba(255,255,255,0.85);
  background: rgba(6,20,25,0.62); padding: 3px 10px; border-radius: 999px;
}
.tech-album-caption { padding: 20px 24px 24px; }
.tech-album-caption .tech-album-eyebrow { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky-light); margin-bottom: 6px; display: block; }
.tech-album-caption h4 { margin: 0 0 6px; font-size: 1.1rem; color: var(--white); }
.tech-album-caption p { margin: 0; font-size: 0.9rem; line-height: 1.5; color: rgba(255,255,255,0.75); }
.tech-album-summary { max-width: 640px; margin: 22px auto 0; }
.tech-album-summary .eyebrow { margin-bottom: 8px; }
.tech-album-summary p#techSummaryText { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.65; margin: 0; }
@media (max-width: 560px) { .tech-tab { min-width: 130px; padding: 14px 16px; } }

/* ---------- Hero ---------- */
.hero {
  padding-block: 100px 80px;
  position: relative;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lede { margin-bottom: 34px; max-width: 46ch; }
.hero-metric-bridge {
  margin-top: 56px;
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  gap: 0;
}
.metric { flex: 1; padding-right: 24px; position: relative; }
.metric + .metric { padding-left: 24px; border-left: 1px solid var(--border); }
.metric .metric-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.metric .metric-value { font-size: var(--step-2); font-weight: 700; color: var(--navy); margin-top: 6px; }

.hero-visual {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--ocean-deepest) 0%, var(--ocean-deep) 45%, var(--ocean) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 28px;
}
.hero-visual::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 36px 36px;
}
.hero-visual .tag {
  position: relative;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 8px 14px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-metric-bridge { flex-direction: column; gap: 20px; }
  .metric + .metric { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 20px; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--teal);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card.accent-green::before { background: var(--green); }
.card.accent-navy::before { background: var(--navy); }
.card h3, .card h4 { margin-bottom: 2px; }
.card .card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal);
  margin-bottom: 6px;
}
.card-link { margin-top: auto; font-weight: 600; color: var(--teal); font-size: var(--step--1); display: inline-flex; align-items: center; gap: 6px; }
.card-link::after { content: "→"; transition: transform .15s ease; }
.card-link:hover::after { transform: translateX(4px); }

/* ---------- Pillars (Environmental / Economics / Sustainability) ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pillar { background: var(--white); padding: 40px 32px; }
.pillar .pillar-index { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); }
.pillar h3 { margin-top: 10px; margin-bottom: 12px; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Stats / Impact ---------- */
.stat-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; background: var(--white); }
.stat-block .stat-num { font-size: var(--step-3); font-weight: 700; color: var(--teal); font-family: var(--font-mono); }
.stat-block .stat-label { color: var(--text-secondary); font-size: var(--step--1); margin-top: 6px; }

/* ---------- Placeholders (images / data) ---------- */
.img-placeholder {
  background: repeating-linear-gradient(135deg, var(--bg), var(--bg) 10px, var(--bg-sink) 10px, var(--bg-sink) 20px);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 24px;
  min-height: 220px;
}
.data-placeholder {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: #F0F3EE;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 14px 18px; font-size: var(--step--1); border-bottom: 1px solid var(--border); }
th { background: var(--white); color: var(--navy); font-weight: 600; }
tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: rgba(20, 125, 126, 0.03); }

/* ---------- Lists with checks ---------- */
.check-list li { position: relative; padding-left: 28px; margin-bottom: 12px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; background: var(--teal); border-radius: 1px; transform: rotate(45deg); }

/* ---------- Breadcrumb / page intro ---------- */
.page-intro { padding: 56px 0 0; }
.page-intro .eyebrow { margin-bottom: 20px; }
.page-intro h1, .page-intro h2.intro-title { max-width: 16ch; margin-bottom: 20px; }
/* h2.intro-title reuses the page's original h1 styling: the real <h1> now
   lives in the video band above, so this stays an h2 to keep one h1 per page. */
.page-intro h2.intro-title { font-family: var(--font-body); font-weight: 700; line-height: 1.15; font-size: var(--step-5); }
.page-intro .lede { max-width: 60ch; }

/* ---------- Article / Insights cards ---------- */
.article-card { display: flex; flex-direction: column; }
.article-card .article-media { aspect-ratio: 16/10; margin-bottom: 18px; }
.article-cat { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--teal); }
.article-card h3 { font-size: var(--step-1); margin: 10px 0 8px; }
.article-meta { color: var(--text-secondary); font-size: 0.82rem; margin-top: auto; padding-top: 14px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
label { font-size: var(--step--1); font-weight: 600; color: var(--navy); }
label .req { color: var(--teal); }
input, textarea, select {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: var(--step--1);
  color: var(--text);
}
textarea { resize: vertical; min-height: 140px; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); }
.field-error { color: #B54545; font-size: 0.8rem; display: none; }
.form-field.invalid input, .form-field.invalid textarea, .form-field.invalid select { border-color: #B54545; }
.form-field.invalid .field-error { display: block; }
.form-note { font-size: 0.82rem; color: var(--text-secondary); margin-top: 6px; }
.form-status { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: var(--step--1); display: none; }
.form-status.show { display: block; }
.form-status.success { background: rgba(106,155,120,0.12); color: var(--green-deep); border: 1px solid rgba(106,155,120,0.35); }
.form-status.error { background: rgba(181,69,69,0.08); color: #8f3a3a; border: 1px solid rgba(181,69,69,0.3); }

@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Final CTA band ---------- */
.cta-band { background: var(--navy); border-radius: var(--radius); padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; color: var(--white); }
.cta-band h2 { color: var(--white); margin-bottom: 8px; font-size: var(--step-2); }
.cta-band p { color: rgba(255,255,255,0.72); }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(165deg, var(--sky-light) 0%, var(--sky-mid) 38%, var(--sky-deep) 100%);
  color: rgba(255,255,255,0.85);
  padding-top: 72px;
  position: relative;
}
.site-footer::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--sky-scrim); pointer-events: none;
}
.site-footer > * { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand img { width: 130px; height: auto; margin-bottom: 10px; }
.footer-brand p { color: rgba(255,255,255,0.6); max-width: 32ch; font-size: var(--step--1); }
.footer-tagline { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--olive-light); margin-top: 14px; }
.footer-col h4 { color: var(--white); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 11px; }
.footer-col a { color: rgba(255,255,255,0.68); font-size: var(--step--1); }
.footer-col a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-block: 26px; font-size: 0.82rem; flex-wrap: wrap; gap: 12px; color: rgba(255,255,255,0.5); }
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--white); }
.footer-legal { display: flex; gap: 20px; }
.footer-visits strong { color: rgba(255,255,255,0.85); font-family: var(--font-mono); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Leadership philosophy card ---------- */
.philosophy-card { padding: 36px; }
.philosophy-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 40px;
  align-items: center;
}
.philosophy-flow {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin: 22px 0 4px;
}
.philosophy-step {
  flex: 1 1 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
}
.philosophy-icon { display: inline-flex; color: var(--teal); margin-bottom: 8px; }
.philosophy-icon svg { width: 26px; height: 26px; }
.philosophy-step-label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 5px;
}
.philosophy-step-desc { display: block; font-size: 0.76rem; line-height: 1.4; color: var(--text-secondary); }
.philosophy-flow-arrow { display: flex; align-items: center; color: var(--teal); font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.philosophy-signature {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.philosophy-signature-photo {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--border);
}
.philosophy-signature-quote { margin: 0 0 3px; font-style: italic; font-size: 0.94rem; color: var(--text); }
.philosophy-signature-name { margin: 0; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
.philosophy-visual { text-align: center; }
.philosophy-visual-img {
  width: 100%;
  max-width: 280px;
  display: block;
  margin: 0 auto 14px;
  border-radius: var(--radius);
}
.philosophy-visual-caption { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; max-width: 260px; margin: 0 auto; }
@media (max-width: 900px) {
  .philosophy-grid { grid-template-columns: 1fr; }
  .philosophy-visual { order: -1; }
  .philosophy-visual-img { max-width: 220px; }
}
@media (max-width: 640px) {
  .philosophy-flow { flex-direction: column; }
  .philosophy-flow-arrow { transform: rotate(90deg); align-self: center; }
}

/* ---------- Process flow chain (text-based, no imagery required) ---------- */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin: 10px 0 16px;
}
.flow .step {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.flow .arrow { color: var(--teal); font-weight: 600; }

/* ---------- Product model card ---------- */
.model-card { position: relative; }
.model-card .model-id {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--teal);
  letter-spacing: 0.04em;
}
.model-card h4 { margin-top: 4px; }
.model-tag { color: var(--text-secondary); font-size: var(--step--1); font-style: normal; }

/* ---------- Deployment tag list ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list span {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--white);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
}
/* ---------- Deployment map (Texas regions) ---------- */
.tx-map-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.tx-map-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  aspect-ratio: 646 / 630;
}
.tx-map-wrap svg { width: 100%; height: 100%; display: block; }
.tx-map-outline { fill: var(--green); stroke: var(--white); stroke-width: 3; }
.tx-map-legend {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.tx-map-legend-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tx-legend-total { text-align: center; }
.tx-legend-total-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
.tx-legend-total-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.tx-legend-bar {
  width: 16px;
  height: 200px;
  border-radius: 999px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
}
.tx-legend-seg { width: 100%; flex-shrink: 0; transition: flex-grow .2s ease; }
.tx-legend-key {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.76rem;
}
.tx-legend-key li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.tx-legend-key-name { flex: 1; }
.tx-legend-key strong {
  font-family: var(--font-mono);
  color: var(--navy);
}
.tx-legend-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .tx-legend-bar { width: 200px; height: 16px; flex-direction: row-reverse; }
}
.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--teal);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 1px #1B4D1F;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}
.map-marker:hover, .map-marker:focus-visible { box-shadow: 0 0 0 3px rgba(181, 69, 69, 0.35); }
.map-marker.is-active { background: #B54545 !important; box-shadow: 0 0 0 1px #B54545; }
.map-marker .marker-label {
  position: absolute;
  top: -8px; left: 26px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--navy);
  font-weight: 700;
  pointer-events: none;
  text-shadow: 0 0 4px var(--white), 0 0 4px var(--white);
}
.map-marker.is-active .marker-label { color: #B54545; }

.map-popup {
  position: absolute;
  z-index: 3;
  min-width: 220px;
  max-width: 260px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.map-popup h4 { font-size: var(--step-0); margin-bottom: 4px; }
.map-popup .map-popup-count {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #B54545;
}
.map-popup .venue-types { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.map-popup .venue-types span {
  font-size: 0.74rem; color: var(--text-secondary); background: var(--bg);
  border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px;
}
.map-popup .map-popup-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: var(--text-secondary);
  font-size: 1rem; line-height: 1; cursor: pointer; padding: 4px;
}

/* ---------- Social icons ---------- */
.social-icons { display: flex; gap: 10px; margin-top: 4px; }
.social-icons a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.social-icons a:hover { background: var(--teal); border-color: var(--teal); color: var(--white); }
.social-icons svg { width: 17px; height: 17px; fill: currentColor; }
.footer-social { display: flex; gap: 14px; margin-top: 18px; }
.footer-social a {
  width: 51px; height: 51px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--white);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.footer-social a:hover { transform: translateY(-2px); filter: brightness(1.08); }
.footer-social svg { width: 24px; height: 24px; fill: currentColor; }
/* Real brand colors per network */
.footer-social a.social-x { background: #000000; }
.footer-social a.social-instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.footer-social a.social-facebook { background: #1877F2; }
.footer-social a.social-linkedin { background: #0A66C2; }

/* ---------- Address block ---------- */
.address-block { margin-bottom: 4px; }
.address-block .address-label {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--teal); display: block; margin-bottom: 4px;
}

/* ---------- Site assistant widget ---------- */
.assistant-toggle {
  position: fixed; bottom: 24px; right: 24px; z-index: 600;
  display: flex; align-items: center; gap: 0;
  background: var(--white); border: 2px solid var(--teal);
  border-radius: 999px; box-shadow: var(--shadow);
  cursor: pointer; padding: 4px 18px 4px 4px;
}
.assistant-toggle:hover { border-color: var(--navy); }
.assistant-toggle .ask-icon {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
}
.assistant-toggle .ask-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.assistant-toggle .ask-label {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem;
  color: var(--navy); letter-spacing: 0.04em; padding-left: 10px; white-space: nowrap;
}

.assistant-panel {
  position: fixed; bottom: 92px; right: 24px; z-index: 601;
  width: min(340px, calc(100vw - 32px));
  max-height: min(480px, calc(100vh - 140px));
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.assistant-panel[hidden] { display: none; }
.assistant-header {
  background: var(--navy); color: var(--white);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
}
.assistant-header h4 { color: var(--white); font-size: var(--step--1); margin: 0; }
.assistant-header .assistant-sub { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.6); font-weight: 400; margin-top: 2px; }
.assistant-close { background: none; border: none; color: rgba(255,255,255,0.8); font-size: 1.1rem; cursor: pointer; padding: 4px; }
.assistant-messages { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.assistant-msg { font-size: 0.85rem; line-height: 1.5; max-width: 92%; }
.assistant-msg.bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; }
.assistant-msg.user { align-self: flex-end; background: var(--teal); color: var(--white); border-radius: var(--radius-sm); padding: 9px 12px; }
.assistant-typing { display: flex; gap: 4px; align-items: center; padding: 12px !important; }
.assistant-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-secondary); opacity: 0.5; animation: assistant-typing-bounce 1.1s infinite ease-in-out; }
.assistant-typing span:nth-child(2) { animation-delay: 0.15s; }
.assistant-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes assistant-typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-3px); opacity: 1; } }
.assistant-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.assistant-quick button {
  font-size: 0.72rem; background: var(--white); border: 1px solid var(--border);
  color: var(--teal); padding: 6px 10px; border-radius: 999px; cursor: pointer;
}
.assistant-quick button:hover { background: var(--bg); }
.assistant-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.assistant-form input { flex: 1; padding: 9px 12px; font-size: 0.82rem; }
.assistant-form button { padding: 9px 14px; }

.model-card .model-render {
  margin: -32px -32px 16px;
  aspect-ratio: 16/13;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.model-card .model-render img { width: 100%; height: 100%; object-fit: cover; display: block; }
.model-card .device-icon { width: auto; height: 78%; }
.model-card .device-context-badge {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 1px solid var(--border); border-radius: 50%;
  color: var(--teal);
}
.model-card .device-context-badge svg { width: 16px; height: 16px; }
.model-card .feature-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.model-card .feature-tags .feature-tag-btn {
  font-size: 0.7rem; color: var(--navy); background: var(--bg);
  border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px;
  cursor: pointer; font-family: var(--font-body); transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.model-card .feature-tags .feature-tag-btn:hover { border-color: var(--teal); color: var(--teal); }
.model-card .feature-tags .feature-tag-btn.is-active { background: var(--teal); border-color: var(--teal); color: var(--white); }
.model-card .feature-detail {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
}
.model-card .feature-detail[hidden] { display: none; }

/* ---------- Language switcher ---------- */
.lang-switch { display: flex; align-items: center; gap: 5px; margin-right: 4px; }
.lang-switch a {
  width: 26px; height: 19px; border-radius: 3px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  opacity: 0.65;
}
.lang-switch a svg { width: 100%; height: 100%; display: block; }
.lang-switch a:hover { opacity: 1; }
.lang-switch a.lang-active { opacity: 1; border-color: var(--white); box-shadow: 0 0 0 1px var(--white); }

.section-img {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
  border: 1px solid var(--border);
}
.section-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.page-hero-img {
  margin-top: 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/6;
  position: relative;
}
.page-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-hero-img .img-credit {
  position: absolute; bottom: 10px; right: 14px;
  font-size: 0.68rem; color: rgba(255,255,255,0.85);
  background: rgba(14,52,64,0.55); padding: 3px 9px; border-radius: 999px;
  font-family: var(--font-mono);
}

/* ---------- Splash / intro screen ---------- */
.splash-screen {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.splash-screen.splash-hide { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-mark {
  width: 132px;
  height: auto;
  margin-bottom: 20px;
  opacity: 0;
  transform: scale(0.82);
  animation: splash-mark-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
}
@keyframes splash-mark-in {
  to { opacity: 1; transform: scale(1); }
}
.splash-circle {
  opacity: 0;
  transform-origin: center;
  transform: scale(0.4);
  animation: splash-circle-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.splash-circle-1 { animation-delay: 0.1s; }
.splash-circle-2 { animation-delay: 0.28s; }
.splash-circle-3 { animation-delay: 0.46s; }
@keyframes splash-circle-in {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

.splash-word {
  display: flex; flex-direction: column; align-items: center;
  opacity: 0;
  animation: splash-word-in 0.7s ease 0.75s forwards;
}
.splash-name {
  font-family: var(--font-body); font-weight: 800; font-size: var(--step-3);
  letter-spacing: -0.01em; color: #fff;
}
.splash-sub {
  font-family: var(--font-mono); font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.5);
  margin-top: 4px;
}
@keyframes splash-word-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.splash-tagline {
  color: rgba(255,255,255,0.55);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin-top: 22px;
  opacity: 0;
  animation: splash-word-in 0.6s ease 1.05s forwards;
}
.splash-skip {
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
  background: none; border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  margin-top: 20px;
  opacity: 0;
  animation: splash-word-in 0.6s ease 1.25s forwards;
}
.splash-skip:hover { color: #fff; border-color: rgba(255,255,255,0.5); }
@media (prefers-reduced-motion: reduce) {
  .splash-mark, .splash-word, .splash-tagline, .splash-skip { animation: none; opacity: 1; transform: none; }
}

.acronym-tile, .approach-tile {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--white);
  display: block;
  background: var(--navy-deep);
}
.approach-tile { transition: transform 0.15s ease; }
.approach-tile:hover { transform: translateY(-3px); }
.acronym-tile img, .approach-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Full-bleed photo behind the tile, with a permanent light tint so any
   photo reads consistently with the site's dark palette. */
.tile-photo { position: absolute; inset: 0; z-index: 0; }
.acronym-tile::before, .approach-tile::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,20,25,.30) 0%, rgba(6,20,25,.10) 45%, rgba(6,20,25,.30) 100%);
}
.tile-ghost {
  position: absolute; top: -0.12em; left: 0.05em; z-index: 1;
  font-family: var(--font-body); font-weight: 800;
  font-size: 7.5rem; line-height: 1;
  color: rgba(28, 154, 155, 0.28);
  user-select: none;
}
.tile-icon {
  position: absolute; top: 18px; left: 18px; z-index: 1;
  color: rgba(28, 154, 155, 0.55);
}
.tile-icon svg { width: 64px; height: 64px; }
.step-visual {
  height: 120px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  color: var(--teal);
  border-bottom: 1px solid var(--border);
}
.step-visual svg { width: 42px; height: 42px; }
.step-visual--green { color: var(--green-deep); }
.step-visual--navy { color: var(--navy); }
/* Caption is hidden by default and revealed only on hover / keyboard focus /
   tap — nothing is shown below the photo until then. On reveal it covers the
   whole tile (not just a bottom strip) so a fuller description has room. */
.acronym-tile .tile-caption, .approach-tile .tile-caption {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(6,14,18,0.90) 0%, rgba(6,14,18,0.96) 100%);
  padding: 28px 24px;
  display: flex; align-items: flex-start; gap: 12px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  overflow-y: auto;
}
.approach-tile:hover .tile-caption,
.approach-tile:focus-visible .tile-caption,
.approach-tile.is-open .tile-caption,
.acronym-tile:hover .tile-caption,
.acronym-tile.is-open .tile-caption {
  opacity: 1; transform: none; pointer-events: auto;
}
.acronym-tile .tile-letter, .approach-tile .tile-letter {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.3rem;
  border: 1px solid rgba(255,255,255,0.5); border-radius: var(--radius-sm);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.acronym-tile .tile-text h5, .approach-tile .tile-text h5 { color: var(--white); font-size: 1rem; margin: 0 0 6px; }
.acronym-tile .tile-text p, .approach-tile .tile-text p { color: rgba(255,255,255,0.8); font-size: 0.8rem; line-height: 1.55; margin: 0; }
/* Extra explanation, hidden until the tile is clicked/tapped open (see
   initPhotoTiles in main.js) — hover alone only reveals the short caption. */
.tile-detail {
  display: block; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7) !important; font-size: 0.72rem !important; line-height: 1.4 !important;
}
/* Touch devices have no hover: tapping the tile toggles the caption via
   the .is-open class (see initPhotoTiles in main.js). */

.article-banner {
  aspect-ratio: 16/9;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -32px -32px 18px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 16px;
}
.article-banner .banner-text {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.96);
  font-weight: 800;
  font-size: clamp(1.5rem, 6cqw, 2.4rem);
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.article-banner svg { width: 30px; height: 30px; color: rgba(255,255,255,0.55); position: absolute; top: 14px; right: 14px; z-index: 1; }
.article-banner::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.14) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
}
.banner-green { background: linear-gradient(135deg, var(--olive), var(--olive-deep)); }
.banner-red { background: linear-gradient(135deg, #C0503F, #9B3A2C); }
.banner-blue { background: linear-gradient(135deg, var(--ocean-light), var(--ocean)); }
.banner-orange { background: linear-gradient(135deg, #D98A2B, #B56A16); }
.banner-teal { background: linear-gradient(135deg, var(--teal-light), var(--teal)); }
.banner-navy { background: linear-gradient(135deg, var(--ocean), var(--ocean-deepest)); }

.contact-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.contact-row svg { width: 17px; height: 17px; color: var(--teal); flex-shrink: 0; }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-top: 20px; aspect-ratio: 16/10; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.badge.filter-badge.is-active { background: var(--teal); color: var(--white); border-color: var(--teal); }
.article-card[hidden] { display: none; }

.flow .step.flow-step-btn {
  font-family: var(--font-mono); background: var(--bg); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 999px; white-space: nowrap; font-size: 0.74rem;
  cursor: pointer; color: var(--text-secondary); transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.flow .step.flow-step-btn:hover { border-color: var(--teal); color: var(--teal); }
.flow .step.flow-step-btn.is-active { background: var(--teal); border-color: var(--teal); color: var(--white); }
.flow-detail[hidden] { display: none; }

/* ---------- Scroll fade-in ---------- */
.fade-in-up { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in-up.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .fade-in-up { opacity: 1; transform: none; transition: none; }
}

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.small { font-size: 0.85rem; }
.divider { height: 1px; background: var(--border); border: none; margin-block: 48px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-secondary);
}

/* ==========================================================================
   Brand mark, motion & micro-interaction layer
   Added in the v14 pass. Everything here is additive and degrades safely:
   each effect is gated behind prefers-reduced-motion, and reveal elements
   are made visible by default so the page is readable with JS disabled.
   ========================================================================== */

.footer-logo {
  width: 88px;
  height: auto;
  margin-bottom: 18px;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.35));
}

/* ---------- Sticky header: condense on scroll ---------- */
.site-header {
  transition: box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}
/* The blur lives on a pseudo-element, NOT on .site-header itself.
   backdrop-filter (like transform and filter) turns an element into the
   containing block for its position:fixed descendants — putting it on the
   header re-anchored the fixed mobile menu panel to the header box and
   collapsed it to ~52px tall. Isolating it here keeps the viewport as the
   containing block for the menu. */
.site-header.is-stuck { box-shadow: 0 6px 28px rgba(4, 34, 45, 0.35); }
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(100deg, var(--sky-light) 0%, var(--sky-mid) 46%, var(--sky-deep) 100%);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.site-header.is-stuck::before { opacity: 1; }

/* ---------- Scroll reveal ---------- */
/* Visible by default; main.js adds .reveal-ready to <html> only when
   IntersectionObserver is supported, which is what arms the animation. */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ---------- Card / button micro-interactions ---------- */
.card,
.stat-block {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              border-color 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--ocean) 35%, var(--border));
}

.btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(14, 110, 149, 0.30); }

/* Link arrows lean forward on hover */
.card-link, .btn-ghost { transition: gap 0.25s var(--ease), color 0.25s var(--ease); }
.card-link:hover, .btn-ghost:hover { gap: 12px; color: var(--ocean-light); }

/* Underline sweep on nav links */
.main-nav a.nav-link, .main-nav button.nav-link { position: relative; }
.main-nav a.nav-link::after,
.main-nav button.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  /* Light gradient reads on the dark header. Inside the mobile panel (white
     background) it flips to the ocean/olive pair — see the override below. */
  background: linear-gradient(90deg, var(--olive-light), var(--white));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.main-nav a.nav-link:hover::after,
.main-nav button.nav-link:hover::after,
.main-nav a.nav-link.active::after { transform: scaleX(1); }
.main-nav.mobile-open a.nav-link::after,
.main-nav.mobile-open button.nav-link::after {
  background: linear-gradient(90deg, var(--ocean), var(--olive));
}

/* ---------- Media ---------- */
img { height: auto; }
.card img, .media img { transition: transform 0.6s var(--ease); }
.card:hover img { transform: scale(1.04); }

/* ---------- Honour the user's motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
  .card:hover, .btn:hover, .brand:hover .brand-mark,
  .card:hover img { transform: none !important; }
}

/* ==========================================================================
   Bugfix: small-phone header overflow
   The header row held brand + flags + two buttons + the menu toggle with no
   rule below 980px. On a 390px viewport the primary CTA overflowed the
   viewport and pushed the hamburger completely off-screen, leaving phone
   users with no navigation at all. Verified in the v13 build before change.
   ========================================================================== */
.nav-wrap { min-width: 0; }
.brand { min-width: 0; }

@media (max-width: 720px) {
  /* The badge carries the brand on its own at this size. */
  .brand-word { display: none; }
  .header-actions { gap: 10px; }
  .header-actions .btn-primary { padding: 9px 14px; font-size: var(--step--1); }
  .lang-switch { gap: 6px; }
}

@media (max-width: 480px) {
  /* Below this the CTA can't coexist with the toggle. It is already the
     first item inside the opened menu, so nothing becomes unreachable. */
  .header-actions .btn-primary { display: none; }
}

/* The menu toggle is the only route to navigation on phones — it must never
   be the element that gets squeezed out. */
.nav-toggle { flex-shrink: 0; }

/* CTAs live in the header bar on desktop and inside the menu panel on phones. */
.mobile-cta { display: none; }
@media (max-width: 980px) {
  .main-nav.mobile-open .mobile-cta { display: block; margin-top: 10px; }
  .main-nav.mobile-open .mobile-cta .btn { width: 100%; justify-content: center; }
}

/* Spanish labels run ~30% longer than English; between the 980px nav
   breakpoint and ~1280px the header row ran past the viewport edge on the
   /es/ pages. Shed the secondary CTA first (it also lives in the footer),
   then tighten the nav rhythm before anything is allowed to overflow. */
@media (max-width: 1280px) {
  .header-actions .btn-outline { display: none; }
  .main-nav > ul { gap: 0; }
  .main-nav a.nav-link, .main-nav button.nav-link { padding-inline: 10px; }
}
/* Spanish needs the same relief ~140px earlier. */
@media (max-width: 1440px) {
  html[lang="es"] .header-actions .btn-outline { display: none; }
  html[lang="es"] .main-nav > ul { gap: 0; }
  html[lang="es"] .main-nav a.nav-link,
  html[lang="es"] .main-nav button.nav-link { padding-inline: 9px; font-size: var(--step--1); }
}

/* Grid items default to min-width:auto, so any wide or non-wrapping child
   (long Spanish strings in .flow, monospace .model-id) can push a track past
   its share and force the page to scroll sideways. minmax(0, 1fr) caps the
   track at the container width and lets the child wrap or scroll instead.
   This was overflowing es/technology.html at 390px and 820px. */
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

.card, .model-card { min-width: 0; }
.flow { flex-wrap: wrap; }
.model-id { overflow-wrap: anywhere; }

/* Process-step buttons sized to their longest label; Spanish blows past the
   container gutter at 390px. Let them shrink and wrap their text. */
.flow-step-btn, .step {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Two pages still reported a wider scrollWidth than viewport with no
   overflowing element in the DOM — the culprit is a decorative pseudo-element,
   which getBoundingClientRect can't surface. `clip` (not `hidden`) trims the
   stray paint without creating a scroll container, so position:sticky on the
   header keeps working. */
body { overflow-x: clip; }

/* Honeypot field for the contact/volunteer forms. Real visitors never see
   or reach it (off-screen + unreachable by Tab); form-filling bots that
   populate every field they find will fill this one, which is how the JS
   spots and silently drops them — see initContactForm/initVolunteerForm
   in main.js. display:none is deliberately avoided since some bots skip
   fields hidden that way; this is hidden by position instead. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
