@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,480;9..144,560;9..144,640&family=IBM+Plex+Mono:wght@400;500&family=Outfit:wght@360;420;520;600&display=swap");

:root {
  --bg: #0c0b09;
  --surface: #151310;
  --fg: #f4efe6;
  --muted: #9b9388;
  --accent: #e08a3a;
  --accent-soft: #f0c9a0;
  --border: #2c2822;
  --line: #3a342c;
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-sans: "Outfit", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  min-height: 100dvh;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(1120px, calc(100% - 2.5rem)); margin: 0 auto; }
header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 28px; height: 28px; border-radius: 4px; flex: none; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mono { font-family: var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; font-size: 11px; color: var(--muted); }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a, .nav button {
  background: none; border: 0; color: var(--muted);
  padding: 10px 12px; border-radius: 8px; font-size: 14px;
  white-space: nowrap;
}
.nav a:hover, .nav button:hover, .nav a.active { color: var(--fg); }
.nav .btn-ghost { min-height: 40px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 8px; font-size: 14px;
}
.btn-primary { background: var(--accent); color: var(--bg); font-weight: 520; border: 1px solid transparent; }
.btn-ghost { border: 1px solid var(--border); color: var(--fg); }
.menu { display: none; width: 44px; height: 44px; border: 0; background: none; color: var(--fg); font-size: 20px; }
.mobile {
  display: none; border-top: 1px solid var(--border);
  padding: 8px 20px 16px; background: var(--bg);
}
.mobile a { display: flex; min-height: 48px; align-items: center; font-size: 1rem; border-bottom: 1px solid var(--border); }
.mobile a:last-child { border-bottom: 0; }

.hero { padding: clamp(40px, 9vw, 72px) 0 clamp(48px, 9vw, 80px); }
.kicker { color: var(--accent); }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8.5vw, 4.4rem);
  line-height: 1.05; margin: 18px 0 22px; max-width: 16ch;
}
.lede { max-width: 38rem; color: var(--muted); font-size: clamp(1rem, 2.5vw, 1.05rem); line-height: 1.65; }
.lede a { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.affils {
  list-style: none; padding: 0; margin: 22px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.affils a {
  display: inline-flex; align-items: center; min-height: 36px;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.affils a:hover { color: var(--fg); border-color: var(--line); }

section.band { border-top: 1px solid var(--border); padding: clamp(36px, 7vw, 56px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 16px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 5vw, 2rem); margin-top: 8px; }
.section-head > a { padding: 8px 0; white-space: nowrap; }

.community-grid {
  display: grid; gap: 12px; margin-top: 24px;
  grid-template-columns: 1fr;
}
.community-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px; min-width: 0;
}
.community-card:hover { border-color: var(--line); }
.community-card h3 { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; }
.community-card p:last-child { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
@media (min-width: 700px) { .community-grid { grid-template-columns: repeat(3, 1fr); } }

.grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .grid { grid-template-columns: 1fr 1fr 1fr; gap: 18px; } }

.card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px;
  overflow-wrap: break-word;
}
.card:hover { border-color: var(--line); }
.card h3 { font-family: var(--font-display); font-size: clamp(1.2rem, 4vw, 1.45rem); margin: 14px 0 10px; line-height: 1.2; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.55; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag {
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 10px; font-family: var(--font-mono); font-size: 11px; color: var(--muted);
}

.filters {
  display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 8px; margin-top: 24px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 999px; flex: none;
  border: 1px solid var(--border); background: transparent; color: var(--muted); white-space: nowrap;
}
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.detail { padding: clamp(40px, 8vw, 56px) 0 clamp(48px, 10vw, 80px); max-width: min(720px, 100%); }
.detail h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 7vw, 3rem); margin: 12px 0 18px; line-height: 1.1; }
.detail .summary { color: var(--muted); font-size: clamp(1rem, 2.8vw, 1.1rem); line-height: 1.65; }
.detail .summary a { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.about-sub { font-family: var(--font-display); font-size: clamp(1.3rem, 4vw, 1.6rem); margin: 36px 0 12px; }
.hl { list-style: none; padding: 24px 0 0; margin: 24px 0 0; border-top: 1px solid var(--border); }
.hl li { display: flex; gap: 12px; margin: 0 0 12px; line-height: 1.5; }
.hl a { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.dot { width: 6px; height: 6px; border-radius: 99px; background: var(--accent); margin-top: 8px; flex: none; }

footer { border-top: 1px solid var(--border); padding: 36px 0 48px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 20px; }
.foot h2 { font-family: var(--font-display); font-size: 1.2rem; }
.foot p { color: var(--muted); max-width: 28rem; font-size: 0.95rem; line-height: 1.6; }
.foot-affils { font-size: 0.85rem !important; }
.foot-affils a { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 3px; }
.foot-links {
  display: flex; flex-wrap: wrap; gap: 12px 18px; align-content: start;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.foot-links a { padding: 6px 0; }
.foot-links a:hover { color: var(--fg); }

.hidden { display: none !important; }
.page { display: none; }
.page.show { display: block; }

/* Tablet / small laptop nav */
@media (max-width: 800px) {
  .nav { display: none; }
  .menu { display: inline-flex; align-items: center; justify-content: center; }
  .mobile.open { display: block; }
}

/* Phones */
@media (max-width: 480px) {
  .wrap { width: calc(100% - 2rem); }
  .bar { height: 56px; }
  .hero h1 { max-width: 100%; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
  .card { padding: 18px; }
  .community-card { padding: 18px; }
  .filters { margin-inline: calc(-1rem); padding-inline: 1rem; }
  .section-head { flex-direction: column; align-items: start; }
  .foot { flex-direction: column; }
  .foot-links { flex-direction: column; gap: 4px; }
}

/* Very small screens */
@media (max-width: 360px) {
  .affils a { font-size: 10px; padding: 6px 12px; }
  .chip { padding: 0 14px; }
}

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