/* ============================================================
   ZENOS - Design System
   ============================================================

   !! CRITICAL BRAND RULE - CHIPPED CORNERS WITH BORDERS !!

   When an element needs BOTH a chipped-corner shape AND a border,
   DO NOT use `clip-path` directly on the element. CSS `clip-path`
   CLIPS AWAY the border at the chipped corners, leaving gaps.

   ALWAYS use the SVG-background approach for bordered chipped
   elements. See `.chip-border` / `.chip-border-double` utilities
   further down this file, or the inline SVG approach used on
   `.nav__dropdown::before` and `.btn--secondary::before`.

   clip-path is fine ONLY for:
   - Solid filled shapes (no border). e.g. `.clip-card`, `.clip-landscape`
   - Pseudo-element overlays where the parent carries the border/fill
   - Images / videos / media that don't need a visible border

   When in doubt: use the SVG polygon approach. It renders the fill
   AND the stroke along the full chipped path cleanly.
   ============================================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 1rem); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Cross-page hash links land under the fixed nav + any sticky sub-nav.
   scroll-margin-top on the target section compensates so the heading
   lands just below the chrome. Pages with a sticky sub-nav override
   this with a larger value in their page CSS. */
section[id] { scroll-margin-top: calc(var(--nav-height) + 1rem); }
body { min-height: 100vh; line-height: 1.6; overflow-x: hidden; }
body.loading { overflow: hidden; }

/* --- Custom scrollbar (ZENOS brand) --- */
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #7B70FB rgba(0, 0, 0, 0.4);
}

/* WebKit - dark theme (default) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-left: 1px solid rgba(123, 112, 251, 0.08);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7B70FB 0%, #54FFE0 100%);
  border: 2px solid var(--black);
  background-clip: padding-box;
  min-height: 48px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #B1AAFD 0%, #D6FFF7 100%);
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Scroll progress bar (top of viewport) */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #7B70FB 0%, #54FFE0 100%);
  z-index: 10000;
  width: 0%;
  transition: width 0.05s linear;
  box-shadow: 0 0 8px rgba(123, 112, 251, 0.6);
}

/* --- Page Loader (1:1 port of Webflow original) --- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.loader.is-dismissed {
  animation: loader-dismiss 300ms forwards;
}

@keyframes loader-dismiss {
  to { opacity: 0; visibility: hidden; }
}

/* Clip-wrap: full-viewport container for the Z-mask, scales 1x → 3x */
.loader_clip-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: clip-scale-1 1500ms forwards;
  animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
  animation-delay: 1300ms;
}

@keyframes clip-scale-1 {
  0% { transform: scale(1); }
  100% { transform: scale(3); }
}

/* The Z-shaped mask (dark, reveals page through cut-out as it scales) */
.loader_clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--black);
  clip-path: polygon(
    61% 42%, 52% 42%, 52% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%, 52% 0%, 52% 42%,
    41% 42%, 39% 46%, 39% 58%, 59% 58%, 61% 54%
  );
  animation: clip-scale-2 2000ms forwards;
  animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
  animation-delay: 2600ms;
}

@keyframes clip-scale-2 {
  0% { transform: scale(1); }
  100% { transform: scale(2.5); }
}

@media (max-width: 991px) {
  .loader_clip {
    clip-path: polygon(25% 46%, 24% 17%, 24% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%, 24% 0%, 25% 46%, 25% 61%, 74% 61%, 77% 58%, 77% 43%, 28% 43%);
  }
}

@media (max-width: 480px) {
  .loader_clip {
    clip-path: polygon(41% 41%, 41% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%, 41% 0%, 41% 41%, 16% 41%, 10% 43%, 10% 59%, 84% 59%, 90% 57%, 90% 41%);
  }
}

/* Purple cover slab - slides up at 500ms */
.loader_cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--purple);
  animation: cover-move 1000ms forwards;
  animation-timing-function: ease-in;
  animation-delay: 500ms;
}

