/* ==========================================================================
   Mad Matrix Solutions — corporate one-pager
   Design direction: "Ledger / Ops-Plate" — Matrix read as a grid of
   coordinates, not the movie. A quiet, disciplined graphite-on-paper shell
   with a faint hairline grid, inside which two forced-palette brand cards
   (Knockout / Rock) are allowed to break the frame.
   ========================================================================== */

:root {
  --mm-bg: #edece7;
  --mm-bg-alt: #e4e2db;
  --mm-surface: #f5f4f0;
  --mm-fg: #14151a;
  --mm-muted: #6b6e76;
  --mm-border: #d9d6cf;
  --mm-border-strong: #c2beb3;
  --mm-signal: #4f7a5b;

  --font-display: 'Archivo', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --max-w: 1180px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --mm-bg: #131313;
    --mm-bg-alt: #1a1a1a;
    --mm-surface: #1c1c1c;
    --mm-fg: #edece7;
    --mm-muted: #96958f;
    --mm-border: #2c2c2a;
    --mm-border-strong: #3d3c38;
    --mm-signal: #7fb28c;
  }
}

/* Brand tokens — fixed regardless of viewer color scheme, each card is its
   own lit "lockup" rather than a themeable surface. */
:root {
  --ko-bg: #0d0d12;
  --ko-bg2: #1a1a24;
  --ko-fg: #ffffff;
  --ko-muted: #b7b7c4;
  --ko-primary: #ff1493;
  --ko-secondary: #06b6d4;
  --ko-accent: #8b2fd9;
  --ko-border: rgba(255, 255, 255, 0.1);
  --ko-gradient: linear-gradient(135deg, #ff1493 0%, #8b2fd9 100%);

  --rt-bg: #0a0908;
  --rt-bg2: #18140d;
  --rt-fg: #f5efe2;
  --rt-muted: #c9bda3;
  --rt-gold: #e6c369;
  --rt-gold-deep: #a9791f;
  --rt-border: rgba(230, 195, 105, 0.22);
  --rt-gradient: linear-gradient(135deg, #f6dd97 0%, #b8860b 55%, #7a5810 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--mm-bg);
  background-image:
    linear-gradient(var(--mm-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--mm-border) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  color: var(--mm-fg);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

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

h1, h2, h3 { font-family: var(--font-display); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mm-muted);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mm-signal);
  flex-shrink: 0;
}
.section-head.center .eyebrow { justify-content: center; }

/* ── Reveal-on-scroll ─────────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal-stagger].is-visible > * { opacity: 1; transform: none; }
[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 0.15s; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 0.25s; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-stagger] > * { opacity: 1; transform: none; }
}

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--mm-bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mm-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark img { width: 28px; height: 28px; border-radius: 7px; }

.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--mm-muted);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--mm-fg); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--mm-border-strong);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  padding: 104px 0 80px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 22px;
  max-width: 860px;
  margin-inline: auto;
}

.hero p.lede {
  color: var(--mm-muted);
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 40px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-outline {
  border-color: var(--mm-border-strong);
  color: var(--mm-fg);
  background: transparent;
}
.btn-outline:hover { background: var(--mm-surface); }

.btn-solid {
  background: var(--mm-fg);
  color: var(--mm-bg);
}
.btn-solid:hover { background: color-mix(in srgb, var(--mm-fg) 85%, var(--mm-bg)); }

/* Registration plate — the page's signature element. A stamped ledger
   line stating exactly who/where/what-licence, echoed again in the footer. */
.plate {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--mm-muted);
  border: 1px solid var(--mm-border-strong);
  border-radius: 999px;
  background: var(--mm-surface);
  padding: 8px 6px 8px 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.plate span { padding: 0 12px; white-space: nowrap; }
.plate span:not(:last-child) { border-right: 1px solid var(--mm-border-strong); }
.plate .live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mm-signal);
  font-weight: 600;
}
.plate .live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mm-signal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mm-signal) 25%, transparent);
}

/* ── Section shell ────────────────────────────────────────────────────── */
section { padding: 96px 0; }
.section-head {
  max-width: 640px;
  margin: 0 0 52px;
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.section-head p { color: var(--mm-muted); font-size: 1.05rem; margin: 0; }

#brands {
  background: var(--mm-bg-alt);
  border-block: 1px solid var(--mm-border);
}

/* ── Brand cards ──────────────────────────────────────────────────────── */
.brand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.brand-card {
  border-radius: var(--radius-lg);
  padding: 44px 38px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease;
}
.brand-card:hover {
  transform: translateY(-6px) rotate(var(--tilt, 0deg));
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.45);
}
.brand-card.knockout { --tilt: -0.6deg; }
.brand-card.rock { --tilt: 0.6deg; }

.brand-card .brand-logo { height: 40px; width: auto; margin-bottom: 28px; }
.brand-card .brand-tagline {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 14px;
  max-width: 420px;
}
.brand-card .brand-copy {
  font-size: 0.98rem;
  margin: 0 0 26px;
  max-width: 420px;
}
.brand-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid;
}

