/* ============================================================
   ULTRAINFRA — MAIN STYLESHEET
   main.css · File 2 of 3
   All component styles. Tokens are in tokens.css — loaded first.
   Structure mirrors index.html section order exactly.
   ============================================================ */

/* ── RESET & BASE ─────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: auto; /* Lenis handles smooth scroll — never use CSS smooth */
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
  overflow-x: hidden;
}

img    { display: block; width: 100%; height: 100%; object-fit: cover; }
a      { color: inherit; text-decoration: none; }
ul     { list-style: none; }
button { font-family: var(--font); }

hr.rule      { border: none; border-top: var(--rule); }
hr.rule-dark { border: none; border-top: var(--rule-dark); }

/* ── UTILITY CLASSES ─────────────────────────────────────── */

/* Section label — above every heading */
.sec-label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font);
  font-size: var(--text-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 2rem;
}
.sec-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: currentColor;
}
.dark-section .sec-label { color: var(--mid-dark); }

/* Link arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.2rem;
  color: inherit;
  text-decoration: none;
  cursor: none;
  transition: gap 0.25s var(--ease-studio), color 0.25s;
}
.link-arrow::after { content: '→'; }
.link-arrow:hover  { gap: 0.9rem; color: var(--accent); }

/* Dark section base */
.dark-section {
  background: var(--dark);
  color: var(--fg-dark);
}

/* Heading utilities */
.h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: 800;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-heading);
  text-transform: uppercase;
}
.h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  letter-spacing: var(--ls-normal);
  line-height: var(--lh-heading);
  text-transform: uppercase;
}
.h3 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 700;
  letter-spacing: var(--ls-normal);
}

/* Body text */
.body-text {
  font-size: var(--text-body-lg);
  line-height: var(--lh-body);
  color: rgba(15,15,13,0.55);
  max-width: 520px;
}
.dark-section .body-text { color: rgba(245,244,240,0.55); }

/* Body reveal — initial hidden state, animated by JS */
.body-reveal {
  opacity: 0;
  transform: translateY(18px);
  will-change: transform, opacity;
}

/* Word mask — used by buildHeading() */
.word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  margin-right: 0.25em;
  line-height: 1.05;
}
.word-inner {
  display: inline-block;
  white-space: nowrap;
}

/* Typewriter cursor */
.typewriter {
  display: inline-block;
  position: relative;
  min-height: 1.2em;
}
.typewriter::after {
  content: '|';
  display: inline-block;
  margin-left: 1px;
  color: var(--accent);
  animation: blink 0.65s step-end infinite;
  opacity: 0;
}
.typewriter.typing::after { opacity: 1; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--accent);
  color: var(--fg-dark);
  padding: 0.85rem 2rem;
  font-family: var(--font);
  font-size: 0.65rem;
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  border: none;
  cursor: none;
  transition: background 0.25s;
}
.btn-primary::after { content: '→'; }
.btn-primary:hover  { background: #e04030; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(245,244,240,0.3);
  color: var(--fg-dark);
  padding: 0.85rem 2rem;
  font-family: var(--font);
  font-size: 0.65rem;
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  cursor: none;
  transition: background 0.25s, border-color 0.25s;
}
.btn-outline::after { content: '→'; }
.btn-outline:hover  { background: var(--accent); border-color: var(--accent); }

/* Scroll bar indicator */
.scroll-bar {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--mid), transparent);
  animation: scrollDrop 1.6s ease-in-out infinite;
}
@keyframes scrollDrop {
  0%   { transform: scaleY(0); transform-origin: top; }
  49%  { transform: scaleY(1); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── LOADER ──────────────────────────────────────────────── */

#loader {
  position: fixed;
  inset: 0;
  background: var(--dark);
  color: var(--fg-dark);
  z-index: var(--z-loader);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem var(--pad-x);
  pointer-events: none;
}

#loader-count {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 1.5rem;
}

#loader-bar-wrap {
  width: 100%;
  height: 1px;
  background: rgba(245,244,240,0.12);
}

#loader-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* ── PAGE TRANSITION OVERLAY ─────────────────────────────── */

#page-overlay {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: var(--z-overlay);
  transform: translateY(100%);
  pointer-events: none;
}

/* ── CUSTOM CURSOR ───────────────────────────────────────── */

body { cursor: none; }

#cur-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--dark);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
  transition: width 0.2s, height 0.2s, background 0.2s;
}

#cur-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1px solid rgba(15,15,13,0.28);
  border-radius: 50%;
  pointer-events: none;
  z-index: calc(var(--z-cursor) - 1);
  transform: translate(-50%, -50%);
}

#cur-dot.hovered {
  width: 48px;
  height: 48px;
  background: var(--accent);
}

body.on-dark #cur-dot  { background: var(--fg-dark); mix-blend-mode: normal; }
body.on-dark #cur-ring { border-color: rgba(245,244,240,0.35); }

@media (hover: none) {
  #cur-dot, #cur-ring { display: none; }
  body { cursor: auto; }
}

/* ── NAVIGATION ──────────────────────────────────────────── */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: var(--z-nav);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

