/* ==========================================================================
   FORMULASSIST GROUP — style.css
   Premium dark engineering theme.
   Accent system: cyan = Formulassist, electric blue = Techassist,
   red = Formulassist de Automobile (used sparingly).
   ========================================================================== */

:root {
  --void: #04060a;
  --ink: #070b12;
  --navy: #0a1224;
  --graphite: #141a26;
  --graphite-2: #1b2331;

  --line: rgba(160, 185, 220, .14);
  --line-strong: rgba(160, 185, 220, .3);

  --text: #e9eef6;
  --mute: #93a0b4;
  --dim: #7a869b;

  --cyan: #3fd8ff;
  --blue: #5b84ff;
  --red: #ff4a4d;

  --font-display: 'Michroma', 'Eurostile', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, dt { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

::selection { background: rgba(63, 216, 255, .3); color: #fff; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 1rem; top: -4rem;
  z-index: 400;
  padding: .7rem 1.1rem;
  background: var(--cyan);
  color: #02131a;
  font-weight: 600;
  text-decoration: none;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

/* ---------- Shared type ---------- */
.section { padding-block: clamp(5rem, 10vw, 9rem); position: relative; }

.section-tag {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
  font-size: .85rem;
  letter-spacing: .04em;
  color: var(--cyan);
}
.section-tag::before {
  content: "";
  width: 36px; height: 1px;
  background: var(--cyan);
}

.h2 {
  font-weight: 300;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: #fff;
  text-wrap: balance;
}
.h2-large { font-size: clamp(2rem, 4.6vw, 3.8rem); }

.lead {
  margin-top: 1.5rem;
  max-width: 60ch;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--mute);
}
.body-copy {
  margin-top: 1.1rem;
  max-width: 62ch;
  color: var(--mute);
}

.section-head { max-width: 760px; }

.text-link {
  display: inline-block;
  position: relative;
  padding-bottom: 2px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--cyan);
  text-decoration: none;
}
.text-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(.35);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.text-link:hover::after, .text-link:focus-visible::after { transform: scaleX(1); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: background-color .3s, color .3s, border-color .3s, box-shadow .4s;
}
.btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-18deg);
  transition: left .7s var(--ease);
  pointer-events: none;
}
.btn:hover::after, .btn:focus-visible::after { left: 130%; }

