/* ==========================================================================
   Niku Electric  ·  site stylesheet  ·  v2 "night shift"
   Dark is the default look because the client's own assets are dark-native
   (light-wave artwork on near-black, white wordmark with a blue bolt). A
   light theme stays available through the header toggle.
   One accent (brand blue), one cool navy-tinted neutral family, one radius.
   Motion: scroll-driven animations (view() / scroll() timelines) where the
   browser supports them, IntersectionObserver otherwise, pointer physics for
   buttons and the hero photo, cross-document view transitions between pages.
   Everything collapses under prefers-reduced-motion.
   ========================================================================== */

/* ---------- fonts ------------------------------------------------------- */
@font-face {
  font-family: "Satoshi";
  src: url("/assets/niku/fonts/satoshi-variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/niku/fonts/jetbrains-mono-variable.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens (dark default) --------------------------------------- */
:root {
  color-scheme: dark;
  --ground: #070b17;
  --ground-2: #0c1225;
  --surface: #121a30;
  --surface-2: #18223c;
  --text: #eef1fb;
  --text-2: #aab4d2;
  --text-3: #8791b3;
  --hair: rgba(169, 179, 209, 0.16);
  --hair-strong: rgba(169, 179, 209, 0.32);
  --accent: #4164d8;
  --accent-text: #8fb0ff;
  --accent-soft: rgba(65, 100, 216, 0.22);
  --on-accent: #ffffff;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  --logo-filter: none;
  --wordmark-filter: none;
  --wave-opacity: 0.75;
  --scrim: rgba(7, 11, 23, 0.72);

  --font-sans: "Satoshi", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 12px;
  --shell: 1320px;
  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --nav-h: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #f4f5fa;
  --ground-2: #ffffff;
  --surface: #eaedf6;
  --surface-2: #dfe4f1;
  --text: #111633;
  --text-2: #4b5375;
  --text-3: #5b6386;
  --hair: rgba(17, 22, 51, 0.12);
  --hair-strong: rgba(17, 22, 51, 0.26);
  --accent-text: #2f4fc0;
  --accent-soft: rgba(65, 100, 216, 0.12);
  --shadow: 0 30px 60px -30px rgba(17, 22, 51, 0.35);
  --logo-filter: invert(1);
  --wordmark-filter: invert(1) hue-rotate(180deg);
  --wave-opacity: 0.22;
  --scrim: rgba(17, 22, 51, 0.7);
}

/* ---------- reset ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
body {
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Film grain: one fixed, pointer-events-none layer. Breaks the flatness of
   large dark surfaces; costs nothing on scroll because it never repaints. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: 0.045;
  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.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
:root[data-theme="light"] body::before { opacity: 0.035; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---------- typography -------------------------------------------------- */
.nk-h1, .nk-h2, .nk-h3 { font-weight: 700; letter-spacing: -0.025em; line-height: 1.02; text-wrap: balance; }
.nk-h1 { font-size: clamp(2.2rem, 1rem + 4.6vw, 5.25rem); }
.nk-h2 { font-size: clamp(1.9rem, 1.1rem + 2.6vw, 3.4rem); }
.nk-h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.7rem); line-height: 1.15; }
.nk-lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); line-height: 1.5; color: var(--text-2); max-width: 36ch; text-wrap: pretty; }
.nk-body { color: var(--text-2); max-width: 62ch; text-wrap: pretty; }
.nk-body p + p { margin-top: 0.9em; }
.nk-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.nk-muted { color: var(--text-3); }
.nk-link { color: var(--accent-text); font-weight: 500; }
.nk-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.nk-arrow { display: inline-flex; align-items: center; gap: 0.4em; font-weight: 600; color: var(--accent-text); }
.nk-arrow svg { width: 1.1em; height: 1.1em; transition: transform 0.35s var(--ease); }
.nk-arrow:hover svg { transform: translateX(5px); }
.nk-i { width: 1.25em; height: 1.25em; flex: none; }
.nk-label { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-text); font-weight: 500; }

/* ---------- layout ------------------------------------------------------ */
.nk-shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gut); }
.nk-section { padding-block: clamp(4rem, 6vw + 1.5rem, 8.5rem); }
.nk-section--tight { padding-block: clamp(2.5rem, 4vw + 1rem, 5rem); }
.nk-section + .nk-section { border-top: 1px solid var(--hair); }
.nk-head { max-width: 62ch; margin-bottom: clamp(2rem, 3.5vw, 3.5rem); }
.nk-head .nk-lead { margin-top: 0.9rem; }
.nk-skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.6rem 1rem;
  background: var(--accent); color: var(--on-accent); border-radius: var(--r); font-weight: 600; transition: top 0.2s;
}
.nk-skip:focus { top: 1rem; }