nav.scrolled {
  background: rgba(245,244,240,0.92);
  backdrop-filter: var(--blur-nav);
  -webkit-backdrop-filter: var(--blur-nav);
  border-color: var(--border);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  display: flex;
  align-items: center;
  color: var(--accent);
  line-height: 1;
}
.nav-logo-icon svg { display: block; }
.nav-logo-img { display: block; height: 34px; width: auto; }
/* Logo placeholder SVG — h-6 on mobile, h-8 on md+ (w-auto) */
.nav-logo-svg { display: block; height: 1.5rem; width: auto; color: var(--paper, #fff); }
@media (min-width: 768px) {
  .nav-logo-svg { height: 2rem; }
}

.nav-logo-wordmark {
  transition: opacity 0.3s;
}

/* Hide wordmark on sub-pages — JS adds .sub-page to body */
body.sub-page .nav-logo-wordmark { display: none; }

/* Nav links */
.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-links a {
  opacity: 0.6;
  transition: opacity 0.2s;
  cursor: none;
}
.nav-links a:hover { opacity: 1; }

.nav-links li.active > a {
  opacity: 1;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

/* Dropdown */
.has-dropdown { position: relative; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 1rem);
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  min-width: 220px;
  padding: 0.5rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 12px 40px rgba(15,15,13,0.12);
  z-index: 10;
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 0.65rem 1.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.65;
  transition: opacity 0.15s, background 0.15s;
  cursor: none;
}
.nav-dropdown a:hover {
  opacity: 1;
  background: rgba(15,15,13,0.04);
}

.dropdown-caret {
  font-size: 0.5rem;
  margin-left: 0.2rem;
  vertical-align: middle;
}

/* Nav CTA */
.nav-right { display: flex; align-items: center; }

.nav-cta {
  background: var(--dark);
  color: var(--fg-dark);
  padding: 0.45rem 1.1rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: none;
  transition: background 0.25s;
}
.nav-cta:hover { background: var(--accent); }

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--dark);
  transition: transform 0.3s, opacity 0.3s;
}
/* Active state — X icon */
.nav-hamburger[aria-expanded="true"] span:first-child {
  transform: translateY(6px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile fullscreen menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--dark);
  color: var(--fg-dark);
  z-index: calc(var(--z-nav) - 1);
  padding: calc(var(--nav-h) + 2rem) var(--pad-x) 3rem;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-links li {
  border-bottom: 1px solid var(--border-dark);
}
.mobile-nav-links a {
  display: block;
  padding: 1.2rem 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.mobile-nav-links .accent-link { color: var(--accent); }

.mobile-menu-footer {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.4;
}

/* ── HERO ─────────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: flex-end;
}

/* XY canvas — fills hero, behind everything */
#xy-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Overlay — softens grid so text is readable */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(245,244,240,0)   0%,
    rgba(245,244,240,0.5) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Hero content — bottom-left */
.hero-content {
  position: relative;
  z-index: 3;
  padding: 0 var(--pad-x) 4rem;
  width: 100%;
  will-change: transform;
  text-align: left;
}

.hero-eyebrow {
  font-size: var(--text-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.2rem;
}

/* Each H1 line needs overflow:hidden to clip the slide-up */
.hero-line-wrap {
  display: block;
  overflow: hidden;
  line-height: 1.3; /* loose enough for the larger red line's descenders */
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 800;
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  line-height: var(--lh-display);
  margin-bottom: 1.5rem;
}

/* Line 2 in accent colour (plain text — hero title types char-by-char) */
.hero-line-accent,
.hero-line-accent .word-inner { color: var(--accent); }

/* Caret on the hero line currently being typed */
.hero-line.typing::after {
  content: '';
  display: inline-block;
  width: 0.08em;
  height: 0.85em;
  margin-left: 0.06em;
  background: var(--accent);
  vertical-align: baseline;
  animation: blink 0.8s step-end infinite;
}

.hero-sub {
  font-size: var(--text-body-lg);
  line-height: var(--lh-body);
  color: rgba(15,15,13,0.55);
  max-width: 460px;
  margin-bottom: 2rem;
}

/* Coordinate readout — bottom right corner */
.hero-coord-readout {
  position: absolute;
  bottom: 2.5rem;
  right: var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  z-index: 4;
}

.coord-label {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: var(--ls-mono);
  color: var(--mid);
  text-transform: uppercase;
}
.coord-label span {
  color: var(--accent);
  font-weight: 500;
}

/* Scroll indicator */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid);
  z-index: 4;
}

/* ── COMPANY SUMMARY ─────────────────────────────────────── */

.company-summary {
  border-top: var(--rule);
  border-bottom: var(--rule);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.summary-block {
  padding: 4rem var(--pad-x) 4rem;
  border-right: var(--rule);
}
.summary-block:last-child { border-right: none; }

.summary-text {
  font-size: var(--text-body-sm);
  line-height: var(--lh-body);
  color: rgba(15,15,13,0.55);
  margin-top: 0;
}

/* ── SERVICES — DESK SCENE + CAROUSEL ────────────────────── */

.services-section {
  border-top: var(--rule);
}

.services-header {
  padding: 2.5rem var(--pad-x) 1.25rem;
  border-bottom: var(--rule);
}

/* Desk scene container */
.desk-scene {
  position: relative;
  height: 90vh;
  overflow: hidden;
}

/* Desk background image */
.desk-image {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.desk-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) brightness(0.6);
}

.desk-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15,15,13,0.88) 0%,
    rgba(15,15,13,0.35) 55%,
    rgba(15,15,13,0.18) 100%
  );
}

/* Carousel wrapper — centres in scene */
.carousel-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: var(--z-float);
}

/* Carousel track — horizontal row of cards */
.carousel-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

/* Individual card */
.carousel-card {
  position: relative;
  flex: 0 0 258px;
  height: 340px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--surface);
  cursor: none;
  scroll-snap-align: center;
  transition:
    transform        0.5s var(--ease-studio),
    box-shadow       0.5s var(--ease-studio),
    flex-basis       0.4s var(--ease-studio),
    opacity          0.4s;
}