@keyframes cover-move {
  0% { transform: translateY(0%); }
  100% { transform: translateY(-100%); }
}

/* HUD container - small centered frame, NOT full viewport */
.loader_hud {
  position: relative;
  width: 100%;
  max-width: 25%;
  margin-left: auto;
  margin-right: auto;
  padding-top: 20svh;
  aspect-ratio: 2 / 1;
}

@media (max-width: 991px) {
  .loader_hud {
    max-width: 55%;
    margin-top: 4svh;
    padding-top: 22svh;
    right: -1%;
  }
}

@media (max-width: 480px) {
  .loader_hud {
    max-width: 85%;
    margin-top: 0;
    padding-top: 20svh;
    right: auto;
  }
}

/* HUD corner: small 2rem square bracket */
.loader_hud-corner {
  position: absolute;
  aspect-ratio: 1;
  width: 2rem;
  inset: auto auto 0% 0%;
}

.loader_hud-corner.is-bottom {
  animation: hud-1-move 600ms forwards;
  animation-timing-function: ease-in;
  animation-delay: 500ms;
}

@keyframes hud-1-move {
  0% { transform: translate(0vw, 0vh); }
  100% { transform: translate(-24vw, 19.5svh); }
}

.loader_hud-corner.is-top {
  inset: 0% 0% auto auto;
  animation: hud-2-move 600ms forwards;
  animation-timing-function: ease-in;
  animation-delay: 500ms;
}

@keyframes hud-2-move {
  0% { transform: translate(0vw, 0vh); }
  100% { transform: translate(24vw, -19.5svh); }
}

/* HUD line - horizontal by default (bottom of corner, transform-origin left) */
.loader_hud-line {
  position: absolute;
  background-color: var(--purple-tint);
  transform-origin: 0%;
  width: 100%;
  height: 1px;
  inset: auto 0% 0%;
  animation: line-scale-2 200ms forwards;
  animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
  animation-delay: 2150ms;
}

/* top horizontal line - transform-origin right */
.loader_hud-line.is-top-h {
  transform-origin: 100%;
  inset: 0% 0% auto;
}

/* vertical line variant */
.loader_hud-line.is-2 {
  transform-origin: 50% 100%;
  width: 1px;
  height: 100%;
  inset: auto auto 0% 0%;
  animation-name: line-scale-1;
}

.loader_hud-line.is-2.is-top {
  transform-origin: 50% 0;
  inset: 0% 0% 0% auto;
}

@keyframes line-scale-1 {
  0% { transform: scaleY(1); }
  100% { transform: scaleY(0); }
}

@keyframes line-scale-2 {
  0% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea { font: inherit; }

/* --- CSS Custom Properties --- */
:root {
  /* Colours */
  --black: #0E0B16;
  --white: #F5F4F4;
  --white-pure: #FFFFFF;
  --purple: #7B70FB;
  --purple-tint: #B1AAFD;
  --cyan: #54FFE0;
  --cyan-tint: #D6FFF7;
  --magenta: #B870FB;
  --yellow: #FFDE51;
  --grey: #666666;
  --grey-light: #999999;
  --grey-dark: #1A1A1A;
  --card-dark: rgba(0, 0, 0, 0.85);
  --card-light: rgba(246, 246, 246, 0.9);
  --border-dark: rgba(123, 112, 251, 0.3);
  --border-light: rgba(123, 112, 251, 0.15);

  /* Typography */
  --font-heading: 'Archivo', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Layout */
  --container-max: 1280px;
  --container-wide: 1440px;
  --container-narrow: 960px;
  --gutter: clamp(1.5rem, 4vw, 3rem);
  --section-padding: clamp(4rem, 8vw, 8rem);
  --nav-height: 4.25rem;

  /* Radius - angular brand, use sparingly */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;

  /* Transitions */
  --ease-out: cubic-bezier(0.075, 0.82, 0.165, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --duration-fast: 200ms;
  --duration-mid: 400ms;
  --duration-slow: 700ms;
}

/* --- Typography --- */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@125,900&display=swap');
}

body {
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 0.875rem + 0.2vw, 1.0625rem);
  font-weight: 400;
  color: var(--black);
}

