/* ============================================================
   KRIJMA ENGINEERS — Light-first design with electric red accent
   Auto-switches to dark when the user's OS/browser prefers dark.
   ============================================================ */

/* ----- Tokens (default = LIGHT) ----- */
:root {
  --bg:           #ffffff;
  --bg-2:         #fafafb;
  --surface:      #ffffff;
  --surface-2:    #f5f5f7;
  --surface-3:    #ececef;
  --border:       rgba(10,10,12,0.08);
  --border-strong:rgba(10,10,12,0.14);

  --text:         #0a0a0c;
  --text-muted:   #52525c;
  --text-faint:   #8a8a93;

  /* === Accent palette === Electric Red */
  --accent:       #dc2626;
  --accent-soft:  #fca5a5;
  --accent-deep:  #991b1b;
  --accent-bg:    rgba(220,38,38,0.08);
  --accent-border:rgba(220,38,38,0.25);

  --signal:       #b45309;   /* amber — distinct family signal for "Running" */
  --success:      #16a34a;

  --header-bg:    rgba(254, 226, 226, 0.95);   /* light rose — matches home gutter */
  --hero-overlay-from: rgba(255,255,255,0.0);
  --hero-overlay-to:   rgba(255,255,255,0.0);
  --hero-text-shadow:  none;

  --grid-line:    rgba(10,10,12,0.04);
  --logo-opacity: 0.9;
  --portfolio-filter: grayscale(0) brightness(1);
  --portfolio-filter-hover: none;

  --font-display: 'Space Grotesk','Inter',system-ui,-apple-system,sans-serif;
  --font-sans:    'Inter',system-ui,-apple-system,sans-serif;
  --font-mono:    'JetBrains Mono',ui-monospace,'Courier New',monospace;

  --section-y: clamp(4rem, 8vw, 7rem);
  --container: 1280px;

  --shadow-card:  0 1px 2px rgba(10,10,12,0.04), 0 8px 24px -12px rgba(10,10,12,0.08);
  --shadow-pop:   0 20px 50px -20px rgba(10,10,12,0.18);
}

/* ----- Dark theme via prefers-color-scheme ----- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0a0a0c;
    --bg-2:          #0e0e11;
    --surface:       #131318;
    --surface-2:     #1a1a20;
    --surface-3:     #22222a;
    --border:        rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.16);

    --text:          #f5f5f7;
    --text-muted:    #b0b0ba;
    --text-faint:    #6c6c79;

    --accent:        #ef4444;
    --accent-soft:   #fca5a5;
    --accent-deep:   #b91c1c;
    --accent-bg:     rgba(239,68,68,0.12);
    --accent-border: rgba(239,68,68,0.35);

    --signal:        #fbbf24;   /* amber for dark-theme contrast */

    --header-bg:     rgba(42, 13, 18, 0.88);    /* deep wine — matches home gutter, red family */
    --hero-overlay-from: rgba(0,0,0,0.4);
    --hero-overlay-to:   rgba(10,10,12,1);
    --hero-text-shadow:  0 2px 24px rgba(0,0,0,0.5);

    --grid-line:     rgba(255,255,255,0.025);
    --logo-opacity:  0.85;
    --portfolio-filter: grayscale(0.1) brightness(0.85);
    --portfolio-filter-hover: none;

    --shadow-card:   0 1px 0 rgba(255,255,255,0.04) inset, 0 30px 60px -20px rgba(0,0,0,0.8);
  }
}

/* Manual override (data-theme attribute on <html>) — for future toggle */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"]  { color-scheme: dark; }

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle industrial grid backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}

main, header, footer, section { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent); }

img, svg { display: block; max-width: 100%; height: auto; }

ul, ol { list-style: none; }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--accent); color: #ffffff; }

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.section { padding: var(--section-y) 0; }