/* Active card — hovered, video playing */
.carousel-card.active {
  flex-basis: 300px;
  transform: translateY(-12px);
  box-shadow: var(--shadow-active);
}

/* Dimmed cards — another card is active */
.carousel-card.dimmed {
  transform: scale(0.95) translateY(6px);
  opacity: 0.6;
}

/* Video — behind text, hidden by default */
.card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
}
/* Video visible only when card is active */
.carousel-card.active .card-video { opacity: 1; }

/* Overlay on top of video, behind text */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15,15,13,0.92) 0%,
    rgba(15,15,13,0.55) 50%,
    rgba(15,15,13,0.35) 100%
  );
  z-index: 1;
}

/* Card text content — always above video and overlay */
.card-content {
  position: absolute;
  inset: 0;
  padding: 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--fg-dark);
  z-index: 2;
}

.card-num {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--mid-dark);
  margin-bottom: 1.2rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 0.8rem;
}

.card-desc {
  font-size: var(--text-body-sm);
  line-height: 1.6;
  color: rgba(245,244,240,0.65);
  margin-bottom: 0.6rem; /* link sits snugly under the text */
}

.card-link {
  font-size: 0.62rem;
  color: var(--fg-dark);
  align-self: flex-start;
}
.card-link:hover { color: var(--accent); }

/* Navigation dots */
.carousel-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245,244,240,0.3);
  border: none;
  cursor: none;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}
.dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* ── APPROACH ACCORDION ──────────────────────────────────── */

.approach-section {
  /* No bottom padding — coord section follows immediately */
}

.approach-header {
  padding: var(--pad-y) var(--pad-x) 3rem;
  border-bottom: var(--rule-dark);
}

.approach-list { }

.approach-item {
  border-bottom: var(--rule-dark);
  background: transparent;
  transition: background 0.35s var(--ease-studio);
  cursor: none;
  overflow: hidden;
}

/* Teal background on hover */
.approach-item:hover  { background: var(--accent-2); }
.approach-item.open   { background: var(--accent-2); }

.approach-item-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: start;
  padding: 2rem var(--pad-x);
  gap: 2rem;
}

.approach-left {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.approach-num {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--ls-label);
  color: var(--mid-dark);
  padding-top: 0.3rem;
  transition: color 0.3s;
  flex-shrink: 0;
}
.approach-item:hover .approach-num,
.approach-item.open  .approach-num  { color: rgba(15,15,13,0.5); }

.approach-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--fg-dark);
  transition: color 0.3s;
}
.approach-item:hover .approach-title,
.approach-item.open  .approach-title { color: var(--dark); }

/* Detail text — hidden by default, expands on hover */
.approach-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.4s var(--ease-studio),
    opacity    0.35s,
    padding    0.3s;
}
.approach-item:hover .approach-detail,
.approach-item.open  .approach-detail {
  max-height: 200px;
  opacity: 1;
  padding-top: 0.5rem;
}

.approach-detail p {
  font-size: var(--text-body-sm);
  line-height: var(--lh-body);
  color: rgba(15,15,13,0.7);
  max-width: 520px;
  padding-bottom: 1.5rem;
}

/* ── COORDINATE / BLUEPRINT REVEAL ──────────────────────── */

.coord-section {
  padding: var(--pad-y) 0;
}

.coord-section-header {
  padding: 0 var(--pad-x) 3rem;
}

.coord-wrap {
  position: relative;
  margin: 0 var(--pad-x);
}

/* Axis rails */
.coord-axis-x {
  position: absolute;
  height: 1px;
  bottom: -1px;
  left: 40px;
  right: 0;
  background: var(--coord-axis);
  z-index: 3;
}
.coord-axis-y {
  position: absolute;
  width: 1px;
  left: -1px;
  top: 0;
  bottom: 40px;
  background: var(--coord-axis);
  z-index: 3;
}

/* Tick label containers */
.coord-ticks-x {
  position: absolute;
  bottom: -28px;
  left: 40px;
  right: 0;
  display: flex;
  justify-content: space-between;
  z-index: 4;
}
.coord-ticks-y {
  position: absolute;
  left: -38px;
  top: 0;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 4;
}

.coord-tick {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.1em;
  color: var(--coord-tick);
}
.coord-tick.active { color: var(--coord-active); }

/* Live X/Y labels — positioned like reference screenshot */
.coord-live-x {
  position: absolute;
  right: -2.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--coord-tick);
  z-index: 5;
  white-space: nowrap;
}
.coord-live-y {
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--coord-tick);
  z-index: 5;
  white-space: nowrap;
}
.coord-live-x span,
.coord-live-y span { color: var(--coord-active); }

/* Clipped image container — JS applies clip-path on scroll */
.coord-clip {
  position: relative;
  margin-left: 40px;
  margin-bottom: 40px;
  clip-path: inset(0% 100% 100% 0%); /* starts: nothing visible */
  will-change: clip-path;
  overflow: hidden;
}
.coord-clip img {
  width: 100%;
  aspect-ratio: 832 / 747; /* reserve layout height before the image loads */
  object-fit: cover;
  display: block;
}

/* Internal grid lines — built and inserted by JS */
.coord-grid-line-h,
.coord-grid-line-v {
  position: absolute;
  pointer-events: none;
}
.coord-grid-line-h {
  height: 1px;
  left: 0; right: 0;
  background: rgba(255,89,73,0.10);
}
.coord-grid-line-v {
  width: 1px;
  top: 0; bottom: 0;
  background: rgba(255,89,73,0.10);
}

