:root {
  --bg: #040711;
  --bg2: #0b1535;
  --panel: rgba(17, 28, 62, 0.55);
  --panel-strong: rgba(18, 34, 73, 0.8);
  --text: #eef3ff;
  --muted: #a5b4db;
  --line: rgba(168, 188, 255, 0.22);
  --primary: #2cf7e2;
  --accent: #ff2bd6;
  --good-shadow: 0 22px 52px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at 10% 12%, rgba(44, 247, 226, 0.08), transparent 28%),
              radial-gradient(circle at 90% 20%, rgba(255, 43, 214, 0.08), transparent 36%),
              linear-gradient(135deg, var(--bg) 10%, var(--bg2) 50%, var(--bg) 100%);
  overflow-x: hidden;
  cursor: none;
}

body.blog-open {
  overflow: hidden;
}

h1, h2, h3 {
  margin-top: 0;
  font-family: "Sora", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(1140px, calc(100% - 2.6rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 7, 17, 0.72);
  backdrop-filter: blur(12px);
}

section[id] {
  scroll-margin-top: 84px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(44, 247, 226, 0.14), rgba(255, 43, 214, 0.10));
  border: 1px solid rgba(44, 247, 226, 0.28);
  border-radius: 12px;
  padding: 0.22rem 0.42rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22), inset 0 0 18px rgba(44, 247, 226, 0.08);
  backdrop-filter: blur(10px);
}

.brand img {
  width: auto;
  height: 38px;
  max-width: 160px;
  object-fit: contain;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.05rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color .25s ease, transform .25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  transform: translateY(-2px);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 130;
  background: transparent;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.1s linear;
}

.scroll-cue {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  animation: scrollCue 1.8s ease infinite;
}

@keyframes scrollCue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(14px); opacity: 0; }
}

.page-hero {
  position: relative;
  min-height: 74vh;
  display: grid;
  align-items: center;
  padding: 5rem 0 3rem;
  overflow: clip;
}

.page-hero.compact {
  min-height: 54vh;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.hero-video-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(4, 7, 17, 0.88), rgba(4, 7, 17, 0.55), rgba(4, 7, 17, 0.88));
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.04);
}

.eyebrow {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(44, 247, 226, 0.45);
  background: rgba(44, 247, 226, 0.08);
  color: var(--primary);
  font-size: 0.84rem;
  padding: 0.37rem 0.82rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  max-width: 14ch;
  margin: 1rem 0;
}

.hero-sub {
  color: #d7e2ff;
  max-width: 65ch;
  font-size: 1.05rem;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy::before {
  content: "";
  position: absolute;
  left: -1.2rem;
  top: -0.8rem;
  width: min(56vw, 380px);
  height: min(56vw, 380px);
  z-index: -1;
  background: radial-gradient(circle, rgba(44, 247, 226, 0.14), rgba(255, 43, 214, 0.06) 42%, transparent 68%);
  filter: blur(6px);
  pointer-events: none;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: 0.78rem;
  box-shadow: 0 0 24px rgba(44, 247, 226, 0.12);
}

.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

#home h1 {
  max-width: 16ch;
  margin: 0.85rem 0 0.95rem;
  font-size: clamp(2.2rem, 5.4vw, 4.5rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

#home .hero-sub {
  max-width: 54ch;
  margin: 0 0 0.3rem;
  color: #cdd9fb;
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.65;
}

.hero-proof-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
  max-width: 620px;
  margin-top: 1.1rem;
}

.hero-proof-row span {
  position: relative;
  border: 1px solid rgba(168, 188, 255, 0.22);
  border-radius: 12px;
  padding: 0.8rem 0.85rem 0.75rem;
  background: rgba(4, 7, 17, 0.42);
  color: var(--muted);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.hero-proof-row span::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.7;
}

.hero-proof-row strong {
  display: block;
  color: var(--primary);
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.32rem;
  line-height: 1;
  margin-bottom: 0.22rem;
}

#home .btn-row {
  margin-top: 1.2rem;
}

#home .btn {
  padding: 0.95rem 1.7rem;
  font-size: 1.02rem;
  font-weight: 700;
}

#home .btn-primary {
  box-shadow: 0 14px 34px rgba(44, 247, 226, 0.32);
}

.hero-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
}

