/* NEXTTHINGS — dark neon theme */

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #07070d;
  --bg-alt: #0b0b16;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e8e8f0;
  --muted: #a3a3bb;
  --pink: #ff2bd6;
  --violet: #7c4dff;
  --cyan: #00e5ff;
  --neon: linear-gradient(90deg, var(--pink), var(--violet), var(--cyan));
  --radius: 18px;
  --container: 1120px;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

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

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

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

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

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.6rem, 7vw, 5.25rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
}
.skip-link:focus { top: 16px; }

/* Neon gradient text */
.neon-text {
  background: var(--neon);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(124, 77, 255, 0.45));
  animation: neon-flow 8s linear infinite;
}

@keyframes neon-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 7, 13, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand img { height: 44px; width: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: inline-block;
  padding: 8px 14px;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-list a:hover { color: var(--text); background: var(--surface); text-decoration: none; }

.nav-list .nav-cta {
  color: var(--text);
  border: 1px solid rgba(124, 77, 255, 0.5);
  box-shadow: 0 0 16px rgba(124, 77, 255, 0.25) inset;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  color: #fff;
  background: var(--neon);
  background-size: 200% 100%;
  box-shadow: 0 0 24px rgba(255, 43, 214, 0.35), 0 0 48px rgba(0, 229, 255, 0.15);
  animation: neon-flow 6s linear infinite;
}
.btn-primary:hover { box-shadow: 0 0 32px rgba(255, 43, 214, 0.55), 0 0 64px rgba(0, 229, 255, 0.3); }

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
}
.btn-ghost:hover { border-color: rgba(0, 229, 255, 0.5); box-shadow: 0 0 20px rgba(0, 229, 255, 0.2); }

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  padding: 96px 0 160px;
  isolation: isolate;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; }

/* Fade the glow into the page so the hero has no hard bottom edge */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, var(--bg) 100%);
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.blob-pink   { width: 520px; height: 520px; background: var(--pink);   top: -140px; left: -120px; animation: drift-a 18s ease-in-out infinite; }
.blob-violet { width: 460px; height: 460px; background: var(--violet); top: 10%;    right: -80px; animation: drift-b 22s ease-in-out infinite; }
.blob-cyan   { width: 420px; height: 420px; background: var(--cyan);   bottom: 0;      left: 35%; opacity: 0.25; animation: drift-c 20s ease-in-out infinite; }

@keyframes drift-a { 50% { transform: translate(120px, 80px) scale(1.1); } }
@keyframes drift-b { 50% { transform: translate(-140px, 60px) scale(0.9); } }
@keyframes drift-c { 50% { transform: translate(-100px, -70px) scale(1.15); } }

/* Synthwave perspective grid */
.grid-floor {
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: -10%;
  height: 55%;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 43, 214, 0.3) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.5;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: center top;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 70%, transparent 100%);
  animation: grid-move 3s linear infinite;
}

@keyframes grid-move {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 64px, 0 0; }
}

.hero-content { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.7);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { to { box-shadow: 0 0 0 10px rgba(0, 229, 255, 0); } }

.lead {
  max-width: 620px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* Sections */
.section { padding: 112px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 20%, var(--bg-alt) 80%, var(--bg) 100%); }

.section-kicker {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

/* Service cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius);
  background:
    radial-gradient(400px circle at var(--mx) var(--my), rgba(124, 77, 255, 0.14), transparent 45%),
    var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

/* Gradient border that lights up on hover */
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--neon);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.card:hover { transform: translateY(-6px); box-shadow: 0 18px 50px rgba(124, 77, 255, 0.18); }
.card:hover::before { opacity: 1; }

.card p { color: var(--muted); margin: 0; }

.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 43, 214, 0.2), rgba(0, 229, 255, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 22px rgba(124, 77, 255, 0.3);
}

.card-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Process steps */
.steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  counter-reset: none;
}

.step {
  position: relative;
  padding: 28px 24px 24px;
  border-left: 2px solid transparent;
  border-image: linear-gradient(180deg, var(--pink), var(--cyan)) 1;
  background: linear-gradient(90deg, var(--surface), transparent);
}

.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 14px;
  background: var(--neon);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step p { color: var(--muted); margin: 0; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.company-card {
  position: relative;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.15), 0 30px 80px rgba(124, 77, 255, 0.15);
  overflow: hidden;
}

.company-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--neon);
  background-size: 200% 100%;
  animation: neon-flow 6s linear infinite;
}

.company-card dl { margin: 0; display: grid; gap: 14px; }
.company-card dl > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.company-card dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.company-card dt { color: var(--muted); font-size: 0.92rem; }
.company-card dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.footer-inner p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* Scroll reveal (only when JS is running) */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Legal / simple pages */
.page { padding: 72px 0 96px; }
.page .container { max-width: 800px; }
.page h1 { font-size: clamp(2.2rem, 5vw, 3.25rem); }
.page h2 { font-size: 1.5rem; margin-top: 2.2em; }
.page p, .page li { color: #cfcfdc; }
.page ul { padding-left: 1.25em; }
.page li { margin-bottom: 0.4em; }
.page .meta { color: var(--muted); }

.not-found {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.not-found h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.not-found .lead { margin: 0 auto 32px; }
.not-found .code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 12rem);
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

/* Responsive */
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .section { padding: 84px 0; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .brand img { height: 36px; }
  .nav-list li:not(:last-child) { display: none; }
  .hero { padding: 64px 0 120px; min-height: auto; }
  .blob { filter: blur(70px); }
  .blob-pink { width: 320px; height: 320px; }
  .blob-violet { width: 280px; height: 280px; }
  .blob-cyan { width: 260px; height: 260px; }
  .company-card { padding: 24px 20px; }
  .company-card dl > div { grid-template-columns: 1fr; gap: 2px; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
