/* CW-ARCADE — BASE
   Resets, font faces, base typography, generic utility classes. */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&family=Chakra+Petch:wght@600;700&display=swap");

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

html {
  background: var(--void);
  color-scheme: dark;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
video,
canvas,
svg {
  max-width: 100%;
  /* Without this, an <img> that declares width/height attributes (for
     layout-shift prevention) keeps that absolute height once max-width
     shrinks it to fit a narrower column — it stops scaling proportionally
     and can dominate a section vertically. height:auto keeps it locked
     to its intrinsic aspect ratio at whatever width it's actually given. */
  height: auto;
  display: block;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: var(--content-wide);
}

.section {
  position: relative;
  padding-block: var(--section-pad-y);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-16);
}

.section-head--center {
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: var(--space-16);
  text-align: center;
}

/* ---------- Type utilities ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--cyan-soft);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  flex: none;
}

.eyebrow--ember {
  color: var(--ember);
}
.eyebrow--ember::before {
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember);
}

.eyebrow--violet {
  color: var(--violet);
}
.eyebrow--violet::before {
  background: var(--violet);
  box-shadow: 0 0 10px var(--violet);
}

.section-title {
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
}

/* Neon triple-glow heading — adapted from Codepen_Text_Effects/
   HighEndFOnts's "02 — Neon Triple Glow" (a stack of white/cyan/
   violet text-shadow layers plus a letter-spacing entrance), recolored
   from that pen's cyan/magenta pairing to this brand's cyan + violet
   and toned down from its always-on buzzy pulse to a slow, subtle
   breathe. Applied to every major .section-title on the page (not
   just one section) as the page's one deliberate heading-glow
   signature, rather than a one-off accent — so it's the same
   treatment every time, not competing variations. Entrance is gated
   on .reveal.is-visible (this project's existing scroll-reveal class,
   see main.js) instead of firing on page load. */
.section-title--neon {
  color: var(--ink);
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.75),
    0 0 18px rgba(0, 173, 252, 0.8),
    0 0 42px rgba(0, 173, 252, 0.5),
    0 0 84px rgba(124, 92, 255, 0.4),
    0 0 140px rgba(124, 92, 255, 0.22);
}

.reveal.is-visible .section-title--neon {
  animation: neon-title-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both,
    neon-title-breathe 5s ease-in-out 0.9s infinite;
}

@keyframes neon-title-in {
  from {
    opacity: 0;
    letter-spacing: 0.14em;
    filter: blur(3px);
  }
  to {
    opacity: 1;
    letter-spacing: normal;
    filter: blur(0);
  }
}

@keyframes neon-title-breathe {
  0%, 100% {
    text-shadow:
      0 0 6px rgba(255, 255, 255, 0.75),
      0 0 18px rgba(0, 173, 252, 0.8),
      0 0 42px rgba(0, 173, 252, 0.5),
      0 0 84px rgba(124, 92, 255, 0.4),
      0 0 140px rgba(124, 92, 255, 0.22);
  }
  50% {
    text-shadow:
      0 0 8px rgba(255, 255, 255, 0.9),
      0 0 24px rgba(0, 173, 252, 0.95),
      0 0 60px rgba(0, 173, 252, 0.65),
      0 0 110px rgba(124, 92, 255, 0.55),
      0 0 180px rgba(124, 92, 255, 0.3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-title--neon,
  .reveal.is-visible .section-title--neon {
    animation: none;
  }
}

.section-lede {
  margin-top: var(--space-5);
  font-size: var(--fs-body-lg);
  color: var(--ink-dim);
  line-height: var(--lh-body);
}

.text-dim {
  color: var(--ink-dim);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: var(--space-4);
  z-index: 1000;
  background: var(--graphite-800);
  color: var(--ink);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-strong);
  transition: top var(--dur-micro) var(--ease-engineered);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ---------- Buttons ----------
   Ported from Codepen/Buttons/Futuristic Buttons's "Ice" variant: a
   skewed pill with a breathing inner border and a heavy tinted glow —
   kept close to verbatim (skewX(-8deg), the breath/breath2 keyframe
   pair, the inset ::before ring) but recolored to brand cyan for the
   primary action and violet for the secondary. One authoritative
   button implementation — every .btn on the page (nav, hero, pricing,
   final CTA) inherits this. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.95rem 1.9rem;
  border-radius: var(--radius-lg) var(--radius-sm) var(--radius-lg) 0px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: uppercase;
  position: relative;
  color: var(--ink);
  transform: skewX(-8deg);
  transition: transform var(--dur-micro) var(--ease-engineered),
    box-shadow var(--dur-micro) var(--ease-engineered);
  animation: btn-breath-2 2.4s 0.4s ease-in-out infinite alternate;
}

.btn > * {
  transform: skewX(8deg);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.btn::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: calc(100% - 16px);
  height: calc(100% - 6px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-md) 2px var(--radius-md) 2px;
  animation: btn-breath 2.4s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes btn-breath {
  0% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0.94);
  }
}

@keyframes btn-breath-2 {
  0% {
    transform: skewX(-8deg) scaleX(1);
  }
  100% {
    transform: skewX(-8deg) scaleX(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    animation: none;
  }
  .btn::before {
    animation: none;
  }
}

.btn-primary {
  background: linear-gradient(
    to bottom,
    rgba(0, 173, 252, 0.55),
    rgba(0, 100, 220, 0.5)
  );
  border: 1px solid var(--cyan-soft);
  box-shadow: 0 0 60px rgba(0, 173, 252, 0.35), 0 5px 20px rgba(0, 173, 252, 0.3),
    inset 0 1px var(--cyan-soft), inset 0 -1px var(--cyan-soft);
}

.btn-primary::before {
  box-shadow: inset 0 0 24px 0 var(--cyan-soft);
}

.btn-primary:hover {
  box-shadow: 0 0 70px rgba(0, 173, 252, 0.55), 0 5px 24px rgba(0, 173, 252, 0.4),
    inset 0 1px var(--cyan-soft), inset 0 -1px var(--cyan-soft);
}

.btn-primary:hover::before {
  box-shadow: inset 0 0 40px 0 var(--cyan-soft);
}

.btn-ghost {
  background: linear-gradient(
    to bottom,
    rgba(139, 61, 255, 0.32),
    rgba(80, 30, 200, 0.28)
  );
  border: 1px solid var(--violet-soft);
  box-shadow: 0 0 50px rgba(139, 61, 255, 0.24), 0 5px 18px rgba(139, 61, 255, 0.22),
    inset 0 1px var(--violet-soft), inset 0 -1px var(--violet-soft);
}

.btn-ghost::before {
  box-shadow: inset 0 0 24px 0 var(--violet-soft);
}

.btn-ghost:hover {
  box-shadow: 0 0 60px rgba(139, 61, 255, 0.4), 0 5px 20px rgba(139, 61, 255, 0.3),
    inset 0 1px var(--violet-soft), inset 0 -1px var(--violet-soft);
}

.btn-ghost:hover::before {
  box-shadow: inset 0 0 40px 0 var(--violet-soft);
}

.btn:hover {
  transform: skewX(-8deg) translateY(-2px);
}

.btn svg {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}

/* ---------- Reveal-on-scroll (quiet, restrained) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-reveal) var(--ease-engineered),
    transform var(--dur-reveal) var(--ease-engineered);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