/* ----- Typography ----- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); letter-spacing: -0.015em; }
h4 { font-size: 1.125rem; letter-spacing: -0.01em; }
h5 { font-size: 0.875rem; letter-spacing: 0.04em; text-transform: uppercase; }

p { color: var(--text-muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: '';
  width: 1.5rem;
  height: 1px;
  background: var(--accent);
}

.lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 60ch;
}

.muted { color: var(--text-faint); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--accent-deep); color: #ffffff; transform: translateY(-1px); }

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

.btn-arrow::after {
  content: '\2192';
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: transform 0.18s;
}
.btn-arrow:hover::after { transform: translateX(4px); }

.btn-sm { padding: 0.5rem 0.875rem; font-size: 0.75rem; }

/* ----- Navigation ----- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 2px solid var(--accent);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.nav.scrolled {
  box-shadow: 0 4px 24px -16px rgba(10,10,12,0.18);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  transition: padding 0.25s ease;
}
.nav.scrolled .nav-inner { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.nav-brand img {
  height: 84px;
  width: auto;
  transition: height 0.25s ease;
  transform-origin: left center;
}
.nav.scrolled .nav-brand img { height: 70px; }

@media (max-width: 1100px) {
  .nav-inner { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .nav-brand img { height: 64px; }
  .nav.scrolled .nav-brand img { height: 56px; }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a, .nav-menu > li > button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  text-transform: uppercase;
  position: relative;
}
.nav-menu > li > a:hover,
.nav-menu > li > button:hover,
.nav-menu > li.active > a,
.nav-menu > li.open > button { color: var(--text); }

/* Active underline ONLY for non-CTA active items */
.nav-menu > li.active > a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--accent);
}

.nav-menu .caret {
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-top: 2px;
  transition: transform 0.2s;
}
.nav-menu > li.open .caret { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.18s ease;
  box-shadow: var(--shadow-pop);
}
.nav-menu > li.open .dropdown,
.nav-menu > li:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block;
  padding: 0.625rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.dropdown a:hover { background: var(--surface-2); color: var(--accent); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem !important;
  background: var(--accent);
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-left: 0.5rem;
  transition: background 0.18s;
}
.nav-cta:hover { background: var(--accent-deep) !important; color: #ffffff !important; }
.nav-menu > li.active > a.nav-cta {
  background: var(--accent-deep);
  color: #ffffff !important;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  z-index: 102;
  position: relative;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }
.nav-menu.open ~ .nav-toggle,
.nav-toggle[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }

@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }

  /* Backdrop behind the open menu, taps to close */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10,10,12,0.4);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  .nav-backdrop.open { opacity: 1; visibility: visible; }

  .nav-menu {
    position: fixed;
    top: var(--nav-h, 64px);
    left: 0; right: 0;
    bottom: auto;
    max-height: calc(100vh - var(--nav-h, 64px));
    display: block;            /* explicit, defeats desktop flex */
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    gap: 0;
    overflow-y: auto;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }
  .nav-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }

  .nav-menu > li {
    display: block;
    list-style: none;
    position: relative;
  }
  .nav-menu > li > a,
  .nav-menu > li > button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);          /* explicit dark color on light bg */
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border);
    text-align: left;
    cursor: pointer;
  }
  .nav-menu > li > a:hover,
  .nav-menu > li > button:hover { background: var(--surface-2); color: var(--accent); }

  .nav-menu > li.active > a:not(.nav-cta)::after { display: none; }
  .nav-menu > li.active > a:not(.nav-cta) { color: var(--accent); }

  .nav-menu .caret { margin-left: auto; }

  /* Sub-dropdown: render inline, hidden until parent li.open */
  .dropdown {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    background: var(--surface-2);
    padding: 0;
    list-style: none;
  }
  .nav-menu > li.open .dropdown { display: block; }
  .dropdown a {
    display: block;
    width: 100%;
    padding: 0.75rem 2rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
  }
  .dropdown a:hover { background: var(--surface); color: var(--accent); }

  /* Contact CTA as a full-width pill at the bottom of the menu */
  .nav-cta {
    margin: 0.75rem 1.25rem !important;
    justify-content: center !important;
    border-radius: 0;
  }
  .nav-menu > li.active > a.nav-cta { background: var(--accent); }
}