.dark-theme,
.dark-theme body,
[data-theme="dark"] {
  color: var(--white);
  background-color: var(--black);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.h1, h1 {
  font-size: clamp(2.5rem, 2rem + 3vw, 5rem);
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
}

.h2, h2 {
  font-size: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
}

/* Mobile: the Archivo 900 heading at 125% stretch makes long single
   words (INFRASTRUCTURE, TECHNOLOGY, INTERACTIVE) overflow on narrow
   viewports. Drop size + stretch so the heading wraps cleanly without
   losing its weight. */
@media (max-width: 640px) {
  .h1, h1 {
    font-size: clamp(1.875rem, 1.25rem + 3.5vw, 3rem);
    font-stretch: 100%;
  }
  .h2, h2 {
    font-size: clamp(1.5rem, 1.25rem + 2vw, 2.25rem);
    font-stretch: 100%;
  }
}

.h3, h3 {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  font-weight: 700;
}

.h4, h4 {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 700;
}

.subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 0.875rem + 0.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.5;
}

.label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--purple-tint);
}

.body-lg {
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.7;
}

.body-sm {
  font-size: 0.875rem;
  line-height: 1.6;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--section-padding) 0;
  position: relative;
  overflow: hidden;
}

.section--dark {
  background-color: var(--black);
  color: var(--white);
  position: relative;
}

/* Ambient grid + glow on all dark sections */
.section--dark::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(123, 112, 251, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 112, 251, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 50% 50%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 10%, transparent 70%);
}

/* Vary the glow position per section to avoid repetition */
.section--dark:nth-child(odd)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 40%, rgba(123, 112, 251, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.section--dark:nth-child(even)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 60%, rgba(84, 255, 224, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.section--dark > * {
  position: relative;
  z-index: 1;
}

.section--light {
  background-color: var(--white);
  color: var(--black);
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

@media (max-width: 991px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* --- Flex utilities --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 0;
  transition: all var(--duration-mid) var(--ease-out);
  white-space: nowrap;
}

.btn--primary {
  background: var(--purple);
  color: var(--white);
  /* Fixed-pixel chips so the Z-diagonal stays a clean 45° regardless
     of the button's width. Percentage clip-paths stretch into shallow
     ramps on wide buttons and steep cliffs on tall ones. */
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
}

.btn--primary:hover {
  background: var(--purple-tint);
  color: var(--black);
}

/* Double chip for standalone primary CTAs */
.btn--primary:only-child,
.btn--clip {
  clip-path: polygon(
    12px 0, 100% 0, 100% calc(100% - 12px),
    calc(100% - 12px) 100%, 0 100%, 0 12px
  );
}

.btn--secondary {
  color: inherit;
  position: relative;
  background: transparent;
  isolation: isolate;
}

/* Two-layer chip: ::before = border colour, ::after = fill inset 1.5px.
   Px-based clip-path keeps the chip a clean 45° on wide buttons — the
   prior SVG-bg approach with preserveAspectRatio='none' stretched the
   chip diagonal badly on CTA-width buttons. */
.btn--secondary::before,
.btn--secondary::after {
  content: '';
  position: absolute;
  pointer-events: none;
  transition: background var(--duration-mid) var(--ease-out);
}

.btn--secondary::before {
  inset: 0;
  z-index: -2;
  background: rgba(255, 255, 255, 0.2);
  clip-path: polygon(
    0 0, 100% 0, 100% calc(100% - 12px),
    calc(100% - 12px) 100%, 0 100%
  );
}

.btn--secondary::after {
  inset: 1.5px;
  z-index: -1;
  background: rgba(255, 255, 255, 0.06);
  clip-path: polygon(
    0 0, 100% 0, 100% calc(100% - 10.5px),
    calc(100% - 10.5px) 100%, 0 100%
  );
}

.btn--secondary:hover::before {
  background: rgba(255, 255, 255, 1);
}
.btn--secondary:hover::after {
  background: rgba(255, 255, 255, 1);
}

.btn--secondary:hover {
  color: var(--black);
}

[data-theme="light"] .btn--secondary:hover,
.section--light .btn--secondary:hover {
  background: var(--black);
  color: var(--white);
}

.btn--ghost {
  padding: 0.5rem 0;
  border-radius: 0;
  color: var(--cyan);
  font-weight: 600;
}

.btn--ghost::after {
  content: '\2192';
  transition: transform var(--duration-fast) var(--ease-out);
}

.btn--ghost:hover::after {
  transform: translateX(4px);
}

/* --- Cards --- */
.card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  transition: transform var(--duration-mid) var(--ease-out),
              box-shadow var(--duration-mid) var(--ease-out);
}

.card:hover {
  /* no movement */
}

.card--dark {
  color: var(--white);
}

.card--dark:not(.chip-border):not(.chip-border-double) {
  background: var(--card-dark);
  border: 2px solid var(--border-dark);
}

.card--light {
  color: var(--black);
}

.card--light:not(.chip-border):not(.chip-border-double) {
  background: var(--card-light);
  border: 2px solid rgba(123, 112, 251, 0.15);
}

.card__label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: var(--space-sm);
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.card__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  opacity: 0.8;
}

/* --- Section Headers --- */
.section-header {
  max-width: 720px;
  margin-bottom: var(--space-xl);
}

.section-header--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-header .label {
  margin-bottom: var(--space-sm);
  display: block;
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  opacity: 0.75;
  line-height: 1.7;
}

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.badge--purple {
  background: rgba(123, 112, 251, 0.15);
  color: var(--purple-tint);
}

.badge--cyan {
  background: rgba(84, 255, 224, 0.15);
  color: var(--cyan);
}

.badge--green {
  background: rgba(84, 255, 224, 0.15);
  color: #54FFB0;
}

.badge--outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
}