/* Knockout Global */
.brand-card.knockout {
  background: radial-gradient(circle at 15% 0%, var(--ko-bg2), var(--ko-bg) 60%);
  color: var(--ko-fg);
  border: 1px solid var(--ko-border);
}
.brand-card.knockout .brand-copy { color: var(--ko-muted); }
.brand-card.knockout .brand-tagline {
  font-family: 'Manrope', 'Inter', sans-serif;
  background: var(--ko-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-card.knockout .chip {
  border-color: var(--ko-border);
  color: var(--ko-fg);
  background: rgba(255, 255, 255, 0.04);
}
.brand-card.knockout::after {
  content: '';
  position: absolute;
  inset: auto -30% -50% auto;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 20, 147, 0.35), transparent 65%);
  z-index: -1;
  transition: opacity 0.35s ease;
}
.brand-card.knockout:hover::after { opacity: 1.3; }
.brand-card.knockout .btn-brand {
  background: var(--ko-gradient);
  color: #fff;
}

/* Rock Tournaments */
.brand-card.rock {
  background: radial-gradient(circle at 85% 0%, var(--rt-bg2), var(--rt-bg) 60%);
  color: var(--rt-fg);
  border: 1px solid var(--rt-border);
}
.brand-card.rock .brand-copy { color: var(--rt-muted); }
.brand-card.rock .brand-tagline {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--rt-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-card.rock .chip {
  border-color: var(--rt-border);
  color: var(--rt-gold);
  background: rgba(230, 195, 105, 0.06);
}
.brand-card.rock::after {
  content: '';
  position: absolute;
  inset: auto -30% -50% auto;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(230, 195, 105, 0.22), transparent 65%);
  z-index: -1;
  transition: opacity 0.35s ease;
}
.brand-card.rock:hover::after { opacity: 1.3; }
.brand-card.rock .btn-brand {
  background: var(--rt-gradient);
  color: #241a05;
}

.btn-brand {
  font-weight: 700;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn-brand:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ── Licensing ────────────────────────────────────────────────────────── */
.license-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.license-card {
  background: var(--mm-surface);
  border: 1px solid var(--mm-border);
  border-radius: var(--radius-md);
  padding: 30px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.license-card:hover {
  border-color: var(--mm-border-strong);
  transform: translateY(-3px);
}
.license-card .icon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.license-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--mm-bg-alt);
  border: 1px solid var(--mm-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.license-card .icon svg { width: 20px; height: 20px; stroke: var(--mm-fg); }
.license-card .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mm-signal);
}
.license-card .status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mm-signal);
}
.license-card h3 { font-size: 1.08rem; font-weight: 600; margin: 0 0 10px; }
.license-card p { color: var(--mm-muted); font-size: 0.92rem; margin: 0 0 8px; }
.license-card .fact {
  font-size: 0.86rem;
  font-family: var(--font-mono);
  color: var(--mm-fg);
  background: var(--mm-bg-alt);
  border: 1px solid var(--mm-border);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  word-break: break-word;
}
.license-note {
  margin-top: 28px;
  font-size: 0.86rem;
  color: var(--mm-muted);
  padding-top: 24px;
  border-top: 1px solid var(--mm-border);
}
.license-note a { text-decoration: underline; }

/* ── Contact / CTA ────────────────────────────────────────────────────── */
.contact-band {
  background: var(--mm-fg);
  color: var(--mm-bg);
  border-radius: var(--radius-lg);
  padding: 60px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.contact-band h2 { margin: 0 0 12px; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
.contact-band p { color: color-mix(in srgb, var(--mm-bg) 70%, var(--mm-fg)); margin: 0 0 28px; }
.contact-band .btn-outline {
  border-color: color-mix(in srgb, var(--mm-bg) 40%, transparent);
  color: var(--mm-bg);
}
.contact-band .btn-outline:hover {
  background: color-mix(in srgb, var(--mm-bg) 12%, transparent);
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--mm-border);
  padding: 40px 0 40px;
}
.footer-plate {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--mm-border);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.footer-legal {
  max-width: 560px;
  font-size: 0.82rem;
  color: var(--mm-muted);
  line-height: 1.6;
}
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--mm-muted);
}
.footer-links a:hover { color: var(--mm-fg); }
.footer-bottom {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--mm-muted);
  padding-top: 24px;
  border-top: 1px solid var(--mm-border);
}

/* ── Privacy page ─────────────────────────────────────────────────────── */
.policy {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.policy h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 600; margin-bottom: 8px; }
.policy .updated { font-family: var(--font-mono); color: var(--mm-muted); font-size: 0.85rem; margin-bottom: 40px; }
.policy h2 { font-size: 1.2rem; font-weight: 600; margin-top: 44px; margin-bottom: 12px; }
.policy p, .policy li { color: var(--mm-muted); font-size: 0.98rem; line-height: 1.7; }
.policy ul { padding-left: 20px; }
.policy a { text-decoration: underline; color: var(--mm-fg); }
.policy .back-link { display: inline-block; margin-bottom: 32px; font-family: var(--font-mono); font-size: 0.85rem; text-decoration: none; color: var(--mm-muted); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .brand-grid { grid-template-columns: 1fr; }
  .license-grid { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; gap: 20px; }
}

@media (max-width: 720px) {
  body { background-size: 40px 40px; }
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--mm-bg);
    border-bottom: 1px solid var(--mm-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .contact-band { padding: 44px 26px; }
  .plate { font-size: 0.72rem; }
  .plate span { padding: 0 8px; }
}