.model-card {
  background: rgba(15, 26, 59, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: var(--good-shadow);
}

model-viewer {
  width: 100%;
  height: 420px;
  border-radius: 16px;
  background: radial-gradient(circle at 45% 30%, #1b306f, #0b1535 70%);
}

.hero-canvas-wrap {
  position: relative;
  overflow: hidden;
}

canvas.hero-canvas {
  display: block;
  width: 100%;
  height: 420px;
  border-radius: 16px;
  background: radial-gradient(circle at 45% 30%, #1b306f, #0b1535 70%);
  cursor: grab;
  touch-action: none;
}

canvas.hero-canvas.is-dragging,
canvas.hero-canvas:active {
  cursor: grabbing;
}

.hero-canvas-wrap.compact canvas.hero-canvas {
  height: 280px;
}

.hero-canvas-hint {
  position: absolute;
  right: 1.1rem;
  bottom: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(4, 7, 17, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  pointer-events: none;
}

.section {
  padding: 4.7rem 0;
}

.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.section-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 1.6rem;
  margin-bottom: 2.6rem;
}

.section-head > div:first-child .hero-sub {
  max-width: 60ch;
}

.section-head .hero-canvas-wrap canvas.hero-canvas {
  height: 200px;
}

.cinema-break {
  position: relative;
  min-height: 62vh;
  display: grid;
  place-items: center;
  overflow: clip;
  margin: 5rem 0;
}

.cinema-video-wrap {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.cinema-video-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 7, 17, 0.75), rgba(4, 7, 17, 0.45), rgba(4, 7, 17, 0.85));
}

.cinema-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) contrast(1.05);
}

.cinema-content {
  text-align: center;
}

.cinema-content .eyebrow {
  margin-bottom: 1rem;
}

.cinema-content h2 {
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  max-width: 22ch;
  margin: 0 auto;
  line-height: 1.15;
}

.stagger .reveal:nth-child(1) { transition-delay: 0s; }
.stagger .reveal:nth-child(2) { transition-delay: 0.08s; }
.stagger .reveal:nth-child(3) { transition-delay: 0.16s; }
.stagger .reveal:nth-child(4) { transition-delay: 0.24s; }
.stagger .reveal:nth-child(5) { transition-delay: 0.32s; }
.stagger .reveal:nth-child(6) { transition-delay: 0.4s; }

p {
  line-height: 1.72;
  color: var(--muted);
}

.card-grid,
.project-grid,
.contact-grid,
.team-grid,
.stack-grid,
.dual-grid {
  display: grid;
  gap: 1rem;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-grid,
.dual-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-grid,
.stack-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.card,
.contact-item,
.feature,
.industry-chip,
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  backdrop-filter: blur(8px);
  transition: transform .27s ease, border-color .27s ease, box-shadow .27s ease;
}

.panel:hover,
.card:hover,
.contact-item:hover,
.feature:hover,
.kpi:hover {
  transform: translateY(-6px);
  border-color: rgba(44, 247, 226, 0.6);
  box-shadow: var(--good-shadow);
}

.tag {
  margin-bottom: 0.55rem;
  color: var(--accent);
  font-size: 0.84rem;
  letter-spacing: 0.03em;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.btn {
  --magnetic-x: 0px;
  --magnetic-y: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.75rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transform: translate3d(var(--magnetic-x), var(--magnetic-y), 0);
  transition: transform .45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .25s ease, border-color .25s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.42), transparent 72%);
  transform: translateX(-130%);
  transition: transform .7s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translateX(130%);
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), #89fff2);
  color: #041116;
  box-shadow: 0 10px 28px rgba(44, 247, 226, 0.28);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.24);
}

.btn:hover {
  box-shadow: 0 16px 36px rgba(44, 247, 226, 0.24);
}

.inline-video {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--good-shadow);
}

.tech-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.tech-chip {
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 999px;
  padding: 0.58rem 0.95rem;
  background: rgba(255, 255, 255, 0.05);
}

.industry-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.industry-chip {
  padding: 0.6rem 0.85rem;
}

.footer {
  text-align: center;
  padding: 1rem 1rem 2rem;
  color: #8491ba;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: #02040f;
  transition: opacity .55s ease, visibility .55s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  width: min(420px, calc(100% - 3rem));
  text-align: center;
}

.loader-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(44, 247, 226, 0.14), rgba(255, 43, 214, 0.10));
  border: 1px solid rgba(44, 247, 226, 0.28);
  border-radius: 14px;
  padding: 0.7rem 1.1rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22), inset 0 0 18px rgba(44, 247, 226, 0.08);
  backdrop-filter: blur(10px);
}

.loader-logo {
  width: 160px;
}

