/* ============================================================
   Britt Broadcast — Components
   Requires tokens.css. Plain CSS, no framework needed.
   ============================================================ */

/* ---------- Base ---------- */
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
}
body.has-watermark {
  background-image: url('../images/brand-watermark.png');
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 81% auto;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: var(--leading-tight);
  margin: 0;
}
p { margin: 0; }
a { color: var(--color-primary-text); text-decoration: none; }
a:hover { color: var(--color-link-hover); }

.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.section { padding: var(--space-9) 0; }
.section-dark {
  background: var(--surface-dark);
  color: var(--text-on-dark-muted);
}
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--text-on-dark); }
.section-tint { background: var(--color-primary-tint); }

/* --color-primary-text (green-700) is AA-safe on light surfaces but too dark
   on black — restore the brighter green-600 for plain links here,
   where it already passes AA (5.76:1). */
.section-dark a:not(.btn), .hero a:not(.btn) { color: var(--color-primary); }
.section-dark a:not(.btn):hover, .hero a:not(.btn):hover { color: #fff; }

/* Lead line under a section heading — carries the promise the heading names. */
.lede {
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  color: var(--text-heading);
  max-width: 34ch;
  text-wrap: balance;
}

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-nav);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease,
              border-color var(--duration-fast) ease, transform var(--duration-fast) ease;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn svg, .btn .lucide { width: 16px; height: 16px; }

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

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-heading);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-link-hover);
  background: var(--color-primary-tint);
}

/* Outline variant for dark sections */
.section-dark .btn-outline, .hero .btn-outline, .btn-outline.on-dark {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--text-on-dark);
}
.section-dark .btn-outline:hover, .hero .btn-outline:hover, .btn-outline.on-dark:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(35, 157, 72, 0.08);
}

.btn-sm { padding: 10px 20px; font-size: var(--text-sm); }

/* ---------- Card (service) ---------- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--border-strong);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--color-primary-tint);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.card-icon svg, .card-icon .lucide { width: 22px; height: 22px; }
.card h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.card p { font-size: var(--text-sm); color: var(--text-muted); }

/* ---------- ProjectCard (case study) ---------- */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}
.project-card-media {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    135deg,
    var(--color-primary-tint) 0 12px,
    var(--surface-page) 12px 24px
  );
  border-bottom: 1px solid var(--border);
}
.project-card-media span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.project-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
}
.project-card h3 { font-size: var(--text-xl); font-weight: 600; }
.project-card-client { font-size: var(--text-sm); color: var(--text-muted); }
.project-card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-heading);
}
.project-card:hover .project-card-link { color: var(--color-primary); }
.project-card-link svg, .project-card-link .lucide {
  width: 15px; height: 15px;
  transition: transform var(--duration-fast) ease;
}
.project-card:hover .project-card-link svg,
.project-card:hover .project-card-link .lucide { transform: translateX(3px); }

/* ---------- TopBar ---------- */
.topbar {
  background: var(--surface-dark);
  color: var(--text-on-dark-muted);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 40px;
}
.topbar-info {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-width: 0;
}
.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.topbar-item:hover { color: var(--text-on-dark); }
.topbar-item svg { width: 14px; height: 14px; color: var(--color-primary); flex-shrink: 0; }
.topbar-social { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.topbar-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-dark-muted);
  transition: color var(--duration-fast) ease;
}
.topbar-social a:hover { color: var(--color-primary); }
.topbar-social svg { width: 15px; height: 15px; }

@media (max-width: 820px) {
  .topbar-address { display: none; }
}