/* --- ZENOS clip shape (chipped corners) --- */
/* clip-path version for non-bordered elements (images, filled shapes) */
.clip-card {
  clip-path: polygon(8% 0, 100% 0, 100% 92%, 92% 100%, 0 100%, 0 8%);
  border-radius: 0;
}

.clip-landscape {
  clip-path: polygon(5% 0%, 100% 0%, 100% 92%, 95% 100%, 0% 100%, 0% 8%);
  border-radius: 0;
}

/* Chipped borders — two-layer clip-path technique.
   The outer ::before paints the border colour, the inner ::after
   paints the fill at a 1.5px inset. The 1.5px gap between them
   reads as the border. clip-path uses PIXEL values so the chip
   corners stay 45° regardless of the element's aspect ratio.
   Single chip = bottom-right only. Double chip = top-left + bottom-right. */
.chip-border,
.chip-border-double {
  position: relative;
  border: none !important;
  background: transparent !important;
  border-radius: 0;
  isolation: isolate;
}

.chip-border > *,
.chip-border-double > * {
  position: relative;
  z-index: 1;
}

.chip-border::before,
.chip-border-double::before,
.chip-border::after,
.chip-border-double::after {
  content: '';
  position: absolute;
  transition: background var(--duration-mid, 250ms) var(--ease-out, ease);
}

/* Border (outer) layer */
.chip-border::before,
.chip-border-double::before {
  inset: 0;
  z-index: -2;
}

/* Fill (inner) layer, inset by 1.5px so ::before shows as a border */
.chip-border::after,
.chip-border-double::after {
  inset: 1.5px;
  z-index: -1;
}

/* ---- Single chip (bottom-right) ---- */
.chip-border::before {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}
.chip-border::after {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14.5px), calc(100% - 14.5px) 100%, 0 100%);
}