.loader-bar {
  width: 100%;
  height: 6px;
  margin-top: 1rem;
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
  overflow: hidden;
}

.loader-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.goo-defs {
  position: absolute;
  width: 0;
  height: 0;
}

.liquid-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 400;
  filter: url(#liquid-goo);
  mix-blend-mode: screen;
}

.liquid-blob {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary), var(--accent));
  opacity: 0.9;
  transition: width .25s ease, height .25s ease, margin .25s ease;
}

.liquid-blob[data-blob="0"] { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.liquid-blob[data-blob="1"] { width: 20px; height: 20px; }
.liquid-blob[data-blob="2"] { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.liquid-blob[data-blob="3"] { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
.liquid-blob[data-blob="4"] { width: 8px; height: 8px; margin: -4px 0 0 -4px; }

.liquid-cursor.active .liquid-blob {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  background: radial-gradient(circle, var(--accent), var(--primary));
}

.cursor-core {
  position: fixed;
  top: 0;
  left: 0;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
  z-index: 401;
}

.bg-orb {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(44px);
  z-index: -2;
  opacity: 0.34;
}

.orb-1 {
  top: 14%;
  left: -7%;
  background: var(--primary);
}

.orb-2 {
  top: 45%;
  right: -9%;
  background: var(--accent);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 70%);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

main section[id] {
  scroll-margin-top: 84px;
}

/* ---- Chaptered snap-scroll layout ---- */
html {
  scroll-snap-type: y proximity;
}

html.blog-page-root {
  scroll-snap-type: none;
}

.blog-index-page {
  cursor: auto;
}

.blog-index-page .bg-grid {
  opacity: 0.75;
}

.blog-index-main {
  position: relative;
  z-index: 1;
}

.blog-index-hero {
  min-height: 58vh;
  display: grid;
  align-content: center;
  padding: 6rem 0 3rem;
}

.blog-index-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1.02;
  max-width: 13ch;
  margin: 1rem 0;
}

.blog-index-hero code,
.blog-section-head code {
  color: var(--primary);
}

.blog-index-section {
  padding: 4rem 0;
}

.blog-section-head {
  margin-bottom: 1.6rem;
}

.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.blog-card {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  min-height: 260px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  backdrop-filter: blur(8px);
  transition: transform .27s ease, border-color .27s ease, box-shadow .27s ease;
}

.blog-card:hover,
.blog-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(44, 247, 226, 0.6);
  box-shadow: var(--good-shadow);
  outline: none;
}

.blog-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.blog-card p {
  margin: 0;
}

.blog-card-meta {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.blog-card-action {
  align-self: end;
  color: var(--primary);
  font-weight: 700;
}

.blog-article-list {
  display: grid;
  gap: 1.4rem;
}

.blog-page-article {
  background: rgba(15, 26, 59, 0.72);
  border: 1px solid rgba(168, 188, 255, 0.24);
  border-radius: 20px;
  padding: clamp(1.2rem, 4vw, 2rem);
  scroll-margin-top: 96px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.blog-page-article h2 {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.14;
  margin: 0.75rem 0 0.55rem;
}

.blog-page-article .blog-summary {
  color: var(--primary);
  font-weight: 700;
}

.blog-index-page .footer {
  padding-top: 3rem;
}

.blog-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.2rem;
}

.blog-breadcrumb {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
}

.blog-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.blog-single {
  max-width: 760px;
  margin: 1.4rem auto 0;
}

.blog-cover {
  width: 100%;
  border-radius: 16px;
  margin: 1.2rem 0;
  object-fit: cover;
  max-height: 420px;
}

.blog-inline-figure {
  margin: 1.6rem 0;
}

.blog-inline-figure img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.blog-inline-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: rgba(230, 236, 255, 0.65);
  text-align: center;
}

.blog-single-nav {
  max-width: 760px;
  margin: 3.2rem auto 0;
}

.blog-related {
  max-width: 760px;
  margin: 2.4rem auto 0;
  padding: 0 1rem;
}

.blog-related h2 {
  font-size: 1.3rem;
  margin-bottom: 0.9rem;
}

.blog-related-list {
  list-style: none;
  display: grid;
  gap: 0.7rem;
  padding: 0;
  margin: 0;
}

.blog-related-list a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, border-color .2s ease;
}

.blog-related-list a:hover,
.blog-related-list a:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(44, 247, 226, 0.6);
}

.chapter {
  position: relative;
  min-height: 142vh;
  display: block;
  padding: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: clip;
}

