/* Jaxvik — single-page marketing site */

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #0f1216;
  --muted: #4a515c;       /* 8.3:1 on --bg */
  --border: #e3e6eb;
  --accent: #2346d8;      /* 6.6:1 on --bg */
  --accent-hover: #1a37b3;
  --on-accent: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.85);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --max-width: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --header-height: 4rem;
  --radius: 0.75rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f12;
    --surface: #15181d;
    --text: #eef0f3;
    --muted: #a3aab5;       /* 8.0:1 on --bg */
    --border: #262a31;
    --accent: #8ea4ff;      /* 8.2:1 on --bg */
    --accent-hover: #b0bfff;
    --on-accent: #0d0f12;
    --header-bg: rgba(13, 15, 18, 0.85);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

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

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.875rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 0.375rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--bg);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-height);
}

.wordmark {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: clamp(1rem, 4vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

/* Hero */

.hero {
  padding-block: clamp(5rem, 16vw, 11rem) clamp(4rem, 12vw, 8rem);
}

.hero h1 {
  max-width: 16ch;
  font-size: clamp(2.5rem, 7.5vw, 5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  max-width: 34rem;
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  line-height: 1.55;
}

.button {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
  transform: translateY(-1px);
}

/* Sections */

.section {
  padding-block: clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--border);
}

.eyebrow {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* What we do */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: clamp(1.75rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: var(--muted);
}

.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.3125rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

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

/* About */

.prose {
  display: grid;
  gap: 1.5rem;
  max-width: 46rem;
}

.prose-lead {
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.prose p:not(.prose-lead) {
  color: var(--muted);
}

/* Contact */

.contact-email {
  font-size: clamp(1.75rem, 5.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.contact-email a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.contact-email a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

/* Footer */

.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

/* Small screens */

@media (max-width: 30rem) {
  .nav {
    height: auto;
    min-height: var(--header-height);
  }

  .wordmark {
    font-size: 1.125rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: 0.875rem;
  }

  .button {
    display: block;
    text-align: center;
  }
}