/* ---------- buttons ----------------------------------------------------- */
.nk-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0.8rem 1.5rem; border-radius: var(--r);
  font-weight: 600; font-size: 1rem; line-height: 1.2; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; will-change: transform;
  transition: transform 0.45s var(--ease-out), background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.nk-btn svg { width: 1.15em; height: 1.15em; transition: transform 0.35s var(--ease); }
.nk-btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 14px 30px -14px rgba(65, 100, 216, 0.9); }
.nk-btn--primary:hover { background: #3a5cd0; }
.nk-btn--primary:hover svg { transform: translateX(4px); }
.nk-btn--ghost { background: transparent; color: var(--text); border-color: var(--hair-strong); }
.nk-btn--ghost:hover { border-color: var(--text-2); background: var(--accent-soft); }
.nk-btn:active { transform: scale(0.97) !important; }
.nk-btn[aria-disabled="true"], .nk-btn:disabled { opacity: 0.6; pointer-events: none; }

/* spotlight border: a radial highlight that follows the pointer (JS sets --mx/--my) */
.nk-spot { position: relative; }
.nk-spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(143, 176, 255, 0.85), transparent 62%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.nk-spot:hover::before { opacity: 1; }

/* ---------- header ------------------------------------------------------ */
.nk-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--hair);
  view-transition-name: nk-header;
}
.nk-nav { display: flex; align-items: center; gap: 1.5rem; min-height: var(--nav-h); }
.nk-brand { display: inline-flex; align-items: center; flex: none; }
.nk-brand img { height: 30px; width: auto; filter: var(--wordmark-filter); }
.nk-nav__links { display: none; align-items: center; gap: 0.25rem; margin-inline: auto; }
.nk-nav__links a { position: relative; padding: 0.55rem 0.85rem; border-radius: var(--r); font-weight: 500; color: var(--text-2); transition: color 0.2s; }
.nk-nav__links a::after { content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.3rem; height: 2px; background: var(--accent-text); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.nk-nav__links a:hover { color: var(--text); }
.nk-nav__links a:hover::after, .nk-nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nk-nav__links a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nk-nav__tools { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.nk-nav__phone { display: none; align-items: center; gap: 0.45em; font-family: var(--font-mono); font-size: 0.95rem; font-weight: 500; padding: 0.55rem 0.7rem; border-radius: var(--r); }
.nk-nav__phone:hover { background: var(--surface); }
.nk-nav__cta { display: none; min-height: 44px; padding-block: 0.6rem; }
.nk-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: var(--r); border: 1px solid var(--hair); background: transparent; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.nk-iconbtn:hover { background: var(--surface); border-color: var(--hair-strong); }
.nk-iconbtn svg { width: 22px; height: 22px; }
.nk-theme .nk-theme__sun { display: none; }
:root[data-theme="light"] .nk-theme .nk-theme__sun { display: block; }
:root[data-theme="light"] .nk-theme .nk-theme__moon { display: none; }
.nk-menu .nk-menu__close { display: none; }
.nk-menu[aria-expanded="true"] .nk-menu__open { display: none; }
.nk-menu[aria-expanded="true"] .nk-menu__close { display: block; }

/* mobile sheet (absolute under the sticky header: backdrop-filter makes the header the containing block) */
.nk-sheet {
  position: absolute; top: 100%; left: 0; right: 0; height: calc(100dvh - var(--nav-h)); overflow: auto;
  z-index: 40; display: grid; align-content: start; gap: 0.25rem;
  padding: 1rem var(--gut) 2rem; background: var(--ground); border-top: 1px solid var(--hair);
  transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
}
.nk-sheet[data-open="true"] { transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.nk-sheet a { display: block; padding: 0.9rem 0.5rem; font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 700; letter-spacing: -0.02em; border-bottom: 1px solid var(--hair); }
.nk-sheet a[aria-current="page"] { color: var(--accent-text); }
.nk-sheet .nk-btn { margin-top: 1.25rem; justify-self: start; font-size: 1.05rem; }
.nk-sheet__phone { display: inline-flex; align-items: center; gap: 0.5em; margin-top: 1rem; font-family: var(--font-mono); font-weight: 500; font-size: 1.1rem; }
body[data-menu-open="true"] { overflow: hidden; }

@media (min-width: 900px) {
  .nk-nav__links { display: flex; }
  .nk-nav__phone { display: inline-flex; }
  .nk-nav__cta { display: inline-flex; }
  .nk-menu { display: none; }
  .nk-sheet { display: none; }
}

/* ---------- hero (cinematic) ------------------------------------------- */
.nk-hero {
  position: relative; isolation: isolate; overflow: clip;
  min-height: calc(100dvh - var(--nav-h)); display: grid;
  padding-block: clamp(2.5rem, 5vw, 5rem) 0;
}
.nk-hero__wave {
  position: absolute; inset: -12% -25% -20% -25%; z-index: -2; pointer-events: none;
  background-image: image-set(url("/assets/niku/brand/wave-1600.webp") type("image/webp"), url("/assets/niku/brand/wave-1600.jpg") type("image/jpeg"));
  background-size: cover; background-position: 55% 45%;
  opacity: var(--wave-opacity); will-change: transform;
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.nk-hero__tint { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, transparent 40%, var(--ground) 100%), radial-gradient(70% 60% at 20% 30%, rgba(7, 11, 23, 0.55), transparent 70%); }
:root[data-theme="light"] .nk-hero__tint { background: linear-gradient(180deg, transparent 40%, var(--ground) 100%), radial-gradient(70% 60% at 20% 30%, rgba(244, 245, 250, 0.7), transparent 70%); }
.nk-hero__inner { position: relative; z-index: 1; width: 100%; display: grid; grid-template-rows: auto 1fr; }
.nk-hero__title {
  font-size: clamp(2rem, 0.2rem + 8vw, 6.5rem); line-height: 0.96; letter-spacing: -0.035em; font-weight: 800;
  text-wrap: balance; max-width: 14ch; overflow-wrap: anywhere;
}
.nk-hero__title .nk-w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.nk-hero__title .nk-w > span { display: inline-block; }
/* the second sentence is a window onto the client's own artwork */
.nk-hero__title .nk-mask > span {
  background-image: linear-gradient(rgba(143, 176, 255, 0.55), rgba(143, 176, 255, 0.55)), image-set(url("/assets/niku/brand/wave-1600.webp") type("image/webp"), url("/assets/niku/brand/wave-1600.jpg") type("image/jpeg"));
  background-size: auto, 180% auto; background-position: 0 0, 40% 50%; filter: brightness(1.45) saturate(1.25);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
:root[data-theme="light"] .nk-hero__title .nk-mask > span { background-image: none; color: var(--accent); -webkit-text-fill-color: var(--accent); }
.nk-hero__row { display: grid; gap: 2rem; margin-top: clamp(1.5rem, 3vw, 2.75rem); align-self: end; padding-bottom: clamp(2rem, 6vh, 4.5rem); }
.nk-hero__copy { max-width: 40rem; }
.nk-hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 1.75rem; }
.nk-hero__media { position: relative; }
.nk-hero__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); box-shadow: var(--shadow);
  view-transition-name: nk-hero-photo;
}
@media (min-width: 900px) {
  /* the subject sits in the bottom-right corner, full height of the hero, and
     emerges out of the dark: masked on its top and left edges, hard on the
     bottom and right edges that it shares with the section */
  .nk-hero__row { padding-right: 44%; }
  .nk-hero__media { position: absolute; right: 0; bottom: 0; width: min(46vw, 660px); height: 82%; z-index: -1; }
  .nk-hero__media picture, .nk-hero__media img { width: 100%; height: 100%; }
  .nk-hero__media img {
    aspect-ratio: auto; object-fit: cover; object-position: 55% 50%; border-radius: 0; box-shadow: none;
    mask-image: linear-gradient(90deg, transparent 0%, #000 42%), linear-gradient(180deg, transparent 0%, #000 38%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%), linear-gradient(180deg, transparent 0%, #000 38%);
    mask-composite: intersect; -webkit-mask-composite: source-in;
  }
}
@media (max-width: 899px) { .nk-hero { min-height: 0; padding-bottom: clamp(2rem, 6vw, 3rem); } .nk-hero__row { padding-bottom: 0; } }
@media (max-width: 480px) { .nk-hero__title { font-size: 2.05rem; } }

/* ---------- customers: giant count + marquee ---------------------------- */
.nk-logos { overflow: hidden; }
.nk-logos__head { display: grid; gap: 1rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.nk-logos__count { font-family: var(--font-mono); font-weight: 700; font-size: clamp(4.5rem, 2rem + 10vw, 11rem); line-height: 0.9; letter-spacing: -0.04em; color: var(--text); }
.nk-logos__text { max-width: 30ch; }
.nk-logos__text .nk-lead { max-width: none; }
.nk-logos__more { margin-top: 1rem; }
@media (min-width: 900px) { .nk-logos__head { grid-template-columns: auto 1fr; gap: 3rem; padding-right: 36%; } }
.nk-marquee {
  --mgap: 1rem; display: flex; overflow: hidden; padding-block: 0.25rem;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.nk-marquee__track { display: flex; flex: none; will-change: transform; }
.nk-marquee__track li { flex: none; margin-right: var(--mgap); }
.nk-logo {
  display: flex; align-items: center; justify-content: center; width: clamp(180px, 22vw, 280px); aspect-ratio: 5 / 2; padding: 1.25rem 1.75rem;
  border: 1px solid var(--hair); border-radius: var(--r); background: var(--ground-2);
  transition: border-color 0.3s, transform 0.5s var(--ease-out);
}
.nk-logo:hover { border-color: var(--hair-strong); transform: translateY(-3px); }
.nk-logo img { max-height: 100%; width: auto; max-width: 100%; filter: var(--logo-filter); opacity: 0.9; }

/* ---------- service areas: two panels ----------------------------------- */
.nk-panels { display: grid; gap: 0.5rem; }
.nk-panel {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r); min-height: 460px;
  display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid var(--hair); background: var(--surface);
}
.nk-panel__bg { position: absolute; inset: 0; z-index: -2; }
.nk-panel__bg img, .nk-panel__bg picture { width: 100%; height: 100%; }
.nk-panel__bg img { object-fit: cover; transform: scale(1.02); transition: transform 1.2s var(--ease-out); }
.nk-panel:hover .nk-panel__bg img { transform: scale(1.08); }
.nk-panel__scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 11, 23, 0) 20%, var(--scrim) 62%, rgba(7, 11, 23, 0.94) 100%); }
:root[data-theme="light"] .nk-panel--photo { color: #eef1fb; }
:root[data-theme="light"] .nk-panel--photo .nk-body { color: #c9d0e6; }
:root[data-theme="light"] .nk-panel--photo .nk-arrow, :root[data-theme="light"] .nk-panel--photo .nk-label { color: #8fb0ff; }
.nk-panel__body { position: relative; padding: clamp(1.5rem, 3vw, 2.75rem); display: grid; gap: 0.9rem; }
.nk-panel__body .nk-h2 { max-width: 12ch; }
.nk-panel__body .nk-arrow { margin-top: 0.5rem; font-size: 1.05rem; }
.nk-panel__icon { width: 96px; height: 96px; margin-bottom: 1rem; opacity: 0.95; }
.nk-panel__list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1.25rem; color: var(--text-2); font-size: 1rem; }
.nk-panel__list li { display: flex; gap: 0.5em; align-items: baseline; }
.nk-panel__list svg { width: 1em; height: 1em; flex: none; color: var(--accent-text); transform: translateY(0.15em); }
@media (min-width: 900px) {
  .nk-panels { grid-template-columns: 7fr 5fr; }
  .nk-panel { min-height: 620px; }
  .nk-panel__list { grid-template-columns: 1fr; }
}

/* ---------- process: horizontal pan ------------------------------------- */
.nk-pan { position: relative; }
.nk-pan__sticky { display: grid; grid-template-columns: 100%; gap: 2rem; container-type: inline-size; }
.nk-pan__track { justify-self: start; }
.nk-pan__head { display: grid; gap: 0.75rem; padding-inline: var(--gut); width: 100%; max-width: var(--shell); margin-inline: auto; }
.nk-pan__head > * { max-width: 62ch; }
.nk-pan__track { display: grid; gap: 1.25rem; padding-inline: var(--gut); counter-reset: step; }
.nk-stepcard {
  position: relative; display: grid; gap: 0.75rem; align-content: start; padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--hair); border-radius: var(--r); background: var(--ground-2); min-height: 260px;
}
.nk-stepcard::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-mono); font-weight: 600; font-size: clamp(2.2rem, 1.5rem + 2vw, 3.5rem); line-height: 1; color: var(--accent-text); letter-spacing: -0.03em; }
.nk-stepcard h3 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.8rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin-top: 0.5rem; }
.nk-stepcard p { color: var(--text-2); max-width: 34ch; }
.nk-stepcard--end { background: var(--accent); color: var(--on-accent); border-color: transparent; align-content: center; }
.nk-stepcard--end::before { content: none; }
.nk-stepcard--end h3 { margin-top: 0; }
.nk-stepcard--end p { color: rgba(255, 255, 255, 0.85); }
.nk-stepcard--end .nk-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.5); justify-self: start; margin-top: 0.5rem; }
.nk-stepcard--end .nk-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
@media (min-width: 900px) {
  .nk-pan__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; scrollbar-width: none; }
  .nk-pan__track::-webkit-scrollbar { display: none; }
  .nk-stepcard { flex: none; width: min(460px, 60cqw); scroll-snap-align: start; min-height: 380px; }
}