/* Crosshair at current clip edge corner */
.coord-crosshair {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--coord-cross);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
}
.coord-crosshair::before {
  content: '';
  position: absolute;
  width: 1px;
  height: 100%;
  left: 50%;
  background: var(--coord-cross);
}
.coord-crosshair::after {
  content: '';
  position: absolute;
  height: 1px;
  width: 100%;
  top: 50%;
  background: var(--coord-cross);
}

/* Description text below image — matches reference screenshot */
.coord-description {
  padding: 4rem var(--pad-x) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* Caption bar */
.coord-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem var(--pad-x) 0;
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--coord-tick);
  border-top: var(--rule-dark);
}
.coord-readout { color: var(--coord-active); }

/* ── CTA SECTION ─────────────────────────────────────────── */

.cta-section {
  border-top: var(--rule-dark);
  border-bottom: var(--rule-dark);
}

.cta-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: var(--pad-y) var(--pad-x);
  align-items: center;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ── CONTACT ─────────────────────────────────────────────── */

.contact-section {
  border-top: var(--rule);
}

.contact-header {
  padding: var(--pad-y) var(--pad-x) 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  padding: 0 var(--pad-x) var(--pad-y);
  gap: 4rem;
  align-items: start;
}

.contact-divider {
  background: var(--border);
  align-self: stretch;
}

.contact-col-label {
  font-size: 0.65rem;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1rem;
}

.contact-col-desc {
  font-size: var(--text-body-sm);
  line-height: var(--lh-body);
  color: rgba(15,15,13,0.55);
  margin-bottom: 1.1rem;
}

/* Form fields — tightened vertical rhythm */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
}

.form-field label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
}

.form-field input,
.form-field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0;
  font-family: var(--font);
  font-size: var(--text-body-sm);
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--accent); }
.form-field textarea { resize: none; }

.form-note {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--mid);
  margin-top: 1rem;
  line-height: var(--lh-body);
}

/* Form submit states */
#submit-btn[disabled] { opacity: 0.6; pointer-events: none; }
#submit-btn.success   { background: var(--accent-2); }

/* ── FOOTER ──────────────────────────────────────────────── */

footer {
  background: var(--dark);
  color: var(--fg-dark);
  border-top: var(--rule-dark);
}

/* 4-column link grid */
.footer-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 3.5rem var(--pad-x);
  border-bottom: var(--rule-dark);
  gap: 0;
}

.footer-col + .footer-col {
  border-left: var(--rule-dark);
  padding-left: 2.5rem;
}

.footer-col-label {
  font-size: var(--text-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: rgba(245,244,240,0.28);
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-links a {
  font-size: 0.78rem;
  color: rgba(245,244,240,0.6);
  letter-spacing: 0.03em;
  transition: color 0.2s;
  cursor: none;
}
.footer-links a:hover { color: var(--fg-dark); }

/* Legal strip */
.footer-legal {
  display: flex;
  gap: 2rem;
  padding: 1rem var(--pad-x);
  border-bottom: var(--rule-dark);
  flex-wrap: wrap;
}
.footer-legal a {
  font-size: var(--text-caption);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.28);
  cursor: none;
  transition: color 0.2s;
}
.footer-legal a:hover { color: rgba(245,244,240,0.65); }

/* Bottom bar */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--pad-x);
}

/* Bold company name — NO logo */
.footer-wordmark {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--fg-dark);
}

.footer-copy {
  font-size: var(--text-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.28);
}

/* Back to top button */
.back-to-top {
  background: none;
  border: 1px solid rgba(245,244,240,0.2);
  color: rgba(245,244,240,0.55);
  padding: 0.45rem 1rem;
  font-family: var(--font);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.back-to-top:hover {
  background: var(--accent);
  color: var(--fg-dark);
  border-color: var(--accent);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 1024px) {
  .carousel-card { flex-basis: 232px; }
  .carousel-card.active { flex-basis: 272px; }
}

@media (max-width: 900px) {

  /* Nav */
  .nav-links,
  .nav-right        { display: none; }
  .nav-hamburger    { display: flex; }
  .mobile-menu      { display: flex; }

  /* Company summary: 4 cols → 2 cols */
  .summary-grid     { grid-template-columns: 1fr 1fr; }
  .summary-block:nth-child(2) { border-right: none; }
  .summary-block:nth-child(3) { border-top: var(--rule); }
  .summary-block:nth-child(4) {
    border-top: var(--rule);
    border-right: none;
  }

  /* Carousel: 3D disabled → flat scroll */
  .carousel-card.active  { transform: none; flex-basis: 300px; }
  .carousel-card.dimmed  { transform: none; opacity: 1; }
  .desk-scene            { height: 80vh; }

  /* Approach: hover → tap */
  .approach-item-inner   { grid-template-columns: 1fr; }
  .approach-item:hover .approach-detail { max-height: 0; opacity: 0; }
  .approach-item.open  .approach-detail {
    max-height: 300px;
    opacity: 1;
    padding-top: 0.5rem;
  }
  .approach-item:hover  { background: transparent; }
  .approach-item.open   { background: var(--accent-2); }
  .approach-item:hover .approach-title { color: var(--fg-dark); }
  .approach-item.open  .approach-title { color: var(--dark); }
  .approach-item:hover .approach-num   { color: var(--mid-dark); }
  .approach-item.open  .approach-num   { color: rgba(15,15,13,0.5); }

  /* Coord description */
  .coord-description    { grid-template-columns: 1fr; gap: 2rem; }
  .coord-live-x,
  .coord-live-y         { display: none; }

  /* CTA */
  .cta-inner            { grid-template-columns: 1fr; gap: 2.5rem; }

  /* Contact */
  .contact-grid         { grid-template-columns: 1fr; gap: 3rem; }
  .contact-divider      { display: none; }

  /* Footer */
  .footer-top           { grid-template-columns: 1fr 1fr; }
  .footer-col + .footer-col {
    border-left: none;
    padding-left: 0;
  }
  .footer-col:nth-child(3),
  .footer-col:nth-child(4) {
    border-top: var(--rule-dark);
    padding-top: 2rem;
    margin-top: 2rem;
  }
  .footer-bottom        {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 520px) {

  .summary-grid          { grid-template-columns: 1fr; }
  .summary-block         { border-right: none; border-top: var(--rule); }
  .summary-block:first-child { border-top: none; }

  .footer-top            { grid-template-columns: 1fr; }
  .footer-col + .footer-col {
    border-top: var(--rule-dark);
    padding-top: 2rem;
    margin-top: 2rem;
  }

  .hero-title            { font-size: clamp(2.8rem, 12vw, 5rem); }
  .cta-buttons           { flex-direction: column; }
  .btn-primary,
  .btn-outline           { justify-content: center; }
}

/* ── ACCESSIBILITY ───────────────────────────────────────── */

/* Keyboard focus — visible ring for non-mouse users */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Reduced motion — disable all animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1      !important;
    transition-duration:       0.01ms !important;
  }
  .scroll-bar            { animation: none; }
  .carousel-card.active  { transform: none; }
  .coord-clip            { clip-path: inset(0% 0% 0% 0%) !important; }
  .body-reveal           { opacity: 1 !important; transform: none !important; }
}