/* ----- Hero (Home) ----- */
.hero {
  position: relative;
  padding: 10rem 0 5rem;
  overflow: hidden;
  /* No solid background so the body's grid backdrop shows through */
}
.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}
.hero-copy {
  max-width: 64ch;
  margin-bottom: 3.5rem;
}
.hero-copy h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}
.hero-copy h1 .accent { color: var(--accent); }
.hero-copy .lead { max-width: 60ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-visual {
  position: relative;
  /* Matches the source 1349×350 (~3.85:1); minimal side-cropping of the
     decorative frame so the embedded text stays fully visible. */
  aspect-ratio: 16 / 5;
  overflow: hidden;
  background: #1d3454;
  border: 1px solid var(--border);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.15) 0%, transparent 45%),
    linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-visual::before {
  content: '';
  position: absolute;
  top: 1rem; left: 1rem;
  width: 40px; height: 40px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  z-index: 3;
}
.hero-visual .accent-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 4px;
  width: 25%;
  background: var(--accent);
  z-index: 3;
  transition: width 0.4s ease;
}
.hero-visual .stamp {
  position: absolute;
  bottom: 1rem; right: 1rem;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--accent);
  padding: 0.375rem 0.625rem;
}
/* Hero controls: outside the banner so they never overlap baked-in text */
.hero-controls {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.hero-arrow {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.hero-arrow:hover { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.hero-arrow svg { width: 20px; height: 20px; }

.hero-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.hero-dots button {
  width: 30px;
  height: 4px;
  background: var(--border-strong);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}
.hero-dots button:hover { background: var(--text-faint); }
.hero-dots button.active { background: var(--accent); width: 46px; }

.hero-counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-left: auto;
}
@media (max-width: 720px) {
  .hero { padding-top: 7rem; padding-bottom: 3rem; }
  /* Keep the banner's full content visible on phones — the marketing copy
     baked into each banner needs to stay readable. */
  .hero-visual { aspect-ratio: 1349 / 350; }
  .hero-slide img { object-fit: contain; }
  .hero-arrow { display: none; }
  .hero-counter { display: none; }
  .hero-visual .accent-bar, .hero-visual::before { display: none; }
  .hero-visual .stamp { display: none; }
  .hero-controls { justify-content: center; gap: 0.625rem; margin-top: 1.25rem; }
}

/* ----- Stats strip ----- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  background: var(--surface);
}
.stats > div {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--border);
}
.stats > div:last-child { border-right: none; }
.stats .num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stats .num span { color: var(--accent); }
.stats .lbl {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
}
@media (max-width: 780px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(2) { border-right: none; }
  .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

/* ----- Page header (non-home) ----- */
.page-header {
  position: relative;
  padding: 9rem 0 4rem;
  /* No solid background so the body's grid backdrop shows through */
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
@media (max-width: 720px) {
  .page-header { padding: 6.5rem 0 3rem; }
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, var(--accent-bg) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, var(--accent-bg) 0%, transparent 40%);
  z-index: 0;
}
.page-header-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}
.page-header h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
}
.page-header p.lead { margin-top: 0.75rem; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-faint); opacity: 0.4; }
.breadcrumb .active { color: var(--text); }

@media (max-width: 720px) {
  .page-header-inner { grid-template-columns: 1fr; }
}

/* ----- Section heading ----- */
.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.section-head h2 { max-width: 18ch; }
.section-head .lead { max-width: 38ch; }
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; }
}

/* ----- Service / Feature cards ----- */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem;
  position: relative;
  transition: all 0.2s ease;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.card:hover::before { width: 100%; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.card-icon svg { width: 26px; height: 26px; }

.card-num {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

.card h3 { margin-bottom: 0.75rem; }
.card p { font-size: 0.9375rem; color: var(--text-muted); }

/* ----- Prose / long-form content ----- */
.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.7; }
.prose p strong { color: var(--text); }
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}
.prose ul.bullets {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}
.prose ul.bullets li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.625rem;
  color: var(--text-muted);
}
.prose ul.bullets li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.625rem;
  width: 0.625rem; height: 1px;
  background: var(--accent);
}