/* ---------- founder ----------------------------------------------------- */
.nk-founder__grid { display: grid; gap: 2.5rem; align-items: start; }
.nk-founder__media { position: relative; overflow: hidden; border-radius: var(--r); max-width: 480px; }
.nk-founder__media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r); will-change: transform; }
.nk-founder__quote { font-size: clamp(1.4rem, 1rem + 1.6vw, 2.3rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; max-width: 24ch; }
.nk-founder__role { font-family: var(--font-mono); color: var(--accent-text); font-size: 0.9rem; margin-top: 0.5rem; }
.nk-founder__body { margin-top: 1.5rem; }
.nk-facts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.75rem; }
.nk-facts li { padding: 0.5rem 0.9rem; border: 1px solid var(--hair-strong); border-radius: var(--r); font-size: 0.92rem; font-weight: 500; }
.nk-badge { margin-top: 1.75rem; }
.nk-badge img { height: 72px; width: auto; }
@media (min-width: 900px) { .nk-founder__grid { grid-template-columns: 5fr 7fr; gap: 5rem; } }

/* ---------- contact ----------------------------------------------------- */
.nk-contact__grid { display: grid; gap: 2.5rem; align-items: start; }
.nk-contact__people { display: grid; gap: 1.25rem; margin-top: 1.75rem; }
.nk-person { display: grid; gap: 0.15rem; }
.nk-person__name { font-weight: 600; }
.nk-person__role { color: var(--text-3); font-size: 0.95rem; }
.nk-person a { display: inline-flex; align-items: center; gap: 0.45em; margin-top: 0.2rem; color: var(--text); overflow-wrap: anywhere; }
.nk-person a:hover { color: var(--accent-text); }
.nk-person a svg { width: 1.05em; height: 1.05em; color: var(--accent-text); }
.nk-form { display: grid; gap: 1rem; padding: clamp(1.5rem, 3vw, 2.25rem); border: 1px solid var(--hair); border-radius: var(--r); background: var(--ground-2); }
.nk-field { display: grid; gap: 0.4rem; }
.nk-field label { font-weight: 600; font-size: 0.95rem; }
.nk-field label span { color: var(--text-3); font-weight: 400; }
.nk-input {
  width: 100%; min-height: 50px; padding: 0.75rem 0.95rem; border-radius: var(--r);
  border: 1px solid var(--hair-strong); background: var(--ground); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nk-input::placeholder { color: var(--text-3); }
.nk-input:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.nk-input { min-height: 150px; resize: vertical; }
.nk-form__row { display: grid; gap: 1rem; }
.nk-consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.95rem; color: var(--text-2); }
.nk-consent input { width: 20px; height: 20px; margin-top: 0.2rem; accent-color: var(--accent); flex: none; }
.nk-consent a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 0.15em; }
.nk-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.nk-form__status { font-size: 0.95rem; color: var(--text-2); }
.nk-form__status[data-state="error"] { color: #ff8a80; }
:root[data-theme="light"] .nk-form__status[data-state="error"] { color: #c62828; }
.nk-form__thanks { padding: 1.5rem; border: 1px solid var(--hair); border-radius: var(--r); background: var(--surface); font-weight: 500; }
.nk-hp { position: absolute; left: -9999px; top: -9999px; }
@media (min-width: 640px) { .nk-form__row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .nk-contact__grid { grid-template-columns: 5fr 7fr; gap: 5rem; } }

/* ---------- footer ------------------------------------------------------ */
.nk-footer { border-top: 1px solid var(--hair); padding-block: 3.5rem 2rem; color: var(--text-2); font-size: 0.95rem; }
.nk-footer__grid { display: grid; gap: 2rem; }
.nk-footer__brand img { height: 28px; width: auto; filter: var(--wordmark-filter); }
.nk-footer h2 { font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 0.6rem; }
.nk-footer ul { display: grid; gap: 0.35rem; }
.nk-footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 0.2em; }
.nk-footer__ids { font-family: var(--font-mono); font-size: 0.85rem; display: grid; gap: 0.25rem; }
.nk-footer__social { display: flex; gap: 0.5rem; margin-top: 1rem; }
.nk-footer__bottom { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--hair); font-size: 0.88rem; color: var(--text-3); }
@media (min-width: 720px) { .nk-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

/* ---------- page header ------------------------------------------------- */
.nk-pagehead { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(3rem, 6vw, 6rem) clamp(2rem, 4vw, 4rem); }
.nk-pagehead::before {
  content: ""; position: absolute; inset: -30% -20% auto -20%; height: 120%; z-index: -1; pointer-events: none; opacity: calc(var(--wave-opacity) * 0.6);
  background-image: image-set(url("/assets/niku/brand/wave-1600.webp") type("image/webp"), url("/assets/niku/brand/wave-1600.jpg") type("image/jpeg"));
  background-size: cover; background-position: 70% 30%;
  mask-image: linear-gradient(180deg, #000 20%, transparent 90%); -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 90%);
}
.nk-pagehead .nk-lead { margin-top: 1.25rem; }
.nk-pagehead__jumps { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.nk-pagehead__count { display: block; font-family: var(--font-mono); font-weight: 700; font-size: clamp(4rem, 2rem + 8vw, 9rem); line-height: 0.9; letter-spacing: -0.04em; color: var(--accent-text); margin-bottom: 0.5rem; }
.nk-crumbs { display: flex; flex-wrap: wrap; gap: 0.4em; font-size: 0.9rem; color: var(--text-3); margin-bottom: 1.25rem; }
.nk-crumbs a:hover { color: var(--text); }

/* ---------- analyzer service stack -------------------------------------- */
.nk-stack { display: grid; gap: 1.25rem; }
.nk-card { display: grid; border: 1px solid var(--hair); border-radius: var(--r); overflow: hidden; background: var(--ground-2); }
.nk-card__media { overflow: hidden; }
.nk-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.nk-card:hover .nk-card__media img { transform: scale(1.05); }
.nk-card__body { padding: clamp(1.5rem, 3vw, 2.75rem); display: grid; gap: 0.9rem; align-content: start; }
.nk-card__body h3 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.nk-card__label { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-text); font-weight: 500; }
.nk-card__body .nk-btn { justify-self: start; margin-top: 0.5rem; }
@media (min-width: 900px) {
  .nk-card { grid-template-columns: 5fr 7fr; }
  .nk-card__media img { aspect-ratio: auto; height: 100%; min-height: 380px; }
  .nk-stack { gap: 0; }
  .nk-stack .nk-card { position: sticky; top: calc(var(--nav-h) + 1.25rem); margin-bottom: 1.25rem; box-shadow: var(--shadow); }
  .nk-stack .nk-card:last-child { margin-bottom: 0; }
}

/* ---------- electrical service groups ----------------------------------- */
.nk-groups { display: grid; gap: 1.25rem; }
.nk-group { padding: 1.75rem; border: 1px solid var(--hair); border-radius: var(--r); background: var(--surface); }
.nk-group h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.9rem; }
.nk-group ul { display: grid; gap: 0.5rem; color: var(--text-2); }
.nk-group li { display: flex; gap: 0.55em; align-items: baseline; }
.nk-group li svg { width: 1em; height: 1em; flex: none; color: var(--accent-text); transform: translateY(0.15em); }
@media (min-width: 720px) { .nk-groups { grid-template-columns: repeat(3, 1fr); } }

/* ---------- faq --------------------------------------------------------- */
.nk-faq { display: grid; gap: 0; }
.nk-faq__row { display: grid; gap: 0.5rem; padding-block: 1.6rem; border-top: 1px solid var(--hair); }
.nk-faq__row:last-child { border-bottom: 1px solid var(--hair); }
.nk-faq__row h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.nk-faq__row p { color: var(--text-2); max-width: 62ch; }
@media (min-width: 900px) { .nk-faq__row { grid-template-columns: 5fr 7fr; gap: 3rem; } }

/* ---------- references -------------------------------------------------- */
.nk-refs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.nk-ref { display: grid; align-content: start; border: 1px solid var(--hair); border-radius: var(--r); overflow: hidden; background: var(--ground-2); transition: transform 0.5s var(--ease-out), border-color 0.3s; }
.nk-ref:hover { transform: translateY(-4px); border-color: var(--hair-strong); }
.nk-ref__cover { overflow: hidden; }
.nk-ref__cover img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1s var(--ease-out); }
.nk-ref:hover .nk-ref__cover img { transform: scale(1.06); }
.nk-ref__mark { display: flex; align-items: center; justify-content: center; height: 104px; padding: 1.25rem; border-bottom: 1px solid var(--hair); }
.nk-ref__mark img { max-height: 100%; width: auto; filter: var(--logo-filter); }
.nk-ref__mark h3 { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; text-align: center; line-height: 1.2; }
.nk-ref__body { padding: 1rem 1.25rem 1.25rem; }
.nk-ref__body h3 { font-size: 1rem; font-weight: 600; }
.nk-ref__body p { color: var(--text-2); font-size: 0.95rem; margin-top: 0.2rem; }
.nk-ref--cover { grid-column: span 2; }
@media (min-width: 720px) { .nk-refs { grid-template-columns: repeat(3, 1fr); } .nk-ref--cover { grid-column: span 1; } }
@media (min-width: 1024px) { .nk-refs { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; } }

