/* ============================================================
   MISTRAL SYSTEMS — site refondu
   Direction: engineering firm refined / institutional
   ============================================================ */

/* -- Reset --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { line-height: 1.5; }
img, picture, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* -- Tokens -------------------------------------------------- */
:root {
  /* Palette — Navy & Parchemin (default) */
  --paper:        #EAE6DD;
  --paper-deep:   #DCD7CA;
  --ink:          #1B2A3A;
  --ink-soft:     #4A5A6A;
  --ink-faint:    #8A98A6;
  --rule:         rgba(27, 42, 58, 0.18);
  --rule-soft:    rgba(27, 42, 58, 0.10);
  --accent:       #B8860B;            /* brass / dark gold */
  --accent-deep:  #8C6608;
  --alert:        #8B0000;            /* fire-suppression red */
  --steel:        #4A5A6A;

  /* Reverse (used on dark blocks) */
  --paper-on-ink: #EAE6DD;
  --ink-on-ink:   #0F1822;

  /* Type */
  --font-display: "Bricolage Grotesque", "Archivo Narrow", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Density */
  --pad-section: clamp(80px, 9vw, 140px);
  --pad-container: clamp(20px, 4vw, 56px);
  --gap-card: clamp(20px, 2vw, 32px);
  --row-tight: 6px;
  --row-base: 12px;

  /* Misc */
  --container-max: 1360px;
  --rule-w: 1px;
}

/* Density: compact mode */
:root[data-density="compact"] {
  --pad-section: clamp(56px, 6vw, 96px);
  --gap-card: clamp(14px, 1.4vw, 22px);
  --row-base: 8px;
}

/* Palette: high-voltage (yellow + black) */
:root[data-palette="voltage"] {
  --paper:       #F4F2EC;
  --paper-deep:  #E6E2D6;
  --ink:         #0A0A0A;
  --ink-soft:    #2A2A2A;
  --ink-faint:   #777;
  --rule:        rgba(10,10,10,0.20);
  --rule-soft:   rgba(10,10,10,0.10);
  --accent:      #FFD60A;
  --accent-deep: #C8A300;
  --alert:       #E63946;
  --steel:       #3A3A3A;
  --paper-on-ink:#F4F2EC;
  --ink-on-ink:  #000;
}

/* Palette: fire (red + cream) */
:root[data-palette="fire"] {
  --paper:       #F5F2EC;
  --paper-deep:  #EAE5D8;
  --ink:         #1A1A1A;
  --ink-soft:    #3A3A3A;
  --ink-faint:   #888;
  --rule:        rgba(26,26,26,0.20);
  --rule-soft:   rgba(26,26,26,0.10);
  --accent:      #C8102E;
  --accent-deep: #8E0A1F;
  --alert:       #C8102E;
  --steel:       #555;
  --paper-on-ink:#F5F2EC;
  --ink-on-ink:  #0A0A0A;
}

/* Palette: monochrome restraint */
:root[data-palette="mono"] {
  --paper:       #F2F0EB;
  --paper-deep:  #E2E0DA;
  --ink:         #111;
  --ink-soft:    #444;
  --ink-faint:   #888;
  --rule:        rgba(0,0,0,0.18);
  --rule-soft:   rgba(0,0,0,0.08);
  --accent:      #111;
  --accent-deep: #000;
  --alert:       #8B0000;
  --steel:       #555;
  --paper-on-ink:#F2F0EB;
  --ink-on-ink:  #000;
}

/* Font swap option */
:root[data-display-font="serif"] {
  --font-display: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
}
:root[data-display-font="mono"] {
  --font-display: "IBM Plex Mono", "JetBrains Mono", monospace;
}

/* -- Base ---------------------------------------------------- */
html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11", "tnum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--ink); color: var(--paper); }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--pad-container);
  padding-right: var(--pad-container);
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: currentColor;
  display: inline-block;
}

/* Section frame */
section {
  padding-top: var(--pad-section);
  padding-bottom: var(--pad-section);
  position: relative;
}

.section-rule {
  height: 1px;
  background: var(--rule);
  width: 100%;
}

