/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --mv-canvas: #FAFAF7;
  --mv-canvas-pure: #FFFFFF;
  --mv-ink: #0A0A0A;
  --mv-n-50: #F4F4EF;
  --mv-n-100: #ECECE5;
  --mv-n-200: #DCDCD3;
  --mv-n-300: #BFBFB4;
  --mv-n-400: #9A9A8E;
  --mv-n-500: #6F6F65;
  --mv-n-600: #4A4A42;
  --mv-n-700: #2E2E29;
  --mv-n-800: #1C1C19;
  --mv-accent: #2347FF;
  --mv-accent-hover: #1832D9;
  --mv-accent-press: #0F22A8;
  --mv-accent-tint: #E8ECFF;

  --bg: var(--mv-canvas);
  --bg-sunken: var(--mv-n-50);
  --bg-elevated: var(--mv-canvas-pure);
  --fg: var(--mv-ink);
  --fg-muted: var(--mv-n-600);
  --fg-subtle: var(--mv-n-500);
  --fg-faint: var(--mv-n-400);
  --fg-inverse: var(--mv-canvas);
  --border: var(--mv-n-200);
  --border-strong: var(--mv-n-300);
  --accent: var(--mv-accent);
  --accent-hover: var(--mv-accent-hover);

  --font-sans: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --lh-tight: 1.02;
  --lh-snug: 1.15;
  --lh-base: 1.5;

  --shadow-xs: 0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow-sm: 0 2px 6px rgba(10, 10, 10, 0.05), 0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow-md: 0 8px 24px rgba(10, 10, 10, 0.07), 0 2px 6px rgba(10, 10, 10, 0.04);
  --shadow-lg: 0 24px 56px rgba(10, 10, 10, 0.10), 0 6px 16px rgba(10, 10, 10, 0.06);
  --shadow-ink: 4px 4px 0 var(--mv-ink);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 160ms;
  --dur-base: 280ms;
  --dur-slow: 520ms;

  --site-max: 1280px;
  --site-pad: clamp(20px, 4vw, 64px);
}

/* ── Reset ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 999;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 0 8px 8px;
  transition: top 200ms;
}

.skip-link:focus {
  top: 0;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 var(--site-pad);
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes mvMarquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-33.333%);
  }
}

@keyframes mvMarqueeRev {
  from {
    transform: translateX(-33.333%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes dotPulse {

  0%,
  100% {
    opacity: .4;
    transform: scale(1)
  }

  50% {
    opacity: 1;
    transform: scale(1.15)
  }
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 680ms var(--ease-out), transform 680ms var(--ease-out);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger>* {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 680ms var(--ease-out), transform 680ms var(--ease-out);
}

.reveal-stagger.in>* {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.in>*:nth-child(1) {
  transition-delay: 0ms;
}

.reveal-stagger.in>*:nth-child(2) {
  transition-delay: 70ms;
}

.reveal-stagger.in>*:nth-child(3) {
  transition-delay: 140ms;
}

.reveal-stagger.in>*:nth-child(4) {
  transition-delay: 210ms;
}

.reveal-stagger.in>*:nth-child(5) {
  transition-delay: 280ms;
}

.reveal-stagger.in>*:nth-child(6) {
  transition-delay: 350ms;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease-out);
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--mv-ink);
  box-shadow: var(--shadow-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--mv-ink);
}

.btn-primary:active {
  background: var(--mv-accent-press);
  transform: translate(4px, 4px);
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--mv-ink);
  border-color: var(--mv-ink);
}

.btn-secondary:hover {
  background: var(--mv-ink);
  color: #fff;
}

.btn-secondary-neo {
  background: var(--bg-elevated);
  color: var(--mv-ink);
  border: 2px solid var(--mv-ink);
  box-shadow: var(--shadow-ink);
}

.btn-secondary-neo:hover {
  background: var(--mv-n-50);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--mv-ink);
}

.btn-secondary-neo:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.btn-ink {
  background: var(--mv-ink);
  color: #fff;
  border-color: var(--mv-ink);
}

.btn-ink:hover {
  background: var(--mv-n-700);
}

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}

/* ── Eyebrow + kinetic ─────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1.5px;
  background: currentColor;
  flex-shrink: 0;
}

.kinetic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.04em;
}

/* ── Nav ───────────────────────────────────────────────────── */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur-base) var(--ease-out);
}

