/* ==========================================================================
   XUXA HOLDINGS — Main stylesheet
   Plain CSS, no build step. Sections:
   1. Fonts  2. Tokens  3. Base  4. Layout helpers  5. Header & navigation
   6. Buttons & labels  7. Hero  8. Sections  9. Services  10. Process diagram
   11. Industries  12. CTA  13. Page heroes  14. Expertise  15. About
   16. Contact form  17. Legal / 404  18. Footer  19. Motion  20. Responsive
   ========================================================================== */

/* 1. Fonts (SIL Open Font License — see assets/fonts/OFL-*.txt) ----------- */
@font-face { font-family: "Space Grotesk"; src: url("../assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../assets/fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* 2. Design tokens ------------------------------------------------------- */
:root {
  --bg: #071017;
  --bg-2: #101D27;
  --panel: #182934;
  --accent: #5ED9CE;
  --accent-hover: #88F0E3;
  --text: #F5F8FA;
  --text-2: #A8BAC5;
  --light: #F1F5F5;
  --ink: #0B1A22;          /* text on light backgrounds */
  --ink-2: #3E525D;        /* secondary text on light backgrounds (AA on --light) */
  --line: rgba(168, 186, 197, 0.16);
  --line-strong: rgba(168, 186, 197, 0.32);
  --line-light: rgba(11, 26, 34, 0.12);

  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --section: clamp(88px, 12vw, 168px);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 84px;
}

/* 3. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.05; letter-spacing: -0.025em; margin: 0; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; }
::selection { background: var(--accent); color: var(--bg); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.light :focus-visible { outline-color: #0E7F76; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  background: var(--accent); color: var(--bg); padding: 12px 18px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* 4. Layout helpers ------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; position: relative; }
.section--tight { padding: clamp(64px, 8vw, 112px) 0; }
.dark-2 { background: var(--bg-2); }
.light { background: var(--light); color: var(--ink); }
.light .lede, .light p { color: var(--ink-2); }
.light h2, .light h3 { color: var(--ink); }

.grid-lines { position: relative; }
.grid-lines::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc((min(100vw, var(--wrap)) - 2 * var(--gutter)) / 4) 100%;
  background-position: calc((100vw - min(100vw, var(--wrap))) / 2 + var(--gutter)) 0;
  opacity: 0.5;
}
.light.grid-lines::before { background-image: linear-gradient(to right, var(--line-light) 1px, transparent 1px); }

.h-display { font-size: clamp(42px, 7vw, 92px); font-weight: 700; letter-spacing: -0.035em; line-height: 0.98; }
.h-section { font-size: clamp(30px, 4.2vw, 58px); letter-spacing: -0.03em; }
.h-sub { font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.lede { font-size: clamp(17px, 1.4vw, 20px); color: var(--text-2); max-width: 60ch; line-height: 1.6; }
.measure { max-width: 62ch; }
.accent { color: var(--accent); }

/* 5. Header & navigation ------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  transition: background-color .35s var(--ease), border-color .35s var(--ease), height .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled, .site-header.is-solid {
  background: rgba(7, 16, 23, 0.92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

/* The official Xuxa mark now has an alpha-transparent background.
   Render it directly over dark header/footer surfaces, with no white plate. */
.logo-plate {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; padding: 0; border: 0; border-radius: 0;
  line-height: 0; text-decoration: none; flex-shrink: 0;
  box-shadow: none;
}
.logo-plate img { display: block; width: 170px; height: auto; object-fit: contain; }

.nav-primary { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.nav-primary ul { list-style: none; display: flex; gap: clamp(18px, 2.4vw, 36px); }
.nav-primary a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--text-2);
  position: relative; padding: 6px 0; transition: color .25s var(--ease);
}
.nav-primary ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-primary ul a:hover, .nav-primary ul a[aria-current="page"] { color: var(--text); }
.nav-primary ul a:hover::after, .nav-primary ul a[aria-current="page"]::after { transform: scaleX(1); }

.menu-toggle {
  display: none; width: 48px; height: 48px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text); cursor: pointer; border-radius: var(--radius);
  position: relative;
}
.menu-toggle span {
  position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor;
  transition: transform .35s var(--ease), opacity .2s;
}
.menu-toggle span:nth-child(1) { top: 18px; }
.menu-toggle span:nth-child(2) { top: 23px; }
.menu-toggle span:nth-child(3) { top: 28px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 6. Buttons & labels ---------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.light .eyebrow { color: #0E7F76; }
.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.light .mono { color: var(--ink-2); }

.btn {
  --btn-bg: var(--accent); --btn-fg: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 26px; border: 1px solid var(--btn-bg); border-radius: var(--radius);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-head); font-weight: 600; font-size: 16px; letter-spacing: 0;
  text-decoration: none; cursor: pointer; position: relative; overflow: hidden;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { --btn-bg: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn--small { min-height: 44px; padding: 0 18px; font-size: 14.5px; }
.light .btn { --btn-bg: var(--ink); --btn-fg: var(--light); }
.light .btn:hover { --btn-bg: #0E7F76; }
.light .btn--ghost { color: var(--ink); border-color: rgba(11,26,34,.3); background: transparent; }
.light .btn--ghost:hover { color: #0E7F76; border-color: #0E7F76; }

.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  color: var(--accent); text-decoration: none; padding: 6px 0;
  border-bottom: 1px solid rgba(94, 217, 206, 0.35); transition: border-color .25s, color .25s, gap .3s var(--ease);
}
.text-link:hover { color: var(--accent-hover); border-color: var(--accent-hover); gap: 14px; }
.light .text-link { color: #0E7F76; border-color: rgba(14,127,118,.35); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* 7. Home hero ----------------------------------------------------------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 60px) 0 clamp(56px, 8vw, 104px); overflow: hidden; isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; transform: scale(1.06); animation: heroZoom 2.4s var(--ease) forwards; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(7,16,23,.96) 0%, rgba(7,16,23,.86) 34%, rgba(7,16,23,.35) 66%, rgba(7,16,23,.25) 100%),
    linear-gradient(0deg, rgba(7,16,23,1) 0%, rgba(7,16,23,0) 38%);
}
.hero__inner { width: 100%; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.hero h1 { font-size: clamp(44px, 7.2vw, 96px); font-weight: 700; letter-spacing: -0.04em; line-height: 0.95; max-width: 11ch; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .line > span { display: block; }
.hero__statement { font-family: var(--font-head); font-size: clamp(18px, 1.7vw, 23px); font-weight: 500; color: var(--accent); margin: 28px 0 18px; letter-spacing: -0.01em; }
.hero__body { color: var(--text-2); font-size: clamp(16px, 1.3vw, 18px); max-width: 48ch; margin-bottom: 36px; }
.hero__meta {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-top: clamp(48px, 7vw, 88px); padding-top: 22px; border-top: 1px solid var(--line);
}
.hero__meta ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 32px; }
.hero__meta li { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.hero__meta li b { color: var(--accent); font-weight: 500; margin-right: 8px; }

.scroll-cue {
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2);
}
.scroll-cue__track { width: 1px; height: 44px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-cue__track::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--accent);
  animation: scrollCue 2.2s var(--ease) infinite;
}
.scroll-cue:hover { color: var(--text); }

/* 8. Intro --------------------------------------------------------------- */
.intro__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.intro__grid h2 { font-size: clamp(32px, 4.4vw, 60px); }
.intro__copy { padding-top: 10px; }
.intro__copy p:first-child { font-family: var(--font-head); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.3; color: var(--ink); letter-spacing: -0.015em; font-weight: 500; }
.intro__copy p { font-size: 18px; }
.pillars { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--line-light); }
.pillars li { padding: 26px 24px 0 0; }
.pillars li + li { padding-left: 24px; border-left: 1px solid var(--line-light); }
.pillars .mono { display: block; margin-bottom: 10px; }
.pillars strong { font-family: var(--font-head); font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }

.section-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head .lede { margin-top: 20px; }

/* 9. Service panels (home) ---------------------------------------------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line); border: 1px solid var(--line); }
.service {
  background: var(--bg); position: relative; display: flex; flex-direction: column; min-height: 640px;
  overflow: hidden; isolation: isolate; text-decoration: none;
}
.service__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .6s; filter: saturate(.85) brightness(.85); }
.service::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7,16,23,.55) 0%, rgba(7,16,23,.25) 30%, rgba(7,16,23,.92) 72%, rgba(7,16,23,.98) 100%);
}
.service:hover .service__media img, .service:focus-within .service__media img { transform: scale(1.05); filter: saturate(1) brightness(.95); }
.service__top { display: flex; justify-content: space-between; padding: 28px 30px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.service__top span:first-child { color: var(--accent); }
.service__body { margin-top: auto; padding: 0 30px 34px; }
.service h3 { font-size: clamp(26px, 2.3vw, 34px); margin-bottom: 16px; max-width: 14ch; }
.service p { color: var(--text-2); font-size: 16px; margin-bottom: 26px; max-width: 38ch; }
.service .text-link::after { content: ""; position: absolute; inset: 0; } /* whole panel clickable */

/* 10. Process diagram ---------------------------------------------------- */
.process { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.process__intro .lede { margin-top: 22px; }
.flow { position: relative; }
.flow__tabs { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.flow__rail { position: absolute; left: 0; right: 0; top: 37px; height: 1px; background: var(--line-strong); }
.flow__rail span { position: absolute; left: 0; top: 0; height: 1px; background: var(--accent); width: 12.5%; transition: width .6s var(--ease); }
.flow__tab {
  appearance: none; background: none; border: 0; color: var(--text-2); cursor: pointer; width: 100%;
  text-align: left; padding: 0 12px 22px 0; font: inherit; position: relative;
}
.flow__tab .num { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; margin-bottom: 14px; }
.flow__node {
  display: block; width: 15px; height: 15px; border: 1px solid var(--line-strong); background: var(--bg-2);
  transform: rotate(45deg); margin: 0 0 22px 1px; transition: background .3s, border-color .3s, transform .4s var(--ease);
}
.flow__tab .name { display: block; font-family: var(--font-head); font-size: clamp(16px, 1.6vw, 22px); font-weight: 600; letter-spacing: .02em; color: var(--text-2); transition: color .3s; }
.flow__tab:hover .name { color: var(--text); }
.flow__tab[aria-selected="true"] .name { color: var(--text); }
.flow__tab[aria-selected="true"] .flow__node, .flow__tab.is-done .flow__node { background: var(--accent); border-color: var(--accent); }
.flow__tab[aria-selected="true"] .flow__node { transform: rotate(45deg) scale(1.25); box-shadow: 0 0 0 6px rgba(94,217,206,.12); }
.flow__tab[aria-selected="true"] .num { color: var(--accent); }
.flow__panels { margin-top: 30px; border: 1px solid var(--line); background: var(--panel); position: relative; min-height: 260px; }
.flow__panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.flow__panel[hidden] { display: none; }
.flow__panel-text { padding: clamp(28px, 3.2vw, 44px); display: flex; flex-direction: column; }
.flow__panel-text .mono { color: var(--accent); margin-bottom: 18px; }
.flow__panel-text h3 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 14px; }
.flow__panel-text p { color: var(--text-2); }
.flow__panel-text .step-count { margin-top: auto; padding-top: 26px; font-family: var(--font-mono); font-size: 12px; color: var(--text-2); letter-spacing: .12em; }
.flow__diagram { border-left: 1px solid var(--line); position: relative; overflow: hidden; min-height: 260px; }
.flow__diagram svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow__panel.is-entering .flow__panel-text > * { animation: fadeUp .55s var(--ease) both; }
.flow__panel.is-entering .flow__panel-text > *:nth-child(2) { animation-delay: .05s; }
.flow__panel.is-entering .flow__panel-text > *:nth-child(3) { animation-delay: .1s; }

/* 11. Industries tiles (home) ------------------------------------------ */
.tiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.tile { position: relative; overflow: hidden; isolation: isolate; min-height: 420px; display: flex; align-items: flex-end; text-decoration: none; color: var(--text); background: var(--bg-2); }
.tile:nth-child(1) { grid-column: span 7; }
.tile:nth-child(2) { grid-column: span 5; }
.tile:nth-child(3) { grid-column: span 5; }
.tile:nth-child(4) { grid-column: span 7; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.1s var(--ease); filter: brightness(.82) saturate(.9); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,16,23,0) 35%, rgba(7,16,23,.9) 100%); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.05); }
.tile__label { width: 100%; padding: 26px 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.tile__label .mono { display: block; color: var(--accent); margin-bottom: 8px; font-size: 12px; }
.tile__label h3 { font-size: clamp(22px, 2.2vw, 30px); }
.tile__arrow { width: 46px; height: 46px; border: 1px solid var(--line-strong); display: grid; place-items: center; flex-shrink: 0; transition: background .3s, border-color .3s, color .3s; }
.tile:hover .tile__arrow { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* 12. Final CTA ---------------------------------------------------------- */
.cta { position: relative; overflow: hidden; isolation: isolate; padding: clamp(110px, 14vw, 200px) 0; }
.cta__media { position: absolute; inset: 0; z-index: -2; }
.cta__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,16,23,.97) 0%, rgba(7,16,23,.86) 50%, rgba(7,16,23,.6) 100%); }
.cta h2 { font-size: clamp(34px, 5.4vw, 76px); max-width: 15ch; letter-spacing: -0.035em; }
.cta p { font-size: clamp(17px, 1.5vw, 21px); color: var(--text-2); margin: 26px 0 40px; max-width: 46ch; }