/* ----- Tables ----- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  background: var(--surface);
}
.data-table thead {
  background: var(--surface-2);
}
.data-table th {
  text-align: left;
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 1rem 1.25rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .row-num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.8125rem;
  width: 50px;
}
.data-table .client { font-weight: 600; color: var(--text); }
.data-table .qty {
  font-family: var(--font-mono);
  color: var(--accent);
  width: 100px;
  text-align: right;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  background: var(--surface);
}
.status-pill.running { color: var(--signal); border-color: var(--signal); background: rgba(180,83,9,0.06); }
.status-pill.running::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: var(--signal);
  animation: pulse 2s ease infinite;
}
.status-pill.done { color: var(--accent); border-color: var(--accent-border); background: var(--accent-bg); }
.status-pill.done::before {
  content: '\2713';
  font-family: var(--font-sans);
  font-size: 0.75rem;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.table-wrap { overflow-x: auto; }

/* ----- "From the Field" grid (site photos with captions) -----
   Grid cells are shaped to match each photo's natural aspect:
   - --portrait spans 1 col × 2 rows (tall) → for portrait source images
   - --feature  spans 2 cols × 1 row (wide) → for very wide landscapes
   - default tile is 1 col × 1 row (slightly landscape) → for standard 4:3 / 16:9 */
.field-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  gap: 1rem;
}
.field-item--portrait { grid-row: span 2; }
.field-item--feature  { grid-column: span 2; }
.field-item {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  display: block;
}
.field-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease, filter 0.3s ease;
  filter: var(--portfolio-filter);
}
.field-item:hover img { transform: scale(1.04); filter: none; }
.field-item .fi-caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.85) 100%);
  color: #ffffff;
}
.field-item .fi-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.3rem;
}
.field-item .fi-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.field-item--feature .fi-title { font-size: 1.125rem; }

/* Tablet: 2 columns, each tile single-cell. Portrait tiles get taller rows. */
@media (max-width: 900px) {
  .field-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
  }
  .field-item, .field-item--feature, .field-item--portrait {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }
  .field-item--portrait { aspect-ratio: 3 / 4; }
  .field-item--feature  { grid-column: span 2; aspect-ratio: 16 / 9; }
}

/* Phone: single column, every tile uses its natural-ish aspect ratio */
@media (max-width: 540px) {
  .field-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .field-item, .field-item--feature, .field-item--portrait { grid-column: auto; }
  .field-item--portrait { aspect-ratio: 3 / 4; }
  .field-item--feature  { aspect-ratio: 16 / 7; }
  .field-item          { aspect-ratio: 4 / 3; }
}

/* ----- Portfolio grid ----- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;  /* portrait spans don't leave holes */
  gap: 1rem;
}
.portfolio-item--portrait {
  grid-row: span 2;
  aspect-ratio: auto;     /* override the default 4:3 so the tile is naturally tall */
}
.portfolio-item--wide {
  grid-column: span 2;
  aspect-ratio: 16 / 7;   /* matches very-wide landscape sources */
}
@media (max-width: 720px) {
  .portfolio-item--portrait { grid-row: auto; aspect-ratio: 3 / 4; }
  .portfolio-item--wide { grid-column: auto; aspect-ratio: 4 / 3; }
}
@media (max-width: 980px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }

.portfolio-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.3s;
  filter: var(--portfolio-filter);
}
.portfolio-item:hover img { transform: scale(1.06); filter: var(--portfolio-filter-hover); }
.portfolio-item .pi-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
  color: #ffffff;
}
.portfolio-item .pi-caption {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.portfolio-item .pi-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--accent-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.portfolio-item .pi-zoom {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px; height: 36px;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}
.portfolio-item:hover .pi-zoom { opacity: 1; transform: translateY(0); }

/* ----- Clients marquee (auto-scrolling logo strip, home page) ----- */
.marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  background: var(--accent-bg);
  border-top: 1px solid var(--accent-border);
  border-bottom: 1px solid var(--accent-border);
  /* Soft fade at both edges so logos enter/leave smoothly */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
}
/* Slim accent rails along the top + bottom edge for visual delineation */
.marquee::before,
.marquee::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  z-index: 1;
  opacity: 0.65;
  pointer-events: none;
}
.marquee::before { top: 0; }
.marquee::after  { bottom: 0; }
.marquee-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  animation: marquee 60s linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  min-width: 180px;
  padding: 0.5rem 0.75rem;
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}
.marquee-item:hover { transform: translateY(-3px); filter: drop-shadow(0 6px 12px var(--accent-border)); }
.marquee-item img {
  max-height: 96px;
  max-width: 200px;
  width: auto;
  object-fit: contain;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}