.nav-wrap.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand-logo {
  display: block;
  max-width: 100%;
  height: auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.nav-brand-logo {
  height: clamp(18px, 3vw, 22px);
  width: auto;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  transition: color var(--dur-fast) var(--ease-out);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
}

.nav-cta {
  margin-left: 8px;
}

.nav-ham {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
}

.nav-ham span {
  display: block;
  height: 1.5px;
  background: var(--fg);
  transition: all var(--dur-base) var(--ease-out);
  transform-origin: center;
}

.nav-ham.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-ham.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-ham.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding: 16px 0 20px;
  gap: 2px;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile-link {
  display: block;
  padding: 11px 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  transition: color var(--dur-fast) var(--ease-out);
}

.nav-mobile-link:last-of-type {
  border-bottom: none;
}

.nav-mobile-link:hover {
  color: var(--accent);
}

.nav-mobile-cta {
  margin-top: 16px;
  width: 100%;
}

@media (max-width: 768px) {

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-ham {
    display: flex;
  }
}

/* ── Footer ────────────────────────────────────────────────── */
.footer-wrap {
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 48px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 4px;
}

.footer-link {
  font-size: 14px;
  color: var(--fg);
  transition: color var(--dur-fast) var(--ease-out);
}

.footer-link:hover {
  color: var(--accent);
}

.footer-intro {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 34ch;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.footer-brand-logo {
  height: 20px;
  width: auto;
}

/* ── Footer Interactive Logo ────────────────────────────────── */
.footer-logo-interactive {
  position: relative;
  width: 100%;
  height: clamp(80px, 16vw, 220px);
  margin: 40px 0 56px;
  cursor: crosshair;
  transform: scale(1);
  transition: transform 0.6s var(--ease-out);
}

.footer-logo-interactive:hover {
  transform: scale(1.02);
}

.footer-logo-mask {
  width: 100%;
  height: 100%;
  -webkit-mask-image: url('/images/mr-visualizer-logo-animated.svg');
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url('/images/mr-visualizer-logo-animated.svg');
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  position: relative;
}

.footer-logo-solid {
  position: absolute;
  inset: 0;
  background: var(--mv-ink);
  opacity: 1;
  transition: opacity 0.4s ease;
}

.footer-logo-interactive:hover .footer-logo-solid {
  opacity: 0.85;
}

.footer-logo-aurora {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(110deg, var(--accent) 0%, #A5B4FC 25%, #F472B6 50%, #A5B4FC 75%, var(--accent) 100%);
  background-size: 200% 100%;
  animation: footerAuroraAnim 4s linear infinite;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-out);
}

@keyframes footerAuroraAnim {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: -200% 50%;
  }
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-small {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.footer-avail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-avail::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }
}

@media (max-width: 480px) {
  .footer-wrap {
    padding: 48px 0 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ── CTA Band ──────────────────────────────────────────────── */
.cta-wrap {
  background: var(--mv-ink);
  color: var(--fg-inverse);
  padding: 120px 0;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  gap: 36px;
  align-items: flex-start;
}

.cta-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.cta-eyebrow::before {
  content: '';
  width: 28px;
  height: 1.5px;
  background: currentColor;
}

.cta-headline {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(44px, 8vw, 108px);
  line-height: 0.97;
  letter-spacing: -0.036em;
  max-width: 24ch;
}

.cta-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--mv-n-300);
  max-width: 52ch;
}

.cta-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.cta-btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 14px 26px;
  border-radius: 10px;
  border: 2px solid #fff;
  box-shadow: 4px 4px 0 #fff;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.cta-btn-primary:hover {
  background: var(--accent-hover);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #fff;
}

.cta-btn-primary:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.cta-btn-ghost {
  background: transparent;
  color: #fff;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.cta-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.75);
}

.cta-btn-ghost-neo {
  background: transparent;
  color: #fff;
  padding: 14px 26px;
  border-radius: 10px;
  border: 2px solid #fff;
  box-shadow: 4px 4px 0 #fff;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.cta-btn-ghost-neo:hover {
  background: rgba(255, 255, 255, 0.10);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #fff;
}

.cta-btn-ghost-neo:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

@media (max-width: 768px) {
  .cta-wrap {
    padding: 80px 0;
  }
}

@media (max-width: 480px) {
  .cta-wrap {
    padding: 64px 0;
  }

  .cta-row {
    flex-direction: column;
    width: 100%;
  }

  .cta-row a,
  .cta-row button {
    width: 100%;
    justify-content: center;
  }
}

/* ── Back to top ───────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--mv-ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), background var(--dur-fast) var(--ease-out);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--mv-n-700);
}

@media (max-width: 480px) {
  .back-to-top {
    bottom: 20px;
    right: 16px;
  }
}