/* Print — hide decorative elements */
@media print {
  #loader, #page-overlay,
  #cur-dot, #cur-ring,
  nav, .hero-scroll-hint,
  .carousel-dots,
  .back-to-top           { display: none !important; }
  body                   { cursor: auto; }
  .hero                  { height: auto; padding: 3rem 0; }
}


/* ── SERVICES STRIP — accent marquee after hero (company-refer1) ── */
.services-strip {
  background: var(--accent);
  overflow: hidden;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.strip-track {
  display: flex;
  align-items: center;
  width: max-content;
}
/* Each group carries the animation. padding-right === the flex gap, so
   when translateX(-100%) resets to 0% the seam is pixel-identical. */
.strip-group {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  padding-right: 3.5rem;
  animation: strip-scroll 45s linear infinite; /* slow, per request */
}
.strip-track span {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f4f3ef;
  white-space: nowrap;
}
.strip-track .strip-dot { opacity: 0.55; font-weight: 400; }
@keyframes strip-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ── COMPANY SECTION — reference layout (company-refer1) ──
   Mobile-first: columns stack full-width; desktop switches to
   side-by-side with the right column slightly wider. */
.company-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 901px) {
  .company-grid { grid-template-columns: 1fr 1.15fr; }
}
.company-left {
  padding: 5rem var(--pad-x) 5rem;
}
.company-heading {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--ink);
  margin: 1.5rem 0 2.5rem;
  max-width: 12ch;
}
.company-more {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}
.company-right {
  border-left: 1px solid var(--border);
}
.company-block {
  padding: 4rem 3rem;
}
.company-block + .company-block {
  border-top: 1px solid var(--border);
}
.company-block-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1rem 0 0.75rem;
}
@media (max-width: 900px) {
  .company-grid { grid-template-columns: 1fr; }
  .company-right { border-left: none; border-top: 1px solid var(--border); }
  .company-block { padding: 3rem var(--pad-x); }
}


/* ── FLICKERING GRID BACKGROUND (replaces desk POV image) ── */
.desk-image { background: var(--bg); }
#flicker-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ── CAROUSEL — AUTOMATIC LOOPING MARQUEE ──
   The loop transform lives ONLY on .carousel-track; hover scale /
   blur live ONLY on the cards — no transform conflicts. */
.carousel-wrap { overflow: hidden; }
.carousel-track {
  display: flex;
  gap: var(--gap, 1.25rem);
  width: max-content;
  /* transform driven by JS (initCarousel) — auto loop + arrows share one offset */
  will-change: transform;
}
@keyframes carousel-loop {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.carousel-card {
  flex-shrink: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.45s ease, opacity 0.45s ease;
}
/* Hovered card: expand + bring to front */
.carousel-track .carousel-card:hover {
  transform: scale(1.06) !important;
  z-index: 5;
  filter: none;
  opacity: 1;
}
/* All non-hovered cards: blurry + greyish */
.carousel-track:hover .carousel-card:not(:hover) {
  filter: blur(3px) grayscale(0.8);
  opacity: 0.55;
}
/* ── SERVICES HEADER — tight title + accent underline + typing sub ── */
.services-title {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
  padding: 0 0 0.3rem;
  border-bottom: 2px solid var(--accent); /* compact accent rule */
}
.services-sub {
  display: block;
  margin: 0.6rem 0 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(15, 15, 13, 0.6);
  min-height: 1.4em; /* reserve line so retyping never shifts layout */
}

/* ── COORDINATED SCROLL REVEAL — CSS Scroll-Driven Animations ──
   --reveal-x / --reveal-y are registered percentages so the scroll
   timeline interpolates them with sub-pixel precision. They drive the
   image clip-path AND position the bracket at the moving corner. */
@property --reveal-x {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 100%;
}
@property --reveal-y {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 100%;
}

.reveal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin: 0 var(--pad-x);
  /* Named view timeline — every animation below reads this element's
     progress through the viewport. */
  view-timeline: --coordReveal block;
}