/* ---------- NavBar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: 72px;
}
.navbar-logo img { height: 40px; width: auto; display: block; }
.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.navbar-links a {
  font-family: var(--font-nav);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-body);
  transition: color var(--duration-fast) ease;
}
.navbar-links a:hover { color: var(--color-primary); }
.navbar-cta { display: flex; align-items: center; gap: var(--space-4); }

.has-dropdown { position: relative; }
.has-dropdown > a { display: inline-flex; align-items: center; gap: 4px; }
.nav-caret { width: 14px; height: 14px; transition: transform var(--duration-fast) ease; }
.has-dropdown:hover .nav-caret, .has-dropdown:focus-within .nav-caret { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin: var(--space-2) 0 0;
  padding: var(--space-2);
  min-width: 160px;
  list-style: none;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--duration-fast) ease, transform var(--duration-fast) ease, visibility var(--duration-fast);
}
.has-dropdown:hover .nav-dropdown, .has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: calc(var(--radius) - 2px);
  font-size: var(--text-sm);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
}
.nav-dropdown a:hover { background: var(--color-primary-tint); color: var(--color-primary); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-card);
  color: var(--text-heading);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
}
.nav-toggle svg { width: 22px; height: 22px; display: block; }
.navbar-mobile {
  display: none;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--surface-card);
}
.navbar-mobile a {
  font-family: var(--font-nav);
  padding: var(--space-3) 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-body);
}
.navbar-mobile a:hover { color: var(--color-primary); }
.navbar.is-open .navbar-mobile { display: flex; }

@media (max-width: 820px) {
  .navbar-links, .navbar-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--surface-dark);
  color: var(--text-on-dark-muted);
  overflow: hidden;
  padding: var(--space-9) 0 0;
}
/* Homepage hero only - with the heading/subtext removed there's barely any
   content left, so without a floor height the slideshow photos would
   shrink down to fit it. Keep the hero (and its photos) the same size as
   before, with the remaining buttons/trusted-by text and the waveform
   grouped together at the bottom instead of riding up under a short
   content block, so the top of the photo stays clear. */
.hero-home {
  display: flex;
  flex-direction: column;
  min-height: 680px;
}
.hero-home .container { margin-top: auto; }
@media (max-width: 640px) {
  .hero-home { min-height: 420px; }
  /* On a narrow screen the buttons + trusted-by line were wrapping onto
     several lines each, stacking up into a tall, cluttered block that ate
     most of the photo. Tighten them so the slideshow stays the main thing
     on screen. */
  .hero-home .hero-inner { padding-bottom: var(--space-5); }
  .hero-home .hero-actions { gap: var(--space-3); }
  .hero-home .btn { padding: 11px 20px; font-size: 0.8125rem; }
  .hero-home .hero-trusted {
    font-size: 0.625rem;
    letter-spacing: 0.06em;
    line-height: 1.6;
  }
}
/* The dark diagonal overlay exists to keep the (now-removed) left-aligned
   heading legible; without that text it just dims the photo for no reason.
   Keep only a light bottom fade, for the buttons/trusted-by line that still
   sit over the image, so the slideshow reads as bright and clear as the
   photos on their own. */
.hero-home .hero-watermark::after {
  background: linear-gradient(180deg, rgba(5, 7, 7, 0) 55%, rgba(5, 7, 7, 0.6) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding-bottom: var(--space-8);
}
.hero h1 {
  font-size: clamp(var(--text-3xl), 5.4vw, var(--text-5xl));
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7), 0 1px 4px rgba(0, 0, 0, 0.8);
}
.hero h1 em {
  font-style: normal;
  color: var(--color-primary);
}
.hero-sub {
  font-size: var(--text-lg);
  max-width: 560px;
  margin-bottom: var(--space-6);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }

.hero-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
/* Plain static hero photo - used on every page other than the homepage
   (About, Contact, Projects, Services, Team), each with a single <img>
   directly inside .hero-watermark instead of the homepage's slide track. */
.hero-watermark > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.1) brightness(1.05);
}
/* Homepage hero slideshow - real project photos sliding on a loop, driven by
   assets/js/site.js (translateX on the track, autoplay + prev/next/dots),
   matching the sliding behavior of the live brittbroadcast.com hero. */