@media (max-width: 720px) {
  .marquee { margin-top: 1.5rem; }
  .marquee-track { gap: 2.25rem; animation-duration: 45s; }
  .marquee-item { height: 84px; min-width: 140px; }
  .marquee-item img { max-height: 72px; max-width: 150px; }
}

/* Compact marquee variant used as a global strip above the footer */
.footer-marquee {
  background: var(--accent-bg);
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  padding: 1.25rem 0;
  overflow: hidden;
}
.footer-marquee .marquee {
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: 0;
}
.footer-marquee .marquee::before,
.footer-marquee .marquee::after { display: none; }
.footer-marquee .marquee-item { height: 80px; min-width: 140px; padding: 0 0.5rem; }
.footer-marquee .marquee-item img { max-height: 64px; max-width: 160px; }
@media (max-width: 720px) {
  .footer-marquee { padding: 1rem 0; }
  .footer-marquee .marquee-item { height: 64px; min-width: 110px; }
  .footer-marquee .marquee-item img { max-height: 52px; max-width: 120px; }
}

/* ----- Clients grid ----- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
@media (max-width: 980px) { .clients-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .clients-grid { grid-template-columns: repeat(2, 1fr); } }
.client-cell {
  background: var(--surface);
  padding: 1.5rem;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: background 0.2s;
}
.client-cell:hover { background: var(--surface-2); }
.client-cell img {
  max-height: 64px;
  max-width: 85%;
  width: auto;
  object-fit: contain;
  opacity: var(--logo-opacity);
  transition: opacity 0.3s;
  margin-bottom: 0.875rem;
}
.client-cell:hover img { opacity: 1; }
.client-cell .name {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ----- Team grid ----- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
@media (max-width: 780px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .team-grid { grid-template-columns: 1fr; } }
.team-cell {
  background: var(--surface);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: background 0.2s;
  position: relative;
}
.team-cell:hover { background: var(--surface-2); }
.team-cell .avatar {
  width: 48px; height: 48px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.team-cell h4 { font-size: 1rem; margin-bottom: 0.125rem; color: var(--text); }
.team-cell .role {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ----- Testimonials ----- */
.quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem 2rem 2rem 3.5rem;
  position: relative;
  margin-bottom: 1rem;
}
.quote-card::before {
  content: '"';
  position: absolute;
  top: 0.25rem;
  left: 1.25rem;
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 1;
  color: var(--accent);
  font-weight: 700;
}
.quote-card p { color: var(--text); font-size: 1.0625rem; line-height: 1.6; margin-bottom: 1rem; }
.quote-card .by {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.quote-card .by span { color: var(--text-faint); margin-right: 0.5rem; }

/* ----- Forms ----- */
.form { display: grid; gap: 1rem; }
.form-row { display: flex; flex-direction: column; gap: 0.5rem; }
.form-row.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .form-row.row-2 { grid-template-columns: 1fr; }
}
.form-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.input, .textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 0.875rem 1rem;
  font-family: var(--font-sans);
  /* 16px on mobile prevents iOS auto-zoom on focus */
  font-size: 16px;
  transition: border-color 0.15s;
}
@media (min-width: 640px) {
  .input, .textarea { font-size: 0.9375rem; }
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.textarea { resize: vertical; min-height: 130px; }

/* ----- Director / Profile block ----- */
.director-block {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 720px) { .director-block { grid-template-columns: 1fr; } }
/* Long-form prose blocks (Director's Note, About Us, Quality Policy)
   get justified paragraphs. Lists, headings, and short labels stay
   left-aligned. */
.prose p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.director-photo {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  position: relative;
}
.director-photo::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 24px; height: 24px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}
.director-photo::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 24px; height: 24px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}
.director-photo img {
  width: 100%;
  max-width: 180px;
  margin: 0 auto 1rem;
  filter: grayscale(0.2);
}
.director-photo .name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
}
.director-photo .role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.25rem;
}