/* ---- Double chip (top-left + bottom-right) ---- */
.chip-border-double::before {
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}
.chip-border-double::after {
  clip-path: polygon(14.5px 0, 100% 0, 100% calc(100% - 14.5px), calc(100% - 14.5px) 100%, 0 100%, 0 14.5px);
}

/* ---- Dark variants (default colours) ---- */
.chip-border::before,
.chip-border-double::before {
  background: rgba(123, 112, 251, 0.3);
}
.chip-border::after,
.chip-border-double::after {
  background: rgba(0, 0, 0, 0.85);
}

/* ---- Light variants ---- */
.chip-border--light::before,
.chip-border-double--light::before {
  background: rgba(123, 112, 251, 0.2);
}
.chip-border--light::after,
.chip-border-double--light::after {
  background: linear-gradient(135deg, #F6F6F6, #EDE8FF);
}

/* ---- Hover states ---- */
.chip-border:hover::before,
.chip-border-double:hover::before {
  background: rgba(123, 112, 251, 0.6);
}

.chip-border--light:hover::before,
.chip-border-double--light:hover::before {
  background: rgba(123, 112, 251, 0.4);
}
.chip-border--light:hover::after,
.chip-border-double--light:hover::after {
  background: linear-gradient(135deg, #F0EEFF, #E4DDFF);
}

/* --- Image treatment --- */
.img-rounded {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.img-rounded img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Gradient backgrounds --- */
.bg-gradient-dark {
  background: var(--black);
  position: relative;
}

.bg-gradient-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(123, 112, 251, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(84, 255, 224, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.bg-gradient-light {
  background: var(--white);
  position: relative;
}

.bg-gradient-light::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(123, 112, 251, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 100%, rgba(84, 255, 224, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* --- Grain texture overlay --- */
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 1;
}

.grain > * {
  position: relative;
  z-index: 2;
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background var(--duration-mid) var(--ease-out),
              box-shadow var(--duration-mid) var(--ease-out);
}

.nav--scrolled {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav--light.nav--scrolled {
  background: rgba(246, 246, 246, 0.95);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav__logo svg {
  height: 1.75rem;
  width: auto;
}

.nav__logo--dark svg .cls-1 { fill: var(--white); }
.nav--light .nav__logo svg .cls-1 { fill: var(--black); }
.nav--light.nav--scrolled .nav__logo svg .cls-1 { fill: var(--black); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__link {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.75;
  transition: opacity var(--duration-fast);
  position: relative;
  text-align: center;
  width: 9rem;
  flex-shrink: 0;
  padding: 0.25rem 0.375rem;
  overflow: hidden;
  white-space: nowrap;
}

.nav__link:hover,
.nav__link--active {
  opacity: 1;
}

.nav__link--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: var(--purple);
}

.nav--light .nav__link--active::after {
  background: var(--purple);
}

/* Scrambled char spans inherit text color naturally - no highlight (matches original) */

/* --- Nav Dropdowns --- */
.nav__item {
  position: relative;
  width: 9rem;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.nav__item .nav__link {
  width: 100%;
}

.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;                         /* left-aligned with the parent nav item */
  transform: translateY(6px);
  min-width: 14rem;
  padding: 0.75rem;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duration-mid) var(--ease-out),
              visibility var(--duration-mid) var(--ease-out),
              transform var(--duration-mid) var(--ease-out);
}

/* Solid fill, borderless, single bottom-right chip.
   Uses px-based clip-path on a solid background (not an SVG-bg) so the
   chip stays 45° even though the dropdown's aspect changes with item
   count. 16px matches the .chip-border utility convention. */
.nav__dropdown::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(14, 11, 22, 0.95);
  z-index: -1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  clip-path: polygon(
    0 0, 100% 0, 100% calc(100% - 16px),
    calc(100% - 16px) 100%, 0 100%
  );
}

.nav--light .nav__dropdown::before {
  background: rgba(245, 244, 244, 0.98);
}

.nav__item:hover .nav__dropdown,
.nav__dropdown:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav__dropdown__link {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--white);
  padding: 0.5rem 0.75rem;
  transition: background var(--duration-fast), color var(--duration-fast);
  white-space: nowrap;
}

.nav--light .nav__dropdown__link {
  color: var(--black);
}

.nav__dropdown__link:hover {
  background: rgba(123, 112, 251, 0.12);
  color: var(--cyan);
}

.nav--light .nav__dropdown__link:hover {
  color: var(--purple);
}

.nav__dropdown__link small {
  display: block;
  font-size: 0.6875rem;
  opacity: 0.5;
  margin-top: 2px;
  font-weight: 400;
}

/* Hide dropdowns on mobile (rely on the full mobile menu) */
@media (max-width: 991px) {
  .nav__dropdown {
    display: none;
  }
}

.nav--light .nav__link {
  color: var(--black);
}

.nav__cta {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  background: var(--purple);
  color: var(--white);
  /* Fixed-pixel chips — percentage values stretch into elongated
   * diagonals on this short 9rem x ~36px button. 12px keeps the
   * corners proportional to the button height. */
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  border-radius: 0;
  width: 9rem;
  flex-shrink: 0;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  transition: all var(--duration-mid) var(--ease-out);
}

.nav__cta:hover {
  background: var(--purple-tint);
  color: var(--black);
}

/* Nav mobile */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  z-index: 1001;
}

.nav__hamburger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: all var(--duration-mid) var(--ease-out);
}

.nav--light .nav__hamburger span {
  background: var(--black);
}

.nav__hamburger--open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger--open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger--open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 991px) {
  .nav__hamburger { display: flex; }

  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(72vw, 300px);
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: calc(var(--nav-height) + 1.5rem) var(--space-md) var(--space-md);
    background: var(--black);
    transform: translateX(100%);
    transition: transform var(--duration-slow) var(--ease-out);
    gap: var(--space-sm);
    overflow-y: auto;
  }

  .nav--light .nav__links {
    background: var(--white);
  }

  .nav__links--open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: 1.0625rem;
    opacity: 1;
    width: auto;
    text-align: left;
    padding: 0.25rem 0;
    overflow: visible;
  }

  /* Same width override on the parent wrapper, plus left-align so the
     link reads as a list item and not a centered desktop pill. */
  .nav__item {
    width: 100%;
    justify-content: flex-start;
  }

  /* Nav CTA becomes a full-width mobile button. Fixed 9rem desktop
     width would leave it floating narrow in the drawer. */
  .nav__cta {
    width: 100%;
    text-align: center;
    padding: 0.7rem 1rem;
    font-size: 0.875rem;
  }

  /* Active underline: span the full left-aligned link on mobile */
  .nav__link--active::after {
    left: 0;
    right: 0;
    width: auto;
  }
}

