/* ─────────────────────────────────────────────────────────────
   SpanMind — marketing site styles
   Brand: #1a6fbf blue · #0f172a navy · DM Serif Display + Inter
   ───────────────────────────────────────────────────────────── */

:root {
  --navy: #070b16;
  --navy-2: #0f172a;
  --navy-3: #16213b;
  --blue: #1a6fbf;
  --blue-bright: #3b9eff;
  --ink: #0d1b2a;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --border: #e3e9f1;
  --text: #0d1b2a;
  --text-2: #5a6a7a;
  --text-on-dark: #e8eef7;
  --text-on-dark-2: #98a8bf;
  --success: #1a8754;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 14px;
  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}

em {
  font-style: italic;
  color: var(--blue);
}

p {
  margin: 0;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.96rem;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s var(--ease),
    border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn--sm {
  padding: 9px 16px;
  font-size: 0.88rem;
}
.btn--primary {
  background: linear-gradient(135deg, var(--blue-bright), var(--blue));
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(26, 111, 191, 0.7);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -10px rgba(59, 158, 255, 0.8);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-on-dark);
}
.btn--ghost:hover {
  border-color: var(--blue-bright);
  color: #fff;
}
.section .btn--ghost {
  color: var(--ink);
  border-color: var(--border);
  background: #fff;
}
.section .btn--ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition:
    background 0.3s var(--ease),
    border-color 0.3s,
    backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 11, 22, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(59, 158, 255, 0.12);
  border: 1px solid rgba(59, 158, 255, 0.25);
}
.brand__name {
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  color: #fff;
}
.nav__links {
  display: flex;
  gap: 30px;
  font-size: 0.92rem;
  color: var(--text-on-dark-2);
}
.nav__links a {
  transition: color 0.2s;
}
.nav__links a:hover {
  color: #fff;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background:
    radial-gradient(
      1200px 600px at 70% -10%,
      rgba(26, 111, 191, 0.35),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 10% 10%,
      rgba(59, 158, 255, 0.16),
      transparent 55%
    ),
    var(--navy);
  color: var(--text-on-dark);
  padding: 150px 0 60px;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  width: 700px;
  height: 700px;
  top: -260px;
  right: -160px;
  background: radial-gradient(
    circle,
    rgba(59, 158, 255, 0.22),
    transparent 60%
  );
  filter: blur(20px);
  pointer-events: none;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(900px 500px at 50% 0%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(
    900px 500px at 50% 0%,
    #000,
    transparent 75%
  );
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-on-dark);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 7px 14px;
  border-radius: 999px;
}
.pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 0 4px rgba(59, 158, 255, 0.25);
}
.hero__title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  color: #fff;
  margin: 22px 0 18px;
}
.hero__sub {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--text-on-dark-2);
  max-width: 540px;
}
.hero__sub strong {
  color: var(--text-on-dark);
  font-weight: 600;
}
.hero__actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero__actions--center {
  justify-content: center;
}
.hero__stats {
  display: flex;
  gap: 40px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.hero__stats div {
  display: flex;
  flex-direction: column;
}
.hero__stats b {
  font-family: "DM Serif Display", serif;
  font-size: 2rem;
  color: #fff;
  line-height: 1;
}
.hero__stats span {
  font-size: 0.82rem;
  color: var(--text-on-dark-2);
  margin-top: 4px;
}

/* constellation */
.constellation {
  position: relative;
  height: 360px;
}
.constellation__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.constellation__lines path {
  stroke-dasharray: 6 8;
  animation: dash 18s linear infinite;
}
@keyframes dash {
  to {
    stroke-dashoffset: -200;
  }
}
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-on-dark);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 9px 14px;
  border-radius: 11px;
  backdrop-filter: blur(6px);
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.node--core {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  left: 50%;
  top: 50%;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue));
  border: none;
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 14px 40px -10px rgba(59, 158, 255, 0.7);
  animation: none;
}
.node--1 {
  left: 17%;
  top: 17%;
}
.node--2 {
  left: 83%;
  top: 17%;
  animation-delay: 0.6s;
}
.node--3 {
  left: 9%;
  top: 56%;
  animation-delay: 1.2s;
}
.node--4 {
  left: 90%;
  top: 56%;
  animation-delay: 1.8s;
}
.node--5 {
  left: 50%;
  top: 92%;
  animation-delay: 2.4s;
}
@keyframes float {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, calc(-50% - 9px));
  }
}

/* marquee / connects strip */
.marquee {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}
.marquee__label {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-on-dark-2);
}
.marquee__items {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  font-weight: 600;
  color: var(--text-on-dark);
}
.marquee__items .dim {
  font-weight: 400;
  font-size: 0.84rem;
  color: var(--text-on-dark-2);
}

