/* ============ Elarix Labs — brand system ============ */
:root {
  --carbon: #1F2A36;
  --carbon-deep: #17202a;
  --argon: #F4F6F8;
  --pure: #FFFFFF;
  --spectra: #03C7DC;
  --graphite: #545454;
  --tungsten: #7A8086;
  --cesium: #A6C8D9;
  --display: 'Exo 2', sans-serif;
  --body: 'Montserrat', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --hair: rgba(31, 42, 54, 0.12);
  --hair-dark: rgba(255, 255, 255, 0.12);
  --nav-h: 76px;
  --ease-out: cubic-bezier(0.21, 0.47, 0.32, 0.98);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.4, 1);
}
::selection { background: rgba(3,199,220,.35); color: #fff; }
.light ::selection { color: var(--carbon); }
:focus-visible { outline: 2px solid var(--spectra); outline-offset: 3px; border-radius: 4px; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--carbon);
  color: var(--pure);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--spectra); }
.mono { font-family: var(--mono); }
.accent { color: var(--spectra); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }
.center { text-align: center; }

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-weight: 200; font-size: clamp(2.15rem, 7vw, 5.4rem); line-height: 1.08; }
h2 { font-weight: 300; font-size: clamp(1.8rem, 4.4vw, 3.3rem); line-height: 1.12; margin-bottom: 28px; }
h3 { font-weight: 500; font-size: clamp(1.35rem, 2.4vw, 1.9rem); margin-bottom: 16px; }

.kicker {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--spectra);
  margin-bottom: 26px;
}
.lead { font-size: clamp(1.02rem, 1.6vw, 1.3rem); line-height: 1.6; max-width: 760px; }
.light .lead { color: var(--graphite); }
.dark .lead { color: var(--cesium); }

/* quiet gradient accent text — one slow pass, barely-there */
.shimmer {
  background: linear-gradient(100deg, var(--spectra) 30%, #5adfee 50%, var(--spectra) 70%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--spectra);
  animation: shimmer 9s ease-in-out infinite;
}
@keyframes shimmer { to { background-position: -260% 0; } }

/* ============ progress bar + cursor glow ============ */
.progress-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; background: transparent; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--spectra); box-shadow: 0 0 12px rgba(3,199,220,.7); }

.glow-orb { display: none; }

/* ============ nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 40px;
  height: var(--nav-h); padding: 0 40px;
  transition: background .35s ease, box-shadow .35s ease, backdrop-filter .35s ease;
}
.nav.scrolled { background: rgba(23, 32, 42, 0.85); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--hair-dark); }
.nav-logo { flex: none; display: flex; }
.nav-links { display: flex; gap: 32px; margin-left: auto; }
.nav-links a {
  font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cesium); transition: color .18s var(--ease-out); position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px;
  background: var(--spectra); transition: right .25s var(--ease-out);
}
.nav-links a:hover { color: var(--pure); }
.nav-links a:hover::after { right: 0; }

.nav-burger {
  display: none; flex-direction: column; justify-content: center; gap: 6px;
  width: 46px; height: 46px; padding: 10px; margin-left: auto;
  background: none; border: 1px solid var(--hair-dark); border-radius: 10px; cursor: pointer;
}
.nav-burger span { display: block; height: 2px; background: var(--pure); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
body.menu-open .nav-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90; background: rgba(23,32,42,.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .28s var(--ease-out);
}
body.menu-open .mobile-menu { opacity: 1; pointer-events: auto; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 30px; text-align: center; }
.mobile-menu nav a {
  font-family: var(--display); font-weight: 300; font-size: 1.9rem; color: var(--pure);
  opacity: 0; transform: translateY(18px); transition: opacity .4s ease, transform .4s ease;
}
body.menu-open .mobile-menu nav a { opacity: 1; transform: translateY(0); }
body.menu-open .mobile-menu nav a:nth-child(1) { transition-delay: .05s; }
body.menu-open .mobile-menu nav a:nth-child(2) { transition-delay: .12s; }
body.menu-open .mobile-menu nav a:nth-child(3) { transition-delay: .19s; }
body.menu-open .mobile-menu nav a:nth-child(4) { transition-delay: .26s; }
body.menu-open .mobile-menu nav a:nth-child(5) { transition-delay: .33s; }
.mobile-menu .btn-cta { font-size: 1rem; margin-top: 12px; }
body.menu-open { overflow: hidden; }

.btn {
  display: inline-block; font-family: var(--mono); font-size: 0.85rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .16s var(--ease-out), box-shadow .16s var(--ease-out), background .16s var(--ease-out), color .16s var(--ease-out), border-color .16s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn-lg { padding: 17px 36px; font-size: 0.95rem; }
.btn-cta { background: var(--spectra); color: var(--carbon-deep); font-weight: 500; }
.btn-cta:hover { box-shadow: 0 6px 24px rgba(3,199,220,.35); background: #22d3e6; }
.btn-ghost { border-color: var(--hair-dark); color: var(--pure); }
.btn-ghost:hover { border-color: rgba(3,199,220,.6); color: var(--spectra); }

/* ============ hero ============ */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden; padding: calc(var(--nav-h) + 40px) 0 80px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(31,42,54,.96) 30%, rgba(31,42,54,.55) 70%, rgba(31,42,54,.8)),
              linear-gradient(rgba(31,42,54,.3), rgba(31,42,54,.92) 92%);
}
#latticeCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero-inner { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; padding: 0 32px; width: 100%; }
.hero-sub { margin: 36px 0 44px; font-size: clamp(1.02rem, 1.7vw, 1.35rem); color: var(--cesium); max-width: 700px; }
.hero-sub strong { color: var(--pure); font-weight: 500; }
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 2;
  color: var(--tungsten); font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase;
}
.cue-line { width: 1px; height: 44px; background: linear-gradient(var(--spectra), transparent); animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: scaleY(.4); opacity:.4; } 50% { transform: scaleY(1); opacity:1; } }

