/* ==============================================================
   Community Page — Jodi Martin
   Extends theme.css; same tokens, Inter typography.
   Loaded only on Community pages via functions.php.
   ============================================================== */

.jm-community-page { position: relative; z-index: 2; }

/* --------------------------------------------------------------
   HERO
   -------------------------------------------------------------- */
.cm-hero {
  position: relative;
  padding: clamp(60px, 8vw, 110px) 0 clamp(50px, 6vw, 80px);
  border-bottom: 0.5px solid var(--rule);
}
.cm-hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-bottom: 22px;
  border-bottom: 0.5px solid var(--rule);
  margin-bottom: clamp(50px, 6vw, 80px);
  opacity: 0;
  animation: cmFadeUp 1s .1s cubic-bezier(.2,.7,.2,1) forwards;
}
.cm-hero-meta .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--brass);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  animation: pulse 2.4s ease-in-out infinite;
}
.cm-hero-center {
  text-align: center;
  max-width: 940px;
  margin: 0 auto clamp(50px, 6vw, 80px);
}
.cm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 28px;
  opacity: 0;
  animation: cmFadeUp 1s .25s cubic-bezier(.2,.7,.2,1) forwards;
}
.cm-eyebrow::before, .cm-eyebrow::after {
  content: '';
  width: 40px; height: 1px;
  background: var(--brass);
}
.cm-hero-title {
  font-weight: 200;
  font-size: clamp(50px, 9vw, 130px);
  line-height: .95;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 30px;
}
.cm-line { display: block; overflow: hidden; }
.cm-line span {
  display: block;
  transform: translateY(110%);
  animation: cmSlideUp 1.1s cubic-bezier(.2,.7,.2,1) forwards;
}
.cm-line:nth-child(1) span { animation-delay: .35s; }
.cm-line:nth-child(2) span { animation-delay: .5s; }
.cm-italic { font-style: italic; font-weight: 300; color: var(--navy); }
.cm-hero-sub {
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 300;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 auto 36px;
  opacity: 0;
  animation: cmFadeUp 1s .8s cubic-bezier(.2,.7,.2,1) forwards;
}
.cm-hero-actions {
  opacity: 0;
  animation: cmFadeUp 1s .95s cubic-bezier(.2,.7,.2,1) forwards;
}

.cm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 0.5px solid var(--rule);
  background: var(--cream);
  opacity: 0;
  animation: cmFadeUp 1s 1.1s cubic-bezier(.2,.7,.2,1) forwards;
}
.cm-stat {
  padding: clamp(24px, 3vw, 38px);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cm-stat + .cm-stat { border-left: 0.5px solid var(--rule); }
.cm-stat strong {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 200;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1;
}
.cm-stat span {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* --------------------------------------------------------------
   THE STANDARD (CREED)
   -------------------------------------------------------------- */
.cm-creed {
  padding: clamp(80px, 10vw, 150px) 0;
  background: var(--navy-deep);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.cm-creed::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(184,146,74,.14), transparent 60%);
  pointer-events: none;
}
.cm-creed .wrap { max-width: 900px; position: relative; z-index: 1; }
.cm-creed-frame {
  border: 0.5px solid rgba(212,178,118,.4);
  padding: clamp(40px, 6vw, 80px) clamp(30px, 5vw, 70px);
  position: relative;
  text-align: center;
}
.cm-creed-frame::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 0.5px solid rgba(212,178,118,.2);
  pointer-events: none;
}
.cm-creed-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: clamp(36px, 4vw, 56px);
}
.cm-creed-seal {
  width: 64px; height: 64px;
  color: var(--brass-lite);
}
.cm-creed-label {
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--brass-lite);
}
.cm-creed-lines {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.5vw, 32px);
  margin-bottom: clamp(36px, 4vw, 52px);
}
.cm-creed-line {
  font-size: clamp(19px, 2.4vw, 30px);
  font-weight: 200;
  font-style: italic;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--paper);
}
.cm-creed-line span {
  font-style: normal;
  font-weight: 400;
  color: var(--brass);
  margin-right: 12px;
  font-size: .75em;
}
.cm-creed-note {
  font-size: 13px;
  color: var(--cream-2);
  opacity: .75;
  font-style: italic;
  max-width: 52ch;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 0.5px solid rgba(212,178,118,.25);
}