/* ----- Registration info grid ----- */
.reg-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
}
.reg-grid dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.reg-grid dd {
  color: var(--text);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
.reg-grid dt:last-of-type, .reg-grid dd:last-of-type { border-bottom: none; }
@media (max-width: 600px) {
  .reg-grid { grid-template-columns: 1fr; gap: 0; }
  .reg-grid dt { border-bottom: none; padding-bottom: 0.125rem; }
  .reg-grid dd { padding-top: 0.125rem; padding-bottom: 0.875rem; }
}

/* ----- Contact page ----- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 2rem; } }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.contact-card + .contact-card { margin-top: 1rem; }

.contact-info-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.875rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-info-row:last-child { border-bottom: none; }
.contact-info-row .icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}
.contact-info-row .icon svg { width: 18px; height: 18px; }
.contact-info-row .lbl {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.25rem;
}
.contact-info-row .val { color: var(--text); font-size: 0.9375rem; line-height: 1.5; }
.contact-info-row .val a { color: var(--text); }
.contact-info-row .val a:hover { color: var(--accent); }

.form-status {
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  font-size: 0.875rem;
  display: none;
}

/* Honeypot — visually & dimensionally hidden, but NOT display:none
   (some bots skip display:none fields). Real users never see it. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-actions-note {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Divider used inside a card to split sections (e.g. contact info ↔ actions) */
.card-divider {
  margin: 1.5rem 0 1.25rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.card-divider-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.875rem;
}
.action-stack {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* Embedded map */
.map-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 16 / 7;
}
.map-wrap iframe {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  z-index: 2;
  pointer-events: none;
}
.map-wrap .map-stamp {
  position: absolute;
  bottom: 0.75rem; left: 0.75rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--accent);
  padding: 0.3rem 0.625rem;
}
@media (max-width: 720px) {
  .map-wrap { aspect-ratio: 4 / 3; }
}
.form-status.ok { background: rgba(22,163,74,0.08); border-color: rgba(22,163,74,0.3); color: var(--success); display: block; }
.form-status.err { background: var(--accent-bg); border-color: var(--accent-border); color: var(--accent); display: block; }

/* ----- CTA banner ----- */
.cta-banner {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3rem clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--accent);
}
.cta-banner h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); max-width: 26ch; }
@media (max-width: 720px) {
  .cta-banner { grid-template-columns: 1fr; padding: 2rem; }
}

/* ----- Footer ----- */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
}
.footer-brand p { font-size: 0.9375rem; color: var(--text-muted); margin-top: 1rem; max-width: 42ch; }
.footer-brand img { height: 84px; width: auto; }
.footer-links li { margin-bottom: 0.625rem; font-size: 0.875rem; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }
.footer address { color: var(--text-muted); font-size: 0.875rem; font-style: normal; line-height: 1.8; }
.footer address strong { color: var(--text); display: block; margin-bottom: 0.5rem; }
.footer address a { color: var(--text-muted); }
.footer address a:hover { color: var(--accent); }
.footer-line {
  color: var(--text-muted);
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
}
.footer-line span.lbl {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  min-width: 14px;
}

.footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }
.footer-bottom .right { display: flex; gap: 1.5rem; align-items: center; }

/* ----- Lightbox ----- */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lb-overlay.open { display: flex; }
.lb-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border: 1px solid rgba(255,255,255,0.15);
}
.lb-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.lb-close:hover { background: var(--accent); color: #ffffff; border-color: var(--accent); }

/* ----- Utilities ----- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Scroll-to-top button */
.scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px; height: 44px;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.25s ease;
  pointer-events: none;
  box-shadow: var(--shadow-card);
}
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--accent-deep); transform: translateY(-2px); }

/* Fade-up entrance animation */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-up { opacity: 1; transform: none; }
}

/* ============================================================
   Cross-page transitions
   ============================================================ */

/* Modern browsers (Chrome/Edge 126+, Safari TP) get a real cross-document
   View Transition. No JS needed — the browser cross-fades old↔new automatically. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Fallback for browsers without View Transitions: fade the main content
   up on every page load so navigation feels less abrupt. */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
main {
  animation: pageIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* Skip the JS fallback when the browser already does View Transitions
   (avoids stacking two animations). */
@supports (view-transition-name: none) {
  main { animation: none; }
}
/* No fade when splash is already covering the page on first load */
body.splashing main { animation: none; }
@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
}

/* Outgoing fade (set by JS just before navigation) */
body.leaving { transition: opacity 0.18s ease; opacity: 0; }

