/* ============================================================
   VOLTAIC — high-voltage power systems engineering
   Theme lock: DARK only. One accent: incandescent amber.
   Shape lock: sharp (radius 0) everywhere.
   ============================================================ */

:root {
  --bg:        #08090B;   /* near-black, never pure */
  --bg-1:      #0D0F12;   /* elevated surface */
  --bg-2:      #14171C;   /* card / cell */
  --line:      rgba(255, 255, 255, 0.09);
  --line-2:    rgba(255, 255, 255, 0.16);
  --text:      #F1F0EC;   /* warm off-white, never pure */
  --muted:     #989CA4;
  --muted-2:   #6E727A;
  --accent:    #FFB23D;   /* incandescent amber, the only accent */
  --accent-hi: #FFC871;
  --hot:       #FFF6E6;   /* white-hot highlight */
  --maxw: 1320px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Satoshi", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Cabinet Grotesk", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* ---------- film grain (fixed, never on scroll containers) ---------- */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.05; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- shared ---------- */
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4rem;
}

.section-title {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  max-width: 18ch;
}
.section-sub {
  color: var(--muted);
  max-width: 56ch;
  margin-top: 1.2rem;
  font-size: 1.05rem;
}
.section-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-head--row {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
}

section { padding-inline: clamp(1.25rem, 5vw, 3.75rem); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Satoshi", sans-serif;
  font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn--primary {
  background: var(--accent); color: #14110A;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn--primary:hover { background: var(--accent-hi); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost {
  background: transparent; color: var(--text);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--ghost:active { transform: translateY(0); }
.btn--lg { padding: 1.05rem 2rem; font-size: 1.05rem; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 76px;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
  .nav.is-scrolled { background: rgba(8, 9, 11, 0.96); }
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  padding-inline: clamp(1.25rem, 5vw, 3.75rem);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
}
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); }
.brand__mark { color: var(--accent); display: inline-flex; }
.brand__word {
  font-family: "Cabinet Grotesk", sans-serif;
  font-weight: 800; letter-spacing: 0.16em; font-size: 1.05rem;
}
.nav__cta { justify-self: end; }

/* ---- Apple-style segmented control (section switcher) ---- */
.segmented {
  position: relative; justify-self: center;
  display: inline-flex; align-items: center;
  padding: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.segmented__item {
  position: relative; z-index: 1;
  padding: 0.68rem 1.5rem;
  font-size: 1.02rem; line-height: 1;
  color: var(--muted);
  border-radius: 11px;
  white-space: nowrap;
  transition: color 0.25s var(--ease);
}
.segmented__item:hover { color: var(--text); }
.segmented__item.is-active { color: var(--text); }
/* hairline dividers between inactive segments, hidden either side of the active one */
.segmented__item + .segmented__item::before {
  content: ""; position: absolute; left: -0.5px; top: 50%;
  height: 19px; width: 1px; transform: translateY(-50%);
  background: var(--line-2);
  transition: opacity 0.25s var(--ease);
}
.segmented__item.is-active::before,
.segmented__item.is-active + .segmented__item::before { opacity: 0; }
.segmented__thumb {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; opacity: 0;
  border-radius: 11px; z-index: 0;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.42s var(--ease), width 0.42s var(--ease), opacity 0.2s var(--ease);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(7rem, 13vh, 9rem) clamp(1.25rem, 5vw, 3.75rem) clamp(4rem, 8vh, 6rem);
  overflow: hidden;
  isolation: isolate;
}

/* full-bleed background video */
.hero__video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  background: var(--bg);
  pointer-events: none;
}

/* inward masking gradient: a vignette overlay that resolves to the page
   background at every edge, so the video melts into the site with no hard
   rectangle. Plus a top scrim (nav legibility) and a calm pocket behind copy. */
.hero__mask {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(8, 9, 11, 0.82) 0%, rgba(8, 9, 11, 0.18) 28%, rgba(8, 9, 11, 0.32) 60%, var(--bg) 100%),
    radial-gradient(ellipse 82% 84% at 50% 45%, transparent 38%, rgba(8, 9, 11, 0.6) 66%, var(--bg) 87%);
}

.hero__copy { max-width: 920px; margin: 0 auto; }
.hero__title {
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 5rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}
.hero__lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  max-width: 48ch;
  margin: 0 auto 2.4rem;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   SECTORS
   ============================================================ */