.reveal-media {
  position: relative;
  --reveal-x: 100%;
  --reveal-y: 100%;
}
.reveal-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 832 / 747;
  object-fit: cover;
  /* Box mapped from the interpolated variables: exposes the region from
     the top-left origin to (--reveal-x, --reveal-y). */
  clip-path: inset(0 calc(100% - var(--reveal-x)) calc(100% - var(--reveal-y)) 0);
}

/* Custom bracket — absolute pseudo-border locked to the reveal's moving
   bottom-right corner coordinate. */
.reveal-bracket {
  position: absolute;
  left: var(--reveal-x);
  top: var(--reveal-y);
  width: 26px;
  height: 26px;
  transform: translate(-100%, -100%);
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  pointer-events: none;
}

.reveal-text {
  text-align: center; /* per spec: center-aligned in the text block */
}
.reveal-text .h2 { margin: 0 0 1.5rem; }
.reveal-text .body-text { margin: 0 auto; max-width: 46ch; }

@supports (animation-timeline: view()) {
  .reveal-media {
    animation: coord-open linear both;
    animation-timeline: --coordReveal;
    /* Baseline at entry 0%: only ~10% of the top-left quadrant exposed. */
    animation-range: entry 0% contain 50%;
  }
  .reveal-text {
    animation: coord-text linear both;
    animation-timeline: --coordReveal;
    /* Completes as the component reaches the 50% window-center mark. */
    animation-range: entry 0% cover 50%;
  }
}

@keyframes coord-open {
  from { --reveal-x: 10%; --reveal-y: 10%; }
  to   { --reveal-x: 100%; --reveal-y: 100%; }
}
@keyframes coord-text {
  from { opacity: 0; transform: translateY(48px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .reveal-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-media,
  .reveal-text { animation: none; } /* vars default to 100% = fully revealed */
  #hero-cta    { animation: none; }
}

/* ── HERO EXTRAS ── */
/* Reserve height while the sub line types so the CTA never jumps */
.hero-sub.typewriter { min-height: 3lh; display: block; }

/* Glowing CTA — hero section only */
#hero-cta {
  animation: cta-glow 2.4s ease-in-out infinite;
}
@keyframes cta-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 89, 73, 0.35); }
  50%      { box-shadow: 0 0 26px rgba(255, 89, 73, 0.75), 0 0 52px rgba(255, 89, 73, 0.25); }
}

/* Typing caret on the card description while typing */
.card-desc.typing::after {  content: '';
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin-left: 2px;
  background: currentColor;
  vertical-align: text-bottom;
  animation: blink 0.7s step-end infinite;
}
/* Marquee replaces dot navigation */
.carousel-dots { display: none; }

/* ── COMPANY BLOCKS — hover effect ── */
.company-block {
  position: relative;
  transition: background 0.4s ease, transform 0.4s ease;
  cursor: default;
}
.company-block::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.company-block:hover {
  background: rgba(15, 15, 13, 0.03);
}
.company-block:hover::before { transform: scaleY(1); }
.company-block:hover .company-block-title { color: var(--accent); }
.company-block-title { transition: color 0.3s ease; }

/* Fluid gradient drift — right-hand description blocks only */
.company-right .company-block::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    rgba(255, 89, 73, 0.10) 0%,
    rgba(15, 15, 13, 0.05) 28%,
    rgba(136, 136, 128, 0.10) 52%,
    rgba(255, 89, 73, 0.07) 78%,
    rgba(15, 15, 13, 0.04) 100%);
  background-size: 300% 300%;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
}
.company-right .company-block > * { position: relative; z-index: 1; }
.company-right .company-block:hover::after {
  opacity: 1;
  animation: mesh-drift 6s ease-in-out infinite alternate;
}
@keyframes mesh-drift {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}

/* ── CAROUSEL ARROWS — ghost buttons, centered at the bottom ── */
.carousel-arrows {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.8rem;
  position: relative;
  z-index: var(--z-float);
}
.carousel-arrow {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: transparent;                       /* ghost */
  border: 1px solid rgba(245, 244, 240, 0.45);   /* thin clean outline */
  border-radius: 999px;
  color: var(--fg-dark);
  font-size: 1.05rem;
  line-height: 1;
  cursor: none;
  transition: background 0.3s ease, border-color 0.3s ease,
              color 0.3s ease, transform 0.3s ease;
}
.carousel-arrow:hover {
  background: var(--accent);                     /* smooth solid fill */
  border-color: var(--accent);
  color: var(--fg-dark);
  transform: translateY(-2px);
}