/* ============================================================
   Splash logo intro (plays once per session)
   ============================================================ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.splash.fade { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-mark {
  position: relative;
  text-align: center;
  animation: splashAppear 0.5s ease;
}
.splash-mark img {
  height: clamp(110px, 18vw, 160px);
  width: auto;
  display: block;
  margin: 0 auto;
  transform-origin: center center;
  will-change: transform;
}
.splash-mark.flying img {
  transition: transform 0.95s cubic-bezier(0.65, 0, 0.35, 1);
}
.splash-tagline {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-faint);
  opacity: 0;
  animation: splashFadeIn 0.45s ease 0.25s forwards;
  transition: opacity 0.3s ease;
}
.splash-mark.flying .splash-tagline { opacity: 0; }
.splash-loader {
  position: absolute;
  bottom: -2.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 2px;
  background: var(--surface-3);
  overflow: hidden;
  opacity: 0;
  animation: splashFadeIn 0.4s ease 0.35s forwards;
}
.splash-loader::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: splashLoader 1.1s ease-in-out infinite;
}
.splash-mark.flying .splash-loader { opacity: 0; }
@keyframes splashAppear {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes splashFadeIn { to { opacity: 1; } }
@keyframes splashLoader {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(110%); }
}
body.splashing { overflow: hidden; }
body.splashing .nav-brand img { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .splash { display: none; }
  body.splashing { overflow: auto; }
  body.splashing .nav-brand img { opacity: 1; }
}

/* ============================================================
   Mobile fine-tuning (≤ 720px)
   ============================================================ */
@media (max-width: 720px) {
  .section { padding: 3rem 0; }

  h1 { font-size: clamp(2rem, 8vw, 2.75rem); }
  h2 { font-size: clamp(1.625rem, 6vw, 2.25rem); }

  /* Hero copy and visuals on phone */
  .hero { padding: 6.5rem 0 2.5rem; }
  .hero-copy { margin-bottom: 2rem; }
  .hero-copy h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .hero-copy .lead { font-size: 1rem; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }

  /* Section heads stay readable */
  .section-head { margin-bottom: 2rem; padding-bottom: 1.25rem; }

  /* Stats grid: keep 2x2 on phones, more breathing room */
  .stats > div { padding: 1.25rem 1rem; }
  .stats .num { font-size: clamp(1.75rem, 7vw, 2.25rem); }

  /* Cards a little tighter */
  .card { padding: 1.5rem; }
  .card-num { top: 1rem; right: 1.25rem; }

  /* Tables — let users see they can scroll */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .data-table { font-size: 0.875rem; min-width: 560px; }
  .data-table th, .data-table td { padding: 0.75rem 0.875rem; }

  /* Director block on mobile */
  .director-photo { padding: 1.25rem; max-width: 240px; margin: 0 auto; }

  /* Contact page card padding tightens */
  .contact-card { padding: 1.5rem; }
  .contact-info-row { grid-template-columns: 44px 1fr; gap: 0.75rem; padding: 0.875rem 0; }
  .contact-info-row .icon { width: 36px; height: 36px; }

  /* CTA banner */
  .cta-banner { padding: 1.75rem 1.5rem; }
  .cta-banner h2 { font-size: clamp(1.375rem, 6vw, 1.75rem); }

  /* Footer */
  .footer { padding-top: 3rem; }
  .footer-grid { gap: 2rem; padding-bottom: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.625rem; padding: 1.25rem 0; }
  .footer-bottom .right { gap: 1rem; }

  /* Lightbox / scroll-top */
  .lb-overlay { padding: 1rem; }
  .lb-close { top: 0.75rem; right: 0.75rem; }
  .scroll-top { bottom: 1rem; right: 1rem; }
}

/* Extra-small phones (≤ 380px) */
@media (max-width: 380px) {
  .container { padding: 0 1rem; }
  .stats { grid-template-columns: 1fr; }
  .stats > div { border-right: none !important; border-bottom: 1px solid var(--border); }
  .stats > div:last-child { border-bottom: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

/* Avoid iOS landscape notch overlap */
@supports (padding: env(safe-area-inset-left)) {
  .nav-inner, .container {
    padding-left: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-left));
    padding-right: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-right));
  }
}

