/* ============ FIFTEEN GROUP — GLOBAL.CSS ============ */

/* Local fonts */
@font-face {
  font-family: 'ZT Nature';
  src: url('../fonts/zt-nature.bold.otf') format('opentype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Junicode';
  src: url('../fonts/junicode.regular.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Neuton';
  src: url('../fonts/neuton.light.ttf') format('truetype');
  font-weight: 100 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Group */
  --group-bg: #0A0A0A;
  --group-surface: #141414;
  --group-accent: #F0F0F0;
  --group-muted: #888;

  /* Nexuss */
  --nexuss-bg: #07070D;
  --nexuss-surface: #0E0E18;
  --nexuss-mid: #12122A;
  --nexuss-accent: #6C63FF;
  --nexuss-accent-2: #9A8CFF;
  --nexuss-glow: rgba(108, 99, 255, 0.18);
  --nexuss-text: #E8E8FF;

  /* Operron */
  --operron-bg: #060B08;
  --operron-surface: #0B1410;
  --operron-mid: #0E1F14;
  --operron-accent: #00C896;
  --operron-accent-2: #3CE5B1;
  --operron-glow: rgba(0, 200, 150, 0.15);
  --operron-text: #E0F5EE;

  /* Shared */
  --white: #F9F9F9;
  --grey-100: #E5E5E5;
  --grey-300: #AAA;
  --grey-400: #888;
  --grey-500: #666;
  --grey-600: #444;
  --grey-700: #2A2A2A;
  --grey-800: #1A1A1A;
  --grey-900: #0F0F0F;
  --hairline: rgba(255,255,255,0.08);
  --hairline-strong: rgba(255,255,255,0.14);

  /* Typography */
  --font-heading: 'ZT Nature', 'Outfit', system-ui, sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-serif: 'Junicode', 'Neuton', Georgia, serif;

  /* Spacing */
  --section-pad: clamp(80px, 10vw, 140px);
  --container: 1400px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 40px;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Brand tokens — UNIFIED light theme (Apple-inspired) */
  --brand-bg: #FAF7F0;
  --brand-surface: #F2EDE1;
  --brand-surface-hover: #E8E1D2;
  --brand-mid: #F2EDE1;
  --brand-accent: #141414;
  --brand-accent-2: #6C63FF;
  --brand-text: #141414;
  --brand-glow: rgba(20,20,20,0.06);
  --hairline: rgba(20,20,20,0.08);
  --hairline-strong: rgba(20,20,20,0.14);
  --grey-100: #2A2A2A;
  --grey-300: #4A4A4A;
  --grey-400: #6B6B6B;
  --grey-500: #8A8A8A;
  --grey-600: #A59E8E;
  --grey-700: #C0B9A6;
  --grey-800: #CFC7B2;
  --grey-900: #D9D1BD;
}

/* Single light theme — body class kept for compat, identical to :root */
body.theme-group,
body.theme-nexuss,
body.theme-operron {
  --brand-bg: #FAF7F0;
  --brand-surface: #F2EDE1;
  --brand-surface-hover: #E8E1D2;
  --brand-mid: #F2EDE1;
  --brand-text: #141414;
  --brand-glow: rgba(20,20,20,0.06);
  --grey-100: #2A2A2A;
  --grey-300: #4A4A4A;
  --grey-400: #6B6B6B;
  --grey-500: #8A8A8A;
  --grey-600: #A59E8E;
  --grey-700: #C0B9A6;
  --grey-800: #CFC7B2;
  --grey-900: #D9D1BD;
  --hairline: rgba(20,20,20,0.08);
  --hairline-strong: rgba(20,20,20,0.14);
}

/* Brand accent — drives logo dot, ping, accent links */
body[data-brand="group"] { --brand-accent: #141414; --brand-accent-2: #6C63FF; }
body[data-brand="nexuss"] { --brand-accent: #6C63FF; --brand-accent-2: #9A8CFF; }
body[data-brand="operron"] { --brand-accent: #00A37A; --brand-accent-2: #3CE5B1; }

/* ===== Light theme — page-wide overrides ===== */

/* Hero text — dark on cream gradient (default). White when hero has video. */
body.theme-group .hero:not(:has(video)):not(:has(img)) .hero__content,
body.theme-group .hero:not(:has(video)):not(:has(img)) .hero__content h1,
body.theme-group .hero:not(:has(video)):not(:has(img)) .hero__content h2,
body.theme-group .hero:not(:has(video)):not(:has(img)) .hero__content span { color: #141414 !important; }
body.theme-group .hero:not(:has(video)):not(:has(img)) .hero__content p { color: rgba(20,20,20,0.72) !important; }
body.theme-group .hero:not(:has(video)):not(:has(img)) .hero__content .serif-accent { color: rgba(20,20,20,0.72) !important; font-style: italic; }
body.theme-group .hero:not(:has(video)):not(:has(img)) .hero__content .eyebrow-line {
  background: rgba(20,20,20,0.06);
  color: rgba(20,20,20,0.78);
  border: 1px solid rgba(20,20,20,0.08);
}
body.theme-group .hero:not(:has(video)):not(:has(img)) .hero__content .eyebrow-line .ping {
  background: var(--brand-accent, #141414);
  box-shadow: 0 0 8px rgba(20,20,20,0.18);
}

/* Hero with video — white text + dark ghost button */
body.theme-group .hero:has(video) .hero__content,
body.theme-group .hero:has(img) .hero__content { color: #F5F3EE; }
body.theme-group .hero:has(video) .btn--ghost,
body.theme-group .hero:has(img) .btn--ghost {
  background: transparent;
  color: #F5F3EE;
  border-color: rgba(245,243,238,0.4);
}
body.theme-group .hero:has(video) .btn--ghost:hover,
body.theme-group .hero:has(img) .btn--ghost:hover {
  background: rgba(245,243,238,0.12);
  border-color: #fff;
  color: #fff;
}
body.theme-group .hero:has(video) .btn--primary,
body.theme-group .hero:has(img) .btn--primary {
  background: #FAF7F0;
  color: #141414;
  border-color: #FAF7F0;
}
body.theme-group .hero:has(video) .btn--primary:hover,
body.theme-group .hero:has(img) .btn--primary:hover {
  background: #fff;
  border-color: #fff;
}

/* Page header — dark text on cream */
body.theme-group .page-header > *:not(script) { color: #141414; }
body.theme-group .page-header p { color: rgba(20,20,20,0.7); }
body.theme-group .page-header .eyebrow-line {
  background: rgba(20,20,20,0.06);
  color: rgba(20,20,20,0.78);
  border: 1px solid rgba(20,20,20,0.08);
}
body.theme-group .page-header .eyebrow-line .ping {
  background: var(--brand-accent, #141414);
  box-shadow: 0 0 8px rgba(20,20,20,0.18);
}

/* Mega-CTA (video bg) — keeps white text over dark video */
body.theme-group .mega-cta__inner,
body.theme-group .mega-cta__inner *,
body.theme-group .mega-cta__kicker,
body.theme-group .mega-cta__sub { color: #F9F9F9; }
body.theme-group .mega-cta__eyebrow .ping { background: #fff; box-shadow: 0 0 10px #fff; }

/* Mega-CTA buttons — light pill on dark video */
body.theme-group .mega-cta__top .btn--primary {
  background: #FAF7F0;
  color: #141414;
  border-color: #FAF7F0;
}
body.theme-group .mega-cta__top .btn--primary:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
}
body.theme-group .mega-cta__top .btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
body.theme-group .mega-cta__top .btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  color: #fff;
}

/* Card hover bgs for beige theme */
body.theme-group .card:hover,
body.theme-group .card--tier:hover,
body.theme-group .sector-card:hover,
body.theme-group .system-card:hover,
body.theme-group .team-member:hover,
body.theme-group .product-rail .product:hover,
body.theme-group .insight-card:hover,
body.theme-group .memory-card:hover,
body.theme-group .pillar:hover,
body.theme-group .step:hover,
body.theme-group .layer:hover {
  background: var(--brand-surface-hover);
}

/* Form fields on beige */
body.theme-group .form input:focus,
body.theme-group .form select:focus,
body.theme-group .form textarea:focus { background: #D9D1BD; box-shadow: 0 0 0 2px #141414; }

/* Logo strip on beige: flatten to black silhouette */
body.theme-group .logo-strip img {
  filter: brightness(0);
  opacity: 0.7;
}
body.theme-group .logo-strip img:hover { opacity: 1; }

/* Tech divider lines darker on beige */
body.theme-group .tech-divider::before,
body.theme-group .tech-divider::after { background: rgba(10,10,10,0.12); }
body.theme-group .tech-divider { color: #6B6B6B; }

/* Chips on beige */
body.theme-group .chip { background: rgba(10,10,10,0.05); color: #4A4A4A; }

/* Signal strip on beige */
body.theme-group .signal-strip { color: #4A4A4A; }
body.theme-group .signal-strip .dot-sep { background: #A59E8E; }

/* Pullquote */
body.theme-group .pullquote { color: #141414; }
body.theme-group .pullquote::before { color: #141414; opacity: 0.18; }

/* Team member photos: keep photo contrast */
body.theme-group .team-member p { color: #6B6B6B; }
body.theme-group .team-member:hover { background: #DCD5C2; }

/* Systems filter */
body.theme-group .systems-filter button { color: #4A4A4A; }
body.theme-group .systems-filter button:hover { color: #000; }
body.theme-group .systems-filter button.is-active { background: #141414; color: #EFEAE0; }

/* Preloader on beige */
body.theme-group .preloader__bar-track { background: rgba(10,10,10,0.1); }
body.theme-group .preloader__count { color: #6B6B6B; }

/* Body text explicit on group */
body.theme-group { color: #141414; }

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; interpolate-size: allow-keywords; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--brand-text);
  background: var(--brand-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  position: relative;
  min-height: 100vh;
}

/* ---- Lenis smooth scroll required CSS ---- */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: clip;
}
.lenis.lenis-smooth iframe {
  pointer-events: none;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; color: inherit; }

/* Noise — black grain on light theme (universal) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n2'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  1 0 0 0 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n2)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 220px 220px;
  mix-blend-mode: multiply;
}

main, footer, section { position: relative; z-index: 1; }

/* ============ TYPOGRAPHY ============ */
.heading-xl {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 1.00;
  letter-spacing: -0.025em;
}
.heading-lg {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.heading-md {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.heading-sm {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 1.25;
}
.body-lg { font-size: 18px; line-height: 1.65; }
.body-md { font-size: 16px; line-height: 1.6; }
.body-sm { font-size: 14px; font-weight: 300; line-height: 1.55; color: var(--grey-300); }
.serif-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 2.4vw, 26px);
  color: var(--grey-100);
  letter-spacing: 0.005em;
}
.label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--brand-accent);
}

.text-muted { color: var(--grey-400); }
.text-accent { color: var(--brand-accent); }
.font-serif { font-family: var(--font-serif); font-style: italic; }

/* ============ LAYOUT ============ */
.section { padding: var(--section-pad) 0; position: relative; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
.container--narrow { max-width: 760px; }
.container--wide { max-width: 1400px; }

.grid { display: grid; gap: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 12px; }
.gap-md { gap: 24px; }
.gap-lg { gap: 40px; }

/* No section separators — spacing does the work */
.section--divided { border-top: none; }
.section--surface { background: var(--brand-surface); }

/* Accessibility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .slide-up {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .marquee__track { animation: none !important; }
  .typewriter .char { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto !important; }
}

/* ==================================================
   Mobile polish — group page + cross-site
   ================================================== */

/* Tablet tuning */
@media (max-width: 960px) {
  .arm-doors { grid-template-columns: 1fr 1fr; padding: 0 16px; gap: 14px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .team-grid, .team-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* Phones */
@media (max-width: 720px) {
  :root { --section-pad: 60px; --container: 100%; }
  .container { padding: 0 16px; }

  .heading-xl { font-size: clamp(36px, 10vw, 64px); letter-spacing: -0.02em; }
  .heading-lg { font-size: clamp(30px, 7vw, 44px); }
  .heading-md { font-size: clamp(22px, 5vw, 32px); }
  .body-lg { font-size: 16px; }

  /* Hero content tighter on phones */
  .hero__content { padding: 10px 8px; }
  .hero__content .eyebrow-line { font-size: 10px; letter-spacing: 1.5px; padding: 6px 12px; }
  .hero__cta .btn { padding: 12px 20px; font-size: 13px; }
  .hero__cta { gap: 10px; }
  .hero__content .serif-accent { font-size: 15px; }

  /* Arm doors stack on narrow */
  .arm-doors { grid-template-columns: 1fr; padding: 0 12px; }
  .arm-door { min-height: 360px; padding: 28px 22px; }
  .arm-door h2 { font-size: clamp(36px, 9vw, 52px); }
  .arm-door p { font-size: 14px; }

  /* KPI */
  .kpi-row .kpi { padding: 30px 20px; }
  .kpi-row .kpi-num { font-size: clamp(32px, 8vw, 48px); }
  .kpi-row .kpi-label { font-size: 10px; letter-spacing: 2px; }
  .kpi-row .kpi-sub { font-size: 12px; }

  /* Media blocks stack */
  .media-block, .media-block.is-reversed { gap: 24px; }
  .media-block__text h2 { margin-bottom: 14px; }

  /* Big feature */
  .big-feature__body { padding: 32px 22px; gap: 14px; }
  .big-feature__media { min-height: 240px; }

  /* Vision */
  .vision { min-height: auto; }
  .vision__manifesto { padding: 40px 24px; gap: 28px; }
  .vision__statement { font-size: clamp(26px, 6.5vw, 36px); }
  .vision__timeline { padding: 24px 20px 32px; gap: 8px; }
  .vision__year { padding: 18px 16px; }

  /* Pillars → 2-col */
  .pillars { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pillar { padding: 22px 18px; }
  .pillar h4 { font-size: 16px; }
  .pillar p { font-size: 13px; }

  /* Team grid 2-col */
  .team-grid, .team-grid--3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .team-member .team-body { padding: 12px 14px; }
  .team-member h4 { font-size: 14px; }
  .team-member p { font-size: 11px; }

  /* Partners strip */
  .logo-strip { gap: 24px; padding: 20px 0; }
  .logo-strip img { max-height: 24px; }

  /* Quotes stack + tighter padding */
  .quote-with-author { padding: 24px; gap: 18px; }
  .quote-with-author img { width: 56px; height: 56px; }
  .quote-with-author blockquote { font-size: 16px; }

  /* Contact section stack & form */
  .two-col { gap: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .form input, .form select, .form textarea { padding: 12px 14px; font-size: 15px; }

  /* Mega CTA on phones */
  .mega-cta__top { min-height: 420px; padding: 64px 18px 96px; }
  .mega-cta__kicker { font-size: clamp(26px, 6.5vw, 38px); }
  .mega-cta__sub { font-size: 14px; }
  .mega-cta__actions .btn { padding: 14px 20px; font-size: 13px; }

  /* Footer stack */
  .footer { padding: 36px 16px 28px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
  .footer__brand { grid-column: span 2; }
}

/* Small phones */
@media (max-width: 420px) {
  .heading-xl { font-size: clamp(32px, 11vw, 48px); }
  .arm-door h2 { font-size: 34px; }
  .team-grid, .team-grid--3 { grid-template-columns: 1fr 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 20px; }
  .footer__brand { grid-column: auto; }
  .logo-strip { flex-wrap: wrap; gap: 18px; }
  .hero__cta { flex-direction: column; width: 100%; }
  .hero__cta .btn { width: 100%; justify-content: center; }
}