.sectors {
  max-width: var(--maxw); margin: 0 auto;
  padding-block: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--line);
}
.sectors__lede {
  font-family: "Cabinet Grotesk", sans-serif;
  font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  max-width: 24ch; margin-bottom: 3rem;
}
.sectors__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.sectors__list li {
  background: var(--bg);
  padding: 1.8rem 1.5rem 2rem;
  display: flex; flex-direction: column; gap: 1.2rem;
  transition: background 0.3s var(--ease);
}
.sectors__list li:hover { background: var(--bg-1); }
.sectors__no {
  font-family: "JetBrains Mono", monospace; font-size: 12px;
  color: var(--accent); letter-spacing: 0.1em;
}
.sectors__name {
  font-family: "Cabinet Grotesk", sans-serif; font-weight: 700;
  font-size: 1.25rem; letter-spacing: -0.01em;
}

/* ============================================================
   CAPABILITIES (bento — 5 cells, with rhythm)
   ============================================================ */
.caps {
  max-width: var(--maxw); margin: 0 auto;
  padding-block: clamp(5rem, 11vw, 9rem);
}
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 1px; background: var(--line);
  border: 1px solid var(--line);
}
.cell {
  background: var(--bg-1);
  padding: 2rem;
  display: flex; flex-direction: column;
  min-height: 280px;
  position: relative; overflow: hidden;
  transition: background 0.3s var(--ease);
}
.cell:hover { background: var(--bg-2); }
.cell--feature { grid-column: span 2; grid-row: span 2; }
.cell--wide { grid-column: span 2; }
.cell__body { margin-top: auto; }
.cell h3 {
  font-size: 1.4rem; margin-bottom: 0.7rem; font-weight: 700;
}
.cell--feature h3 { font-size: 2rem; }
.cell p { color: var(--muted); font-size: 0.98rem; max-width: 46ch; }

/* cell visuals (real visual variation, not white-on-white) */
.cell__viz { position: absolute; inset: 0; pointer-events: none; }
.cell__viz--grid {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 10%, #000 10%, transparent 70%);
          mask-image: radial-gradient(120% 90% at 70% 10%, #000 10%, transparent 70%);
}
.cell__viz--photo {
  background-size: cover; background-position: center;
  filter: grayscale(1) brightness(0.42) contrast(1.1);
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to top, transparent 8%, #000 75%);
          mask-image: linear-gradient(to top, transparent 8%, #000 75%);
}
.cell--accent { background: var(--bg-2); }
.cell__viz--pulse {
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 1.6rem;
}
.cell__viz--pulse span {
  width: 64px; height: 64px; border: 1px solid var(--accent);
  position: relative;
}
.cell__viz--pulse span::after {
  content: ""; position: absolute; inset: 0; border: 1px solid var(--accent);
  animation: ring 3.2s var(--ease) infinite;
}
@keyframes ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* ============================================================
   SELECTED WORK
   ============================================================ */
.work {
  max-width: var(--maxw); margin: 0 auto;
  padding-block: clamp(4rem, 9vw, 7rem);
}
.projects { list-style: none; margin: 0; padding: 0; }
.project { border-bottom: 1px solid var(--line); }
.project__link {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.6rem) 0;
  transition: opacity 0.3s var(--ease);
}
.project__media { overflow: hidden; aspect-ratio: 3 / 2; background: var(--bg-2); }
.project__media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) brightness(0.6) contrast(1.05) sepia(0.25) hue-rotate(-12deg);
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
}
.project__link:hover .project__media img { transform: scale(1.05); filter: grayscale(0.4) brightness(0.78); }
.project__meta { display: flex; flex-direction: column; gap: 0.5rem; }
.project__index {
  font-family: "JetBrains Mono", monospace; font-size: 12px;
  color: var(--muted-2); letter-spacing: 0.1em;
}
.project__name {
  font-family: "Cabinet Grotesk", sans-serif; font-weight: 800;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -0.02em;
}
.project__link:hover .project__name { color: var(--accent); }
.project__sector { color: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 12.5px; letter-spacing: 0.05em; }
.project__note { color: var(--muted); max-width: 44ch; margin-top: 0.4rem; }

/* ============================================================
   METRICS
   ============================================================ */