/* ============ sections ============ */
.section { padding: 130px 0; position: relative; overflow: hidden; }
.section.light { background: var(--argon); color: var(--carbon); }
.section.light h2, .section.light h3 { color: var(--carbon); }
.section.dark { background: var(--carbon); }

/* whole-section rise — quiet, fast, ease-out */
.slide-section { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.slide-section.in { opacity: 1; transform: none; }

/* rotating molecule decorations */
.mol-decor { position: absolute; z-index: 1; opacity: .1; animation: molspin 60s linear infinite; pointer-events: none; }
.mol-a { width: 300px; right: -70px; top: 40px; }
.mol-b { width: 380px; left: -110px; bottom: -60px; animation-duration: 80s; animation-direction: reverse; }
@keyframes molspin { to { transform: rotate(360deg); } }

/* ============ scattered cards ============ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.scatter { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; padding: 20px 0; }
.scatter-card {
  background: var(--pure); border: 1px solid var(--hair); border-radius: 10px;
  padding: 20px 24px; transform: rotate(var(--rot));
  box-shadow: 0 10px 34px rgba(31,42,54,.09);
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out);
  will-change: transform;
}
.scatter-card:hover { transform: rotate(0deg) scale(1.015); box-shadow: 0 14px 36px rgba(31,42,54,.13); }
.scatter-card .label { display: block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tungsten); }
.scatter-card .num { display: block; font-size: 1.6rem; color: var(--carbon); margin-top: 8px; }
.scatter-card .num-word { display: block; font-family: var(--display); font-weight: 500; font-size: 1.2rem; color: var(--carbon); margin-top: 8px; }

/* ============ stats ============ */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 10px 48px; border-left: 1px solid var(--hair-dark); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num { font-size: clamp(3rem, 7vw, 6.4rem); line-height: 1; color: var(--pure); letter-spacing: -0.02em; }
.stat-num .pct { font-size: 0.55em; }
.stat-label { font-family: var(--display); font-weight: 500; font-size: 1.3rem; color: var(--spectra); margin: 14px 0 10px; }
.stat p { color: var(--cesium); font-size: 1rem; }

/* ============ gap statement ============ */
.gap-section { padding: 160px 0; }
.gap-statement {
  font-weight: 200; font-size: clamp(1.9rem, 5.4vw, 4.2rem); line-height: 1.24;
  max-width: 1100px; margin: 0;
}
.gap-statement .w { color: rgba(255,255,255,0.14); transition: color .45s ease, text-shadow .45s ease; }
.gap-statement .w.lit { color: var(--pure); }
.gap-statement .w.lit.key { color: var(--spectra); text-shadow: 0 0 34px rgba(3,199,220,.5); }

/* ============ intro ============ */
.intro-section { padding-top: 60px; }
.intro-mark { margin: 0 auto 34px; }
.intro-section .lead { margin: 0 auto; }

/* ============ layers ============ */
.layers-section h2 { margin-bottom: 80px; }
.layer-row { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 70px; align-items: center; margin-bottom: 120px; }
.layer-row:last-child { margin-bottom: 0; }
.layer-row.flip .layer-copy { order: 2; }
.layer-row.flip .browser { order: 1; }
.step { font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--spectra); margin-bottom: 18px; }
.layer-copy p { color: var(--graphite); font-size: 1.05rem; max-width: 480px; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.pill {
  font-family: var(--mono); font-size: 0.78rem; color: var(--carbon);
  border: 1px solid var(--hair); background: var(--pure); border-radius: 999px; padding: 8px 16px;
}

.browser {
  border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; background: var(--pure);
  box-shadow: 0 1px 2px rgba(31,42,54,.06), 0 24px 64px -32px rgba(31,42,54,.35);
  will-change: transform;
}
.tilt { transition: box-shadow .3s var(--ease-out); }
.tilt:hover { box-shadow: 0 1px 2px rgba(31,42,54,.06), 0 28px 70px -30px rgba(31,42,54,.45); }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 13px 18px; border-bottom: 1px solid var(--hair); background: #fbfcfd; }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #e2e6ea; }
.browser-bar .mono { font-size: 0.78rem; color: var(--tungsten); margin-left: 10px; letter-spacing: 0.05em; }

/* ============ image interlude ============ */
.interlude {
  position: relative; overflow: hidden; padding: 170px 0;
  display: flex; flex-direction: column; justify-content: center; text-align: center;
}
.interlude-bg { position: absolute; inset: 0; }
.interlude-bg img { width: 100%; height: 100%; object-fit: cover; }
.interlude-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(23,32,42,.88), rgba(23,32,42,.72) 50%, rgba(23,32,42,.9));
}
.interlude .kicker { margin-bottom: 40px; }
.interlude .result-figures { justify-content: center; }
.interlude-line { font-family: var(--display); font-weight: 300; font-size: clamp(1.15rem, 2.2vw, 1.7rem); color: var(--cesium); margin-top: 44px; }
.interlude-line .accent { color: var(--spectra); }

