/* Neocortex Lab — base styles & tokens */

:root {
  --c-primary: #00619A;
  --c-primary-deep: #2C5F8A;
  --c-primary-tint: #90C4D6;
  --c-ink: #1A1A2E;
  --c-ink-soft: #2A2A40;
  --c-paper: #F7F9FC;
  --c-paper-2: #EEF2F8;
  --c-mute: #6B7280;
  --c-line: rgba(26, 26, 46, 0.10);
  --c-line-strong: rgba(26, 26, 46, 0.22);

  --gutter: 20px;
  --section-y: 64px;

  --t-h1: clamp(32px, 7.6vw, 56px);
  --t-h2: clamp(26px, 5.4vw, 40px);
  --t-h3: clamp(20px, 3.6vw, 26px);
  --t-eyebrow: 12px;
  --t-body: 16px;
  --t-body-lg: 18px;
  --t-cap: 14px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 40px; --section-y: 96px; }
}
@media (min-width: 1100px) {
  :root { --gutter: 64px; --section-y: 120px; }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
body {
  font-family: 'Manrope', 'Onest', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-feature-settings: 'ss01' on, 'cv11' on;
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--c-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; color: var(--c-ink); }
h1 { font-size: var(--t-h1); letter-spacing: -0.025em; }
h2 { font-size: var(--t-h2); letter-spacing: -0.02em; }
h3 { font-size: var(--t-h3); }
p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

img { display: block; max-width: 100%; }

/* Layout */
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section.tight { padding-block: calc(var(--section-y) * 0.7); }
.section-dark { background: var(--c-ink); color: #fff; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-paper { background: var(--c-paper); }

.eyebrow {
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-primary);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.section-dark .eyebrow { color: var(--c-primary-tint); }

.lead {
  font-size: clamp(17px, 2.4vw, 21px);
  line-height: 1.55;
  color: var(--c-ink-soft);
}
.muted { color: var(--c-mute); }
.tiny { font-size: var(--t-cap); }
.mono-num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' on; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: #024F7F; }
.btn-outline { background: transparent; color: var(--c-ink); border-color: var(--c-line-strong); }
.btn-outline:hover { border-color: var(--c-primary); color: var(--c-primary); }
.section-dark .btn-outline { color: #fff; border-color: rgba(255,255,255,0.3); }
.section-dark .btn-outline:hover { color: var(--c-primary-tint); border-color: var(--c-primary-tint); }

.btn-sm { height: 44px; padding: 0 18px; font-size: 14px; }
.btn-lg { height: 62px; padding: 0 28px; font-size: 17px; }

.btn-icon-star { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; }
.btn:hover .star-spin { animation: starSpin 800ms var(--ease); }
@keyframes starSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(180deg); }
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 540ms var(--ease), transform 540ms var(--ease);
  transition-delay: var(--rd, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Star background pulse — used in dark hero */
@keyframes ringPulse {
  0% { opacity: 0; transform: scale(0.4); }
  20% { opacity: 0.55; }
  100% { opacity: 0; transform: scale(2.2); }
}
@keyframes ringPulseFast {
  0% { opacity: 0; transform: scale(0.4); }
  20% { opacity: 0.55; }
  100% { opacity: 0; transform: scale(2.2); }
}

/* Photo treatments */
.photo-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--c-ink);
}
.photo-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-vignette::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}
.photo-tone-dark img { filter: brightness(0.78) contrast(1.05) saturate(0.9); }
.photo-tone-cool img { filter: brightness(0.85) contrast(1.05) saturate(1.1) hue-rotate(-5deg); }
.photo-tone-bw img { filter: grayscale(1) contrast(1.1) brightness(0.92) sepia(0.12); }

/* Resonance rings overlay */
.rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rings svg { width: 65%; height: auto; opacity: 0.32; mix-blend-mode: screen; }

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card-ink {
  background: var(--c-ink-soft);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.86);
}

/* Numeric ticker */
.bignum {
  font-size: clamp(56px, 14vw, 128px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--c-primary);
  font-variant-numeric: tabular-nums;
}

/* Sticky header */
.hdr {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--c-line);
  transition: background 240ms var(--ease), border-color 240ms var(--ease);
}
.hdr-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding-inline: var(--gutter);
  max-width: 1280px;
  margin: 0 auto;
  gap: 16px;
}
.hdr .logo { display: flex; align-items: center; gap: 0; height: 28px; }
.hdr .logo img { height: 22px; width: auto; }
.hdr-nav {
  display: none;
  gap: 28px;
  align-items: center;
  flex: 1;
  justify-content: center;
}
.hdr-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-ink-soft);
  position: relative;
  padding: 6px 0;
  letter-spacing: -0.005em;
  transition: color 200ms var(--ease);
}
.hdr-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--c-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}
.hdr-nav a.active { color: var(--c-primary); }
.hdr-nav a.active::after { transform: scaleX(1); }
.hdr-nav a:hover { color: var(--c-primary); }

