/* ============ Vyastra Semiconductors — design system ============ */
:root {
  --bg: #12141c;
  --bg-2: #171b29;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-hi: rgba(29, 211, 238, 0.45);
  --text: #e7ebf4;
  --muted: #97a2ba;
  --cyan: #1dd3ee;
  --violet: #765cf6;
  --pink: #cf72b6;
  --grad: linear-gradient(92deg, var(--cyan), var(--violet) 55%, var(--pink));
  --radius: 18px;
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(118, 92, 246, 0.45); color: #fff; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.container { width: min(1160px, 92%); margin-inline: auto; }

/* ---------- utilities ---------- */
.grad-text {
  background: linear-gradient(92deg, var(--cyan), var(--violet), var(--pink), var(--violet), var(--cyan));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: flow 6s ease-in-out infinite alternate;
}
@keyframes flow { to { background-position: 100% 0; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--cyan);
  display: inline-block;
}

.section { padding: 6.5rem 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 3.2rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-top: 0.9rem; }
.section-head p { color: var(--muted); margin-top: 0.9rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  min-height: 44px;
}
.btn svg { width: 17px; height: 17px; }

.btn-primary {
  background: linear-gradient(92deg, var(--cyan), var(--violet), var(--pink), var(--violet), var(--cyan));
  background-size: 300% 100%;
  color: #060913;
  box-shadow: 0 0 24px rgba(29, 211, 238, 0.35);
  animation: flow 5s ease-in-out infinite alternate;
}
.btn-primary:hover { box-shadow: 0 0 42px rgba(118, 92, 246, 0.55); transform: translateY(-2px); }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--border-hi); background: var(--surface-2); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- background FX ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.bg-fx::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}
/* ponytail: all background blobs are static — any motion behind backdrop-filter
   glass re-samples the blur per frame and reads as flashing/shimmer */
.orb {
  position: absolute;
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
  filter: blur(80px);
  opacity: 0.75;
}
.orb-1 { width: 560px; height: 560px; background: rgba(29, 211, 238, 0.3); top: -180px; left: -120px; }
.orb-2 { width: 520px; height: 520px; background: rgba(118, 92, 246, 0.32); top: -80px; right: -140px; }
.orb-3 { width: 460px; height: 460px; background: rgba(207, 114, 182, 0.18); top: 45%; left: 55%; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(21, 24, 37, 0.55);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  border-bottom-color: var(--border);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 10px 40px rgba(0, 0, 0, 0.35);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #060913;
  box-shadow: 0 0 18px rgba(29, 211, 238, 0.4);
}
.logo-mark svg { width: 19px; height: 19px; }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s ease;
  padding: 0.5rem 0;
  position: relative;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; border-radius: 2px;
  background: var(--grad);
}
.nav-cta { display: flex; align-items: center; gap: 1rem; }
.nav .btn { padding: 0.6rem 1.3rem; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 44px; height: 44px;
  cursor: pointer;
  color: var(--text);
  place-items: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 9rem 0 5rem;
  position: relative;
}
.hero-video { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-video video { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; filter: contrast(1.2) saturate(1.15); }
.hero-video::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18, 20, 28, 0.45), rgba(18, 20, 28, 0.18) 55%, var(--bg));
}
.hero-content { max-width: 800px; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.6rem; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  backdrop-filter: blur(8px);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  font-weight: 700;
}
.hero-sub {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  max-width: 620px;
  margin-top: 1.5rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 4.5rem;
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 20px 50px rgba(0, 0, 0, 0.4);
}
.stat {
  background: rgba(27, 31, 49, 0.35);
  padding: 1.5rem 1.7rem;
}
.stat b {
  font-family: var(--font-head);
  font-size: 1.7rem;
  display: block;
}
.stat span { color: var(--muted); font-size: 0.85rem; }

/* ---------- marquee ---------- */
.marquee {
  border-block: 1px solid var(--border);
  padding: 1.1rem 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px) saturate(1.4);
  -webkit-backdrop-filter: blur(8px) saturate(1.4);
}
.marquee-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: scroll 80s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3.5rem;
}
.marquee-track span::after { content: "◆"; color: var(--violet); font-size: 0.6rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
  position: relative;
  isolation: isolate;
}
/* ponytail: blobs behind backdrop-filter stay static — motion under glass
   makes the blur re-sample every frame and looks like flashing */
.bento::before, .bento::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
  filter: blur(50px);
}
.bento::before {
  width: 460px; height: 460px;
  top: -8%; left: -6%;
  background: radial-gradient(circle, rgba(29, 211, 238, 0.35), transparent 70%);
}
.bento::after {
  width: 520px; height: 520px;
  bottom: -12%; right: -8%;
  background: radial-gradient(circle, rgba(118, 92, 246, 0.38), transparent 70%);
}
.card {
  grid-column: span 2;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03) 55%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.9rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px) saturate(1.5);
  -webkit-backdrop-filter: blur(10px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.card:hover { border-color: var(--border-hi); }
.card-wide { grid-column: span 3; }
.card-full { grid-column: span 6; }

.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(29, 211, 238, 0.14), rgba(118, 92, 246, 0.14));
  border: 1px solid var(--border);
  color: var(--cyan);
  margin-bottom: 1.2rem;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.18rem; margin-bottom: 0.55rem; }