/* ============ result figures ============ */
.result-figures { display: flex; align-items: center; gap: 34px; }
.result-figures .was { font-size: clamp(3.6rem, 10vw, 9rem); color: var(--tungsten); text-decoration: line-through; text-decoration-thickness: 5px; line-height: 1; }
.result-figures .arrow { font-family: var(--display); font-weight: 200; font-size: clamp(2rem, 5vw, 4.4rem); color: var(--tungsten); }
.result-figures .now { font-size: clamp(3.6rem, 10vw, 9rem); color: var(--spectra); line-height: 1; text-shadow: 0 0 44px rgba(3,199,220,.22); }
.result-copy { flex: 1; min-width: 300px; padding-left: 50px; border-left: 1px solid var(--hair-dark); }
.result-copy h2 { margin-bottom: 18px; }

/* ============ roadmap ============ */
.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 70px; position: relative; }
.roadmap::before {
  content: ''; position: absolute; top: 15px; left: 6px; right: 18%; height: 2px;
  background: linear-gradient(90deg, var(--spectra), rgba(3,199,220,.12));
}
.phase { position: relative; padding: 0 44px 0 30px; }
.phase::before {
  content: ''; position: absolute; left: 0; top: 8px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--spectra); box-shadow: 0 0 16px rgba(3,199,220,.6);
}
.phase:nth-child(2)::before { background: rgba(3,199,220,.55); }
.phase:nth-child(3)::before { background: rgba(3,199,220,.3); box-shadow: none; border: 1px solid var(--spectra); }
.phase-tag {
  display: inline-block; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cesium); border: 1px solid var(--hair-dark); border-radius: 999px;
  padding: 6px 16px; margin-bottom: 20px;
}
.phase-tag.now { color: var(--carbon-deep); background: var(--spectra); border-color: var(--spectra); font-weight: 500; }
.phase h3 { color: var(--pure); }
.phase p { color: var(--cesium); font-size: 1rem; max-width: 340px; }

/* ============ team ============ */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 44px; margin-top: 64px; }
.member img {
  width: 128px; height: 128px; border-radius: 50%; object-fit: cover; margin-bottom: 22px;
  filter: grayscale(18%); transition: filter .25s var(--ease-out), transform .25s var(--ease-spring);
}
.member:hover img { filter: grayscale(0%); transform: translateY(-3px); }
.member h4 { font-family: var(--display); font-weight: 600; font-size: 1.12rem; color: var(--carbon); line-height: 1.25; margin-bottom: 6px; }
.member span { font-size: 0.92rem; color: var(--tungsten); }