/* ── FOOTER LINKS — dark-orange hover + animated underline ── */
.footer-links a {
  position: relative;
  z-index: 2; /* text strictly on top */
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.footer-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 2px;
  background: var(--accent-cta, #ff6600);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.footer-links a:hover {
  color: var(--accent-cta, #ff6600);
  text-shadow: 0 0 12px rgba(255, 102, 0, 0.3);
}
.footer-links a:hover::after { transform: scaleX(1); }
.footer-legal a {
  position: relative;
  z-index: 2;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.footer-legal a:hover {
  color: var(--accent-cta, #ff6600);
  text-shadow: 0 0 12px rgba(255, 102, 0, 0.3);
}

/* ══ UPDATE PACK — capsule nav · dark hero · sticky company · form v2 ══ */
:root { --accent-cta: #ff6600; }

/* ── NAV — floating capsule, centered logo ── */
nav {
  top: 1rem;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  padding: 0 1.6rem;
  border-radius: 100px;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 244, 240, 0.12);
  border-bottom: 1px solid rgba(245, 244, 240, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
nav.scrolled {
  background: rgba(10, 10, 10, 0.82);
  border-color: rgba(245, 244, 240, 0.16);
}
/* Centered logo */
.nav-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--fg-dark);
}
/* Links group — left side */
.nav-links { margin-right: auto; }
.nav-links a {
  position: relative;
  color: var(--fg-dark);
  opacity: 0.75;
  transition: color 0.25s ease, opacity 0.25s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1.5px;
  background: var(--accent-cta);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover { color: var(--accent-cta); opacity: 1; }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links li.active > a { border-bottom: none; color: var(--accent-cta); }
.nav-dropdown { border-radius: 12px; }
/* Right group — Log In + CTA */
.nav-right { gap: 1.4rem; }
.nav-login {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 244, 240, 0.75);
  transition: color 0.25s ease;
}
.nav-login:hover { color: var(--accent-cta); }
.nav-cta {
  background: var(--accent-cta);
  border-radius: 999px;
  transition: filter 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-cta:hover {
  background: var(--accent-cta);
  filter: brightness(1.12);
  transform: scale(1.03);
  box-shadow: 0 0 18px rgba(255, 102, 0, 0.45);
}
.nav-hamburger span { background: var(--fg-dark); }
/* Mid widths: un-center the logo so links never collide with it */
@media (max-width: 1150px) {
  .nav-logo { position: static; transform: none; order: 0; }
  .nav-links { margin-right: 0; gap: 1.4rem; order: 1; }
  .nav-right { order: 2; }
}

/* ── HERO — dark mode + blueprint grid + premium type ── */
.hero { background: var(--dark); }
.hero::before {
  /* Sharp blueprint grid aligned to the layout */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 244, 240, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 244, 240, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(245, 244, 240, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 244, 240, 0.025) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  pointer-events: none;
}
.hero-overlay {
  background: linear-gradient(to top,
    rgba(15, 15, 13, 0.85) 0%,
    rgba(15, 15, 13, 0.35) 45%,
    rgba(15, 15, 13, 0.15) 100%);
}
.hero-title, .hero-line {
  font-family: 'Plus Jakarta Sans', var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg-dark);
}
.hero-sub.typewriter {
  font-family: 'Inter', var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: #9c9a94; /* muted gray per typograph reference */
  max-width: 62ch;
}
/* "Build to last" — red, larger (per request) */
.hero-line-square { color: var(--accent); }
/* Red square terminal after "BUILD TO LAST" (reference typography) */
.hero-line-square::after {
  content: '';
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  background: var(--accent);
  margin-left: 0.1em;
}
.hero-eyebrow { font-family: 'Plus Jakarta Sans', var(--font); font-weight: 600; }
#hero-cta {
  font-family: 'Plus Jakarta Sans', var(--font);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
/* Sideways vertical badge — right boundary */
.hero-side-badge {
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  display: flex;
  gap: 1.4rem;
  align-items: center;
  font-family: 'Plus Jakarta Sans', var(--font);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.55);
  z-index: 2;
  pointer-events: none;
}
.hero-side-badge .hsb-est {
  color: rgba(226, 232, 240, 0.9);
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.25);
}
.hero-side-badge .hsb-rest { opacity: 0.7; }
@media (max-width: 768px) { .hero-side-badge { display: none; } }

/* ── COMPANY — sticky left column ── */
.company-left {
  position: sticky;
  top: 4rem;
  align-self: start;
}
@media (max-width: 900px) { .company-left { position: static; } }

/* ── COMPANY RIGHT BLOCKS — tech-matrix hover pattern ── */
.company-block { overflow: hidden; }
.card-pattern-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.5s ease;
  /* Tiny crosshair matrix that drifts diagonally */
  background-image:
    linear-gradient(rgba(255, 89, 73, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 89, 73, 0.14) 1px, transparent 1px),
    radial-gradient(circle 1.5px at 50% 50%, rgba(15, 15, 13, 0.22) 99%, transparent 100%);
  background-size: 36px 36px, 36px 36px, 36px 36px;
  background-position: 17px 17px, 17px 17px, 35px 35px;
  mask-image: radial-gradient(circle at 30% 30%, black 0%, rgba(0,0,0,0.25) 100%);
  -webkit-mask-image: radial-gradient(circle at 30% 30%, black 0%, rgba(0,0,0,0.25) 100%);
}
.company-right .company-block:hover .card-pattern-bg {
  opacity: 1;
  animation: pattern-drift 14s linear infinite;
}
@keyframes pattern-drift {
  from { background-position: 17px 17px, 17px 17px, 35px 35px; }
  to   { background-position: 53px 53px, 53px 53px, 71px 71px; }
}

/* ── CONTACT — trust anchors ── */
.trust-badge {
  margin: 1.4rem 0 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--mid);
}
.trust-logos {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  flex-wrap: wrap;
}
.trust-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink, #0f0f0d);
  opacity: 0.4;
  filter: grayscale(1);
}