/* Numbered section header */
.section-head {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 32px;
  align-items: baseline;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 56px;
}
.section-head .num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-variation-settings: "wdth" 90;
}
.section-head .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-align: right;
  line-height: 1.6;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-soft);
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  background: color-mix(in oklab, var(--paper) 96%, transparent);
  border-bottom-color: var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  font-variation-settings: "wdth" 85;
}
.brand-mark {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-mark.placeholder {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0;
}
.brand-name { line-height: 1; }
.brand-name small {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-top: 4px;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 2px;
  position: relative;
  color: var(--ink-soft);
  transition: color 0.18s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 4px; left: 14px; right: 14px;
  height: 1px;
  background: var(--accent);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px !important;
  background: var(--ink);
  color: var(--paper) !important;
  border-radius: 2px;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--accent); color: var(--ink-on-ink) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.hamburger span {
  width: 22px; height: 1.5px; background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: 140px;
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
.hero::before {
  /* Blueprint grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--rule-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 70% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, black 20%, transparent 75%);
  pointer-events: none;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 48px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-soft);
  gap: 24px;
  flex-wrap: wrap;
}
.hero-top span { white-space: nowrap; }
.hero-top .pulse {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink);
}
.hero-top .pulse::before {
  content: ""; width: 8px; height: 8px;
  background: var(--alert); border-radius: 50%;
  box-shadow: 0 0 0 0 var(--alert);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--alert) 70%, transparent); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 96px);
  align-items: start;
  position: relative;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 8.6vw, 142px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-variation-settings: "wdth" 85;
  color: var(--ink);
}
.hero-headline .accent {
  color: var(--accent);
  font-style: italic;
  font-variation-settings: "wdth" 90;
  font-weight: 700;
}
.hero-headline .stack > span { display: block; }
.hero-headline em {
  font-style: italic;
  font-variation-settings: "wdth" 95;
  font-weight: 600;
}
.hero-headline .dot { color: var(--alert); }

.hero-lede {
  margin-top: 36px;
  max-width: 540px;
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
  color: var(--ink-soft);
}
.hero-lede strong { color: var(--ink); font-weight: 600; }

.hero-cta {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.18s, color 0.18s, transform 0.18s;
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--accent); color: var(--ink-on-ink); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn .arrow {
  width: 14px; height: 14px;
  display: inline-block;
  position: relative;
  transition: transform 0.18s;
}
.btn .arrow::before {
  content: "→";
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 0.8;
}
.btn:hover .arrow { transform: translateX(4px); }

/* Hero side card — institutional info plaque */
.spec-card {
  border: 1px solid var(--rule);
  background: color-mix(in oklab, var(--paper) 88%, var(--ink));
  padding: 28px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  position: relative;
}
.spec-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}
.spec-card::after {
  content: "";
  position: absolute;
  bottom: -1px; right: -1px;
  width: 12px; height: 12px;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}
.spec-card h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-soft);
}
.spec-list { display: grid; gap: 14px; }
.spec-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: baseline;
}
.spec-row .k {
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.spec-row .v {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}
.spec-row .v.num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* Disciplines row under hero */
.hero-disciplines {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.discipline {
  position: relative;
  padding-right: 16px;
}
.discipline .d-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.10em;
  margin-bottom: 18px;
}
.discipline h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 700;
  font-variation-settings: "wdth" 90;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.discipline p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 340px;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  background: var(--paper);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.service {
  padding: 40px 32px 40px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 24px;
  align-items: start;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.service:nth-child(odd) { padding-right: 48px; border-right: 1px solid var(--rule); }
.service:nth-child(even) { padding-left: 48px; }
.service:hover { background: color-mix(in oklab, var(--paper-deep) 60%, transparent); }
.service:hover .svc-arrow { transform: translateX(4px); color: var(--accent); }
.service .svc-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  padding-top: 8px;
}
.svc-body h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 700;
  font-variation-settings: "wdth" 90;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.svc-body .svc-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.svc-body p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 460px;
  margin-bottom: 18px;
}
.svc-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.svc-specs span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  border-radius: 2px;
}
.svc-arrow {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center; justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 13px;
  transition: transform 0.2s, color 0.2s, border-color 0.2s;
  margin-top: 4px;
}
.service:hover .svc-arrow { border-color: var(--accent); }

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  background: var(--paper-deep);
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(40px, 5vw, 96px);
  align-items: start;
}
.about-figure {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 12px;
  border-radius: 2px;
}
.about-figure .figure-slot {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: color-mix(in oklab, var(--ink-soft) 22%, var(--paper));
}
.about-figure .figure-cap {
  display: flex;
  justify-content: space-between;
  padding: 14px 6px 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.about-stamp {
  position: absolute;
  bottom: 32px; right: -24px;
  background: var(--ink);
  color: var(--paper);
  padding: 22px 26px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}
.about-stamp .yr {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  letter-spacing: -0.02em;
  font-variation-settings: "wdth" 85;
  line-height: 1;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}

.about-copy h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3.6vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-variation-settings: "wdth" 90;
  margin-bottom: 28px;
}
.about-copy h2 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 600;
}
.about-copy p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 18px;
  max-width: 560px;
}
.about-copy p strong { color: var(--ink); font-weight: 600; }
.about-feats {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.about-feats li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink-soft);
}
.about-feats li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   STATS — refined, NOT big counters
   ============================================================ */