/* ── Generic section ─────────────────────────────────────────── */
.section {
  padding: 96px 0;
}
.section__head {
  max-width: 660px;
  margin: 0 auto 52px;
  text-align: center;
}
.eyebrow {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}
.section__head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 14px 0 16px;
}
.section__head p {
  color: var(--text-2);
  font-size: 1.06rem;
}

/* ── Problem ─────────────────────────────────────────────────── */
.problem {
  background: var(--surface);
}
.problem__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  position: relative;
}
.pcard {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.pcard__sys {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pcard p {
  margin-top: 12px;
  font-size: 1.05rem;
  font-weight: 500;
}
.pcard--alert {
  background: linear-gradient(135deg, #0f2744, var(--navy-2));
  border: none;
  color: #fff;
}
.pcard--alert .pcard__sys {
  color: var(--blue-bright);
}

/* ── How / steps ─────────────────────────────────────────────── */
.how {
  background: var(--bg);
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.step::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-bright), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(13, 27, 42, 0.45);
}
.step:hover::before {
  opacity: 1;
}
.step__n {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
  color: var(--blue);
  font-weight: 500;
}
.step h3 {
  font-size: 1.45rem;
  margin: 12px 0 8px;
}
.step p {
  color: var(--text-2);
  font-size: 0.96rem;
}

/* ── Demo ────────────────────────────────────────────────────── */
.demo {
  background: var(--navy);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}
.demo .section__head h2 {
  color: #fff;
}
.demo .section__head p {
  color: var(--text-on-dark-2);
}
.browser {
  max-width: 980px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: var(--navy-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--navy-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.browser__bar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a4a63;
}
.browser__url {
  margin-left: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--text-on-dark-2);
}
.browser__video {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Features grid ───────────────────────────────────────────── */
.features {
  background: var(--surface);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    border-color 0.3s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(26, 111, 191, 0.4);
  box-shadow: 0 24px 50px -28px rgba(26, 111, 191, 0.55);
}
.card__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: rgba(26, 111, 191, 0.1);
  margin-bottom: 18px;
}
.card__icon svg {
  width: 24px;
  height: 24px;
}
.card h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.card p {
  color: var(--text-2);
  font-size: 0.96rem;
}

/* ── Migration band ──────────────────────────────────────────── */
.migrate {
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
  color: var(--text-on-dark);
}
.migrate__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}
.migrate__copy h2 {
  color: #fff;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  margin: 14px 0 16px;
}
.migrate__copy p {
  color: var(--text-on-dark-2);
  font-size: 1.05rem;
}
.ticks {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}
.ticks li {
  position: relative;
  padding-left: 30px;
  color: var(--text-on-dark);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(59, 158, 255, 0.18);
  border: 1px solid var(--blue-bright);
}
.ticks li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  width: 5px;
  height: 9px;
  border: solid var(--blue-bright);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.migrate__targets {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 30px;
}
.migrate__from {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-on-dark-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.migrate__arrow {
  color: var(--blue-bright);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips span {
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* ── CTA ─────────────────────────────────────────────────────── */
.cta {
  background: var(--bg);
  text-align: center;
}
.cta__inner {
  max-width: 640px;
  margin: 0 auto;
  background:
    radial-gradient(
      600px 300px at 50% -40%,
      rgba(59, 158, 255, 0.25),
      transparent
    ),
    linear-gradient(135deg, var(--navy-2), var(--navy));
  color: #fff;
  border-radius: 26px;
  padding: 64px 40px;
  box-shadow: 0 40px 80px -40px rgba(13, 27, 42, 0.6);
}
.cta__inner h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
}
.cta__inner p {
  color: var(--text-on-dark-2);
  margin: 14px auto 0;
  max-width: 440px;
  font-size: 1.05rem;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: var(--text-on-dark-2);
  padding: 40px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer .brand__name {
  font-size: 1.05rem;
}
.footer__tag {
  font-size: 0.9rem;
}
.footer__copy {
  margin-left: auto;
  font-size: 0.85rem;
}

/* ── Reveal animation ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  .node,
  .constellation__lines path {
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero__inner,
  .migrate__inner {
    grid-template-columns: 1fr;
  }
  .constellation {
    display: none;
  }
  .steps,
  .grid,
  .problem__cards {
    grid-template-columns: 1fr 1fr;
  }
  .nav__links {
    display: none;
  }
}
@media (max-width: 560px) {
  .hero {
    padding-top: 120px;
  }
  .steps,
  .grid,
  .problem__cards {
    grid-template-columns: 1fr;
  }
  .hero__stats {
    gap: 26px;
  }
  .section {
    padding: 68px 0;
  }
  .footer__copy {
    margin-left: 0;
  }
}