/* ---------- people + offices -------------------------------------------- */
.nk-people { display: grid; gap: 1.25rem; }
.nk-pcard { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1rem; align-items: start; padding: 1.25rem; border: 1px solid var(--hair); border-radius: var(--r); background: var(--ground-2); }
.nk-pcard > * { min-width: 0; }
.nk-pcard img { width: 96px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r); }
.nk-pcard h3 { font-size: 1.25rem; font-weight: 700; }
.nk-pcard__role { color: var(--text-2); }
.nk-pcard__area { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-text); margin-top: 0.15rem; }
.nk-pcard__links { display: grid; gap: 0.35rem; margin-top: 0.75rem; }
.nk-pcard__links a { display: inline-flex; align-items: center; gap: 0.45em; overflow-wrap: anywhere; }
.nk-pcard__links a:hover { color: var(--accent-text); }
.nk-pcard__links svg { width: 1.05em; height: 1.05em; color: var(--accent-text); }
@media (min-width: 720px) { .nk-people { grid-template-columns: 1fr 1fr; } .nk-pcard { grid-template-columns: 140px minmax(0, 1fr); gap: 1.25rem; } .nk-pcard img { width: 140px; } }
.nk-offices { display: grid; gap: 1.25rem; }
.nk-office { padding: 1.75rem; border: 1px solid var(--hair); border-radius: var(--r); background: var(--surface); display: grid; gap: 0.35rem; }
.nk-office h3 { font-size: 1.15rem; font-weight: 700; }
.nk-office address { font-style: normal; color: var(--text-2); }
.nk-office .nk-arrow { margin-top: 0.5rem; font-size: 0.95rem; }
.nk-ids { display: grid; gap: 0.5rem; margin-top: 1.5rem; padding: 1.25rem 1.5rem; border: 1px solid var(--hair); border-radius: var(--r); font-family: var(--font-mono); font-size: 0.92rem; color: var(--text-2); }
.nk-ids b { color: var(--text); font-weight: 500; }
@media (min-width: 720px) { .nk-offices { grid-template-columns: 1fr 1fr; } }