.btn-primary { background: var(--cyan); color: #02131a; }
.btn-primary:hover { background: #fff; box-shadow: 0 0 40px -8px rgba(63, 216, 255, .6); }

.btn-ghost { background: transparent; color: #fff; border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-accent { background: var(--accent, var(--cyan)); color: #04060a; }
.btn-accent:hover { background: #fff; box-shadow: 0 0 36px -8px rgba(var(--accent-rgb, 63, 216, 255), .7); }

/* ==========================================================================
   INTRO
   ========================================================================== */
.intro { display: none; }

html.intro-on .intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--void);
  /* Failsafe: even if script.js never runs, the intro removes itself. */
  animation: introExit .8s var(--ease) 4.4s forwards;
}
html.intro-on .intro.is-done {
  animation: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .7s var(--ease), visibility 0s .7s;
}
@keyframes introExit { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.intro-grid { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.intro-lines path {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: introDraw 1.3s var(--ease) var(--d, 0s) forwards;
}
.intro-lines-key path { stroke: rgba(63, 216, 255, .5); }
@keyframes introDraw { to { stroke-dashoffset: 0; } }

.intro-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.intro-core::before {
  content: "";
  position: absolute;
  inset: -40% -30%;
  background: radial-gradient(closest-side, rgba(63, 216, 255, .16), transparent);
  opacity: 0;
  animation: fadeIn 1.6s ease .6s forwards;
  pointer-events: none;
}
.intro-mark {
  width: 76px; height: 76px;
  color: #fff;
  animation: introMark 1s var(--ease) .5s both;
}
@keyframes introMark {
  from { opacity: 0; transform: scale(.82); }
  to { opacity: 1; transform: none; }
}
.intro-word {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5.4vw, 2.7rem);
  letter-spacing: .12em;
  line-height: 1.15;
  color: #fff;
  animation: introWipe 1s var(--ease) 1s both;
}
.intro-word span:last-child { color: var(--mute); }
@keyframes introWipe {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
.intro-sweep {
  position: absolute;
  top: 42%;
  left: 0;
  width: 2px;
  height: 7.5rem;
  background: linear-gradient(transparent, var(--cyan), transparent);
  box-shadow: 0 0 24px 4px rgba(63, 216, 255, .55);
  opacity: 0;
  animation: introSweep 1s var(--ease) 1s both;
}
@keyframes introSweep {
  0% { left: 0; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
.intro-tag {
  font-size: clamp(.9rem, 2.4vw, 1.1rem);
  font-weight: 300;
  letter-spacing: .18em;
  color: var(--mute);
  animation: fadeIn .9s ease 2s both;
}
.intro-skip {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  min-height: 44px;
  padding: .6rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--mute);
  font: 500 .8rem var(--font-body);
  letter-spacing: .08em;
  cursor: pointer;
  transition: color .25s, border-color .25s;
}
.intro-skip:hover { color: #fff; border-color: var(--cyan); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color .4s;
}
/* Backdrop lives on a pseudo-element so the fixed mobile menu is not trapped inside it */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(4, 6, 10, .88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity .4s;
}
.nav.scrolled, .nav.open { border-color: var(--line); }
.nav.scrolled::before, .nav.open::before { opacity: 1; }

.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: .9rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  font-family: var(--font-display);
  font-size: .78rem;
  letter-spacing: .14em;
  color: #fff;
  text-decoration: none;
}
.brand-mark {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark.has-image > svg { display: none; }
.brand-mark.has-image > img { position: static; object-fit: contain; }
.brand-word b { font-weight: 400; color: var(--mute); }

.nav-menu ul { display: flex; align-items: center; gap: .15rem; }
.nav-menu a {
  position: relative;
  display: block;
  padding: .6rem .85rem;
  font-size: .84rem;
  letter-spacing: .05em;
  color: var(--mute);
  text-decoration: none;
  transition: color .25s;
}
.nav-menu a::after {
  content: "";
  position: absolute;
  left: .85rem; right: .85rem; bottom: .3rem;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-menu a:hover, .nav-menu a.active { color: #fff; }
.nav-menu a:hover::after, .nav-menu a.active::after { transform: scaleX(1); }
.nav-menu .nav-cta { border: 1px solid var(--line-strong); border-radius: 2px; margin-left: .5rem; }
.nav-menu .nav-cta::after { display: none; }
.nav-menu .nav-cta:hover { border-color: var(--cyan); }

.nav-toggle {
  position: relative;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.bars { position: relative; display: block; width: 20px; height: 14px; }
.bars::before, .bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform .35s var(--ease);
}
.bars::before { top: 3px; }
.bars::after { bottom: 3px; }
.nav.open .bars::before { transform: translateY(3.25px) rotate(45deg); }
.nav.open .bars::after { transform: translateY(-3.25px) rotate(-45deg); }

.progress {
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  /* Without JavaScript the menu simply stays visible as a wrapped row */
  html:not(.js) .nav-inner { flex-wrap: wrap; }
  html:not(.js) .nav-menu ul { flex-wrap: wrap; }

  html.js .nav-menu {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 6.5rem var(--gutter) 2rem;
    background: rgba(4, 6, 10, .98);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility 0s .35s;
  }
  html.js .nav.open .nav-menu {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }
  html.js .nav-menu ul { flex-direction: column; align-items: stretch; gap: 0; }
  html.js .nav-menu a {
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: .08em;
  }
  html.js .nav-menu a::after { display: none; }
  html.js .nav-menu .nav-cta { margin-left: 0; border-width: 0 0 1px; border-radius: 0; }
  html.js .nav-menu a.active { color: var(--cyan); }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 8rem 0 5rem;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 78% 42%, #0b1730 0%, transparent 70%), var(--void);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-grid {
  position: absolute;
  inset: -72px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 68% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 68% 45%, #000 0%, transparent 75%);
  animation: gridDrift 36s linear infinite;
}
@keyframes gridDrift { to { transform: translate(72px, 72px); } }

.hero-glow {
  position: absolute;
  right: -12%; top: 6%;
  width: min(70vw, 900px); height: min(70vw, 900px);
  background: radial-gradient(circle, rgba(63, 216, 255, .1), transparent 62%);
}
.hero-glow::after {
  content: "";
  position: absolute;
  left: -90%; bottom: -30%;
  width: 70%; height: 70%;
  background: radial-gradient(circle, rgba(255, 74, 77, .07), transparent 65%);
}
.hero-scan {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 1px;
  background: linear-gradient(transparent, rgba(63, 216, 255, .5), transparent);
  opacity: .55;
  animation: heroScan 16s linear infinite;
}
@keyframes heroScan {
  from { transform: translateX(-5vw); }
  to { transform: translateX(105vw); }
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 4.3vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: .02em;
  color: #fff;
}
.t-line { display: block; }

.hero-tagline {
  margin-top: 1.5rem;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 300;
  letter-spacing: -.01em;
  color: #fff;
}
.hero-support {
  margin-top: 1rem;
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--mute);
}
.hero-def {
  margin-top: 1.4rem;
  max-width: 56ch;
  padding-left: 1rem;
  border-left: 1px solid var(--cyan);
  font-size: .95rem;
  color: var(--text);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

.hero-legend {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 1.5rem 2rem;
  margin-top: 2.6rem;
}
.legend-item {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  text-decoration: none;
  color: var(--text);
}
.legend-dot {
  flex: none;
  width: 9px; height: 9px;
  margin-top: .5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .04);
  transition: box-shadow .3s;
}
.legend-item strong { display: block; font-size: .88rem; font-weight: 500; line-height: 1.35; }
.legend-item small { display: block; font-size: .78rem; color: var(--dim); }
.legend-item:hover .legend-dot { box-shadow: 0 0 0 5px rgba(255, 255, 255, .08), 0 0 14px var(--accent); }

/* Triad visual */
.triad-wrap { width: 100%; max-width: 560px; margin-inline: auto; }
.triad { width: 100%; height: auto; overflow: visible; }

.ring { fill: none; stroke: var(--cyan); transform-origin: 280px 317px; }
.ring-a { stroke-dasharray: 2 10; opacity: .45; animation: spin 90s linear infinite; }
.ring-b { stroke-dasharray: 60 14 6 14; opacity: .28; animation: spin 70s linear infinite reverse; }
.ring-c { opacity: .2; stroke-width: .8; }
@keyframes spin { to { transform: rotate(360deg); } }

.edge {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 4 8;
  animation: edgeFlow 24s linear infinite;
}
@keyframes edgeFlow { to { stroke-dashoffset: -240; } }

.spoke { fill: none; stroke: currentColor; stroke-width: 1.2; opacity: .55; }
.pulse {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 5 95;
  stroke-dashoffset: 100;
  animation: pulseTravel 3.6s linear var(--pd, 0s) infinite;
}
@keyframes pulseTravel { to { stroke-dashoffset: 0; } }

.core-halo { fill: none; stroke: var(--line-strong); stroke-dasharray: 3 5; }
.core-disc { fill: var(--ink); stroke: rgba(255, 255, 255, .6); stroke-width: 1.2; }
.core-text { fill: #fff; font-family: var(--font-display); font-size: 17px; letter-spacing: .06em; }

.node { cursor: pointer; outline: none; }
.node-halo {
  fill: rgba(255, 255, 255, .02);
  stroke: var(--accent);
  stroke-width: 1.2;
  opacity: .7;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .5s var(--ease), opacity .3s, stroke-width .3s;
}
.node-dot { fill: var(--accent); }
.node-name {
  fill: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .08em;
}
.node-sub { fill: var(--mute); font-family: var(--font-body); font-size: 11.5px; }
.node:hover .node-halo, .node:focus-visible .node-halo { transform: scale(1.3); opacity: 1; }
.node:focus-visible .node-halo { stroke: #fff; stroke-width: 2.5; }

/* Hero entrance — base state is fully visible; animations only add motion */
.hero.play .t-line { animation: rise 1s var(--ease) both; }
.hero.play .t-line:nth-child(2) { animation-delay: .1s; }
.hero.play .hero-tagline { animation: rise 1s var(--ease) .25s both; }
.hero.play .hero-support { animation: rise 1s var(--ease) .35s both; }
.hero.play .hero-def { animation: rise 1s var(--ease) .45s both; }
.hero.play .hero-actions { animation: rise 1s var(--ease) .55s both; }
.hero.play .hero-legend { animation: rise 1s var(--ease) .65s both; }
.hero.play .spoke { animation: spokeDraw 1.4s var(--ease) .3s both; }
.hero.play .node, .hero.play .core { animation: fadeIn .9s ease .9s both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes spokeDraw {
  from { stroke-dasharray: 1; stroke-dashoffset: 1; }
  to { stroke-dasharray: 1; stroke-dashoffset: 0; }
}

@media (max-width: 960px) {
  .hero { padding-top: 7rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(1.7rem, 7.4vw, 3.2rem); }
  .triad-wrap { max-width: 480px; }
}
@media (max-width: 640px) {
  .hero-legend { grid-template-columns: 1fr; }
  .node-name { font-size: 16px; }
  .node-sub { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about { background: var(--ink); border-top: 1px solid var(--line); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.structure { position: relative; padding-top: .5rem; }
.structure::before {
  content: "";
  position: absolute;
  left: 7px; top: 1.2rem; bottom: 2.4rem;
  width: 1px;
  background: linear-gradient(var(--line-strong), var(--line));
}
.structure-root, .structure-list li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
}
.structure-node {
  position: relative;
  z-index: 1;
  flex: none;
  width: 15px; height: 15px;
  margin-top: .45rem;
  border: 1.5px solid var(--accent, #fff);
  border-radius: 50%;
  background: var(--ink);
}
.structure-root .structure-node { background: #fff; border-color: #fff; }
.structure-title { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .06em; color: #fff; }
.structure-sub { margin-top: .3rem; font-size: .9rem; color: var(--mute); }
.structure-list { margin-top: 2.6rem; display: grid; gap: 2.4rem; }
.structure-list li::after {
  content: "";
  position: absolute;
  left: 15px; top: calc(.45rem + 7px);
  width: 1.4rem; height: 1px;
  background: var(--line-strong);
}
.structure-list li .structure-node { background: var(--accent); }
.structure-list h3 { font-family: var(--font-display); font-size: .95rem; font-weight: 400; letter-spacing: .06em; color: #fff; }
.structure-list p { margin: .45rem 0 .8rem; max-width: 46ch; color: var(--mute); font-size: .95rem; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   DIVISIONS
   ========================================================================== */
.divisions {
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--void);
}
.divisions::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 40%, transparent 20%, var(--void) 85%);
  pointer-events: none;
}
.divisions > .wrap { position: relative; }

.divisions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.division {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), .1), rgba(7, 11, 18, .94) 55%),
    var(--ink);
  transition: border-color .4s, translate .5s var(--ease), box-shadow .5s;
}
.division::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(var(--accent-rgb), .17), transparent 60%);
  transition: opacity .4s;
}
.division::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(.18);
  transform-origin: left;
  transition: transform .6s var(--ease);
}
.division:hover, .division:focus-within {
  border-color: rgba(var(--accent-rgb), .55);
  translate: 0 -6px;
  box-shadow: 0 34px 60px -34px rgba(var(--accent-rgb), .4);
}
.division:hover::before, .division:focus-within::before { opacity: 1; }
.division:hover::after, .division:focus-within::after { transform: scaleX(1); }

.asset-slot { position: relative; }
.asset-slot > img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.division-art {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}
.division-art > svg { width: 100%; height: 100%; transition: transform .9s var(--ease); }
.division:hover .division-art > svg { transform: scale(1.06); }

.art-flow { stroke-dasharray: 5 7; }
.division:hover .art-flow, .project:hover .art-flow { animation: dashMove 1.4s linear infinite; }
@keyframes dashMove { to { stroke-dashoffset: -48; } }

.division-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.8rem 1.6rem 1.7rem;
}
.division-index { font-size: .8rem; color: var(--accent); letter-spacing: .04em; }
.division-name {
  margin-top: .6rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  line-height: 1.3;
  letter-spacing: .06em;
  color: #fff;
}
.division-focus { margin-top: .75rem; font-size: 1rem; font-weight: 500; color: var(--text); }
.division-desc { margin-top: .7rem; font-size: .95rem; color: var(--mute); }

.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.3rem 0 1.8rem; }
.tags li {
  padding: .25rem .65rem;
  border: 1px solid rgba(var(--accent-rgb), .35);
  border-radius: 2px;
  font-size: .76rem;
  color: var(--text);
}
.division .btn { margin-top: auto; }
.division-url { margin-top: .85rem; font-size: .8rem; color: var(--dim); text-align: center; overflow-wrap: anywhere; }

@media (max-width: 1000px) {
  .divisions-grid { grid-template-columns: 1fr; max-width: 640px; }
}

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.projects { background: var(--ink); border-top: 1px solid var(--line); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.p-edith { grid-column: span 7; }
.p-mcqueen { grid-column: span 5; }
.p-jarvis { grid-column: span 4; }
.p-fa33 { grid-column: span 8; }
.p-more { grid-column: span 12; }

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--graphite), var(--ink));
  transition: border-color .4s, translate .5s var(--ease), box-shadow .5s;
}
.project:hover, .project:focus-within {
  border-color: rgba(var(--accent-rgb), .6);
  translate: 0 -4px;
  box-shadow: 0 30px 50px -34px rgba(var(--accent-rgb), .45);
}
.project:has(.stretched:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 3px; }

.project-visual {
  height: 240px;
  overflow: hidden;
  color: var(--accent);
  background:
    radial-gradient(ellipse at 50% 120%, rgba(var(--accent-rgb), .14), transparent 65%),
    var(--navy);
  border-bottom: 1px solid var(--line);
}
.p-edith .project-visual, .p-fa33 .project-visual { height: 280px; }
.project-visual > svg { width: 100%; height: 100%; transition: transform .9s var(--ease); }
.project:hover .project-visual > svg { transform: scale(1.05); }
.visual-note {
  position: absolute;
  left: .9rem; bottom: .7rem;
  z-index: 1;
  font-size: .72rem;
  color: var(--dim);
}

.project-body { display: flex; flex: 1; flex-direction: column; padding: 1.5rem 1.6rem 1.6rem; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: .9rem; }
.division-chip {
  padding: .2rem .6rem;
  border: 1px solid rgba(var(--accent-rgb), .45);
  border-radius: 2px;
  font-size: .76rem;
  color: var(--text);
}
.status { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--mute); }
.status::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--mute);
}
.status[data-state="development"] { color: var(--text); }
.status[data-state="development"]::before { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px rgba(63, 216, 255, .6); }
.status[data-state="open"]::before { border-style: dashed; }