/* 13. Inner page heroes -------------------------------------------------- */
.page-hero { padding: calc(var(--header-h) + clamp(72px, 10vw, 150px)) 0 clamp(64px, 8vw, 110px); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(40px, 6.2vw, 88px); font-weight: 700; letter-spacing: -0.04em; line-height: 0.98; max-width: 16ch; }
.page-hero .lede { margin-top: 32px; }
.page-hero__grid { display: grid; grid-template-columns: 8fr 4fr; gap: 48px; align-items: end; }
.page-index { list-style: none; border-top: 1px solid var(--line); }
.page-index a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 15px; color: var(--text-2); transition: color .25s, padding .3s var(--ease); }
.page-index a span:first-child { font-family: var(--font-mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.page-index a:hover { color: var(--text); padding-left: 6px; }
.page-hero__mark { position: absolute; right: -4vw; top: 50%; transform: translateY(-40%); font-family: var(--font-head); font-weight: 700; font-size: clamp(200px, 30vw, 460px); line-height: .8; color: transparent; -webkit-text-stroke: 1px rgba(168,186,197,.08); pointer-events: none; user-select: none; z-index: 0; }
.page-hero .wrap { position: relative; z-index: 1; }

/* 14. Expertise detail blocks ------------------------------------------ */
.discipline { padding: var(--section) 0; border-bottom: 1px solid var(--line); }
.discipline:nth-of-type(even) { background: var(--bg-2); }
.discipline__grid { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.discipline--flip .discipline__media { order: 2; }
.discipline__media { position: relative; overflow: hidden; aspect-ratio: 4 / 4.6; position: sticky; top: calc(var(--header-h) + 32px); }
.discipline__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.discipline__media:hover img { transform: scale(1.04); }
.discipline__media figcaption { position: absolute; left: 0; bottom: 0; background: var(--bg); padding: 12px 18px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.discipline__num { font-family: var(--font-mono); font-size: 13px; letter-spacing: .14em; color: var(--accent); text-transform: uppercase; display: block; margin-bottom: 22px; }
.discipline h2 { font-size: clamp(16px, 1.4vw, 18px); font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); margin-bottom: 18px; }
.discipline h3 { font-size: clamp(32px, 4vw, 54px); letter-spacing: -0.03em; margin-bottom: 28px; max-width: 14ch; }
.discipline__desc p { color: var(--text-2); font-size: 17.5px; }
.service-list { list-style: none; margin: 40px 0; border-top: 1px solid var(--line-strong); counter-reset: svc; }
.service-list li { counter-increment: svc; display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 17px 0; border-bottom: 1px solid var(--line); font-size: 16.5px; transition: background .3s, padding .3s var(--ease); }
.service-list li::before { content: counter(svc, decimal-leading-zero); font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); padding-top: 3px; }
.service-list li:hover { padding-left: 8px; }
.note { display: flex; gap: 14px; margin: -12px 0 36px; padding: 18px 20px; border: 1px solid var(--line); background: rgba(24,41,52,.6); font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.note svg { flex-shrink: 0; color: var(--accent); margin-top: 2px; }

/* Industries page */
.industry { position: relative; border-bottom: 1px solid var(--line); }
.industry__grid { display: grid; grid-template-columns: 7fr 5fr; min-height: 640px; }
.industry:nth-of-type(even) .industry__grid { grid-template-columns: 5fr 7fr; }
.industry:nth-of-type(even) .industry__media { order: 2; }
.industry__media { position: relative; overflow: hidden; min-height: 420px; }
.industry__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.industry:hover .industry__media img { transform: scale(1.04); }
.industry__content { padding: clamp(40px, 6vw, 96px) clamp(24px, 5vw, 80px); display: flex; flex-direction: column; justify-content: center; background: var(--bg); }
.industry:nth-of-type(even) .industry__content { background: var(--bg-2); }
.industry__content .mono { color: var(--accent); margin-bottom: 22px; }
.industry__content h2 { font-size: clamp(32px, 3.8vw, 52px); margin-bottom: 22px; }
.industry__content p { color: var(--text-2); font-size: 18px; max-width: 42ch; }
.industry__links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.industry__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.industry__tags li { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); border: 1px solid var(--line-strong); padding: 6px 10px; }

/* 15. About -------------------------------------------------------------- */
.about-statement { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(40px, 6vw, 96px); }
.about-statement h2 { font-size: clamp(30px, 3.6vw, 50px); }
.about-statement .big { font-family: var(--font-head); font-size: clamp(22px, 2.3vw, 31px); line-height: 1.32; letter-spacing: -0.015em; color: var(--ink); font-weight: 500; margin-bottom: 28px; }
.about-split { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.about-split__media { position: relative; aspect-ratio: 4 / 4.4; overflow: hidden; }
.about-split__media img { width: 100%; height: 100%; object-fit: cover; }
.about-split h2 { font-size: clamp(30px, 3.8vw, 52px); margin-bottom: 28px; max-width: 16ch; }
.about-split p { color: var(--text-2); font-size: 18px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-light); }
.principle { padding: 40px 36px 8px 0; }
.principle + .principle { padding-left: 36px; border-left: 1px solid var(--line-light); }
.principle .mono { display: block; margin-bottom: 40px; color: #0E7F76; }
.principle h3 { font-size: clamp(24px, 2.2vw, 30px); margin-bottom: 14px; }
.principle p { font-size: 16.5px; }
.approach { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--line); border: 1px solid var(--line); counter-reset: ap; }
.approach li { background: var(--bg); padding: 34px 28px 40px; position: relative; counter-increment: ap; transition: background .35s; }
.approach li:hover { background: var(--panel); }
.approach li::before { content: counter(ap, decimal-leading-zero); font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); letter-spacing: .12em; display: block; margin-bottom: 64px; }
.approach li::after { content: "→"; position: absolute; right: 24px; top: 30px; color: var(--text-2); font-size: 18px; }
.approach li:last-child::after { content: ""; }
.approach h3 { font-size: clamp(24px, 2.2vw, 30px); margin-bottom: 12px; }
.approach p { color: var(--text-2); font-size: 15.5px; }
.brand-band { background: #fff; border-top: 1px solid var(--line-light); }
.brand-band img { width: 100%; max-width: 1100px; margin: 0 auto; }

/* 16. Contact ------------------------------------------------------------ */
.contact-grid { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-aside { position: sticky; top: calc(var(--header-h) + 32px); }
.contact-aside h2 { font-size: 22px; margin-bottom: 18px; }
.contact-steps { list-style: none; border-top: 1px solid var(--line); margin-bottom: 40px; }
.contact-steps li { display: grid; grid-template-columns: 40px 1fr; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 15.5px; }
.contact-steps li span { font-family: var(--font-mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.contact-aside .small { font-size: 14.5px; color: var(--text-2); }

.form { background: var(--bg-2); border: 1px solid var(--line); padding: clamp(24px, 4vw, 56px); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 24px; }
.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.field .req { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 16px; min-height: 54px;
  transition: border-color .25s, background-color .25s, box-shadow .25s;
}
.field textarea { min-height: 170px; resize: vertical; line-height: 1.55; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%235ED9CE' stroke-width='1.5'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(168,186,197,.5); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94,217,206,.18); }
.field [aria-invalid="true"] { border-color: #FF8A80; }
.field .error { font-size: 13.5px; color: #FFB4AB; min-height: 0; }
.field .error:empty { display: none; }
.field .hint { font-size: 13.5px; color: var(--text-2); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border: 1px solid var(--line-strong); background: var(--bg); cursor: pointer; font-size: 15px; line-height: 1.35; transition: border-color .25s, background .25s; }
.choice span::before { content: ""; width: 16px; height: 16px; border: 1px solid var(--line-strong); border-radius: 50%; flex-shrink: 0; transition: border .2s, background .2s; }
.choice input:checked + span { border-color: var(--accent); background: rgba(94,217,206,.07); }
.choice input:checked + span::before { border: 5px solid var(--accent); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice span:hover { border-color: rgba(168,186,197,.55); }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; font-size: 15px; color: var(--text-2); line-height: 1.55; text-transform: none; letter-spacing: 0; font-family: var(--font-body); }
.consent input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; accent-color: var(--accent); padding: 0; }
.consent a { color: var(--accent); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.form__footer .small { font-size: 13.5px; color: var(--text-2); max-width: 44ch; }
.btn[disabled] { opacity: .6; cursor: progress; }
.form-status { margin-top: 24px; padding: 18px 20px; border: 1px solid var(--line-strong); font-size: 15.5px; line-height: 1.55; }
.form-status:empty { display: none; }
.form-status[data-state="success"] { border-color: var(--accent); background: rgba(94,217,206,.08); color: var(--text); }
.form-status[data-state="error"] { border-color: #FF8A80; background: rgba(255,138,128,.07); color: #FFD9D4; }
.form-status[data-state="info"] { border-color: #E9C46A; background: rgba(233,196,106,.07); color: #F6E7BF; }

/* 17. Legal / 404 -------------------------------------------------------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(22px, 2.2vw, 28px); margin: 52px 0 16px; }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-left: 20px; margin: 0 0 1.1em; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent); }
.notfound { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 40px) 0 80px; position: relative; overflow: hidden; }
.notfound__code { font-family: var(--font-mono); color: var(--accent); letter-spacing: .14em; font-size: 13px; margin-bottom: 26px; display: block; }
.notfound h1 { font-size: clamp(40px, 6vw, 84px); max-width: 14ch; margin-bottom: 26px; }
.notfound p { color: var(--text-2); font-size: 18px; max-width: 48ch; margin-bottom: 38px; }

/* 18. Footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); padding: clamp(64px, 8vw, 110px) 0 36px; }
.footer__top { display: grid; grid-template-columns: 5fr 3fr 4fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.footer__brand p { color: var(--text-2); font-size: 15px; max-width: 38ch; margin-top: 26px; }
.footer__brand .logo-plate img { width: 200px; }
.footer__col h2 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.footer__col ul { list-style: none; display: grid; gap: 10px; }
.footer__col a { text-decoration: none; color: var(--text-2); font-size: 15px; transition: color .2s; }
.footer__col a:hover { color: var(--text); }
.footer__cta h2 { font-family: var(--font-head); font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; letter-spacing: -0.02em; text-transform: none; color: var(--text); margin-bottom: 24px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; font-size: 13.5px; color: var(--text-2); }
.footer__bottom a { color: var(--text-2); text-decoration: none; }
.footer__bottom a:hover { color: var(--text); }
.footer__bottom ul { list-style: none; display: flex; gap: 24px; }

/* 19. Motion ------------------------------------------------------------- */
@keyframes heroZoom { to { transform: scale(1); } }
@keyframes scrollCue { 0% { top: -40%; } 100% { top: 100%; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }

.js .hero h1 .line > span { animation: lineUp 1s var(--ease) both; }
.js .hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
.js .hero [data-hero-fade] { animation: fadeUp .9s var(--ease) both; animation-delay: calc(.35s + var(--d, 0) * .1s); }

.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero__media img { transform: none; }
  .scroll-cue__track::after { display: none; }
}

/* 20. Responsive --------------------------------------------------------- */
@media (max-width: 1100px) {
  .services { grid-template-columns: 1fr; }
  .service { min-height: 520px; }
  .service h3 { max-width: 20ch; }
  .process { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  :root { --header-h: 72px; }
  .menu-toggle { display: inline-block; z-index: 2; }
  .nav-primary {
    position: fixed; inset: 0; z-index: 1; background: var(--bg);
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
    padding: calc(var(--header-h) + 32px) var(--gutter) 40px;
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity .4s var(--ease), transform .45s var(--ease), visibility 0s linear .45s;
    overflow-y: auto;
  }
  .nav-primary.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .4s var(--ease), transform .45s var(--ease), visibility 0s; }
  .nav-primary ul { flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
  .nav-primary ul li { border-bottom: 1px solid var(--line); }
  .nav-primary ul a { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-head); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); padding: 18px 0; }
  .nav-primary ul a::after { display: none; }
  .nav-primary ul a[aria-current="page"] { color: var(--accent); }
  .nav-primary ul a::before { content: attr(data-num); order: 2; font-family: var(--font-mono); font-size: 12px; color: var(--text-2); letter-spacing: .1em; }
  .nav-primary .btn { margin-top: 32px; width: 100%; }
  .nav-primary.is-open li { animation: fadeUp .5s var(--ease) both; }
  .nav-primary.is-open li:nth-child(2) { animation-delay: .04s; }
  .nav-primary.is-open li:nth-child(3) { animation-delay: .08s; }
  .nav-primary.is-open li:nth-child(4) { animation-delay: .12s; }
  .nav-primary.is-open li:nth-child(5) { animation-delay: .16s; }
  .site-header .logo-plate { position: relative; z-index: 2; }
  .logo-plate img { width: 142px; }

  .intro__grid, .about-statement, .contact-grid, .page-hero__grid, .discipline__grid, .about-split { grid-template-columns: 1fr; }
  .discipline--flip .discipline__media { order: 0; }
  .discipline__media { position: relative; top: 0; aspect-ratio: 16 / 10; }
  .contact-aside { position: static; }
  .page-index { display: none; }
  .industry__grid, .industry:nth-of-type(even) .industry__grid { grid-template-columns: 1fr; min-height: 0; }
  .industry:nth-of-type(even) .industry__media { order: 0; }
  .industry__media { min-height: 0; aspect-ratio: 16 / 10; }
  .tile:nth-child(n) { grid-column: span 12; min-height: 340px; }
  .tiles { gap: 12px; }
  .principles { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding: 32px 0; border-left: 0; border-bottom: 1px solid var(--line-light); }
  .principle .mono { margin-bottom: 18px; }
  .approach { grid-template-columns: 1fr 1fr; }
  .section-head { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { align-items: flex-end; }
  .hero__media img { object-position: 72% center; }
  .hero::before { background: linear-gradient(0deg, rgba(7,16,23,1) 0%, rgba(7,16,23,.9) 45%, rgba(7,16,23,.45) 100%); }
  .hero h1 { font-size: clamp(42px, 12vw, 54px); }
  .hero__meta { flex-direction: column; align-items: flex-start; }
  .hero__meta .scroll-cue { display: none; }
  .btn-row .btn { width: 100%; }
  .pillars { grid-template-columns: 1fr; }
  .pillars li, .pillars li + li { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--line-light); }
  .service { min-height: 500px; }
  .service__top, .service__body { padding-left: 22px; padding-right: 22px; }

  /* Process diagram becomes a vertical stepper on mobile */
  .flow__tabs { grid-template-columns: 1fr; gap: 0; border-left: 1px solid var(--line-strong); margin-left: 7px; }
  .flow__rail { display: none; }
  .flow__tab { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; padding: 16px 0 16px 0; margin-left: -8px; }
  .flow__node { margin: 0; }
  .flow__tab .num { order: 3; margin: 0; }
  .flow__tab .name { font-size: 20px; }
  .flow__panels { margin-top: 20px; }
  .flow__panel { grid-template-columns: 1fr; }
  .flow__diagram { border-left: 0; border-top: 1px solid var(--line); min-height: 180px; }

  .form__grid, .choice-grid { grid-template-columns: 1fr; }
  .form__footer .btn { width: 100%; }
  .approach { grid-template-columns: 1fr; }
  .approach li::before { margin-bottom: 24px; }
  .approach li::after { content: "↓"; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }
  .page-hero__mark { display: none; }
  .tile:nth-child(n) { min-height: 280px; }
  .tile__label { padding: 20px; }
}

@media print {
  .site-header, .site-footer, .scroll-cue, .cta { display: none; }
  body { background: #fff; color: #000; }
}

/* Final refinements: keep header CTA legible and support editorial ending link. */
.nav-primary > .btn { color: var(--bg); }
.nav-primary > .btn:hover { color: var(--bg); }
.end-link { margin: 38px 0 0; }
.privacy-note { margin-top: 32px; padding: 18px 20px; border-left: 2px solid var(--accent); background: var(--panel); }
.service-tagline { font-weight: 600; color: var(--text); }
@media (max-width: 960px) {
  .nav-primary > .btn, .nav-primary > .btn:hover { color: var(--bg); }
}
