/* Labstack Pick — Homelab Buyer Matrix
   Direction: rack-bay greens, warm phosphor text, steel lines. No purple/cream clichés. */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,650;9..144,700&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  --bg: #0a1210;
  --bg-elev: #121c18;
  --text: #e7f2ea;
  --muted: #8fa89a;
  --accent: #5fd4a0;
  --accent-deep: #2a9b6a;
  --line: #24332c;
  --warn: #d4a15f;
  --focus: #9be7c4;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(10, 18, 16, 0.15) 0%, transparent 28%),
    radial-gradient(ellipse 80% 50% at 12% -8%, rgba(42, 155, 106, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 92% 8%, rgba(95, 212, 160, 0.08), transparent 50%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 47px,
      rgba(36, 51, 44, 0.35) 47px,
      rgba(36, 51, 44, 0.35) 48px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 47px,
      rgba(36, 51, 44, 0.22) 47px,
      rgba(36, 51, 44, 0.22) 48px
    );
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--focus);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #04140c;
  padding: 0.5rem 0.75rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ——— Header ——— */
.top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(10, 18, 16, 0.82);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  position: relative;
}
.brand::after {
  content: "";
  display: block;
  height: 2px;
  width: 0;
  margin-top: 0.2rem;
  background: var(--accent);
  transition: width 0.45s var(--ease);
}
.brand:hover::after,
.brand:focus-visible::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.4rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
}

main.shell {
  padding-top: 0.5rem;
  padding-bottom: 3rem;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  overflow: hidden;
}

.hero-rail {
  position: absolute;
  inset: 8% auto 12% -1.5rem;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  opacity: 0.55;
  pointer-events: none;
  animation: rail-pulse 4.5s var(--ease) infinite;
}

@keyframes rail-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.92);
  }
  50% {
    opacity: 0.7;
    transform: scaleY(1);
  }
}

.hero-copy {
  max-width: 38rem;
  animation: rise 0.85s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.65rem;
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5.2vw, 3.35rem);
  margin: 0 0 0.85rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h2 {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.lede {
  color: var(--muted);
  max-width: 38rem;
  font-size: 1.05rem;
  margin: 0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: #04140c;
  text-decoration: none;
  padding: 0.72rem 1.15rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.2s ease, box-shadow 0.25s ease;
}
.cta:hover {
  background: var(--focus);
  color: #04140c;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(42, 155, 106, 0.25);
}
.cta.ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-deep);
}
.cta.ghost:hover {
  background: rgba(95, 212, 160, 0.08);
  color: var(--focus);
  box-shadow: none;
}

.section {
  padding: 0.5rem 0 1.5rem;
  animation: rise 0.7s var(--ease) 0.12s both;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.section-head h2 {
  margin: 0;
}

.link-quiet {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ——— Lists / link stacks (not cards) ——— */
.link-stack {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.link-stack li {
  border-bottom: 1px solid var(--line);
}
.link-stack a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0.15rem;
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s ease, padding-left 0.25s var(--ease);
}
.link-stack a:hover {
  color: var(--accent);
  padding-left: 0.35rem;
}
.link-stack .meta {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.plain {
  padding-left: 1.1rem;
}
.plain a {
  color: var(--accent);
}

/* ——— Matrix + filter ——— */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.25rem 0 0.5rem;
}

.toolbar label {
  font-size: 0.85rem;
  color: var(--muted);
}

.toolbar input[type="search"],
.toolbar select {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font: inherit;
  min-width: min(100%, 16rem);
}
.toolbar input::placeholder {
  color: var(--muted);
}

.filter-count {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: auto;
}

.matrix-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 1.5rem;
  border-top: 1px solid var(--line);
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 560px;
}
.matrix th,
.matrix td {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0.55rem;
  text-align: left;
  vertical-align: top;
}
.matrix th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.matrix tbody tr {
  transition: background 0.2s ease;
}
.matrix tbody tr:hover {
  background: rgba(95, 212, 160, 0.04);
}
.matrix tbody tr.is-hidden {
  display: none;
}
.matrix a {
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
}
.matrix a:hover {
  color: var(--accent);
}
.matrix .chip {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 0.1rem 0.4rem;
  margin: 0.15rem 0.2rem 0 0;
}

/* ——— Product / compare ——— */
.specs {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) 1fr;
  gap: 0.55rem 1.25rem;
  margin: 1rem 0 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.specs dt {
  color: var(--muted);
  font-size: 0.9rem;
}
.specs dd {
  margin: 0;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
.compare-col h2 {
  margin-top: 0;
  font-size: 1.35rem;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
}
.compare-table th,
.compare-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.4rem;
  text-align: left;
  vertical-align: top;
}
.compare-table th {
  color: var(--muted);
  font-weight: 500;
  width: 28%;
}

.buy-block {
  margin: 1.75rem 0;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}
.buy-block .note {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.35rem 0 0.9rem;
}

.related {
  margin-top: 2rem;
}

.faq {
  margin: 1.75rem 0;
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::before {
  content: "+";
  display: inline-block;
  width: 1.25rem;
  color: var(--accent);
  font-weight: 600;
}
.faq details[open] summary::before {
  content: "–";
}
.faq p {
  color: var(--muted);
  margin: 0.5rem 0 0.25rem 1.25rem;
}

.hub-picks {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}
.hub-picks li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

/* ——— Footer ——— */
.foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2rem;
  padding: 2rem 0 2.5rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.25));
}
.foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  gap: 1rem;
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.foot a {
  color: var(--accent);
  text-decoration: none;
}
.foot a:hover {
  text-decoration: underline;
}
.disclosure {
  max-width: 42rem;
  line-height: 1.55;
}

.empty {
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-block;
  }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding-bottom: 0.5rem;
  }
  .nav.is-open {
    display: flex;
    animation: rise 0.35s var(--ease) both;
  }
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .specs {
    grid-template-columns: 1fr;
  }
  .hero-rail {
    display: none;
  }
  .filter-count {
    margin-left: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
