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

:root {
  color-scheme: dark;

  --bg: #101312;
  --raised: #171c19;
  --inset: #0b0e0d;
  --text: #f0f1ea;
  --muted: #a4ada4;
  --faint: #707a71;
  --line: #303933;
  --accent: #e3b15e;
  --accent-hover: #f0c775;
  --accent-wash: #3a2e1c;

  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --measure: 64rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg: #f1f2ed;
    --raised: #e8ebe5;
    --inset: #e5e8e2;
    --text: #1d241f;
    --muted: #637067;
    --faint: #879188;
    --line: #cdd3cc;
    --accent: #a35a2e;
    --accent-hover: #7f3f21;
    --accent-wash: #eadace;
  }
}

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 280px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent-wash);
  color: var(--text);
}

a {
  color: var(--text);
  text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

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

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

.skip {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 10;
  padding: 0.45rem 0.7rem;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

.page {
  width: min(var(--measure), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
  padding: 1.5rem 0 3.75rem;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 1.1rem;
  letter-spacing: -0.055em;
  line-height: 1;
  text-decoration: none;
}

.wordmark span {
  color: var(--text);
  font-weight: 700;
}

.wordmark strong {
  color: var(--accent);
  font-weight: 700;
}

.wordmark::before {
  display: inline-block;
  width: 0.48rem;
  height: 0.48rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  vertical-align: 0.08em;
}

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

.header-meta,
.nav,
.footer-links {
  display: flex;
  align-items: baseline;
  gap: 0.25rem 1.25rem;
  flex-wrap: wrap;
}

.nav {
  font-size: 0.85rem;
}

.nav a,
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"],
.footer-links a:hover {
  color: var(--text);
}

.nav a[href^="mailto"],
.footer-links a[href^="mailto"] {
  overflow-wrap: anywhere;
}

.hero {
  padding: clamp(4.5rem, 11vw, 7rem) 0 clamp(3.5rem, 8vw, 5.5rem);
  text-align: center;
}

.eyebrow {
  color: var(--accent);
  font-family: var(--mono);
  font-variant-numeric: lining-nums;
  margin-bottom: 1.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1,
.page-intro h1 {
  max-width: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.97;
  text-wrap: balance;
}

.hero h1 {
  display: grid;
  gap: 0.2rem;
  font-size: clamp(2.6rem, 5.8vw, 4.1rem);
}

.hero-line {
  display: block;
}

.hero-line-primary {
  color: var(--text);
}

.hero-accent {
  color: var(--accent);
}

.hero-line-secondary {
  color: var(--muted);
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.hero-line-secondary span {
  color: var(--text);
}

.section {
  margin-top: 0.5rem;
}

.section + .section {
  margin-top: 4rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0 0.75rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.section-header h2 {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding-bottom: 1px;
  background: var(--line);
}

.product {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 21rem;
  flex-direction: column;
  padding: 1.5rem 1.25rem 1.4rem;
  background: var(--bg);
  transition: background-color 150ms ease;
}

.product:hover {
  background: var(--raised);
}

.product::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  width: auto;
  height: 2px;
  background: var(--product-accent, var(--accent));
  content: "";
  opacity: 0.7;
  transition: opacity 150ms ease;
}

.product:hover::before {
  opacity: 1;
}

.product-sanoo {
  --product-accent: #5b9bea;
}

.product-vizoplay {
  --product-accent: #e7a94e;
}

.product-wordprix {
  --product-accent: #bd91e7;
}

.product-icon {
  display: block;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1.25rem;
  border-radius: 0.55rem;
  object-fit: cover;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.product-name {
  display: flex;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.product h3 {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.product h3 a {
  color: inherit;
  text-decoration: none;
}

.product h3 a::after {
  margin-left: 0.35em;
  color: var(--faint);
  content: "↗";
  font-size: 0.68em;
  font-weight: 400;
  vertical-align: 0.12em;
}

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

.product h3 a:hover::after {
  color: var(--accent-hover);
}

.product-status {
  display: inline-flex;
  align-items: center;
  color: var(--product-accent, var(--accent));
  font-size: 0.75rem;
  font-weight: 500;
}

.product-status::before {
  width: 0.36rem;
  height: 0.36rem;
  margin-right: 0.38rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.product-description {
  max-width: 36rem;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-wrap: pretty;
}

.product-meta {
  display: flex;
  gap: 0.15rem 0.75rem;
  flex-wrap: wrap;
  list-style: none;
  color: var(--faint);
  font-size: 0.75rem;
  margin-top: auto;
  padding-top: 1.1rem;
}

.product-meta li + li::before {
  margin-right: 0.75rem;
  color: var(--line);
  content: "·";
}

.product-meta li:first-child {
  color: color-mix(in srgb, var(--product-accent, var(--accent)) 72%, var(--faint));
}

.product-actions {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.25rem 1rem;
  flex-wrap: wrap;
  min-height: 2.55rem;
  padding-top: 1.3rem;
  font-size: 0.8rem;
}

.product-actions-placeholder {
  pointer-events: none;
}

.product-actions a {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.store-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.store-mark {
  flex: 0 0 auto;
  width: 0.92rem;
  height: 0.92rem;
}

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

.site-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  margin-top: 3.5rem;
  padding-top: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: lining-nums;
}

/* MCP page */

.page-intro {
  padding: clamp(4.5rem, 11vw, 7.5rem) 0 3.5rem;
  text-align: center;
}

.page-intro h1 {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
}

.page-intro p:last-child {
  max-width: 31rem;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.server {
  padding: 1.4rem 0.75rem;
  border-bottom: 1px solid var(--line);
  transition: background-color 150ms ease, border-color 150ms ease;
}

.server:first-child {
  border-top: 1px solid var(--line);
}

.server:hover {
  background: var(--raised);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.server h2 {
  margin-bottom: 0.25rem;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.server .url {
  margin-bottom: 0.7rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-variant-numeric: lining-nums;
  overflow-wrap: anywhere;
}

.server .desc {
  margin-bottom: 0.8rem;
  color: var(--muted);
}

.tool-list,
.notes ul {
  list-style: none;
}

.tool-list {
  display: grid;
  gap: 0.32rem;
}

.tool-list li {
  color: var(--muted);
  font-size: 0.88rem;
}

.tool-list code {
  display: inline-block;
  min-width: 6.4rem;
  margin-right: 0.4rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-variant-numeric: lining-nums;
}

.config {
  margin-top: 3.25rem;
}

.config h2,
.notes h2 {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.config h2 {
  margin-bottom: 0.8rem;
}

pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--inset);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.6;
  overflow-x: auto;
}

.notes {
  max-width: 44rem;
  margin-top: 3.25rem;
  padding: 1.5rem 0.75rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.notes p + p {
  margin-top: 0.8rem;
}

.notes h2 {
  margin: 2rem 0 0.65rem;
}

.notes li {
  padding: 0.16rem 0;
}

.notes li::before {
  margin-right: 0.55rem;
  color: var(--accent);
  content: "–";
}

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

  .product {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .page {
    padding-top: 1.25rem;
    padding-bottom: 3rem;
  }

  .header-meta {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding-top: 4.25rem;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.2rem, 8.2vw, 3.6rem);
  }

  .page-intro h1 {
    font-size: clamp(2.45rem, 10.5vw, 3.8rem);
  }

  .product-description {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .product-actions-placeholder {
    min-height: 0;
    padding-top: 0;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }

  .nav,
  .skip {
    display: none;
  }

  .page {
    width: auto;
    margin: 0;
    padding: 0;
  }

  a {
    color: inherit;
    text-decoration: underline;
  }
}