.hero-slide-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1);
}
.hero-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.1) brightness(1.05);
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide-track { transition: none; }
}
.hero-watermark::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(5, 7, 7, 0.85) 0%, rgba(5, 7, 7, 0.55) 24%, rgba(5, 7, 7, 0.22) 45%, rgba(5, 7, 7, 0.05) 65%, rgba(5, 7, 7, 0.2) 100%),
    linear-gradient(180deg, rgba(5, 7, 7, 0) 0%, rgba(5, 7, 7, 0.45) 100%);
}

/* Hero slideshow controls - prev/next arrows + dots, mirroring the owl-carousel
   nav/dots on the live site's homepage hero. */
.hero-arrow {
  position: absolute;
  top: 46%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(5, 7, 7, 0.35);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.hero-arrow svg { width: 20px; height: 20px; }
.hero-arrow-prev { left: var(--space-4); }
.hero-arrow-next { right: var(--space-4); }
.hero:hover .hero-arrow,
.hero-arrow:focus-visible { opacity: 1; }
.hero-arrow:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.hero-dots {
  position: absolute;
  z-index: 2;
  right: var(--space-5);
  bottom: calc(72px + var(--space-4));
  display: flex;
  gap: 0;
}
.hero-dot {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.hero-dot::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.hero-dot:hover::after { border-color: var(--color-primary); }
.hero-dot.is-active::after {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: scale(1.15);
}
@media (max-width: 640px) {
  .hero-arrow { display: none; }
  .hero-dots { bottom: calc(60px + var(--space-3)); right: var(--space-4); }
}

/* Animated waveform strip */
.waveform {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 72px;
  padding: 0 var(--space-5);
  border-top: 1px solid var(--border-on-dark);
}
.waveform i {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: var(--color-primary);
  opacity: 0.75;
  transform-origin: bottom;
  animation: waveform-bar 1.4s ease-in-out infinite alternate;
}
@keyframes waveform-bar {
  from { transform: scaleY(0.25); opacity: 0.35; }
  to   { transform: scaleY(1);    opacity: 0.85; }
}

@keyframes waveform-bar-calm {
  from { transform: scaleY(0.7); }
  to   { transform: scaleY(1); }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--surface-dark);
  color: var(--text-on-dark-muted);
  padding: var(--space-8) 0 var(--space-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: var(--space-7);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid var(--border-on-dark);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}
.footer-logo img {
  height: 44px;
  width: auto;
  display: block;
  /* White-out for dark surfaces — the only approved logo alteration */
  filter: brightness(0) invert(1);
  margin-bottom: var(--space-4);
}
.footer p { font-size: var(--text-sm); max-width: 340px; }
.footer-social { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-5); }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-on-dark);
  color: var(--text-on-dark-muted);
  transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease, background var(--duration-fast) ease;
}
.footer-social a:hover { background: rgba(255, 255, 255, 0.05); }
.footer-social svg { width: 16px; height: 16px; }
.footer-social a[aria-label="Facebook"]:hover { color: #1877F2; border-color: #1877F2; }
.footer-social a[aria-label="LinkedIn"]:hover { color: #0A66C2; border-color: #0A66C2; }
.footer-social a[aria-label="Instagram"]:hover { color: #E1306C; border-color: #E1306C; }
.footer-social a[aria-label="Twitter"]:hover { color: #fff; border-color: #fff; }
.footer h3 {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-on-dark);
  margin-bottom: var(--space-4);
}
.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer ul a, .footer address a {
  font-size: var(--text-sm);
  color: var(--text-on-dark-muted);
  transition: color var(--duration-fast) ease;
}
.footer ul a:hover, .footer address a:hover { color: var(--color-primary); }
.footer address {
  font-style: normal;
  font-size: var(--text-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer address .row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.footer address .lucide, .footer address svg {
  width: 16px; height: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-5);
  font-size: var(--text-xs);
}
.footer-bottom .energy { color: var(--color-primary); font-weight: 500; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  /* Decorative, low-amplitude: soften rather than stop, so the strip stays alive */
  .waveform i { animation-name: waveform-bar-calm; animation-duration: 3.2s; }
}

/* ============================================================
   Utilities — replace the one-off inline `style="..."` values
   that used to be scattered across every page.
   ============================================================ */

/* ---------- Layout ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.grid { display: grid; }
.grid-160 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.grid-180 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-200 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-260 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-280 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-300 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-300-fill { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-320 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-7 { gap: var(--space-7); }

.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }

.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-7 { margin-bottom: var(--space-7); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.max-w-460 { max-width: 460px; }
.max-w-480 { max-width: 480px; }
.max-w-560 { max-width: 560px; }
.max-w-620 { max-width: 620px; }
.max-w-640 { max-width: 640px; }
.max-w-760 { max-width: 760px; }

/* ---------- Typography ---------- */
.heading-4xl { font-size: var(--text-4xl); font-weight: 700; }
.heading-3xl { font-size: var(--text-3xl); font-weight: 700; }
.heading-2xl { font-size: var(--text-2xl); font-weight: 700; }
.heading-xl { font-size: var(--text-xl); font-weight: 600; }
.heading-lg { font-size: var(--text-lg); font-weight: 600; }
.heading-base { font-size: var(--text-base); font-weight: 600; }
.heading-sm { font-size: var(--text-sm); font-weight: 600; }
.hero-title-clamp { font-size: clamp(var(--text-3xl), 4.5vw, var(--text-4xl)); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-muted { color: var(--text-muted); }
.text-error { font-size: var(--text-xs); color: #B3261E; }

.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;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-4);
  z-index: 1000;
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary-hover);
  color: #fff;
  font-family: var(--font-nav);
  font-weight: 700;
  border-radius: var(--radius);
  transition: top var(--duration-fast) ease;
}
.skip-link:focus {
  top: var(--space-4);
}

/* ---------- Sector / stat tiles ---------- */
.sector-card {
  background: var(--surface-dark-raised);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.sector-card-icon { color: var(--color-primary); width: 22px; height: 22px; }
.sector-card h3 { font-size: var(--text-lg); font-weight: 600; margin: var(--space-3) 0 var(--space-2); }
.sector-card p { font-size: var(--text-sm); }

.sector-tile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.sector-tile svg { color: var(--color-primary); width: 20px; height: 20px; flex-shrink: 0; }
.sector-tile span { font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm); color: var(--text-heading); }

.stat-number { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 700; color: var(--color-primary); }
.stat-label { font-size: var(--text-sm); margin-top: var(--space-2); }

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: var(--space-3);
}
.partner-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 76px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-base) ease, border-color var(--duration-base) ease;
}
.partner-tile:hover { box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.partner-tile img {
  display: block;
  max-width: 100%;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.partner-tile span {
  display: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-heading);
  text-align: center;
}
.partner-tile:has(> span:only-child) span { display: block; }

/* ---------- Team card ---------- */
.team-card {
  position: relative;
  aspect-ratio: 322 / 450;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--color-primary-tint);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.team-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0, 0, 0, 0.26); }