/* --------------------------------------------------------------
   PILLAR ROWS
   -------------------------------------------------------------- */
.cm-pillars-sec {
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--paper);
}
.cm-pillars-head { margin-bottom: clamp(50px, 6vw, 80px); }
.cm-pillar-rows {
  display: flex;
  flex-direction: column;
  border-top: 0.5px solid var(--rule);
}
.cm-pillar-row {
  display: grid;
  grid-template-columns: 120px 1.6fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  padding: clamp(36px, 4.5vw, 56px) 0;
  border-bottom: 0.5px solid var(--rule);
  position: relative;
  transition: background .4s ease;
}
.cm-pillar-row:hover { background: rgba(236,228,210,.35); }
.cm-pillar-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--brass);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.cm-pillar-row:hover::before { transform: scaleY(1); }
.cm-pr-num {
  font-size: clamp(48px, 5.5vw, 84px);
  font-weight: 200;
  font-style: italic;
  color: var(--brass);
  line-height: .85;
  letter-spacing: -0.04em;
  padding-left: clamp(14px, 2vw, 28px);
}
.cm-pr-body h3 {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 300;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin-bottom: 14px;
}
.cm-pr-body p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 62ch;
}
.cm-pr-detail {
  align-self: center;
  background: var(--paper-2);
  border: 0.5px solid var(--rule);
  padding: 22px 26px;
}
.cm-pr-tag {
  display: block;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brass-dark);
  margin-bottom: 10px;
}
.cm-pr-detail p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-style: italic;
}

/* --------------------------------------------------------------
   MEMBER STORIES
   -------------------------------------------------------------- */
.cm-stories {
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}
.cm-stories::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 25%, rgba(184,146,74,.12), transparent 55%);
  pointer-events: none;
}
.cm-stories-head { margin-bottom: clamp(40px, 5vw, 70px); }
.cm-stories-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: clamp(18px, 2.5vw, 32px);
  align-items: start;
}
.cm-story {
  background: var(--paper);
  border: 0.5px solid var(--rule);
  padding: clamp(30px, 3.2vw, 44px);
  margin: 0;
  position: relative;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease;
}
.cm-story:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(20,27,31,.09);
}
.cm-story::before {
  content: '"';
  position: absolute;
  top: 18px; left: 24px;
  font-size: 80px;
  line-height: .6;
  color: var(--brass);
  opacity: .3;
  font-family: Georgia, serif;
}
.cm-story-tall {
  padding-top: clamp(42px, 4.5vw, 60px);
  padding-bottom: clamp(42px, 4.5vw, 60px);
}
.cm-story blockquote {
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.6;
  letter-spacing: -0.008em;
  color: var(--ink);
  margin: 0 0 26px;
  position: relative;
  z-index: 1;
}
.cm-story-tall blockquote { font-size: clamp(18px, 1.8vw, 22px); }
.cm-story figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 20px;
  border-top: 0.5px solid var(--rule);
}
.cm-story figcaption strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.cm-story figcaption span {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* --------------------------------------------------------------
   RESOURCES / THE ARMORY
   -------------------------------------------------------------- */
.cm-resources {
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--paper-2);
  position: relative;
  overflow: hidden;
}
.cm-resources::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--rule-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .3;
  pointer-events: none;
}
.cm-res-head {
  margin-bottom: clamp(40px, 5vw, 70px);
  position: relative;
  z-index: 1;
}
.cm-res-sub {
  font-size: 15px;
  font-style: italic;
  color: var(--ink-mute);
  margin-top: 12px;
}
.cm-res-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 28px);
  position: relative;
  z-index: 1;
}
.cm-res {
  background: var(--paper);
  border: 0.5px solid var(--rule);
  padding: clamp(28px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease;
}
.cm-res::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.cm-res:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px rgba(20,27,31,.09);
}
.cm-res:hover::before { transform: scaleX(1); }
.cm-res-icon {
  width: 40px; height: 40px;
  color: var(--navy);
  margin-bottom: 20px;
}
.cm-res h4 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--ink);
}
.cm-res p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  flex: 1;
  margin-bottom: 18px;
}
.cm-res-cta {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brass-dark);
  transition: color .3s ease;
}
.cm-res:hover .cm-res-cta { color: var(--ink); }