.hdr-cta { display: none; }

@media (min-width: 1000px) {
  .hdr-nav { display: flex; }
  .hdr-cta { display: inline-flex; }
}

.hdr-burger {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: transparent;
}
@media (min-width: 1000px) { .hdr-burger { display: none; } }

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 64px 0 0 0;
  background: #fff;
  z-index: 89;
  padding: 24px var(--gutter) 40px;
  transform: translateY(-100%);
  transition: transform 320ms var(--ease);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.drawer.open { transform: translateY(0); }
.drawer a {
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line);
  font-size: 17px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer a .num { color: var(--c-mute); font-size: 12px; font-variant-numeric: tabular-nums; }
.drawer a.active { color: var(--c-primary); }

/* Sticky mobile CTA */
.scta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  gap: 8px;
  background: linear-gradient(to top, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 70%, rgba(255,255,255,0) 100%);
  transform: translateY(120%);
  transition: transform 320ms var(--ease), opacity 240ms var(--ease);
  opacity: 0;
  pointer-events: none;
}
.scta.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.scta .btn { flex: 1; height: 50px; padding: 0 14px; font-size: 14px; }
.scta .btn-icon { flex: 0 0 50px; padding: 0; }
@media (min-width: 1000px) { .scta { display: none; } }

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-mute);
}
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 16px;
  padding: 16px 18px;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  background: #fff;
  color: var(--c-ink);
  outline: none;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--c-primary);
}
.field input::placeholder { color: var(--c-mute); }
.field-error input, .field-error select { border-color: #C03A3A; }
.field .err {
  font-size: 12px;
  color: #C03A3A;
}

.seg {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.seg button {
  flex: 1 0 calc(50% - 3px);
  background: #fff;
  border: 1px solid var(--c-line);
  padding: 14px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-ink-soft);
  transition: all 180ms var(--ease);
}
.seg button.on {
  border-color: var(--c-primary);
  background: rgba(0, 97, 154, 0.06);
  color: var(--c-primary);
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}
.check input { display: none; }
.check .box {
  width: 18px; height: 18px;
  border: 1px solid var(--c-line-strong);
  border-radius: 3px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 180ms var(--ease);
}
.check input:checked + .box {
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.check input:checked + .box::after {
  content: '';
  width: 10px; height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

/* Accordion */
.acc-item {
  border-bottom: 1px solid var(--c-line);
}
.acc-item summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 36px 24px 0;
  font-weight: 600;
  font-size: 17px;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary::after {
  content: '';
  position: absolute;
  right: 4px; top: 30px;
  width: 14px; height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M7 1v12M1 7h12' stroke='%2300619A' stroke-width='1.4' stroke-linecap='round'/></svg>") center/contain no-repeat;
  transition: transform 240ms var(--ease);
}
.acc-item[open] summary::after { transform: rotate(45deg); }
.acc-item .acc-body {
  padding: 0 36px 28px 0;
  color: var(--c-ink-soft);
  font-size: 16px;
  line-height: 1.65;
  max-width: 64ch;
}
.acc-num {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--c-mute);
  font-weight: 500;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  padding-top: 4px;
}

/* Timeline */
.tl-track {
  position: relative;
  padding-top: 60px;
}
.tl-line {
  position: absolute;
  left: 0; right: 0; top: 84px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--c-line-strong) 5%, var(--c-line-strong) 95%, transparent);
}
.tl-items {
  display: grid;
  gap: 28px;
}
@media (min-width: 768px) {
  .tl-items { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

.tl-item {
  position: relative;
  padding-top: 32px;
}
.tl-item::before {
  content: '';
  position: absolute;
  top: 24px; left: 0;
  width: 9px; height: 9px;
  background: var(--c-primary);
  border-radius: 50%;
  z-index: 2;
}
@media (min-width: 768px) {
  .tl-item::before { top: -36px; }
  .tl-item { padding-top: 0; }
}
.tl-date {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--c-primary);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}
.tl-title { font-size: 18px; font-weight: 700; margin-top: 8px; }
.tl-text { font-size: 14px; line-height: 1.55; color: var(--c-mute); margin-top: 10px; }

/* Active scroll spy underline indicator on header bottom */
.hdr-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--c-primary);
  width: 0;
  transition: width 280ms var(--ease);
}

/* Generic grid utilities used inline */
.grid-2 { display: grid; gap: 16px; }
.grid-3 { display: grid; gap: 16px; }
.grid-4 { display: grid; gap: 16px; }
@media (min-width: 600px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 20px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

/* Decorative star */
.star-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0.07;
}