.project-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.3;
  letter-spacing: .05em;
  color: #fff;
}
.project-title a { text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.project-body p { margin-top: .7rem; max-width: 56ch; font-size: .95rem; color: var(--mute); }
.project-cta {
  position: relative;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 1.3rem;
  font-size: .86rem;
  font-weight: 500;
  color: var(--accent);
}
.project-cta::before {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(.2);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.project:hover .project-cta::before, .project:focus-within .project-cta::before { transform: scaleX(1); }
.project-cta { margin-top: auto; padding-bottom: 0; }
.project-body p + .project-cta { margin-top: 1.4rem; }

.p-more { flex-direction: row; border-style: dashed; border-color: var(--line-strong); background: transparent; }
.p-more .project-visual { flex: 0 0 38%; height: auto; min-height: 220px; border-bottom: 0; border-right: 1px dashed var(--line-strong); }
.p-more .project-body { justify-content: center; }
.p-more .project-cta { margin-top: 1.4rem; }

.blink { animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.wave rect { transform-box: fill-box; transform-origin: center; transition: transform .5s var(--ease); }
.project:hover .wave rect { animation: wave 1.1s ease-in-out infinite; }
.wave rect:nth-child(3n) { animation-delay: .15s; }
.wave rect:nth-child(3n + 1) { animation-delay: .3s; }
@keyframes wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.7); } }

