:root {
  --navy: #15233f;
  --navy-deep: #0d1628;
  --ink: #162033;
  --muted: #5b667a;
  --line: rgba(21, 35, 63, 0.12);
  --paper: #f5f7fb;
  --white: #ffffff;
  --sky: #d8e3f4;
  --gold: #c4a35a;
  --accent: #2f6fed;
  --ok: #1f7a4c;
  --bad: #b42318;
  --sans: "Instrument Sans", "Segoe UI", sans-serif;
  --serif: "Newsreader", "Times New Roman", serif;
  --shadow: 0 18px 50px rgba(13, 22, 40, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 17px;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13, 22, 40, 0.94);
  backdrop-filter: blur(14px);
  color: #fff;
  border-bottom: 1px solid rgba(196, 163, 90, 0.22);
}

.header-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  text-decoration: none;
  display: grid;
  gap: 2px;
}

.brand-kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
}

.nav a:hover { color: #fff; }

.nav-cta {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy-deep) !important;
  font-weight: 600;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 70% at 15% 20%, rgba(47, 111, 237, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(196, 163, 90, 0.22), transparent 50%),
    linear-gradient(160deg, var(--navy-deep), #1c335c 55%, #243a63);
  min-height: min(72vh, 640px);
  display: grid;
  align-items: end;
}

.hero-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(13, 22, 40, 0.55)),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 18px,
      rgba(255, 255, 255, 0.015) 18px,
      rgba(255, 255, 255, 0.015) 19px
    );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  width: min(800px, calc(100% - 40px));
  margin: 0 auto 64px;
  padding-top: 96px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.hero-lede {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.86);
  max-width: 38rem;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
}

.btn-primary:hover { background: #d4b56a; }

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* Sections */
.section-kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.about {
  padding: 72px 0 40px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px 48px;
  align-items: end;
}

.about h2,
.groups-head h2,
.interest h2,
.group-detail h1 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.about h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  max-width: 14ch;
}

.about-copy {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 40rem;
}

.groups {
  padding: 24px 0 80px;
}

.groups-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 28px;
}

.groups-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.filter:hover { color: var(--ink); border-color: rgba(21, 35, 63, 0.28); }

.filter.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.group-card {
  display: block;
  text-decoration: none;
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  border: 1px solid rgba(21, 35, 63, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: rise-in 0.55s ease both;
}

.group-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(13, 22, 40, 0.2);
}

.group-card img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  background: var(--sky);
}

.group-card-body {
  padding: 14px 14px 16px;
}

.group-card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.group-card-body p {
  font-size: 0.88rem;
  color: var(--muted);
}

.filter-empty {
  margin-top: 24px;
  color: var(--muted);
  text-align: center;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Interest */
.interest {
  padding: 0 0 96px;
}

.interest-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  background:
    linear-gradient(135deg, rgba(216, 227, 244, 0.65), rgba(255, 255, 255, 0.95)),
    var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow);
}

.interest h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 12px;
}

.interest-copy {
  color: var(--muted);
  max-width: 28rem;
}

.interest-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.interest-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.interest-form label em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
}

.interest-form .full { grid-column: 1 / -1; }

.interest-form input,
.interest-form select,
.interest-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--white);
  color: var(--ink);
}

.interest-form input:focus,
.interest-form select:focus,
.interest-form textarea:focus {
  outline: 2px solid rgba(47, 111, 237, 0.35);
  border-color: var(--accent);
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.form-status {
  grid-column: 1 / -1;
  min-height: 1.4em;
  font-size: 0.95rem;
  font-weight: 500;
}

.form-status.is-ok { color: var(--ok); }
.form-status.is-bad { color: var(--bad); }

/* Group detail */
.group-page {
  padding-bottom: 80px;
}

.group-page .loading {
  width: min(1120px, calc(100% - 40px));
  margin: 48px auto;
  color: var(--muted);
}

.group-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 36px;
  width: min(1120px, calc(100% - 40px));
  margin: 40px auto 0;
  align-items: start;
}

.group-hero-art {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(21, 35, 63, 0.08);
}

.group-hero-art img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.group-detail .section-kicker { margin-bottom: 8px; }

.group-detail h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 10px;
}

.group-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.group-blurb {
  font-size: 1.08rem;
  max-width: 38rem;
  margin-bottom: 24px;
}

.meta-list {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.meta-list div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.meta-list span {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding-top: 3px;
}

.meta-list strong { font-weight: 600; }

.group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.group-actions .btn-ghost {
  color: var(--navy);
  border-color: var(--line);
}

.group-actions .btn-ghost:hover {
  background: rgba(21, 35, 63, 0.04);
}

.group-interest {
  width: min(720px, calc(100% - 40px));
  margin: 48px auto 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(22px, 4vw, 32px);
  box-shadow: var(--shadow);
}

.group-interest h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.group-interest > p {
  color: var(--muted);
  margin-bottom: 20px;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.78);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
}

.site-footer strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

.site-footer p { font-size: 0.95rem; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover { text-decoration: underline; }

@media (max-width: 980px) {
  .group-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid,
  .interest-panel,
  .group-hero {
    grid-template-columns: 1fr;
  }
  .group-hero-art {
    max-width: 360px;
  }
}

@media (max-width: 720px) {
  .group-grid { grid-template-columns: repeat(2, 1fr); }
  .interest-form { grid-template-columns: 1fr; }
  .nav a:not(.nav-cta) { display: none; }
  .meta-list div { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 480px) {
  .group-grid { grid-template-columns: 1fr; }
  .group-card img { aspect-ratio: 3 / 4; max-height: 420px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .group-card,
  .btn { transition: none; }
  .group-card { animation: none; }
}