.magnetic {
  --magnetic-x: 0px;
  --magnetic-y: 0px;
  transform: translate3d(var(--magnetic-x), var(--magnetic-y), 0);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.magnetic:hover {
  transition-duration: 0.12s;
}

.brand.magnetic {
  transform: translate3d(var(--magnetic-x), var(--magnetic-y), 0);
}

/* ---- Word-mask heading reveal ---- */
.chapter h1,
.chapter h2 {
  display: block;
}

.word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
}

.word {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.chapter.reveal.visible .word {
  transform: none;
}

/* ---- Continuous scroll-linked zoom + fade per chapter ---- */
.chapter-stage {
  width: 100%;
  min-height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  padding: 5.5rem 0 2.5rem;
  transform-origin: center center;
  will-change: transform, opacity, filter;
}

/* ---- Floating decorative boxes ---- */
.floating-box {
  position: absolute;
  z-index: 3;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  backdrop-filter: blur(8px);
  box-shadow: var(--good-shadow);
  animation: floatY 6.5s ease-in-out infinite;
  pointer-events: none;
}

.floating-box.pos-tr {
  top: 10%;
  right: 5%;
  animation-delay: 0.3s;
}

.floating-box.pos-bl {
  bottom: 9%;
  left: 5%;
  animation-duration: 7.6s;
  animation-delay: 0.9s;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

/* ---- Moving marquee text band ---- */
.marquee-strip {
  position: absolute;
  left: 0;
  bottom: 3%;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  z-index: 2;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  pointer-events: none;
}

.marquee-track {
  display: inline-flex;
  gap: 2.6rem;
  animation: marqueeScroll 24s linear infinite;
}

.marquee-track span {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.1rem, 2.6vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(238, 243, 255, 0.14);
  white-space: nowrap;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 860px) {
  .floating-box {
    display: none;
  }

  .marquee-strip {
    bottom: 1.5%;
  }

  .marquee-track span {
    font-size: 1.1rem;
  }
}

@media (max-height: 760px) {
  .chapter-stage {
    padding: 4.5rem 0 1.8rem;
  }

  #home h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    margin: 0.6rem 0 0.7rem;
  }

  #home .hero-sub {
    font-size: 0.96rem;
    line-height: 1.5;
  }

  .hero-proof-row {
    display: none;
  }

  #home .btn-row {
    margin-top: 0.9rem;
  }
}

.chapter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: clamp(1.5rem, 4vw, 3.4rem);
  align-items: center;
}

/* ---- Spacious centered single-column layout (no 3D/model aside) ---- */
.chapter-single {
  display: flex;
  justify-content: center;
}

.chapter-centered {
  width: 100%;
  max-width: 920px;
  text-align: center;
}

.chapter-centered .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.chapter-centered .founders-grid {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.chapter-centered .pill-row.center-pills,
.chapter-centered .contact-grid-compact.center-contact {
  justify-content: center;
}

.chapter-centered .contact-grid-compact.center-contact {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.chapter-footer {
  scroll-snap-align: end;
}

@media (max-width: 860px) {
  html {
    scroll-snap-type: none;
  }
  .chapter {
    min-height: auto;
    padding: 6rem 0 3rem;
  }

  .chapter-stage {
    position: relative;
    min-height: auto;
    display: block;
    padding: 0;
  }
}

/* ---- Morphing background: crossfaded video layers ---- */
.chapter-video-bg {
  position: fixed;
  inset: 0;
  z-index: -6;
  overflow: hidden;
}

.chapter-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(1.05) contrast(1.05) brightness(0.5);
  transition: opacity 1.2s ease;
}

.chapter-video.active {
  opacity: 1;
}

/* ---- Morphing background: crossfaded color wash layers ---- */
.chapter-wash {
  position: fixed;
  inset: 0;
  z-index: -5;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

.chapter-wash.active {
  opacity: 1;
}

.chapter-video-bg::after,
.chapter-wash::before {
  content: "";
}

main::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  background: linear-gradient(180deg, rgba(4, 7, 17, 0.4), rgba(4, 7, 17, 0.75) 60%, rgba(4, 7, 17, 0.92));
  pointer-events: none;
}

/* ---- Chapter counter ---- */
.chapter-counter {
  position: fixed;
  right: 1.4rem;
  bottom: 1.3rem;
  z-index: 150;
  font-family: "Sora", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--text);
  background: rgba(4, 7, 17, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  backdrop-filter: blur(8px);
}

#chapterIndex {
  color: var(--primary);
  font-weight: 700;
}