/* --------------------------------------------------------------
   JOIN
   -------------------------------------------------------------- */
.cm-join {
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  scroll-margin-top: 80px;
}
.cm-join::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(184,146,74,.18), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(184,146,74,.1), transparent 45%);
  pointer-events: none;
}
.cm-join-inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(50px, 6vw, 100px);
  align-items: start;
  position: relative;
  z-index: 1;
}
.cm-join-copy h2 {
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 200;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 14px 0 20px;
}
.cm-join-copy h2 em { font-style: italic; color: var(--brass-lite); font-weight: 300; }
.cm-join-sub {
  font-size: 16px;
  line-height: 1.65;
  color: var(--cream-2);
  max-width: 48ch;
  margin-bottom: 32px;
}
.cm-join-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cm-join-list li {
  position: relative;
  padding-left: 30px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--cream-2);
}
.cm-join-list li::before {
  content: '★';
  position: absolute;
  left: 0; top: 2px;
  color: var(--brass);
  font-size: 13px;
}

.cm-join-form {
  background: rgba(16,26,40,.5);
  border: 0.5px solid rgba(212,178,118,.3);
  padding: clamp(30px, 3.5vw, 46px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cm-form-title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--paper);
  padding-bottom: 18px;
  border-bottom: 0.5px solid rgba(245,239,228,.15);
}
.cm-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cm-field label {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brass-lite);
}
.cm-field input,
.cm-field select {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245,239,228,.3);
  padding: 10px 2px;
  color: var(--paper);
  font-family: var(--ff-sans);
  font-size: 15px;
  outline: none;
  transition: border-color .3s ease;
}
.cm-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%23d4b276' stroke-width='1.5' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
}
.cm-field select option { background: var(--navy-deep); color: var(--paper); }
.cm-field input::placeholder { color: rgba(245,239,228,.4); }
.cm-field input:focus,
.cm-field select:focus { border-color: var(--brass); }
.cm-join-form button {
  margin-top: 8px;
  padding: 18px 30px;
  background: var(--brass);
  color: var(--navy-deep);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background .3s ease, transform .3s ease;
}
.cm-join-form button:hover {
  background: var(--brass-lite);
  transform: translateY(-2px);
}
.cm-form-fine {
  font-size: 12px;
  color: rgba(245,239,228,.5);
  font-style: italic;
  line-height: 1.5;
}

/* --------------------------------------------------------------
   ANIMATIONS
   -------------------------------------------------------------- */
@keyframes cmSlideUp {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}
@keyframes cmFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cm-stats { grid-template-columns: 1fr 1fr; }
  .cm-stat:nth-child(3) { border-left: none; border-top: 0.5px solid var(--rule); }
  .cm-stat:nth-child(4) { border-top: 0.5px solid var(--rule); }
  .cm-pillar-row { grid-template-columns: 90px 1fr; }
  .cm-pr-detail { grid-column: 2; }
  .cm-stories-grid { grid-template-columns: 1fr; }
  .cm-res-grid { grid-template-columns: repeat(2, 1fr); }
  .cm-join-inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .cm-hero-meta { flex-direction: column; gap: 8px; align-items: flex-start; }
  .cm-hero-actions .btn { width: 100%; justify-content: space-between; }
  .cm-stats { grid-template-columns: 1fr 1fr; }
  .cm-pillar-row { grid-template-columns: 1fr; gap: 16px; }
  .cm-pr-num { padding-left: 0; font-size: 44px; }
  .cm-pr-detail { grid-column: 1; }
  .cm-res-grid { grid-template-columns: 1fr; }
}

/* Optional member photo on story cards */
.cm-story-photo {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: block;
  margin-bottom: 10px;
  border: 1.5px solid var(--brass);
}