/* --- Footer --- */
.footer {
  background: var(--black);
  color: var(--white);
  padding: var(--space-xl) 0 var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.footer__tagline {
  font-family: var(--font-heading);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-top: var(--space-md);
  color: var(--white);
}
.footer__tagline span { color: var(--cyan); }

.footer__brand p {
  opacity: 0.5;
  margin-top: var(--space-sm);
  font-size: 0.9375rem;
  max-width: 320px;
}

.footer__col h4 {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
  color: var(--white);
}

.footer__col a {
  display: block;
  font-size: 0.875rem;
  opacity: 0.5;
  margin-bottom: var(--space-xs);
  transition: opacity var(--duration-fast);
}

.footer__col a:hover {
  opacity: 1;
}

.footer__bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  opacity: 0.4;
}

.footer__socials {
  display: flex;
  gap: var(--space-md);
}

.footer__socials a {
  opacity: 0.5;
  transition: opacity var(--duration-fast);
}

.footer__socials a:hover {
  opacity: 1;
}

@media (max-width: 991px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* --- Partner strip --- */
.partners {
  padding: var(--space-xl) 0;
  overflow: hidden;
}

.partners__track {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  animation: scroll-partners 40s linear infinite;
}

.partners__logo {
  flex-shrink: 0;
  height: 7rem;
  opacity: 0.5;
  filter: brightness(0) invert(1);
  transition: opacity var(--duration-mid);
  object-fit: contain;
}

.section--light .partners__logo {
  filter: brightness(0);
}

.partners__logo:hover {
  opacity: 0.8;
}

@keyframes scroll-partners {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Scroll animations (initial states, GSAP activates) --- */
[data-animate] {
  opacity: 0;
}

[data-animate="fade-up"] {
  transform: translateY(40px);
}

[data-animate="fade-in"] {
  transform: none;
}

[data-animate="scale-in"] {
  transform: scale(0.95);
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple); }
.text-muted { opacity: 0.6; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* --- Pull quote --- */
.pull-quote {
  padding: var(--space-lg);
  border-left: 3px solid var(--purple);
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.7;
  opacity: 0.85;
}

.pull-quote__attribution {
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 600;
  opacity: 0.6;
}

/* --- Stat callout --- */
.stat {
  text-align: center;
}

.stat__number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 2rem + 2vw, 4rem);
  font-weight: 900;
  font-stretch: 125%;
  color: var(--cyan);
  line-height: 1;
}