.chapter-counter-sep {
  margin: 0 0.3rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .chapter-counter {
    right: 0.9rem;
    bottom: 0.9rem;
    font-size: 0.74rem;
  }
}

/* ---- Pill rows (condensed chapter content) ---- */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  font-size: 0.86rem;
  transition: border-color .25s ease, background .25s ease, color .25s ease, transform .25s ease;
}

.pill:hover,
.pill:focus-visible {
  color: #041116;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  outline: none;
}

.contact-grid-compact{
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 1rem;
    margin-top: 1.4rem;
}

@media (max-width: 700px) {
  .contact-grid-compact {
    grid-template-columns: 1fr;
  }
}

.section-sub {
  max-width: 65ch;
  margin-bottom: 2.2rem;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 150;
  background: transparent;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .08s linear;
}

.scroll-cue {
  --magnetic-x: 0px;
  --magnetic-y: 0px;
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  width: 38px;
  height: 58px;
  border: 1px solid rgba(238, 243, 255, 0.38);
  border-radius: 999px;
  display: grid;
  place-items: center;
  transform: translateX(-50%) translate3d(var(--magnetic-x), var(--magnetic-y), 0);
  background: rgba(4, 7, 17, 0.28);
  box-shadow: 0 0 0 0 rgba(44, 247, 226, 0.22), inset 0 0 18px rgba(44, 247, 226, 0.1);
  backdrop-filter: blur(8px);
  animation: scrollCueShell 2.7s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.scroll-cue::before,
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(44, 247, 226, 0.86);
  border-bottom: 2px solid rgba(44, 247, 226, 0.86);
  transform: translateX(-50%) rotate(45deg);
  animation: scrollCueChevron 1.9s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.scroll-cue::before {
  top: 16px;
}

.scroll-cue::after {
  top: 25px;
  animation-delay: 0.18s;
  opacity: 0.68;
}

.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 12px;
  margin-left: -2px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), rgba(44, 247, 226, 0));
  animation: scrollCueDot 1.9s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

/* ---- JSON blog reader ---- */
.blog-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
}

.blog-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.blog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 15, 0.76);
  backdrop-filter: blur(16px);
}

.blog-panel {
  position: relative;
  width: min(820px, 100%);
  max-height: min(82vh, 780px);
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(15, 26, 59, 0.96), rgba(6, 12, 30, 0.98));
  border: 1px solid rgba(168, 188, 255, 0.32);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
  padding: clamp(1.2rem, 4vw, 2.2rem);
  transform: translateY(16px) scale(0.98);
  transition: transform .28s ease;
}

.blog-modal.open .blog-panel {
  transform: none;
}

.blog-close {
  position: sticky;
  top: 0;
  float: right;
  margin: 0 0 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(4, 7, 17, 0.78);
  padding: 0.48rem 0.82rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  z-index: 1;
}

.blog-close:hover,
.blog-close:focus-visible {
  color: #041116;
  background: var(--primary);
  outline: none;
}

.blog-panel h2 {
  clear: both;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.12;
  margin: 0.75rem 0 0.55rem;
}

.blog-meta {
  margin: 0 0 1.3rem;
  color: #c7d3f4;
  font-size: 0.92rem;
}

.blog-body {
  border-top: 1px solid rgba(168, 188, 255, 0.18);
  padding-top: 1.2rem;
}

.blog-body p {
  color: #d7e2ff;
  font-size: 1.02rem;
  margin: 0 0 1rem;
}

.blog-body .blog-summary {
  color: var(--primary);
  font-size: 1.12rem;
  font-weight: 600;
}

@keyframes scrollCueShell {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(44, 247, 226, 0.22), inset 0 0 18px rgba(44, 247, 226, 0.1);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(44, 247, 226, 0), inset 0 0 24px rgba(44, 247, 226, 0.18);
  }
}

@keyframes scrollCueDot {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  78% { transform: translateY(28px); opacity: 0; }
  100% { transform: translateY(28px); opacity: 0; }
}

@keyframes scrollCueChevron {
  0% { transform: translate(-50%, -4px) rotate(45deg); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translate(-50%, 12px) rotate(45deg); opacity: 0; }
}

.stagger-grid > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible .stagger-grid > * {
  opacity: 1;
  transform: none;
}