.spin-a, .spin-b { transform-origin: 200px 120px; }
.project:hover .spin-a { animation: spin 14s linear infinite; }
.project:hover .spin-b { animation: spin 9s linear infinite reverse; }

@media (max-width: 1000px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects-grid > .project { grid-column: span 1; }
  .projects-grid > .p-more { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
  .projects-grid > .project, .projects-grid > .p-more { grid-column: auto; }
  .p-more { flex-direction: column; }
  .p-more .project-visual { flex: none; height: 200px; border-right: 0; border-bottom: 1px dashed var(--line-strong); }
  .p-edith .project-visual, .p-fa33 .project-visual { height: 240px; }
}

/* ==========================================================================
   VISION
   ========================================================================== */
.vision {
  background:
    radial-gradient(ellipse 60% 50% at 15% 30%, rgba(91, 132, 255, .09), transparent 70%),
    var(--void);
}
.vision-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.vision-head { position: sticky; top: 7rem; }
.principles { border-top: 1px solid var(--line-strong); }
.principle { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.principle dt { font-size: 1.15rem; font-weight: 500; color: #fff; }
.principle dd { margin-top: .4rem; max-width: 46ch; color: var(--mute); font-size: .96rem; }

@media (max-width: 900px) {
  .vision-grid { grid-template-columns: 1fr; }
  .vision-head { position: static; }
}

/* ==========================================================================
   LEADERSHIP
   ========================================================================== */
.leadership { background: var(--ink); border-top: 1px solid var(--line); }
.leadership-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.portrait {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 100%, rgba(63, 216, 255, .12), transparent 65%),
    linear-gradient(160deg, var(--graphite-2), var(--ink));
}
.portrait .monogram {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .16);
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(var(--cyan), var(--cyan)) top left / 18px 1px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) top left / 1px 18px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) top right / 18px 1px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) top right / 1px 18px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) bottom left / 18px 1px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) bottom left / 1px 18px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) bottom right / 18px 1px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) bottom right / 1px 18px no-repeat;
}
.leader-role { margin-top: .9rem; font-size: 1.1rem; color: var(--cyan); }
.leader-copy .body-copy { margin-bottom: 1.6rem; }