.stat__label {
  font-size: 0.875rem;
  opacity: 0.6;
  margin-top: var(--space-xs);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  :root {
    --section-padding: 3rem;
  }
}

@media (max-width: 480px) {
  :root {
    /* Tighter horizontal gutters on small phones so content cards
       have more breathing room inside their container. */
    --gutter: 1.25rem;
  }
}

/* ================================================================
   Grid-item bleed guard.

   Grid items default to `min-width: auto` (which computes to
   `min-content`) — so an Archivo 900 heading or other nowrap text
   can force its track wider than the container on narrow viewports.
   Explicit `minmax(0, 1fr)` on every track template is verbose;
   this :where() rule zeros grid-item min-width sitewide for the
   grids we own, at 0 specificity so any page rule can override.

   If a grid needs min-content behavior (e.g. a fixed-width preset
   column next to a flexible one) set `min-width: auto` on that
   specific child.
   ================================================================ */
:where(
  .grid,
  .offerings__grid,
  .footer__grid,
  .summary__grid,
  .tech-compressed,
  .product-duo,
  .app-tiles,
  .app-grid,
  .pv-traits,
  .pv-features,
  .tech-cards,
  .phase-block,
  .vtx-schema__grid,
  .twin-diagram__inputs,
  .twin-output__bullets,
  .publisher-steps,
  .os-preview-grid,
  .contact-layout,
  .about-grid,
  .about-values,
  .tech-section__layout,
  .vtx-frame__entities,
  [class*="grid--"]
) > * {
  min-width: 0;
}

/* ================================================================
   Contact modal — global popup injected by initContactModal() in
   main.js. Chipped light-gradient card over a dark blurred backdrop.
   Hidden by default; opened by intercepting any link to contact.html.
   ================================================================ */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 10002; /* above scroll-progress (10000) and loader (10001) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: contactModalFade 180ms ease-out;
}

.contact-modal[hidden] { display: none; }

@keyframes contactModalFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 11, 22, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.contact-modal__card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  color: var(--black);
}

/* Oversized chip corners — matches the reference modal + the brand's
   preference for chunky chips on large surfaces. */
.contact-modal__card.chip-border-double::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 200 200'%3E%3Cpolygon points='28,1 199,1 199,172 172,199 1,199 1,28' fill='none' stroke='rgba(123,112,251,0.4)' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
}
.contact-modal__card.chip-border-double::after {
  background: linear-gradient(135deg, #F6F6F6 0%, #EDE8FF 100%);
  clip-path: polygon(28px 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%, 0 28px);
}

.contact-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(123, 112, 251, 0.45);
  color: var(--purple);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast);
}

.contact-modal__close:hover {
  background: rgba(123, 112, 251, 0.12);
  color: var(--black);
}

.contact-modal__close svg {
  width: 14px;
  height: 14px;
  display: block;
}

