:root {
  --bg: #070b14;
  --bg-elevated: #0d1424;
  --bg-soft: #111a2e;
  --text: #e8eefc;
  --muted: #9aabcc;
  --line: rgba(148, 163, 184, 0.16);
  --blue: #38bdf8;
  --indigo: #818cf8;
  --cyan: #22d3ee;
  --orange: #fb923c;
  --radius: 20px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-y: scroll;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(56, 189, 248, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(129, 140, 248, 0.18), transparent 50%),
    var(--bg);
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.page-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.orb {
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  z-index: 0;
  animation: float 14s ease-in-out infinite;
}

.orb-1 {
  width: 320px;
  height: 320px;
  background: #0ea5e9;
  top: 12%;
  left: -80px;
}

.orb-2 {
  width: 280px;
  height: 280px;
  background: #6366f1;
  top: 40%;
  right: -60px;
  animation-delay: -4s;
}

.orb-3 {
  width: 240px;
  height: 240px;
  background: #22d3ee;
  bottom: 10%;
  left: 35%;
  animation-delay: -8s;
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(20px, -30px, 0);
  }
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.logo-mark {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
}

.logo-text span {
  font-weight: 500;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav a:not(.btn) {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:not(.btn):hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  gap: 5px;
  flex-direction: column;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn-sm {
  min-height: 40px;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
}

.btn-solid {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.28);
}

.btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(99, 102, 241, 0.35);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.08);
  transform: translateY(-2px);
}

.hero {
  padding: 5.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.30fr 0.85fr;
  gap: 1.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(34, 211, 238, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0);
  }
}

.hero h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.03em;
  /*max-width: 12ch;*/
}

.gradient-text {
  display: inline-block;
  background: linear-gradient(120deg, #38bdf8 0%, #a5b4fc 45%, #22d3ee 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

.lede {
  margin: 1.4rem 0 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.hero-visual {
  min-height: 380px;
  display: grid;
  place-items: center;
}

.chip-scene {
  width: min(100%, 380px);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
}

.chip {
  width: 72%;
  aspect-ratio: 1;
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(56, 189, 248, 0.18), rgba(99, 102, 241, 0.12)),
    var(--bg-elevated);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow);
  position: relative;
  display: grid;
  place-items: center;
  animation: chipFloat 7s ease-in-out infinite;
}

@keyframes chipFloat {
  0%,
  100% {
    transform: translateY(0) rotateX(8deg) rotateY(-8deg);
  }
  50% {
    transform: translateY(-14px) rotateX(12deg) rotateY(8deg);
  }
}

.chip-core {
  width: 34%;
  aspect-ratio: 1;
  border-radius: 16px;
  background: linear-gradient(145deg, #38bdf8, #6366f1);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.45);
}

.chip-ring {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.25);
  animation: spin 12s linear infinite;
}

.ring-2 {
  inset: 22%;
  border-color: rgba(129, 140, 248, 0.28);
  animation-duration: 18s;
  animation-direction: reverse;
}

.ring-3 {
  inset: 32%;
  border-color: rgba(34, 211, 238, 0.2);
  animation-duration: 24s;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.trace {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.8), transparent);
  height: 1px;
  width: 40%;
  animation: dash 3s ease-in-out infinite;
}

.t1 {
  top: 18%;
  left: -8%;
}
.t2 {
  bottom: 22%;
  right: -10%;
  animation-delay: 0.6s;
}
.t3 {
  left: 20%;
  top: -6%;
  width: 1px;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(129, 140, 248, 0.8), transparent);
  animation-delay: 1.1s;
}
.t4 {
  right: 24%;
  bottom: -8%;
  width: 1px;
  height: 26%;
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.8), transparent);
  animation-delay: 1.6s;
}

@keyframes dash {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

.chip-label {
  position: absolute;
  bottom: 1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.chip-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0;
  transition: opacity 1s ease;
}

.chip-canvas.is-active {
  opacity: 1;
}

.chip-fallback {
  position: relative;
  z-index: 1;
}

#chipScene.has-3d .chip-fallback {
  display: none;
}

.stats {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(13, 20, 36, 0.7);
  backdrop-filter: blur(10px);
}