.team-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
  /* Photos are shot against different walls/lighting - even them out
     toward a light, neutral studio backdrop like the reference cards. */
  filter: brightness(1.08) contrast(0.94) saturate(0.92);
}
.team-card-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(2, 2, 1, 0) 55%, rgba(0, 0, 0, 0.92) 88%);
}
.team-card-body {
  position: relative;
  z-index: 2;
  padding: var(--space-5);
  text-align: center;
}
.team-name { font-family: 'Roboto', sans-serif; font-size: var(--text-lg); font-weight: 600; color: #fff; margin-bottom: var(--space-1); }
.team-role { font-family: 'Roboto', sans-serif; font-size: var(--text-sm); font-weight: 400; color: rgba(255, 255, 255, 0.85); margin-bottom: var(--space-4); }
.team-social { display: flex; justify-content: center; gap: var(--space-2); }
.team-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transition: background var(--duration-fast) ease;
}
.team-social a svg { width: 14px; height: 14px; }
.team-social a:hover { background: var(--color-primary); }

/* Placeholder card: no photo yet, no scrim, centered muted content */
.team-card.is-placeholder {
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border-strong);
  box-shadow: none;
}
.team-card.is-placeholder .team-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-card);
  color: var(--color-primary);
  margin: 0 auto var(--space-4);
}
.team-card.is-placeholder .team-avatar svg { width: 26px; height: 26px; opacity: 0.7; }
.team-card.is-placeholder .team-name { color: var(--text-heading); }
.team-card.is-placeholder .team-role { color: var(--text-muted); }
.team-card.is-placeholder .team-social a { background: var(--surface-dark); color: #fff; }
.team-card.is-placeholder .team-social a:hover { background: var(--color-primary); }

.check-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-body); }
.check-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.check-list svg { color: var(--color-primary-text); width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; }
.check-list.on-dark svg { color: var(--color-primary); }

