/* Nova Quartz: quartz.gg's theme (PostHog structure) in light mode, in black and white. */

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

html {
  scroll-behavior: smooth;
}

:root {
  color-scheme: light;

  /* Canvas: white */
  --bg: #FFFFFF;
  --bg-2: #F4F4F4;
  --surface: #FFFFFF;
  --surface-2: #F4F4F4;

  /* Ink */
  --ink: #000000;
  --ink-muted: #555555;
  --ink-dim: #8A8A8A;

  /* Rules: outlined everywhere */
  --rule: rgba(0, 0, 0, 0.12);
  --rule-strong: rgba(0, 0, 0, 0.26);

  /* Accent: black. Nova is black and white; grey does the second-colour job. */
  --accent: #000000;
  --accent-bright: #2A2A2A;
  --accent-deep: #000000;
  --accent-text: #6A6A6A;
  --accent-soft: rgba(0, 0, 0, 0.05);

  /* Hard, offset shadows (no blur) */
  --shadow-lg: 0 8px 0 rgba(0, 0, 0, 0.1);

  --heading-font: 'Lexend', 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --body-font: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono-font: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;
  --logo-font: 'Lexend', 'IBM Plex Sans', system-ui, sans-serif; /* the wordmark, shared with quartz.gg */
}

body {
  font-family: var(--body-font);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.65;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}

.eyebrow {
  font-family: var(--mono-font);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.8rem 1.4rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-deep);
  box-shadow: 0 3px 0 var(--accent-deep);
}
.btn--primary:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--accent-deep);
}
.btn--primary:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--accent-deep);
}
.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--rule-strong);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
}
.btn--ghost:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
}
.btn--ghost:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.18);
}
.btn--sm {
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
}
.btn:focus-visible,
.text-link:focus-visible,
.nav-link:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

.text-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.text-link:hover {
  color: var(--accent-text);
  border-color: var(--accent-text);
}

/* Windows: the bordered cards quartz.gg uses for its games */
.window {
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
/* Brand lockup: the Nova gem, then Nova over Quartz (Lexend; Nova regular, Quartz bold) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-gem {
  height: 34px;
  width: auto;
}
.brand-word {
  display: flex;
  flex-direction: column;
  font-family: var(--logo-font);
  font-size: 1.05rem;
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.bw-nova {
  font-weight: 400;
}
.bw-quartz {
  font-weight: 700;
}

/* Nav */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.navbar.is-shown {
  transform: none;
}
.navbar:focus-within {
  transform: none;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.nav-link:hover {
  color: var(--accent-text);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(4.5rem, 12vh, 8rem) 0 clamp(5rem, 12vh, 8rem);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
/* The hero is black: same components, tokens flipped */
.hero {
  color-scheme: dark;
  background: #000;
  --ink: #FFFFFF;
  --ink-muted: #A3A3A3;
  --ink-dim: #7C7C7C;
  --rule: rgba(255, 255, 255, 0.1);
  --rule-strong: rgba(255, 255, 255, 0.22);
  --accent: #FFFFFF;
  --accent-bright: #E6E6E6;
  --accent-deep: #8C8C8C;
  --accent-text: #9C9C9C;
  --surface: #0D0D0D;
  --surface-2: #161616;
  --shadow-lg: 0 8px 0 rgba(255, 255, 255, 0.07);
  border-bottom-color: #000;
}
.hero .btn--primary {
  color: #000;
}
.hero .btn--ghost {
  background: transparent;
  box-shadow: 0 3px 0 rgba(255, 255, 255, 0.2);
}
.hero .btn--ghost:hover,
.hero .btn--ghost:active {
  box-shadow: 0 4px 0 rgba(255, 255, 255, 0.2);
}
/* Big, quiet Nova Quartz mark in the hero's bottom-right, inside the content width */
.hero-mark-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-mark {
  position: absolute;
  right: 2rem;
  bottom: clamp(2rem, 6vh, 4rem);
  display: flex;
  align-items: center;
  gap: 1.1rem;
  color: #3A3A3A;
}
.hero-mark-gem {
  height: clamp(64px, 9vw, 112px);
  width: auto;
}
.hero-mark .brand-word {
  font-size: clamp(1.9rem, 3.1vw, 3.3rem);
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 70% at 70% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 70% at 70% 40%, #000 0%, transparent 75%);
  opacity: 0.6;
}
.hero-inner {
  position: relative;
  width: 100%;
}
section[id] {
  scroll-margin-top: 80px;
}
.hero-content {
  max-width: 46rem;
}
.hero-title {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: clamp(2.8rem, 6.4vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.hero-accent {
  color: var(--accent-text);
}
.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--ink-muted);
  max-width: 34rem;
  margin-bottom: 2.25rem;
}
.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* What we do */
.what {
  padding: clamp(5rem, 12vh, 8rem) 0;
}
.section-header {
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-title {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 1.1rem;
}
.section-description {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 36rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-deep);
  box-shadow: 0 11px 0 rgba(0, 0, 0, 0.1);
}
.card-body {
  padding: 1.75rem 1.6rem 2rem;
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-deep);
  box-shadow: 0 3px 0 var(--accent-deep);
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.card-title {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
}
.card-body p {
  color: var(--ink-muted);
  line-height: 1.65;
}

/* Contact */
.contact {
  padding: 0 0 clamp(5rem, 12vh, 8rem);
}
.contact-body {
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}
.contact-title {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin-bottom: 1rem;
}
.contact-subtitle {
  color: var(--ink-muted);
  font-size: 1.1rem;
  max-width: 34rem;
  margin: 0 auto 2rem;
}

/* Footer */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-end {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
/* Same social links and look as quartz.gg's footer */
.social-icons {
  display: flex;
  gap: 0.6rem;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.social-icon:hover {
  color: var(--ink);
  border-color: var(--ink);
  transform: translateY(-2px);
}
.social-icon:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.footer-legal {
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.footer-link {
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-mark {
    right: 1rem;
  }
  .container,
  .container-wide {
    padding: 0 1rem;
  }
  .nav-links {
    gap: 1rem;
  }
  .nav-link {
    display: none;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .navbar {
    transition: none;
  }
  .card,
  .card:hover {
    transition: none;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
