/*
 * Mongoose Labs studio site.
 *
 * Same token approach and typography as the extension landing template
 * (packages/landing/template/styles.css), but a deliberately different shape:
 * a neutral studio palette with no single brand accent, left-aligned hero,
 * and product cards that each carry their own accent through --card-accent.
 */

:root {
  --ml-bg: #ffffff;
  --ml-surface: #f6f7f9;
  --ml-text: #0f172a;
  --ml-text-muted: #56637a;
  --ml-border: #e2e8f0;
  --ml-border-strong: #cbd5e1;
  --ml-accent: #475569;
  --ml-focus: #2563eb;
  --ml-radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ml-bg: #0b1120;
    --ml-surface: #131c31;
    --ml-text: #f1f5f9;
    --ml-text-muted: #9aa8be;
    --ml-border: #26324a;
    --ml-border-strong: #3a4a68;
    --ml-accent: #cbd5e1;
    --ml-focus: #7dabff;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--ml-bg);
  color: var(--ml-text);
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ml-text);
  text-decoration-color: var(--ml-border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 10;
  background: var(--ml-bg);
  border: 1px solid var(--ml-border-strong);
  border-radius: var(--ml-radius);
  padding: 10px 16px;
  text-decoration: none;
}

/* Section scaffolding */

section {
  padding: 72px 0;
}

.section__label {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ml-text-muted);
}

.section__title {
  margin: 0 0 12px;
  font-size: 1.625rem;
}

.section__intro {
  max-width: 62ch;
  margin: 0 0 36px;
  color: var(--ml-text-muted);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--ml-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ml-text);
}

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

.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ml-text-muted);
  text-decoration: none;
  font-weight: 500;
}

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

/* Hero */

.hero {
  padding: 88px 0 64px;
}

.hero h1 {
  max-width: 22ch;
  margin: 0 0 20px;
  font-size: clamp(2rem, 5vw, 3.125rem);
  letter-spacing: -0.02em;
}

.hero__subhead {
  max-width: 60ch;
  margin: 0 0 36px;
  font-size: 1.1875rem;
  color: var(--ml-text-muted);
}

.promises {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.promises li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: var(--ml-text-muted);
}

.promises li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ml-border-strong);
}

/* Products */

.products {
  background: var(--ml-surface);
  border-top: 1px solid var(--ml-border);
  border-bottom: 1px solid var(--ml-border);
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  padding: 26px 26px 24px;
  background: var(--ml-bg);
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius);
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--card-accent);
}

.product-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.product-card__icon {
  width: 44px;
  height: 44px;
  flex: none;
}

.product-card h3 {
  margin: 0;
  font-size: 1.1875rem;
}

.product-card__desc {
  flex: 1;
  margin: 0;
  color: var(--ml-text-muted);
}

.product-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

/* Buttons. The accent is darkened for the filled variant so white label text
   keeps at least 4.5:1 contrast on both product accents, and the undarkened
   accent is used as a border so the button edge itself stays at least 3:1
   against the card in dark mode. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.15s ease, border-color 0.15s ease;
}

.button--primary {
  background: color-mix(in srgb, var(--card-accent, var(--ml-text)) 85%, #000);
  border-color: var(--card-accent, var(--ml-text));
  color: #ffffff;
}

.button--primary:hover {
  filter: brightness(1.12);
}

.button--secondary {
  border-color: var(--ml-border-strong);
  color: var(--ml-text);
  background: transparent;
}

.button--secondary:hover {
  border-color: var(--card-accent, var(--ml-text));
}

/* About */

.about__body {
  max-width: 68ch;
}

.about__body p {
  margin: 0 0 16px;
}

.about__body p:last-child {
  margin-bottom: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--ml-border);
  padding: 30px 0;
  font-size: 0.875rem;
  color: var(--ml-text-muted);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer__inner p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--ml-text-muted);
}

.site-footer a:hover {
  color: var(--ml-text);
}

@media (max-width: 640px) {
  section {
    padding: 52px 0;
  }

  .hero {
    padding: 56px 0 44px;
  }
}
