:root {
  --navy: #07182f;
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --blue-soft: #eef5ff;
  --cyan-soft: #eefbff;
  --text: #101828;
  --muted: #5f6b7a;
  --soft: #f7f9fc;
  --border: #e3e9f1;
  --green: #138a52;
  --green-soft: #ebfbf2;
  --amber: #b76d00;
  --amber-soft: #fff6e5;
  --violet: #7357d8;
  --violet-soft: #f4f0ff;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.07);
  --max: 1180px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.community-page {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.community-page main a { color: inherit; text-decoration: none; }
.community-page main button { font: inherit; }
.community-page img { display: block; max-width: 100%; }
.community-container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.community-fold {
  position: relative;
  min-height: 700px;
  padding: 92px 0;
  overflow: hidden;
}
.community-fold--hero {
  min-height: 740px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 16% 10%, rgba(37,99,235,.10), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(115,87,216,.09), transparent 27%),
    linear-gradient(180deg, #fff, #fbfcff);
}
.community-fold--soft { background: var(--soft); }
.community-fold--dark {
  color: #fff;
  background:
    radial-gradient(circle at 78% 20%, rgba(37,99,235,.30), transparent 32%),
    #07182f;
}
.community-fold--dark h2,
.community-fold--dark .community-kicker { color: #fff; }
.community-fold--dark .community-copy { color: #b7c5d6; }

.community-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.community-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.community-page h1,
.community-page h2 {
  margin: 0;
  color: var(--navy);
  font-weight: 900;
  letter-spacing: -.045em;
}
.community-page h1 {
  max-width: 820px;
  margin-inline: auto;
  font-size: clamp(50px, 6vw, 76px);
  line-height: .98;
  text-align: center;
}
.community-page h2 {
  max-width: 760px;
  font-size: clamp(38px, 4.5vw, 58px);
  line-height: 1.02;
}
.community-lead {
  max-width: 760px;
  margin: 24px auto 0;
  color: #526173;
  font-size: 18px;
  line-height: 1.68;
  text-align: center;
}
.community-copy {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}
.community-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.community-page .btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 850;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.community-page .btn:hover { transform: translateY(-1px); }
.community-page .btn-primary { color: #fff; background: var(--blue); box-shadow: 0 8px 18px rgba(37,99,235,.20); }
.community-page .btn-primary:hover { background: var(--blue-2); }
.community-page .btn-light { color: var(--navy); background: #fff; border-color: #d7dee8; }

/* Hero community map */
.community-stage {
  position: relative;
  width: min(920px, 100%);
  height: 320px;
  margin: 58px auto 0;
}
.community-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  height: 190px;
  transform: translate(-50%,-50%);
  border: 1px solid #cfddf1;
  border-radius: 34px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  text-align: center;
  z-index: 4;
}
.community-core strong { display: block; color: var(--navy); font-size: 17px; }
.community-core span { display: block; margin-top: 7px; color: #758398; font-size: 11px; }
.community-core .core-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--blue);
  background: var(--blue-soft);
}
.community-node {
  position: absolute;
  width: 190px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-soft);
  animation: communityFloat 5s ease-in-out infinite;
  z-index: 5;
}
.community-node strong { display: block; color: var(--navy); font-size: 11px; }
.community-node small { display: block; margin-top: 5px; color: #7a8797; font-size: 9px; line-height: 1.45; }
.community-node--a { left: 2%; top: 5%; }
.community-node--b { right: 2%; top: 9%; animation-delay: .7s; }
.community-node--c { left: 4%; bottom: 4%; animation-delay: 1.3s; }
.community-node--d { right: 3%; bottom: 2%; animation-delay: 1.9s; }
.community-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40%;
  height: 1px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(37,99,235,.35), rgba(37,99,235,.05));
  z-index: 1;
}
.community-line--1 { transform: rotate(205deg); }
.community-line--2 { transform: rotate(-25deg); }
.community-line--3 { transform: rotate(155deg); }
.community-line--4 { transform: rotate(25deg); }

/* Board layout */
.community-board-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 38px;
}
.community-board-head .community-copy { margin-bottom: 4px; }
.community-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.board-column {
  min-height: 340px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}
.board-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 850;
}
.board-count {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #64748b;
  background: #f1f4f8;
  font-size: 9px;
}
.board-card {
  position: relative;
  padding: 13px;
  border: 1px solid #e6ebf2;
  border-radius: 13px;
  background: #fbfcfe;
  box-shadow: 0 7px 18px rgba(15,23,42,.04);
}
.board-card + .board-card { margin-top: 9px; }
.board-card strong { display: block; color: #263447; font-size: 10px; }
.board-card span { display: block; margin-top: 4px; color: #8190a2; font-size: 8px; line-height: 1.4; }
.board-tag {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 7px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 7px;
  font-weight: 850;
}
.board-card--pulse { animation: cardPulse 5.5s ease-in-out infinite; }

/* Horizontal journey */
.journey-shell {
  position: relative;
  width: 100%;
  margin-top: 52px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  background: rgba(255,255,255,.055);
  box-shadow: 0 24px 50px rgba(0,0,0,.10);
}
.journey-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  position: relative;
}
.journey-row::before {
  content: "";
  position: absolute;
  top: 23px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: rgba(255,255,255,.14);
}
.journey-progress {
  position: absolute;
  top: 23px;
  left: 8%;
  width: 0;
  height: 2px;
  background: #6ea1ff;
  animation: journeyRun 7s ease-in-out infinite;
}
.journey-stop { position: relative; z-index: 2; text-align: center; }
.journey-stop i {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.22);
  border-radius: 50%;
  color: #dfe9f8;
  background: #0e2649;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}
.journey-stop strong { display: block; margin-top: 12px; color: #fff; font-size: 10px; }
.journey-stop small { display: block; max-width: 130px; margin: 5px auto 0; color: #92a5bc; font-size: 8px; line-height: 1.5; }
.journey-stop:nth-child(2) i { animation: journeyStep1 7s infinite; }
.journey-stop:nth-child(3) i { animation: journeyStep2 7s infinite; }
.journey-stop:nth-child(4) i { animation: journeyStep3 7s infinite; }
.journey-stop:nth-child(5) i { animation: journeyStep4 7s infinite; }
.journey-stop:nth-child(6) i { animation: journeyStep5 7s infinite; }

.community-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 34px;
}
.community-cta-row p { max-width: 650px; margin: 0; color: #aebed1; font-size: 13px; line-height: 1.65; }

/* Metric strip */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 42px;
}
.metric-card {
  min-height: 126px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.metric-card strong { display: block; color: var(--navy); font-size: 28px; letter-spacing: -.03em; }
.metric-card span { display: block; margin-top: 6px; color: #778599; font-size: 10px; }
.metric-card small { display: block; margin-top: 14px; color: var(--green); font-size: 8px; font-weight: 850; }

/* Segmentation layout */
.segment-layout {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 58px;
  align-items: center;
}
.segment-cloud {
  position: relative;
  min-height: 420px;
}
.segment-chip {
  position: absolute;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: #334155;
  font-size: 10px;
  font-weight: 850;
  animation: communityFloat 6s ease-in-out infinite;
}
.segment-chip:nth-child(1) { left: 8%; top: 8%; }
.segment-chip:nth-child(2) { right: 10%; top: 14%; animation-delay: .5s; }
.segment-chip:nth-child(3) { left: 22%; top: 37%; animation-delay: 1s; }
.segment-chip:nth-child(4) { right: 3%; top: 47%; animation-delay: 1.5s; }
.segment-chip:nth-child(5) { left: 3%; bottom: 16%; animation-delay: 2s; }
.segment-chip:nth-child(6) { right: 20%; bottom: 7%; animation-delay: 2.5s; }
.segment-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 180px;
  height: 180px;
  transform: translate(-50%,-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-align: center;
  color: #fff;
  background: linear-gradient(145deg, #07182f, #173c70);
  box-shadow: var(--shadow);
}
.segment-center strong { font-size: 18px; }
.segment-center small { display: block; margin-top: 5px; color: #b7c7d9; font-size: 9px; }

/* Membership tier visual */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.tier-card {
  position: relative;
  min-height: 300px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.tier-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tier-card.featured { border-color: #b9d0ff; box-shadow: 0 20px 55px rgba(37,99,235,.13); }
.tier-badge {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.tier-card h3 { margin: 18px 0 0; color: var(--navy); font-size: 22px; }
.tier-card p { margin: 8px 0 0; color: #758398; font-size: 11px; line-height: 1.55; }
.tier-list { display: grid; gap: 10px; margin-top: 22px; }
.tier-list span { display: flex; align-items: center; gap: 8px; color: #425166; font-size: 10px; }
.tier-list i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-style: normal; font-size: 9px; font-weight: 900; }

/* Benefits matrix */
.benefit-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 38px;
}
.benefit-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #fff;
}
.benefit-card strong { display: block; color: var(--navy); font-size: 12px; }
.benefit-card p { margin: 7px 0 0; color: #748296; font-size: 10px; line-height: 1.55; }
.benefit-card:nth-child(2) { background: var(--blue-soft); border-color: #d8e5ff; }
.benefit-card:nth-child(3) { background: var(--green-soft); border-color: #d5efdf; }
.benefit-card:nth-child(4) { background: var(--violet-soft); border-color: #e1d9ff; }

@keyframes communityFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes cardPulse {
  0%,100% { transform: translateY(0); box-shadow: 0 7px 18px rgba(15,23,42,.04); }
  50% { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(37,99,235,.10); }
}
@keyframes journeyRun {
  0%,8% { width: 0; }
  25% { width: 21%; }
  42% { width: 42%; }
  60% { width: 63%; }
  78%,100% { width: 84%; }
}
@keyframes journeyStep1 { 0%,100% { border-color:#6ea1ff; background:#2563eb; color:#fff; } }
@keyframes journeyStep2 { 0%,20% { } 28%,100% { border-color:#6ea1ff; background:#2563eb; color:#fff; } }
@keyframes journeyStep3 { 0%,38% { } 46%,100% { border-color:#6ea1ff; background:#2563eb; color:#fff; } }
@keyframes journeyStep4 { 0%,56% { } 64%,100% { border-color:#6ea1ff; background:#2563eb; color:#fff; } }
@keyframes journeyStep5 { 0%,74% { } 82%,100% { border-color:#66d69a; background:#138a52; color:#fff; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

@media (max-width: 980px) {
  .community-fold { min-height:auto; padding:76px 0; }
  .community-board { grid-template-columns: repeat(2, 1fr); }
  .segment-layout { grid-template-columns:1fr; }
  .metric-strip { grid-template-columns:repeat(2,1fr); }
  .tier-grid { grid-template-columns:1fr; }
  .journey-row { grid-template-columns:1fr; gap:10px; }
  .journey-row::before, .journey-progress { display:none; }
  .journey-stop { display:grid; grid-template-columns:48px 1fr; gap:12px; text-align:left; align-items:center; }
  .journey-stop i { margin:0; }
  .journey-stop strong, .journey-stop small { margin-left:0; margin-right:0; max-width:none; }
}

@media (max-width: 720px) {
  .community-container { width:min(var(--max), calc(100% - 28px)); }
  .community-fold { padding:60px 0; }
  .community-page h1 { font-size:44px; }
  .community-page h2 { font-size:38px; }
  .community-lead { font-size:17px; }
  .community-stage { height:430px; margin-top:42px; }
  .community-core { width:160px; height:160px; }
  .community-node { width:155px; }
  .community-node--a { left:0; top:0; }
  .community-node--b { right:0; top:0; }
  .community-node--c { left:0; bottom:0; }
  .community-node--d { right:0; bottom:0; }
  .community-line { display:none; }
  .community-board { grid-template-columns:1fr; }
  .community-board-head { align-items:flex-start; flex-direction:column; }
  .metric-strip { grid-template-columns:1fr 1fr; }
  .segment-cloud { min-height:500px; }
  .benefit-matrix { grid-template-columns:1fr; }
  .community-cta-row { align-items:flex-start; flex-direction:column; }
}

@media (max-width: 480px) {
  .community-page h1 { font-size:39px; }
  .community-page h2 { font-size:34px; }
  .community-actions .btn { width:100%; }
  .metric-strip { grid-template-columns:1fr; }
  .community-node { width:145px; padding:12px; }
}

.community-centered { text-align: center; }