.stats {
  background: var(--ink);
  color: var(--paper);
  padding-top: 80px;
  padding-bottom: 80px;
}
.stats .container { position: relative; }
.stats-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 24px;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(234, 230, 221, 0.18);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(234, 230, 221, 0.6);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat {
  border-left: 1px solid rgba(234, 230, 221, 0.16);
  padding-left: 24px;
}
.stat:first-child { border-left: none; padding-left: 0; }
.stat .stat-num {
  font-family: var(--font-display);
  font-size: clamp(56px, 6vw, 92px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  font-variation-settings: "wdth" 85;
  color: var(--paper);
  display: block;
}
.stat .stat-num small {
  font-size: 0.4em;
  color: var(--accent);
  font-weight: 700;
  vertical-align: top;
  margin-left: 4px;
}
.stat .stat-lbl {
  display: block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(234, 230, 221, 0.7);
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio { background: var(--paper); }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.proj {
  position: relative;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.proj:hover { transform: translateY(-4px); box-shadow: 0 24px 50px rgba(27,42,58,0.12); }
.proj.span-7 { grid-column: span 7; }
.proj.span-5 { grid-column: span 5; }
.proj.span-4 { grid-column: span 4; }
.proj.span-8 { grid-column: span 8; }
.proj.span-6 { grid-column: span 6; }
.proj .proj-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: color-mix(in oklab, var(--ink-soft) 24%, var(--paper));
  position: relative;
  overflow: hidden;
}
.proj.tall .proj-img { aspect-ratio: 4 / 5; }
.proj-meta {
  padding: 20px 24px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
}
.proj-meta h3 {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 700;
  font-variation-settings: "wdth" 90;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.proj-meta .proj-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.proj-meta .proj-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 9px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  white-space: nowrap;
}

/* image-slot placeholder styling */
image-slot {
  --slot-bg: color-mix(in oklab, var(--ink-soft) 14%, var(--paper));
  --slot-fg: var(--ink-faint);
  --slot-border: var(--rule);
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials { background: var(--paper-deep); }

.t-slider-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.t-stage {
  position: relative;
  min-height: 360px;
}
.t-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.t-item.active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.t-quote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 32px;
  font-variation-settings: "wdth" 100;
}
.t-quote::before {
  content: "“";
  font-family: var(--font-display);
  font-size: 1.6em;
  line-height: 0.6;
  color: var(--accent);
  margin-right: 4px;
  vertical-align: -0.1em;
}
.t-author {
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.t-author .who {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  font-variation-settings: "wdth" 95;
}
.t-author .role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.t-controls {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.t-btn {
  width: 44px; height: 44px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.18s, color 0.18s;
}
.t-btn:hover { background: var(--ink); color: var(--paper); }
.t-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  color: var(--ink-soft);
}

/* Review form aside */
.review-form-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 36px;
  border-radius: 2px;
  position: relative;
}
.review-form-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}
.review-form-card h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  font-variation-settings: "wdth" 90;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.review-form-card .small {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

/* ============================================================
   FORMS (shared)
   ============================================================ */
.form-grid { display: grid; gap: 14px; }
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field { display: grid; gap: 6px; }
.field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field select,
.field textarea {
  background: transparent;
  border: 1px solid var(--rule);
  padding: 12px 14px;
  border-radius: 2px;
  font-size: 14px;
  color: var(--ink);
  font-family: var(--font-body);
  transition: border-color 0.18s, background 0.18s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: color-mix(in oklab, var(--paper) 92%, var(--ink));
}
.field textarea { resize: vertical; min-height: 110px; }
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
}
.consent input { margin-top: 3px; accent-color: var(--accent); }

.form-msg {
  display: none;
  padding: 12px 14px;
  border-radius: 2px;
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.form-msg.show { display: block; }
.form-msg.success { border: 1px solid var(--accent); color: var(--accent-deep); background: color-mix(in oklab, var(--accent) 8%, var(--paper)); }
.form-msg.error { border: 1px solid var(--alert); color: var(--alert); background: color-mix(in oklab, var(--alert) 8%, var(--paper)); }

/* ============================================================
   CERTIFICATIONS — institutional plaque
   ============================================================ */
.certifications {
  background: var(--ink);
  color: var(--paper);
}
.certifications .section-head { border-color: rgba(234,230,221,0.18); }
.certifications .section-head .num { color: var(--accent); }
.certifications .section-head h2 { color: var(--paper); }
.certifications .section-head .meta { color: rgba(234,230,221,0.6); }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(234,230,221,0.18);
}
.cert {
  padding: 48px 40px 48px 0;
  position: relative;
  border-right: 1px solid rgba(234,230,221,0.18);
}
.cert:nth-child(2), .cert:nth-child(3) { padding-left: 40px; }
.cert:last-child { border-right: none; }
.cert-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 24px;
}
.cert-code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(72px, 7vw, 120px);
  letter-spacing: -0.04em;
  line-height: 0.85;
  font-variation-settings: "wdth" 80;
  color: var(--paper);
  margin-bottom: 12px;
}
.cert-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  font-variation-settings: "wdth" 95;
  margin: 24px 0 8px;
  color: var(--paper);
  line-height: 1.2;
}
.cert-body p {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(234,230,221,0.75);
  max-width: 280px;
}
.cert-id {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border: 1px solid rgba(234,230,221,0.3);
  border-radius: 2px;
  color: var(--paper);
}