/* ---------- prose ------------------------------------------------------- */
.nk-prose { max-width: 68ch; color: var(--text-2); }
.nk-prose h2 { font-size: 1.4rem; font-weight: 700; color: var(--text); margin: 2rem 0 0.6rem; letter-spacing: -0.01em; }
.nk-prose h3 { font-size: 1.1rem; font-weight: 600; color: var(--text); margin: 1.5rem 0 0.4rem; }
.nk-prose p + p { margin-top: 0.9em; }
.nk-prose ul { list-style: disc; padding-left: 1.25em; margin: 0.6em 0; display: grid; gap: 0.3em; }
.nk-prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 0.15em; }

/* ==========================================================================
   MOTION
   Additive; collapses under prefers-reduced-motion. Reveals never hide
   content unless motion is actually available.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* hero entrance: words rise out of a clipped line, copy and photo follow */
  html.nk-js .nk-hero__title .nk-w > span { animation: nk-word 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .nk-hero__copy > * { animation: nk-rise 0.9s var(--ease) both; animation-delay: 0.35s; }
  .nk-hero__copy > :nth-child(2) { animation-delay: 0.45s; }
  .nk-hero__media { animation: nk-clip 1.1s var(--ease) 0.25s both; }
  /* the artwork breathes, and drifts with scroll */
  .nk-hero__wave { animation: nk-breathe 28s ease-in-out infinite alternate; }
  .nk-hero__title .nk-mask > span { animation: nk-maskdrift 22s ease-in-out infinite alternate; }
  .nk-marquee__track { animation: nk-marquee 48s linear infinite; }
  .nk-marquee:hover .nk-marquee__track { animation-play-state: paused; }

  @supports (animation-timeline: view()) {
    .nk-hero__wave { animation: nk-breathe 28s ease-in-out infinite alternate, nk-parallax linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 100vh; }
    .nk-reveal { animation: nk-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
    .nk-reveal--stagger > * { animation: nk-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    .nk-panel { animation: nk-wipe linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    .nk-founder__media img { animation: nk-drift-y linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    .nk-stack .nk-card:not(:last-child) { animation: nk-recede linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    .nk-logos__count { animation: nk-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    /* horizontal pan: the tall wrapper pins the sticky stage; the track slides on the wrapper's timeline */
    @media (min-width: 900px) {
      .nk-pan { height: 260vh; view-timeline-name: --nk-pan; view-timeline-axis: block; }
      .nk-pan__sticky { position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow: hidden; align-content: center; }
      .nk-pan__track { overflow: visible; width: max-content; scroll-snap-type: none; animation: nk-pan linear both; animation-timeline: --nk-pan; animation-range: contain 0% contain 100%; }
    }
  }
  @supports not (animation-timeline: view()) {
    html.nk-js .nk-reveal, html.nk-js .nk-reveal--stagger > *, html.nk-js .nk-panel { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
    html.nk-js .nk-reveal.is-in, html.nk-js .nk-reveal--stagger.is-in > *, html.nk-js .nk-panel.is-in { opacity: 1; transform: none; }
  }
  .nk-reveal--stagger > :nth-child(2) { transition-delay: 0.06s; }
  .nk-reveal--stagger > :nth-child(3) { transition-delay: 0.12s; }
  .nk-reveal--stagger > :nth-child(4) { transition-delay: 0.18s; }
  .nk-reveal--stagger > :nth-child(5) { transition-delay: 0.24s; }
  .nk-reveal--stagger > :nth-child(n + 6) { transition-delay: 0.3s; }

  /* cross-document view transitions: the header stays, the hero photo morphs into the first service card */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: nk-vt-out 0.25s ease-in both; }
  ::view-transition-new(root) { animation: nk-vt-in 0.5s var(--ease) both; }
  ::view-transition-old(nk-header), ::view-transition-new(nk-header) { animation: none; mix-blend-mode: normal; }
  ::view-transition-group(nk-hero-photo) { animation-duration: 0.6s; animation-timing-function: var(--ease-out); }
}
@keyframes nk-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes nk-word { from { opacity: 0; transform: translateY(110%) rotate(2deg); } to { opacity: 1; transform: none; } }
@keyframes nk-clip { from { opacity: 0; clip-path: inset(0 0 100% 0 round 12px); transform: translateY(30px); } to { opacity: 1; clip-path: inset(0 0 0 0 round 12px); transform: none; } }
@keyframes nk-wipe { from { clip-path: inset(0 0 100% 0 round 12px); } to { clip-path: inset(0 0 0 0 round 12px); } }
@keyframes nk-breathe { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.09) translate3d(-2%, 1.5%, 0); } }
@keyframes nk-parallax { from { translate: 0 0; } to { translate: 0 18%; } }
@keyframes nk-maskdrift { from { background-position: 30% 50%; } to { background-position: 70% 40%; } }
@keyframes nk-drift-y { from { transform: translateY(-6%) scale(1.08); } to { transform: translateY(6%) scale(1.08); } }
@keyframes nk-recede { from { transform: none; opacity: 1; } to { transform: scale(0.94); opacity: 0.55; } }
@keyframes nk-marquee { to { transform: translateX(-100%); } }
@keyframes nk-pan { to { transform: translateX(calc(-100% + 100cqw)); } }
@keyframes nk-vt-out { to { opacity: 0; } }
@keyframes nk-vt-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nk-marquee { mask-image: none; -webkit-mask-image: none; flex-wrap: wrap; }
  .nk-marquee__track { flex-wrap: wrap; gap: var(--mgap); }
  .nk-marquee__track[aria-hidden="true"] { display: none; }
  .nk-hero__media img, .nk-btn { transform: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- print ------------------------------------------------------- */
@media print {
  :root { --ground: #fff; --ground-2: #fff; --surface: #f3f3f3; --text: #000; --text-2: #222; --text-3: #444; --logo-filter: invert(1); --wordmark-filter: invert(1) hue-rotate(180deg); --wave-opacity: 0; --accent-text: #2f4fc0; }
  body::before, .nk-header, .nk-sheet, .nk-skip, .nk-form, .nk-theme, .nk-menu, .nk-hero__wave, .nk-pagehead::before { display: none !important; }
  .nk-hero__title .nk-mask > span { background-image: none; color: #000; -webkit-text-fill-color: #000; }
  .nk-section { padding-block: 1.5rem; }
  .nk-pan { height: auto; }
}