/* ── BRAND MARQUEE — left-to-right infinite loop ── */
.brand-marquee {
  overflow: hidden;
  background: #CC5500; /* dark orange bar */
  padding: 0.9rem 0;
  margin-top: 1rem;
}
.brand-marquee-track {
  display: flex;
  width: max-content;
  animation: brand-marquee-ltr 22s linear infinite;
  will-change: transform;
}
.brand-marquee:hover .brand-marquee-track {
  animation-play-state: paused;
}
.brand-marquee-group {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  padding-right: 3.5rem; /* equals gap → seamless loop */
  flex-shrink: 0;
}
.brand-marquee-item {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #000000;
  white-space: nowrap;
}
/* LEFT → RIGHT: start shifted one group-width left, end at 0 */
@keyframes brand-marquee-ltr {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* ── CONTACT FORM v2 ── */
.form-field label .req { color: var(--accent-cta); font-weight: 700; }
.form-field label .opt { color: var(--mid); text-transform: none; letter-spacing: 0.04em; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
/* Mobile: stack form rows into a single full-width column */
@media (max-width: 767px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .form-row .form-field { width: 100%; }
  /* Tappable touch targets ≥ 44px */
  .contact-form input,
  .contact-form select,
  .contact-form button,
  .contact-form .upload-zone {
    min-height: 44px;
  }
  /* Fluid container — no horizontal scroll */
  .contact-form { max-width: 100%; padding-left: 1rem; padding-right: 1rem; box-sizing: border-box; }
  .contact-form input, .contact-form select, .contact-form textarea { width: 100%; box-sizing: border-box; }
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-field input,
.form-field textarea,
.form-field select {
  background: rgba(15, 15, 13, 0.035); /* subtle fill, sharp bottom line */
  padding: 0.45rem 0.7rem;
  border: none;
  border-bottom: 1px solid var(--border);
  font: inherit;
  color: var(--ink, #0f0f0d);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.form-field select { cursor: none; appearance: auto; width: 100%; }
.form-field input:hover, .form-field textarea:hover, .form-field select:hover,
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--accent-cta);
  outline: none;
}
/* Upload zone */
.upload-zone {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  border: 1.5px dashed rgba(15, 15, 13, 0.25);
  color: var(--mid);
  font-size: 0.82rem;
  cursor: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.upload-zone em { font-style: normal; opacity: 0.65; }
.upload-zone u { text-underline-offset: 3px; }
.upload-zone .upload-icon { color: var(--accent-cta); flex-shrink: 0; }
.upload-zone:hover, .upload-zone:focus-visible, .upload-zone.dragging {
  border-color: var(--accent-cta);
  background: rgba(255, 102, 0, 0.04);
  outline: none;
}
.upload-chip[hidden] { display: none; }
.upload-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  padding: 0.35rem 0.5rem 0.35rem 0.8rem;
  border: 1px solid rgba(255, 102, 0, 0.4);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--ink, #0f0f0d);
  background: rgba(255, 102, 0, 0.06);
}
.upload-chip button {
  border: none;
  background: transparent;
  color: var(--accent-cta);
  font-size: 1rem;
  line-height: 1;
  cursor: none;
  padding: 0 0.25rem;
}
.form-guarantee {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--mid);
}
.form-note .req { color: var(--accent-cta); }

/* ── SUCCESS BANNER ── */
.form-success {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 2rem 0 1rem;
  max-width: 420px;
}
.form-success.in { opacity: 1; transform: translateY(0); }
.form-success h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  margin: 1.2rem 0 0.7rem;
  color: var(--ink, #0f0f0d);
}
.form-success p { font-size: 0.92rem; line-height: 1.65; color: var(--mid); }
.success-check .check-circle {
  stroke: var(--accent-cta);
  stroke-width: 2;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}
.success-check .check-mark {
  stroke: var(--accent-cta);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
}
.form-success.in .check-circle { animation: check-draw 0.6s ease-out 0.15s forwards; }
.form-success.in .check-mark   { animation: check-draw 0.4s ease-out 0.65s forwards; }
@keyframes check-draw { to { stroke-dashoffset: 0; } }
.success-reset {
  margin-top: 1.6rem;
  padding: 0.8rem 1.6rem;
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--accent-cta);
  border-radius: 999px;
  color: var(--accent-cta);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: none;
  transition: background 0.3s ease, color 0.3s ease;
}
.success-reset:hover { background: var(--accent-cta); color: #fff; }


/* ── APPROACH v2 — 3-step process list (text left / number+title right) ── */
.process-list { display: flex; flex-direction: column; border-top: 1px solid var(--border-dark, rgba(245,244,240,0.1)); }
.process-row {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
  padding: clamp(1.6rem, 3.5vw, 2.6rem) clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--border-dark, rgba(245,244,240,0.1));
  align-items: center;
  transition: background 0.3s ease, color 0.3s ease;
}
@media (min-width: 860px) {
  .process-row { grid-template-columns: minmax(0, 46ch) 1fr; gap: clamp(2.5rem, 6vw, 6rem); }
}
.process-desc { color: rgba(245,244,240,0.6); font-size: 0.92rem; line-height: 1.7; order: 2; }
@media (min-width: 860px) { .process-desc { order: 0; } }
.process-head { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 1.6rem); justify-content: flex-start; }
@media (min-width: 860px) { .process-head { justify-content: flex-end; } }
.process-num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); letter-spacing: 0.14em; }
.process-title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.3rem, 3.2vw, 2.4rem); line-height: 1; letter-spacing: -0.01em;
  color: var(--fg-dark, #f5f4f0);
}
.process-row:not(.is-active):hover { background: rgba(16,185,129,0.07); }
.process-row:not(.is-active):hover .process-title { color: #10B981; }
.process-row.is-active { background: #10B981; }
.process-row.is-active .process-desc { color: #0b2018; }
.process-row.is-active .process-title { color: #08130e; }
.process-row.is-active .process-num { color: #08130e; }
.process-cta {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: #ffffff; color: #08130e; font-size: 1.2rem; text-decoration: none;
  transition: transform 0.25s ease;
}
.process-cta:hover { transform: scale(1.08); color: var(--accent); }

/* ── Footer social icons — plain grey ── */
.social-link { display: inline-flex; align-items: center; gap: 0.55rem; }
.social-ic { flex: none; color: rgba(245,244,240,0.45); transition: color 0.2s ease; }
.social-link:hover .social-ic { color: rgba(245,244,240,0.75); }