.cert-strip {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(234,230,221,0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(234,230,221,0.65);
}
.cert-strip span { display: inline-flex; align-items: center; gap: 8px; }
.cert-strip span::before {
  content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--paper); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.contact-info {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: 40px;
  border-radius: 2px;
}
.contact-info h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  font-variation-settings: "wdth" 90;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.info-block {
  margin-bottom: 28px;
}
.info-block .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.info-block .v {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  font-variation-settings: "wdth" 95;
  line-height: 1.3;
}
.info-block .v a { color: inherit; }
.info-block .v a:hover { color: var(--accent); }
.info-block.urgency {
  background: var(--ink);
  color: var(--paper);
  margin: 32px -40px -40px;
  padding: 28px 40px;
  border-bottom-left-radius: 2px;
  border-bottom-right-radius: 2px;
}
.info-block.urgency .k { color: var(--accent); }
.info-block.urgency .v { color: var(--paper); }
.info-block.urgency .v::before {
  content: ""; display: inline-block;
  width: 10px; height: 10px;
  background: var(--alert);
  border-radius: 50%;
  margin-right: 12px;
  vertical-align: 0.1em;
  box-shadow: 0 0 0 0 var(--alert);
  animation: pulse 2s infinite;
}

.contact-form-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 40px;
  border-radius: 2px;
}
.contact-form-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  font-variation-settings: "wdth" 90;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.contact-form-card .small { font-size: 13px; color: var(--ink-soft); margin-bottom: 28px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--ink-on-ink);
  color: var(--paper);
  padding: 80px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(234,230,221,0.14);
}
.footer .brand { color: var(--paper); }
.footer .brand-name small { color: rgba(234,230,221,0.55); }
.footer p.desc {
  margin-top: 24px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(234,230,221,0.7);
  max-width: 360px;
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.footer ul li { margin-bottom: 10px; }
.footer ul li a {
  font-size: 14px;
  color: rgba(234,230,221,0.75);
  transition: color 0.18s;
}
.footer ul li a:hover { color: var(--paper); }
.footer .contact-line {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(234,230,221,0.75);
  margin-bottom: 8px;
}
.footer-cert {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(234,230,221,0.6);
}
.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(234,230,221,0.5);
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  border: 1px solid rgba(234,230,221,0.22);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.footer-social a:hover { background: var(--accent); color: var(--ink-on-ink); border-color: var(--accent); }

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 90;
  transform: translateY(8px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}
.to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--accent); color: var(--ink-on-ink); }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-disciplines { grid-template-columns: 1fr; gap: 36px; }
  .about-grid, .contact-grid, .t-slider-wrap { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .service:nth-child(odd) { padding-right: 0; border-right: none; }
  .service:nth-child(even) { padding-left: 0; }
  .cert-grid { grid-template-columns: 1fr; }
  .cert { border-right: none; padding: 36px 0 36px !important; border-bottom: 1px solid rgba(234,230,221,0.18); }
  .cert:last-child { border-bottom: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .proj.span-7, .proj.span-5, .proj.span-4, .proj.span-8, .proj.span-6 { grid-column: span 2; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 16px;
    gap: 8px;
  }
  .nav-links.open a { padding: 12px; width: 100%; }
  .hamburger { display: flex; }
  .section-head { grid-template-columns: 1fr; gap: 12px; }
  .section-head .meta { text-align: left; }
  .hero-top { font-size: 10px; }
  .about-stamp { right: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .proj.span-7, .proj.span-5, .proj.span-4, .proj.span-8, .proj.span-6 { grid-column: span 1; }
  .info-block.urgency { margin: 24px -28px -28px; padding: 22px 28px; }
  .contact-info, .contact-form-card, .review-form-card { padding: 28px; }
}