/* ============ contact ============ */
.contact-section { position: relative; overflow: hidden; padding: 170px 0; background: var(--carbon); }
.contact-bg { position: absolute; inset: 0; }
.contact-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.contact-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(23,32,42,.95) 35%, rgba(23,32,42,.6));
}
.contact-section .wrap > img { margin-bottom: 30px; }
.contact-points { display: flex; flex-direction: column; gap: 30px; margin: 44px 0 52px; }
.point { display: flex; gap: 20px; align-items: flex-start; }
.point .dot {
  width: 11px; height: 11px; border-radius: 50%; background: var(--spectra);
  margin-top: 9px; flex: none; box-shadow: 0 0 18px rgba(3,199,220,.65);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:.45; } 50% { opacity:1; } }
.point-label { font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 6px; }
.point p { font-family: var(--display); font-weight: 400; font-size: 1.35rem; color: var(--pure); line-height: 1.35; }

/* ============ footer ============ */
.footer { background: var(--carbon-deep); padding: 34px 0; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .mono { font-size: 0.78rem; color: var(--tungsten); letter-spacing: 0.08em; }
.footer-links { display: flex; gap: 26px; }
.footer-links a { color: var(--tungsten); transition: color .18s var(--ease-out); }
.footer-links a:hover { color: var(--spectra); }

/* ============ scroll animations — small travel, blur-out, ease-out ============ */
.reveal { opacity: 0; transform: translateY(16px); filter: blur(5px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), filter .6s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal[data-anim="left"]  { transform: translateX(-20px); }
.reveal[data-anim="right"] { transform: translateX(20px); }
.reveal[data-anim="zoom"]  { transform: scale(.96); }
.reveal[data-anim="blur"]  { transform: translateY(14px); filter: blur(9px); }
.reveal.visible { opacity: 1; transform: none; filter: none; }

.reveal-load { opacity: 0; transform: translateY(14px); filter: blur(5px); animation: rise .8s var(--ease-out) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: translateY(0); filter: blur(0); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-load, .slide-section { opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important; transition: none !important; }
  .cue-line, .point .dot, .mol-decor, .shimmer { animation: none; }
  [data-parallax], .tilt { transform: none !important; }
  .glow-orb { display: none; }
}

/* ============ responsive ============ */
@media (max-width: 1000px) {
  .split { grid-template-columns: 1fr; gap: 50px; }
  .layer-row, .layer-row.flip { grid-template-columns: 1fr; gap: 34px; margin-bottom: 90px; }
  .layer-row.flip .layer-copy { order: 1; }
  .layer-row.flip .browser { order: 2; }
  .stats { grid-template-columns: 1fr; gap: 44px; }
  .stat { border-left: 0; padding: 0; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .result-copy { padding-left: 0; border-left: 0; }
  .roadmap { grid-template-columns: 1fr; gap: 44px; }
  .roadmap::before { top: 6px; bottom: 6px; left: 6px; right: auto; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--spectra), rgba(3,199,220,.12)); }
  .mol-a { width: 220px; right: -80px; }
  .mol-b { width: 260px; left: -100px; }
}
@media (max-width: 700px) {
  .nav { padding: 0 18px; gap: 14px; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav.scrolled, body.menu-open .nav { background: rgba(23, 32, 42, 0.92); backdrop-filter: blur(14px); }
  .section { padding: 84px 0; }
  .gap-section { padding: 110px 0; }
  .wrap { padding: 0 22px; }
  .hero { padding-top: calc(var(--nav-h) + 24px); }
  .kicker { font-size: 0.68rem; letter-spacing: 0.16em; }
  .hero-inner { padding: 0 22px; }
  .hero-sub { margin: 28px 0 34px; }
  .hero-actions .btn-lg { padding: 15px 26px; font-size: 0.85rem; }
  .team { grid-template-columns: 1fr 1fr; gap: 28px; }
  .member img { width: 96px; height: 96px; }
  .scatter { grid-template-columns: 1fr; gap: 18px; }
  .scatter-card { transform: rotate(0); }
  .result-row { gap: 34px; }
  .result-figures { gap: 18px; }
  .layers-section h2 { margin-bottom: 48px; }
  .layer-row, .layer-row.flip { margin-bottom: 70px; }
  .contact-section, .interlude { padding: 110px 0; }
  .interlude .result-figures { gap: 16px; }
  #latticeCanvas { opacity: .4; }
  .hero-bg img { opacity: .3; }
  h1 { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .point p { font-size: 1.1rem; }
  .scroll-cue { display: none; }
  .glow-orb { display: none; }
}
@media (max-width: 420px) {
  .team { grid-template-columns: 1fr; }
  h1 br, .gap-statement br { display: none; }
}