.stat {
  padding: 1.6rem 1.4rem;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding-bottom: 5rem;
}

.section-label {
  margin: 0 0 0.85rem;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-label.light {
  color: #a5b4fc;
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-head h2,
.eng-card h2,
.partnership-panel h2,
.contact-copy h2 {
  margin: 0;
  /* font-size: clamp(1.8rem, 3.4vw, 2.6rem); */
  letter-spacing: -0.03em;
  line-height: 1.15;

}

.section-sub,
.eng-card p,
.partnership-panel p,
.contact-copy p,
.about-copy p,
.tech-card p {
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  align-items: start;
}

.about-copy {
/*   max-width: 70ch; */
  font-size: 1.1rem;
}

.about-copy p + p {
  margin-top: 1.2rem;
}

.about-copy strong {
  color: var(--text);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  perspective: 1400px;
}

.tech-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  padding: 1.4rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateZ(0);
  transform-style: preserve-3d;
  transition: transform 0.5s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
}

.tech-card.is-tilting {
  transition: transform 0.1s ease-out, border-color 0.35s ease, box-shadow 0.35s ease;
}

.tech-card:hover,
.tech-card.is-tilting {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.tech-card > *:not(.card-glow) {
  position: relative;
  transform: translateZ(28px);
}

.tech-code {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--orange);
  letter-spacing: 0.12em;
}

.tech-card h3 {
  margin: 1rem 0 0.75rem;
  font-size: 1.15rem;
  line-height: 1.25;
}

.tech-card p {
  margin: 0;
  font-size: 0.92rem;
}

.card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--glow-x, 50%) var(--glow-y, 65%),
    rgba(56, 189, 248, 0.22),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tech-card:hover .card-glow {
  opacity: 1;
}

.edge-pill {
  display: inline-flex;
  margin-top: 1.1rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(251, 146, 60, 0.55);
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 600;
}

.eng-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.eng-card {
  padding: 2.2rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(13, 20, 36, 0.8);
}

.eng-card-dark {
  background:
    linear-gradient(160deg, rgba(14, 165, 233, 0.18), rgba(99, 102, 241, 0.22)),
    #0b1220;
}

.eng-card .btn {
  margin-top: 1.5rem;
}

.check-list {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  color: #d7e3ff;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
}

.partnership-panel,
.contact-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
  padding: 2.4rem;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(13, 20, 36, 0.75);
}

.timeline {
  display: grid;
  gap: 0.9rem;
}

.timeline-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  font-weight: 600;
}

.timeline-step span {
  font-family: var(--mono);
  color: var(--cyan);
}

.contact {
  padding-bottom: 4rem;
}

.contact-panel {
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.28)),
    #0a1222;
}

.contact-cards {
  display: grid;
  gap: 0.85rem;
}

.contact-card {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 11, 20, 0.35);
  transition: transform 0.25s ease, background 0.25s ease;
}

.contact-card:hover {
  transform: translateX(6px);
  background: rgba(7, 11, 20, 0.55);
}

.contact-card span {
  color: #b7c5e6;
  font-size: 0.82rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner a:hover {
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.cursor-glow {
  pointer-events: none;
  position: fixed;
  width: 240px;
  height: 240px;
  margin: -120px 0 0 -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14), transparent 65%);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
}

body.has-pointer .cursor-glow {
  opacity: 1;
}

@media (max-width: 1100px) {
  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tech-card:nth-child(4),
  .tech-card:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .eng-grid,
  .partnership-panel,
  .contact-panel,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(1),
  .stat:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .tech-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-toggle {
    display: grid;
  }

  .nav {
    position: absolute;
    top: calc(var(--header-h) + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 1rem 1.25rem 1.25rem;
    background: rgba(7, 11, 20, 0.96);
    border-bottom: 1px solid var(--line);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.75rem 0.4rem;
  }

  .nav .btn {
    justify-content: center;
    margin-top: 0.4rem;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1180px, calc(100% - 1.5rem));
  }

  .hero {
    padding-top: 3.5rem;
  }

  .stats,
  .tech-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .footer-inner {
    flex-direction: column;
  }

  .cursor-glow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