.card p { color: var(--muted); font-size: 0.94rem; }
.card-img {
  margin: -1.9rem -1.9rem 1.4rem;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  width: calc(100% + 3.8rem);
  max-width: none;
  border-bottom: 1px solid var(--border);
  filter: saturate(1.1);
}
.card .tag {
  position: absolute;
  top: 1.4rem; right: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--violet);
  border: 1px solid rgba(118, 92, 246, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

/* ---------- split section ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.split h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-top: 0.9rem; }
.split p { color: var(--muted); margin-top: 1.1rem; }

.check-list { list-style: none; margin-top: 1.6rem; display: grid; gap: 0.85rem; }
.check-list li { display: flex; gap: 0.8rem; align-items: flex-start; color: var(--muted); }
.check-list svg { width: 20px; height: 20px; color: var(--cyan); flex-shrink: 0; margin-top: 3px; }
.check-list b { color: var(--text); font-weight: 600; }

.visual-panel {
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(29, 211, 238, 0.07), rgba(118, 92, 246, 0.1) 60%, rgba(18, 20, 28, 0.4));
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.visual-panel img { border-radius: 12px; border: 1px solid var(--border); }

.code-window {
  background: rgba(17, 19, 25, 0.9);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  overflow: hidden;
}
.code-window header {
  display: flex; gap: 6px;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
.code-window header i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: block; }
.code-window header i:first-child { background: #f87171; }
.code-window header i:nth-child(2) { background: #fbbf24; }
.code-window header i:nth-child(3) { background: #34d399; }
.code-window pre { padding: 1.2rem; color: var(--muted); line-height: 1.9; overflow-x: auto; }
.code-window .k { color: var(--violet); }
.code-window .s { color: var(--cyan); }
.code-window .c { color: #526180; }

/* ---------- timeline / steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  counter-reset: step;
  position: relative;
  isolation: isolate;
}
.steps::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 480px; height: 380px;
  top: -30%; left: 30%;
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
  background: radial-gradient(circle, rgba(118, 92, 246, 0.3), rgba(29, 211, 238, 0.16), transparent 72%);
  filter: blur(46px);
}
.step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02) 60%);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 1.8rem;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
  display: block;
  margin-bottom: 0.8rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step p { color: var(--muted); font-size: 0.9rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--border);
  background:
    radial-gradient(600px circle at 15% 0%, rgba(29, 211, 238, 0.2), transparent 55%),
    radial-gradient(600px circle at 85% 100%, rgba(118, 92, 246, 0.22), transparent 55%),
    var(--bg-2);
  text-align: center;
  padding: 5rem 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.cta-banner::before, .cta-banner::after {
  content: "";
  position: absolute;
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
  filter: blur(40px);
  pointer-events: none;
}
.cta-banner::before {
  width: 380px; height: 380px;
  left: -120px; bottom: -160px;
  background: radial-gradient(circle, rgba(29, 211, 238, 0.35), transparent 70%);
}
.cta-banner::after {
  width: 420px; height: 420px;
  right: -140px; top: -180px;
  background: radial-gradient(circle, rgba(207, 114, 182, 0.28), transparent 70%);
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 720px; margin-inline: auto; }
.cta-banner p { color: var(--muted); max-width: 540px; margin: 1.2rem auto 2.2rem; }

/* ---------- hero visual ---------- */
.hero-visual {
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(29, 211, 238, 0.12);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(29, 211, 238, 0.1), transparent 40%, rgba(18, 20, 28, 0.3));
  pointer-events: none;
}

/* ---------- page hero (subpages) ---------- */
.page-hero { padding: 11rem 0 4rem; }
.page-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  isolation: isolate;
}
.page-hero-grid::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 440px; height: 440px;
  right: -8%; top: -20%;
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
  background: radial-gradient(circle, rgba(118, 92, 246, 0.35), rgba(29, 211, 238, 0.18), transparent 72%);
  filter: blur(48px);
}
.page-hero-grid .hero-visual { aspect-ratio: 4 / 3; }
@media (max-width: 900px) {
  .page-hero-grid { grid-template-columns: 1fr; }
}
.page-hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); margin-top: 1rem; max-width: 760px; }
.page-hero p { color: var(--muted); max-width: 600px; margin-top: 1.3rem; font-size: 1.1rem; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border);
  background: rgba(17, 19, 25, 0.6);
  padding: 4.5rem 0 2rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.6fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}
.footer-grid h4 { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.1rem; }
.footer-grid ul { list-style: none; display: grid; gap: 0.65rem; }
.footer-grid a { color: var(--muted); font-size: 0.95rem; transition: color 0.2s ease; }
.footer-grid a:hover { color: var(--cyan); }
.footer-about p { color: var(--muted); font-size: 0.92rem; margin-top: 1rem; max-width: 320px; }

.newsletter { display: flex; gap: 0.6rem; margin-top: 1rem; }
.newsletter input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  min-height: 44px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.newsletter input::placeholder { color: var(--muted); }
.newsletter input:focus { border-color: var(--border-hi); outline: none; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.socials { display: flex; gap: 0.8rem; }
.socials a {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.socials a:hover { color: var(--cyan); border-color: var(--border-hi); }
.socials svg { width: 17px; height: 17px; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .card, .card-wide { grid-column: span 3; }
}

@media (max-width: 640px) {
  .nav-links, .nav .btn-ghost { display: none; }
  .nav-toggle { display: grid; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: #12141c;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    padding: 1.5rem 5%;
    gap: 1.1rem;
  }
  .card, .card-wide, .card-full { grid-column: span 6; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .section { padding: 4.5rem 0; }
}

/* ponytail: animation:none, never near-zero durations — 0.01ms on an infinite
   animation strobes it every frame instead of stopping it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