/* ---------- Media placeholder (photo slot + fallback label) ---------- */
.media-placeholder {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(135deg, var(--color-primary-tint) 0 12px, var(--surface-page) 12px 24px);
}
.media-placeholder.on-dark {
  border-color: var(--border-on-dark);
  background: var(--surface-dark-raised);
}
.media-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-placeholder span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: var(--space-3);
  text-align: center;
}
.media-placeholder.on-dark span { color: var(--text-on-dark-muted); }
.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-4-3 { aspect-ratio: 4 / 3; }

/* ---------- Project photo gallery + lightbox ---------- */
.project-gallery { display: flex; flex-direction: column; gap: var(--space-3); }
.project-gallery-item { display: block; padding: 0; border: none; background: none; cursor: zoom-in; width: 100%; }
.project-gallery-item .media-placeholder { transition: opacity var(--duration-fast) ease; }
.project-gallery-item:hover .media-placeholder { opacity: 0.85; }
.project-gallery-thumbs { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.project-gallery-thumbs .project-gallery-item { width: 84px; flex-shrink: 0; }
.project-gallery-thumbs .media-placeholder { border-radius: var(--radius); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 7, 0.92);
  padding: var(--space-6);
  box-sizing: border-box;
}
.lightbox-stage { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; }
.lightbox-stage img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-on-dark);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark);
  cursor: pointer;
  transition: border-color var(--duration-fast) ease, color var(--duration-fast) ease, background var(--duration-fast) ease;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { border-color: var(--color-primary); color: var(--color-primary); }
.lightbox-close svg, .lightbox-prev svg, .lightbox-next svg { width: 20px; height: 20px; }
.lightbox-close { top: var(--space-5); right: var(--space-5); }
.lightbox-prev { left: var(--space-5); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: var(--space-5); top: 50%; transform: translateY(-50%); }
.lightbox-counter {
  position: absolute;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
}
@media (max-width: 640px) {
  .lightbox { padding: var(--space-4); }
  .lightbox-prev, .lightbox-next { width: 38px; height: 38px; }
  .lightbox-close { top: var(--space-3); right: var(--space-3); }
  .lightbox-prev { left: var(--space-3); }
  .lightbox-next { right: var(--space-3); }
}

/* ---------- Footer (full-width container + divider) ---------- */
.footer-container-full {
  width: 100%;
  max-width: none;
  padding: 0 var(--space-6);
  box-sizing: border-box;
}
.footer-divider {
  border-top: 1px solid var(--border-on-dark);
  padding-top: var(--space-5);
}

