/* ============================================================
   COMMUNITY — standalone page styles (.cm-* / body.community-page)
   Light, soft, premium — same family as the homepage:
   cream background, delicate warm gradients, Inter Tight +
   Instrument Serif pairing.
   ============================================================ */

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

body.community-page {
  --cm-cream: #f7f4ef;
  --cm-ink: #16130f;
  --cm-ink-soft: #5c564d;
  --cm-accent: #c2402a;
  --cm-accent-soft: #e8ccc2;
  --cm-card: #fffdf9;
  --cm-border: rgba(22, 19, 15, 0.1);
  --cm-font: "Inter Tight", system-ui, sans-serif;
  --cm-serif: "Instrument Serif", Georgia, serif;

  font-family: var(--cm-font);
  color: var(--cm-ink);
  background: var(--cm-cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Living background ── */
.cm-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.cm-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.cm-bg-blob-1 {
  width: 640px;
  height: 560px;
  top: -220px;
  right: -180px;
  background: radial-gradient(circle at 40% 40%, rgba(232, 178, 150, 0.4), rgba(226, 196, 178, 0.18) 60%, transparent);
  animation: cm-drift 24s ease-in-out infinite alternate;
}
.cm-bg-blob-2 {
  width: 560px;
  height: 520px;
  bottom: -240px;
  left: -180px;
  background: radial-gradient(circle at 60% 50%, rgba(214, 168, 146, 0.28), rgba(238, 214, 198, 0.16) 60%, transparent);
  animation: cm-drift 30s ease-in-out infinite alternate-reverse;
}
@keyframes cm-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-46px, 34px) scale(1.07); }
}
.cm-bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

main { position: relative; z-index: 1; }

/* ============================================================
   NAVBAR — light floating pill, homepage family
   ============================================================ */
.cm-nav {
  position: sticky;
  top: 14px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1120px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 12px 14px 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--cm-border);
  background: rgba(255, 253, 249, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 34px rgba(22, 19, 15, 0.07);
}
.cm-brand {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--cm-ink);
  text-decoration: none;
}
.cm-nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.cm-nav-links a {
  color: var(--cm-ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease;
}
.cm-nav-links a:hover,
.cm-nav-links a[aria-current="page"] { color: var(--cm-ink); }
.cm-nav-cta {
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--cm-ink);
  color: var(--cm-cream);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cm-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(22, 19, 15, 0.18);
}

/* ============================================================
   HERO + FORM
   ============================================================ */
.cm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 80px);
}
.cm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cm-ink-soft);
  margin-bottom: 16px;
}
.cm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cm-accent);
  animation: cm-pulse 2.6s ease-in-out infinite;
}
@keyframes cm-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.7); }
}
.cm-title {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin-bottom: 18px;
}
.cm-title em {
  font-family: var(--cm-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
}
.cm-sub {
  color: var(--cm-ink-soft);
  font-size: clamp(1rem, 1.7vw, 1.1rem);
  line-height: 1.6;
  max-width: 520px;
  margin-bottom: 24px;
}
.cm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cm-badge {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--cm-border);
  background: rgba(255, 253, 249, 0.7);
  color: var(--cm-ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
}
.cm-badge-accent {
  background: var(--cm-ink);
  border-color: var(--cm-ink);
  color: var(--cm-cream);
}

/* ── Form card ── */
.cm-form-card {
  position: relative;
  padding: clamp(26px, 3.5vw, 38px);
  border-radius: 26px;
  border: 1px solid var(--cm-border);
  background: rgba(255, 253, 249, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 30px 70px rgba(22, 19, 15, 0.1);
}
.cm-form-card h2 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.cm-form-sub {
  color: var(--cm-ink-soft);
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.cm-field {
  display: block;
  margin-bottom: 14px;
}
.cm-field > span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.cm-field > span em {
  font-style: normal;
  font-weight: 500;
  color: var(--cm-ink-soft);
}
.cm-field input,
.cm-field select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--cm-border);
  background: #fff;
  font-family: var(--cm-font);
  font-size: 0.95rem;
  color: var(--cm-ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cm-field input:focus,
.cm-field select:focus {
  border-color: var(--cm-ink);
  box-shadow: 0 0 0 3px rgba(22, 19, 15, 0.08);
}
.cm-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 18px;
  font-size: 0.82rem;
  color: var(--cm-ink-soft);
  line-height: 1.5;
  cursor: pointer;
}
.cm-consent input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--cm-ink);
  flex-shrink: 0;
}
.cm-submit {
  width: 100%;
  padding: 15px 24px;
  border-radius: 999px;
  border: none;
  background: var(--cm-ink);
  color: var(--cm-cream);
  font-family: var(--cm-font);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cm-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(22, 19, 15, 0.22);
}
.cm-form-error {
  margin-top: 12px;
  color: var(--cm-accent);
  font-size: 0.82rem;
  text-align: center;
}

/* ── Success state ── */
.cm-success {
  text-align: center;
  padding: 24px 8px;
}
.cm-success.is-shown { animation: cm-success-in 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes cm-success-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cm-success-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--cm-ink);
  color: var(--cm-cream);
}
.cm-success-icon svg { width: 28px; height: 28px; }
.cm-success h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.cm-success p {
  color: var(--cm-ink-soft);
  margin-bottom: 20px;
}

/* ============================================================
   WHAT YOU'LL GET
   ============================================================ */
.cm-section {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 100px);
  text-align: center;
}
.cm-h2 {
  font-size: clamp(1.7rem, 3.8vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.cm-perks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  text-align: left;
}
.cm-perk {
  padding: 24px 22px;
  border-radius: 20px;
  border: 1px solid var(--cm-border);
  background: rgba(255, 253, 249, 0.75);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cm-perk:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(22, 19, 15, 0.1);
}
.cm-perk-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--cm-cream);
  border: 1px solid var(--cm-border);
  color: var(--cm-ink);
}
.cm-perk-icon svg { width: 21px; height: 21px; }
.cm-perk h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.cm-perk p {
  color: var(--cm-ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}
.cm-secondary-cta {
  margin-top: clamp(30px, 4vw, 48px);
}
.cm-secondary-cta p {
  color: var(--cm-ink-soft);
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.cm-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid var(--cm-ink);
  color: var(--cm-ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.cm-btn-ghost:hover {
  background: var(--cm-ink);
  color: var(--cm-cream);
  transform: translateY(-2px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.cm-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 30px 24px 36px;
  border-top: 1px solid var(--cm-border);
  color: var(--cm-ink-soft);
  font-size: 0.85rem;
}
.cm-footer-micro {
  margin-top: 4px;
  font-size: 0.72rem;
  opacity: 0.75;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .cm-hero { grid-template-columns: 1fr; }
  .cm-perks { grid-template-columns: 1fr 1fr; }
  .cm-nav-links { gap: 16px; }
}
@media (max-width: 560px) {
  .cm-nav { padding: 10px 10px 10px 16px; }
  .cm-nav-links { display: none; }
  .cm-perks { grid-template-columns: 1fr; }
  .cm-hero { padding-top: 40px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cm-bg-blob, .cm-dot { animation: none !important; }
  .cm-success.is-shown { animation: none; }
}