.contact-modal__head {
  margin-bottom: var(--space-lg);
}

.contact-modal__eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 6px;
}

.contact-modal__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 1.5rem;
  color: var(--black);
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1.1;
}

/* --- Form --- */
.contact-form {
  display: grid;
  gap: var(--space-sm);
}

.contact-form__field {
  display: block;
}

.contact-form__label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--grey);
  margin-bottom: 4px;
}

.contact-form__label sup {
  color: var(--purple);
  font-size: 0.85em;
  margin-left: 1px;
}

.contact-form__input {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--black);
  background: rgba(14, 11, 22, 0.05);
  border: 1px solid rgba(14, 11, 22, 0.1);
  border-radius: 0;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}

.contact-form__input:focus {
  outline: none;
  border-color: var(--purple);
  background: #ffffff;
}

.contact-form__textarea {
  resize: vertical;
  min-height: 96px;
  font-family: var(--font-body);
  line-height: 1.5;
}

.contact-form__select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237B70FB' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-color: rgba(14, 11, 22, 0.05);
}

.contact-form__consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--grey);
  line-height: 1.5;
  cursor: pointer;
}

.contact-form__consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--purple);
}

.contact-form__consent a {
  color: var(--purple);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.contact-form__actions {
  margin-top: var(--space-sm);
}

.contact-form__actions .btn {
  width: auto;
  min-width: 180px;
}

.contact-form__status {
  margin-top: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--grey);
  min-height: 1em;
}

.contact-form__status--ok {
  color: var(--purple);
  font-weight: 600;
}

@media (max-width: 520px) {
  .contact-modal {
    padding: var(--space-sm);
  }
  .contact-modal__card {
    padding: var(--space-lg) var(--space-md) var(--space-md);
  }
  .contact-modal__title {
    font-size: 1.25rem;
  }
  /* Touch-target compliant close button */
  .contact-modal__close {
    width: 44px;
    height: 44px;
    top: 8px;
    right: 8px;
  }
  /* Full-width primary CTA on narrow viewports */
  .contact-form__actions .btn {
    width: 100%;
    justify-content: center;
    min-width: 0;
  }
  /* Larger tap targets + 16px text prevents iOS zoom-on-focus */
  .contact-form__input {
    padding: 12px 14px;
    font-size: 1rem;
  }
}

/* --- Contact modal: success panel (replaces form after send) --- */
.contact-modal__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  gap: var(--space-sm);
}

.contact-modal__success-icon {
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-xs);
}

.contact-modal__success-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 1.5rem;
  color: var(--black);
  letter-spacing: 0.01em;
  margin: 0;
}

.contact-modal__success-body {
  font-size: 0.9375rem;
  color: var(--grey);
  margin: 0 0 var(--space-md);
  max-width: 340px;
  line-height: 1.5;
}

.contact-form__status--err {
  color: #B870FB;
  font-weight: 600;
}

/* --- reCAPTCHA badge: hide the floating widget since we display the
 * required attribution text on the contact forms (per Google's terms:
 * https://developers.google.com/recaptcha/docs/faq#id-like-to-hide-the-recaptcha-badge.-what-is-allowed).
 * The widget still loads and runs — only the visual badge is hidden. */
.grecaptcha-badge {
  visibility: hidden !important;
}

/* --- Inline reCAPTCHA attribution used on the contact modal + /contact
 * form. Sits beneath the submit button, muted so it doesn't compete. */
.recaptcha-attribution {
  font-size: 0.6875rem;
  line-height: 1.5;
  color: rgba(102, 102, 102, 0.9);
  margin-top: var(--space-sm);
}
.recaptcha-attribution a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(123, 112, 251, 0.4);
  text-underline-offset: 2px;
}
.recaptcha-attribution a:hover {
  color: var(--purple);
}
/* Dark-themed variant for the /contact standalone form. */
.contact-page-form .recaptcha-attribution {
  color: rgba(245, 244, 244, 0.45);
}