/* ---------- Form ---------- */
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600; color: var(--text-heading); }
.form-label .optional { font-weight: 400; color: var(--text-muted); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-heading);
  background: var(--surface-card);
}
.form-textarea { resize: vertical; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(35, 157, 72, 0.3);
}
.form-success {
  background: var(--color-primary-tint);
  border: 1px solid var(--green-600);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.form-success svg { width: 20px; height: 20px; color: var(--color-primary-text); flex-shrink: 0; margin-top: 2px; }
.form-success-title { font-family: var(--font-display); font-weight: 600; color: var(--text-heading); margin-bottom: 4px; }
.form-success-body { font-size: var(--text-sm); color: var(--text-body); }

.contact-address { font-style: normal; display: flex; flex-direction: column; gap: var(--space-3); font-size: var(--text-sm); color: var(--text-body); }
.contact-address .row { display: flex; gap: var(--space-3); align-items: flex-start; }
.contact-address svg { width: 16px; height: 16px; color: var(--color-primary-text); flex-shrink: 0; margin-top: 2px; }
.contact-address a { color: var(--color-primary-text); }

/* ---------- Projects filter/detail view ---------- */
.project-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-6); }
.project-card-btn { text-align: left; cursor: pointer; padding: 0; font: inherit; }
.project-detail-scope { margin: 0 0 var(--space-6); padding: 0; }

/* ---------- Floating widgets (WhatsApp chat + back-to-top) ---------- */
.wa-widget {
  position: fixed;
  left: var(--space-5);
  bottom: var(--space-7);
  z-index: 100;
}
.wa-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #25D366;
  color: #fff;
  box-shadow: var(--shadow-lift);
  cursor: pointer;
  transition: transform var(--duration-fast) ease;
}
.wa-fab:hover { transform: scale(1.06); }
.wa-fab svg { width: 32px; height: 32px; }

.wa-popup {
  position: absolute;
  left: 0;
  bottom: calc(100% + var(--space-3));
  width: 300px;
  max-width: calc(100vw - var(--space-6));
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--surface-dark-raised);
}
.wa-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  background: #25D366;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
}
.wa-popup-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.15);
  color: #fff;
  cursor: pointer;
}
.wa-popup-close svg { width: 15px; height: 15px; }
.wa-popup-body { padding: var(--space-5) var(--space-4) var(--space-3); }
.wa-bubble {
  position: relative;
  background: var(--gray-900);
  color: var(--text-on-dark);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
}
.wa-bubble p { margin-bottom: 2px; }
.wa-bubble p:last-child { margin-bottom: 0; }
.wa-bubble::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: -8px;
  border-width: 8px 8px 0 0;
  border-style: solid;
  border-color: var(--gray-900) transparent transparent transparent;
}
.wa-popup-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-3) var(--space-4) var(--space-4);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: #25D366;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
}
.wa-popup-cta:hover { background: #1EBE5A; color: #fff; }
.wa-popup-cta svg { width: 18px; height: 18px; }

.back-to-top {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-7);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-card);
  color: var(--text-heading);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { border-color: var(--color-primary); color: var(--color-primary); }
.back-to-top svg { width: 20px; height: 20px; }

@media (max-width: 480px) {
  .wa-widget { left: var(--space-4); }
  .back-to-top { right: var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}

/* ---------- Theme switcher ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-heading);
  cursor: pointer;
  transition: border-color var(--duration-fast) ease, color var(--duration-fast) ease;
}
.theme-toggle:hover { border-color: var(--color-primary); color: var(--color-primary-text); }
.theme-toggle svg { width: 18px; height: 18px; display: none; }
html[data-theme-pref="system"] .theme-toggle .i-system,
html[data-theme-pref="light"] .theme-toggle .i-light,
html[data-theme-pref="dark"] .theme-toggle .i-dark { display: block; }

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .navbar-logo img { filter: brightness(0) invert(1); }
  :root:not([data-theme="light"]) .form-input, :root:not([data-theme="light"]) .form-select, :root:not([data-theme="light"]) .form-textarea { color-scheme: dark; }
}
:root[data-theme="dark"] .navbar-logo img { filter: brightness(0) invert(1); }
