*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0a0a12;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --muted: rgba(245, 245, 247, 0.55);
  --brand: #7c5cff;
  --nav-h: 62px;
  --card-w: 300px;
  --card-gap: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

a {
  color: inherit;
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 18, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
}
.nav-brand {
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.nav-brand span {
  color: var(--brand);
}
.nav-toggle {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar {
  display: none;
}
.nav-link {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.nav-link.is-active {
  color: var(--text);
  background: rgba(124, 92, 255, 0.18);
}

/* ── Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 120px;
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(124, 92, 255, 0.2), transparent 70%),
    radial-gradient(700px 420px at 100% 110%, rgba(59, 157, 255, 0.1), transparent 70%);
}
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
}
.bg-glow-1 {
  width: 460px;
  height: 460px;
  background: var(--brand);
  opacity: 0.16;
  top: -160px;
  left: 12%;
}
.bg-glow-2 {
  width: 380px;
  height: 380px;
  background: #3b9dff;
  opacity: 0.1;
  bottom: -180px;
  right: 8%;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.hero h1 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  background: linear-gradient(180deg, #ffffff 0%, #b9b3ff 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero p {
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}
.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.hero-pill:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  border-color: var(--accent);
}
.hero-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  z-index: 1;
}
.scroll-cue svg {
  animation: bounce 1.8s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ── App sections (zig-zag) ── */
.app-section {
  padding: 84px 24px;
  scroll-margin-top: var(--nav-h);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.app-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.app-section--rev .app-visual { order: 2; }
.app-section--rev .app-copy { order: 1; }

.app-visual {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  background:
    radial-gradient(120% 120% at 25% 12%, color-mix(in srgb, var(--accent) 48%, transparent), transparent 55%),
    radial-gradient(100% 100% at 88% 96%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 60%),
    #0c0c16;
  box-shadow: 0 34px 90px -46px color-mix(in srgb, var(--accent) 85%, transparent);
}
.app-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(75% 75% at 50% 50%, #000, transparent);
  mask-image: radial-gradient(75% 75% at 50% 50%, #000, transparent);
  opacity: 0.55;
}
.app-visual-blob {
  position: absolute;
  z-index: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(72px);
  opacity: 0.4;
  top: -60px;
  right: -50px;
}
.app-visual-ring {
  position: absolute;
  z-index: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: inset 0 0 60px color-mix(in srgb, var(--accent) 30%, transparent);
}
.app-visual-icon {
  position: relative;
  z-index: 1;
  width: 104px;
  height: 104px;
  color: #ffffff;
  filter: drop-shadow(0 0 28px color-mix(in srgb, var(--accent) 80%, transparent));
  transition: transform 0.4s ease;
}
.app-section:hover .app-visual-icon {
  transform: translateY(-6px) scale(1.04);
}

.app-copy {
  max-width: 480px;
}
.app-kicker {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.app-name {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 14px;
}
.app-text {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}
.app-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a12;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.app-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -18px var(--accent);
  filter: brightness(1.06);
}
.app-link svg {
  transition: transform 0.2s ease;
}
.app-link:hover svg {
  transform: translate(3px, -3px);
}
.app-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Section (carousel heading) ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 24px;
  scroll-margin-top: var(--nav-h);
}
.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.section-sub {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

/* ── Carousel ── */
.marquee {
  width: 100%;
  overflow: hidden;
  padding-block: 34px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}
.marquee-group {
  display: flex;
  gap: var(--card-gap);
  padding-right: var(--card-gap);
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.service-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: var(--card-w);
  flex-shrink: 0;
  padding: 18px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
  transform: translateY(-4px) scale(1.035);
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 18px 40px -20px color-mix(in srgb, var(--accent) 70%, transparent);
}
.service-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.service-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}
.service-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.service-title {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.service-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.service-arrow {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.32);
  transition: transform 0.2s ease, color 0.2s ease;
}
.service-card:hover .service-arrow {
  transform: translate(2px, -2px);
  color: var(--accent);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 24px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ── Reveal on scroll ── */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.app-copy.reveal {
  transition-delay: 0.08s;
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .app-inner {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .app-section--rev .app-visual,
  .app-section--rev .app-copy {
    order: 0;
  }
  .app-visual {
    aspect-ratio: 16 / 10;
  }
  .app-copy {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-grid;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 18px;
    background: rgba(10, 10, 18, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    overflow: visible;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }
  .nav--open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-link {
    padding: 12px 14px;
    border-radius: 12px;
  }
}

@media (max-width: 620px) {
  .nav-inner {
    padding: 0 16px;
  }
  .app-section {
    padding: 60px 18px;
  }
  .section {
    padding: 64px 18px;
  }
  .app-visual-icon {
    width: 84px;
    height: 84px;
  }
  .marquee {
    padding-block: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    transition: none;
  }
  .scroll-cue svg {
    animation: none;
  }
  .marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
    scroll-snap-type: x mandatory;
  }
  .marquee-track {
    animation: none;
  }
  .marquee-group[aria-hidden='true'] {
    display: none;
  }
  .service-card {
    scroll-snap-align: center;
  }
}