.metrics {
  max-width: var(--maxw); margin: 0 auto;
  padding-block: clamp(4rem, 9vw, 7rem);
  display: flex; flex-wrap: wrap;
}
.metric {
  flex: 1 1 180px;
  padding: 0.5rem clamp(1.5rem, 3vw, 2.6rem);
  display: flex; flex-direction: column; gap: 0.7rem;
  border-left: 1px solid var(--line);
}
.metric:first-child { padding-left: 0; border-left: none; }
.metric:last-child { flex: 1.6 1 240px; }
.metric__num {
  font-family: "Cabinet Grotesk", sans-serif; font-weight: 800;
  font-size: clamp(2.6rem, 4.6vw, 4.2rem); letter-spacing: -0.04em;
  line-height: 0.9; color: var(--hot); white-space: nowrap;
}
.metric:last-child .metric__num { color: var(--accent); }
.metric__label { color: var(--muted); font-size: 0.92rem; max-width: 22ch; }

/* ============================================================
   PROCESS / PRACTICE
   ============================================================ */
.process {
  max-width: var(--maxw); margin: 0 auto;
  padding-block: clamp(5rem, 11vw, 9rem);
}
.flow {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
}
.flow__step {
  padding: 2rem 1.6rem 2rem 0;
  border-top: 1px solid var(--accent);
  position: relative;
}
.flow__step::before {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 9px; height: 9px; background: var(--accent);
  transform: translateY(-50%);
}
.flow__verb {
  display: block;
  font-family: "Cabinet Grotesk", sans-serif; font-weight: 800;
  font-size: 1.5rem; letter-spacing: -0.01em;
  margin-bottom: 0.8rem;
}
.flow__step p { color: var(--muted); font-size: 0.96rem; max-width: 30ch; }

/* ============================================================
   QUOTE
   ============================================================ */
.quote {
  padding-block: clamp(5rem, 12vw, 10rem);
  border-top: 1px solid var(--line);
}
.quote blockquote {
  max-width: 1000px; margin: 0 auto; text-align: center;
}
.quote p {
  font-family: "Cabinet Grotesk", sans-serif; font-weight: 700;
  font-size: clamp(1.6rem, 3.8vw, 3rem); letter-spacing: -0.02em;
  line-height: 1.15; color: var(--text);
  margin-bottom: 2.2rem;
}
.quote cite { font-style: normal; display: flex; flex-direction: column; gap: 0.25rem; }
.quote__name { font-weight: 700; }
.quote__role { color: var(--muted); font-size: 0.92rem; }

/* ============================================================
   CTA
   ============================================================ */
.cta {
  padding-block: clamp(5rem, 12vw, 10rem);
  border-top: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.cta::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}
.cta__inner { max-width: 880px; margin: 0 auto; text-align: center; }
.cta__title {
  font-size: clamp(2.2rem, 5.5vw, 4rem); letter-spacing: -0.03em;
  margin-bottom: 1.3rem; max-width: 16ch; margin-inline: auto;
}
.cta__lede { color: var(--muted); font-size: 1.15rem; max-width: 48ch; margin: 0 auto 2.6rem; }
.cta__actions { display: flex; gap: 1.5rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.cta__phone { font-family: "JetBrains Mono", monospace; font-size: 0.95rem; color: var(--muted); letter-spacing: 0.04em; }
.cta__phone:hover { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 7vw, 5rem) clamp(1.25rem, 5vw, 3.75rem) 2rem;
}
.footer__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  padding-bottom: 3rem;
}
.footer__brand .brand__word { display: block; margin-bottom: 0.8rem; }
.footer__brand p { color: var(--muted); max-width: 30ch; }
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer__col h4 {
  font-family: "JetBrains Mono", monospace; font-weight: 500;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 1.1rem;
}
.footer__col a, .footer__col p { display: block; color: var(--muted); margin-bottom: 0.55rem; font-size: 0.95rem; }
.footer__col a:hover { color: var(--accent); }
.footer__base {
  max-width: var(--maxw); margin: 0 auto;
  border-top: 1px solid var(--line); padding-top: 2rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: "JetBrains Mono", monospace; font-size: 11.5px;
  color: var(--muted-2); letter-spacing: 0.04em;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
[data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-reveal].in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .cell--feature { grid-column: span 3; grid-row: span 1; }
  .cell--wide { grid-column: span 3; }
}

@media (max-width: 860px) {
  .segmented { display: none; }
  .sectors__list { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: 1fr; }
  .cell--feature, .cell--wide { grid-column: span 1; }
  .project__link { grid-template-columns: 1fr; gap: 1.2rem; }
  .metric { flex-basis: 40%; }
  .flow { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .sectors__list { grid-template-columns: 1fr; }
  .metrics { flex-direction: column; }
  .metric { flex-basis: auto; padding: 1.4rem 0 0; border-left: none; border-top: 1px solid var(--line); }
  .metric:first-child { padding-top: 0; border-top: none; }
  .flow { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
