/* Catalog shell (home, devices, blogs index, device-spec): same hue + fonts as articles. */

:root {
  --panel: var(--bg-elevated);
  --muted: var(--fg-secondary);
  --soft: var(--fg-tertiary);
  --rule: var(--border);
  --font: "Inter Tight", "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Instrument Serif", "Newsreader", serif;
}

html {
  background: var(--bg);
  color: var(--fg);
  color-scheme: light;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-feature-settings: "ss01", "ss03", "cv11", "liga";
  font-synthesis: none;
}

.display-serif {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

.shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 30px 0 24px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: nowrap;
}

.brand {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* Scoped name: sections.css also defines `.nav` (sticky article bar). */
.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav a {
  text-decoration: none;
  transition: color 160ms ease;
  white-space: nowrap;
}

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

.topbar__end {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 28px);
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
}

.topbar a.topbar__cta,
.topbar__cta {
  flex-shrink: 0;
  width: auto;
  max-width: none;
  min-height: 48px;
  padding: 0 22px;
  font-size: 12px;
  letter-spacing: 0.14em;
}

main {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  padding: clamp(48px, 7vw, 88px) 0 64px;
}

.hero,
.page-hero {
  max-width: min(58rem, 100%);
}

.eyebrow,
.label,
.meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
}

.hero h1,
.page-hero h1 {
  max-width: 12ch;
  margin: 20px 0 24px;
  font-family: var(--serif);
  font-size: clamp(52px, 7.6vw, 108px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0;
}

.page-hero h1 {
  max-width: none;
  margin: 18px 0 0;
}

.hero-copy,
.page-hero .lead {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  background: var(--accent);
  color: oklch(99% 0.004 255);
  border: 1px solid var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 160ms ease;
}

.cta:hover {
  opacity: 0.88;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: baseline;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.02;
  letter-spacing: 0;
  font-weight: 400;
}

.text-link {
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.device-index {
  border: 1px solid var(--rule);
  background: var(--panel);
}

.device-index__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
}

.device-index__head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.02;
  letter-spacing: 0;
  font-weight: 400;
}

.device-index__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.device-index__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 560;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: inherit;
  border-right: 1px solid var(--rule);
  transition: color 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.device-index__list li:last-child a {
  border-right: none;
}

.device-index__list a::after {
  content: "→";
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--soft);
  flex-shrink: 0;
  transition: color 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.device-index__list a:hover,
.device-index__list a:focus-visible {
  color: var(--accent-deep);
}

.device-index__list a:hover::after,
.device-index__list a:focus-visible::after {
  color: var(--accent-deep);
}

.blog-index {
  display: grid;
  gap: clamp(18px, 2.5vw, 24px);
}

.blog-feature {
  padding: clamp(28px, 4vw, 40px);
  background: var(--panel);
  border: 1px solid var(--rule);
}

.blog-feature__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}

.blog-feature__topic {
  color: var(--accent-deep);
}

.blog-feature__sep {
  color: var(--rule);
  letter-spacing: 0;
}

.blog-feature__title {
  margin: 0;
  max-width: 28ch;
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: 0;
}

.blog-feature__title a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.blog-feature__title a:hover,
.blog-feature__title a:focus-visible {
  color: var(--accent-deep);
}

.blog-feature__deck {
  margin: 20px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.final {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.final p {
  max-width: 54ch;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.site-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "lead cta"
    "copy copy";
  gap: 22px 32px;
  align-items: center;
  padding: 32px 0 44px;
  border-top: 1px solid var(--rule);
}

.site-foot__lead {
  grid-area: lead;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  align-self: center;
  gap: 10px 16px;
  min-width: 0;
}

.site-foot__sep {
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  color: var(--soft);
  user-select: none;
}

.site-foot__domain,
.site-foot__email {
  font-family: var(--mono);
  font-size: clamp(14px, 1.15vw, 16px);
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-transform: none;
  text-decoration: none;
  color: var(--muted);
  transition: color 160ms ease;
}

.site-foot__domain:hover,
.site-foot__email:hover {
  color: var(--accent-deep);
}

.site-foot__cta {
  grid-area: cta;
  justify-self: end;
  width: auto;
  max-width: none;
  min-height: 48px;
  padding: 0 22px;
  font-size: 12px;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.site-foot__cta:hover {
  opacity: 0.92;
}

.site-foot__copy {
  grid-area: copy;
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 36px, 680px);
  }

  .hero h1 {
    max-width: 10ch;
  }

  .blog-feature__title {
    max-width: none;
  }

  .final {
    display: grid;
  }

  .final .cta {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .device-index__list {
    grid-template-columns: 1fr;
  }

  .device-index__list a {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    min-height: 40px;
  }

  .device-index__list li:last-child a {
    border-bottom: none;
  }
}

@media (max-width: 640px) {
  .site-foot {
    grid-template-columns: 1fr;
    grid-template-areas:
      "lead"
      "cta"
      "copy";
    gap: 16px;
  }

  .site-foot__cta {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .topbar {
    display: grid;
  }

  .topbar__end {
    width: 100%;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 12px;
    column-gap: 22px;
  }

  .topbar__cta {
    width: 100%;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 48px;
  }

  main {
    padding-top: 48px;
  }

  .section-head {
    display: grid;
  }
}