@media (max-width: 800px) {
  .leadership-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 300px; }
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact {
  background:
    radial-gradient(ellipse 70% 60% at 85% 20%, rgba(63, 216, 255, .08), transparent 70%),
    linear-gradient(180deg, var(--navy), var(--void));
  border-top: 1px solid var(--line);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.contact-person { margin-top: 2rem; padding-left: 1rem; border-left: 1px solid var(--cyan); color: var(--mute); }
.contact-person strong { color: #fff; font-weight: 500; }

.contact-panel { border-top: 1px solid var(--line-strong); }
.contact-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem .25rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background-color .3s, padding .4s var(--ease), border-color .3s;
}
.contact-row:hover, .contact-row:focus-visible {
  padding-inline: 1rem;
  background: rgba(63, 216, 255, .05);
  border-color: var(--cyan);
}
.contact-label { flex: none; min-width: 5.5rem; font-size: .85rem; color: var(--dim); }
.contact-value {
  flex: 1;
  text-align: right;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: #fff;
  overflow-wrap: anywhere;
}
.contact-divisions { margin-top: 2rem; }
.contact-divisions p { font-size: .9rem; color: var(--mute); }
.contact-divisions ul { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin-top: .8rem; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .contact-row { flex-direction: column; gap: .3rem; }
  .contact-value { text-align: left; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--void); border-top: 1px solid var(--line); padding-top: clamp(3.5rem, 7vw, 5.5rem); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
.footer-tagline { margin-top: 1.3rem; font-size: 1.15rem; font-weight: 300; color: #fff; }
.footer-note { margin-top: .3rem; font-size: .9rem; color: var(--mute); }
.footer-h { margin-bottom: 1rem; font-size: .85rem; font-weight: 500; color: var(--dim); }
.footer ul { display: grid; gap: .55rem; }
.footer ul a {
  font-size: .92rem;
  color: var(--mute);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .25s;
}
.footer ul a:hover, .footer ul a:focus-visible { color: var(--cyan); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding: 1.5rem 0 calc(1.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--dim);
}

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   SCROLL REVEAL (only active when script.js has confirmed it is running)
   ========================================================================== */
html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
html.reveal-ready [data-reveal].in { opacity: 1; transform: none; }

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro, html.intro-on .intro { display: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  html.reveal-ready [data-reveal] { opacity: 1; transform: none; }
  .hero-grid, .hero-scan { animation: none; }
}