.reveal.visible .stagger-grid > *:nth-child(1) { transition-delay: 0.02s; }
.reveal.visible .stagger-grid > *:nth-child(2) { transition-delay: 0.1s; }
.reveal.visible .stagger-grid > *:nth-child(3) { transition-delay: 0.18s; }
.reveal.visible .stagger-grid > *:nth-child(4) { transition-delay: 0.26s; }
.reveal.visible .stagger-grid > *:nth-child(5) { transition-delay: 0.34s; }
.reveal.visible .stagger-grid > *:nth-child(6) { transition-delay: 0.42s; }

@media (max-width: 1080px) {
  .blog-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-grid,
  .stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .section-head .hero-canvas-wrap {
    max-width: 320px;
  }
}

@media (max-width: 860px) {
  .blog-index-hero {
    min-height: auto;
    padding-top: 4rem;
  }

  .blog-card-grid {
    grid-template-columns: 1fr;
  }

  body {
    cursor: auto;
  }

  .liquid-cursor,
  .cursor-core {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 1.2rem;
    width: min(340px, calc(100% - 2.4rem));
    background: rgba(4, 7, 17, 0.97);
    border: 1px solid var(--line);
    border-radius: 14px;
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: max-height .35s ease, opacity .25s ease, transform .25s ease;
  }

  .nav-links.open {
    max-height: 440px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav-links a {
    display: block;
    padding: 0.64rem 0.6rem;
    border-radius: 10px;
  }

  .card-grid,
  .project-grid,
  .contact-grid,
  .team-grid,
  .stack-grid,
  .dual-grid,
  .chapter-grid {
    grid-template-columns: 1fr;
  }

  model-viewer {
    height: 320px;
  }

  canvas.hero-canvas {
    height: 260px;
  }

  .hero-canvas-wrap.compact canvas.hero-canvas {
    height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Mobile decluttering (final, forced) ---- */
/* Placed at end of file with !important because this stylesheet has several
   duplicate/legacy rules earlier on; this guarantees these mobile fixes always win. */
@media (max-width: 860px) {
  .scroll-cue {
    display: none !important;
  }

  .marquee-strip {
    display: none !important;
  }

  .hero-proof-row {
    display: none !important;
  }

  .chapter {
    padding: 5.5rem 0 2.5rem !important;
  }

  .chapter-grid {
    gap: 1.6rem !important;
  }

  .eyebrow {
    font-size: 0.76rem !important;
    padding: 0.3rem 0.7rem !important;
  }

  #home h1 {
    font-size: clamp(2rem, 8vw, 2.7rem) !important;
    max-width: none !important;
    margin: 0.7rem 0 0.8rem !important;
  }

  .chapter h2 {
    font-size: clamp(1.5rem, 6vw, 2.1rem) !important;
  }

  #home .hero-sub,
  .section-sub {
    font-size: 0.94rem !important;
    line-height: 1.55 !important;
    max-width: none !important;
  }

  .pill-row {
    gap: 0.45rem !important;
    margin-top: 1rem !important;
  }

  .pill {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.78rem !important;
  }

  #home .btn-row {
    margin-top: 1rem !important;
  }

  #home .btn,
  .btn {
    padding: 0.7rem 1.2rem !important;
    font-size: 0.92rem !important;
  }
}
/* ===========================
   Founders Section
=========================== */

.founders-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:30px;
    margin:45px 0 40px;
}

.founder-card{
    padding:32px;
    border-radius:24px;
    background:rgba(15,22,40,.55);
    backdrop-filter:blur(18px);
    border:1px solid rgba(255,255,255,.08);
    transition:.35s;
    text-align:center;
    position:relative;
    overflow:hidden;
}

.founder-card:hover{
    transform:translateY(-8px);
    border-color:#59f0e8;
    box-shadow:0 20px 50px rgba(0,255,255,.15);
}

.founder-avatar{
    width:110px;
    height:110px;
    margin:auto auto 20px;
    border-radius:50%;
    overflow:hidden;
    border:3px solid rgba(89,240,232,.35);
}

.founder-avatar img{
    width:100%;
    height:100%;
    object-fit:contain;
    transition:0.3s ease;
    background:transparent;
}

.founder-card h3{
    margin-bottom:8px;
    font-size:1.45rem;
}

.founder-role{
    display:block;
    color:#6EF2E7;
    font-weight:600;
    margin-bottom:16px;
}

.founder-card p{
    opacity:.82;
    line-height:1.7;
    font-size:.96rem;
}

@media(max-width:900px){
    .founders-grid{
        grid-template-columns:1fr;
    }
}
/* Contact Cards */
.contact-item{
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;          /* Allows content to shrink */
}

.contact-item h3{
    margin-bottom: 10px;
}

.contact-item p{
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}