/* The theme index wears the star-lord palette -- it is the namesake theme. */
:root {
  --bg: #0a0d24;
  --surface: #15183a;
  --border: #2a2e5a;
  --text: #f3e9ff;
  --muted: #8a7faf;
  --heading: #7fd7ff;
  --primary: #ff5da2;
  --sans: Montserrat, Arial, ui-sans-serif, system-ui, sans-serif;
  --mono: "Space Mono", "Source Code Pro", ui-monospace, monospace;
}

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

html {
  color-scheme: dark;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 clamp(16px, 5vw, 64px) 96px;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--mono);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  padding: clamp(56px, 10vw, 112px) 0 clamp(32px, 5vw, 56px);
  border-bottom: 4px dashed var(--primary);
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.masthead h1 {
  margin: 0;
  color: var(--heading);
  font-family: var(--sans);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.masthead p {
  max-width: 62ch;
  margin: 20px 0 0;
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.masthead a {
  color: var(--primary);
}

.count {
  display: inline-flex;
  gap: 8px;
  margin-top: 28px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ------------------------------------------------------------------ groups */

.group {
  padding-top: clamp(40px, 6vw, 72px);
}

.group h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 24px;
  color: var(--heading);
  font-family: var(--sans);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
}

.group h2 span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 400;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ------------------------------------------------------------- theme cards */

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover,
.card:focus-visible {
  border-color: var(--primary);
  transform: translateY(-3px);
  outline: none;
}

.card:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 45%, transparent);
}

/* Two stacked previews: the theme's dark mode over its light mode. */
.preview {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.mode {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 86px;
  padding: 12px 14px;
}

.mode b {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}

.mode em {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.chips {
  display: flex;
  gap: 5px;
}

.chips i {
  width: 16px;
  height: 16px;
  border-radius: 999px;
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--border);
}

.meta strong {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
}

.meta code {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.card:hover .meta strong,
.card:focus-visible .meta strong {
  color: var(--primary);
}

/* ------------------------------------------------------------------ footer */

.foot {
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

.foot a {
  color: var(--heading);
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
  .card:hover,
  .card:focus-visible {
    transform: none;
  }
}
