/* ══════════════════════════════════════════════════════════════
   THEE ANGELBOY — pages.css
   Shared styles for donate.html & membership.html
   Inherits all base variables from style.css
   ══════════════════════════════════════════════════════════════ */

/* ─── PAGE BODY ─────────────────────────────────────────────── */
.page-body {
  background: var(--bg-s3);
}

/* ─── CONTAINER NARROW ──────────────────────────────────────── */
.container--narrow {
  max-width: 720px;
}

/* ─── PAGE HERO ─────────────────────────────────────────────── */
.page-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(
    165deg,
    #1e1d1a 0%,
    #181714 40%,
    #131210 100%
  );
  overflow: hidden;
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  padding-top: 9rem;
}

.page-hero__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 90% 80% at 50% 60%,
    transparent 0%,
    rgba(5, 5, 4, 0.35) 60%,
    rgba(3, 3, 2, 0.68) 100%
  );
  pointer-events: none;
}

.page-hero__content {
  position: relative;
  z-index: 1;
}

.page-hero__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--white);
  -webkit-text-stroke: 1px var(--copper);
  paint-order: stroke fill;
  text-shadow:
    0 2px 8px rgba(0,0,0,0.18),
    0 0 50px rgba(193,127,58,0.1);
  margin-bottom: 1.2rem;
}

.page-hero__title em {
  font-style: italic;
  font-weight: 400;
}

.page-hero__sub {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.68);
  letter-spacing: 0.02em;
  max-width: 520px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}

/* ─── PAGE SECTION ──────────────────────────────────────────── */
.page-section {
  padding: var(--section-pad) 0;
}

.page-section:nth-child(even) {
  background: rgba(0,0,0,0.04);
}

/* ─── PROSE ─────────────────────────────────────────────────── */
.prose p {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(0.97rem, 1.8vw, 1.06rem);
  line-height: 1.85;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.4rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.28);
}

.prose p strong {
  font-weight: 500;
  color: rgba(255,255,255,0.95);
}

.prose__link {
  color: var(--copper);
  text-decoration: none;
  border-bottom: 1px solid rgba(193,127,58,0.35);
  transition: border-color 0.22s var(--ease), color 0.22s var(--ease);
}

.prose__link:hover {
  color: #ffffff;
  border-color: rgba(255,255,255,0.5);
}

/* ══════════════════════════════════════════════════════════════
   DONATE PAGE
   ══════════════════════════════════════════════════════════════ */

/* ─── DONATE AMOUNTS ────────────────────────────────────────── */
.donate-amounts {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.amount-btn {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 2px;
  padding: 0.65rem 1.4rem;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}

.amount-btn:hover,
.amount-btn.selected {
  background: var(--copper-glow);
  border-color: var(--copper);
  color: #ffffff;
  box-shadow: 0 0 14px var(--copper-soft);
}

/* ─── CUSTOM AMOUNT ─────────────────────────────────────────── */
.donate-custom {
  margin-bottom: 2.5rem;
}

.donate-custom__label {
  display: block;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.6rem;
}

.donate-custom__wrap {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  transition: border-color 0.22s var(--ease);
}

.donate-custom__wrap:focus-within {
  border-color: rgba(193,127,58,0.55);
}

.donate-custom__symbol {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--copper);
  padding: 0.75rem 0.9rem;
  border-right: 1px solid rgba(255,255,255,0.12);
  background: rgba(193,127,58,0.06);
  user-select: none;
}

.donate-custom__input {
  flex: 1;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--white);
  background: transparent;
  border: none;
  outline: none;
  padding: 0.75rem 1rem;
}

.donate-custom__input::placeholder {
  color: rgba(255,255,255,0.25);
}

/* Remove number input arrows */
.donate-custom__input::-webkit-outer-spin-button,
.donate-custom__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.donate-custom__input[type=number] {
  -moz-appearance: textfield;
}

/* ─── DONATE CARD ───────────────────────────────────────────── */
.donate-card {
  background: rgba(185,185,205,0.18);
  border: 1px solid rgba(193,127,58,0.18);
  border-radius: 2px;
  padding: clamp(2rem, 5vw, 3.5rem);
}

.donate-card__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  margin-bottom: 2rem;
  line-height: 1.2;
}

.donate-card__title em {
  font-style: italic;
  font-weight: 400;
}

/* ─── DONATE ACTIONS ────────────────────────────────────────── */
.donate-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.donate-btn {
  flex: 1;
  min-width: 160px;
  justify-content: center;
}

/* ─── DONATE NOTE ───────────────────────────────────────────── */
.donate-note {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.03em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

.donate-note a {
  color: var(--copper);
  text-decoration: none;
}

.donate-note a:hover {
  color: #ffffff;
}

/* ─── DONATE CONFIRM ────────────────────────────────────────── */
.donate-confirm {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 0 0.5rem;
  gap: 0.75rem;
}

.donate-confirm.visible {
  display: flex;
}

.donate-confirm__icon {
  font-size: 1.8rem;
  color: var(--copper);
}

.donate-confirm p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
}

/* ══════════════════════════════════════════════════════════════
   MEMBERSHIP PAGE
   ══════════════════════════════════════════════════════════════ */

/* ─── BREAKDOWN GRID ────────────────────────────────────────── */
.breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5px;
  background: rgba(193,127,58,0.1);
  border: 1px solid rgba(193,127,58,0.1);
  margin-bottom: 3rem;
}

.breakdown-card {
  background: rgba(176,176,196,0.3);
  padding: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.breakdown-card--cause {
  background: rgba(193,127,58,0.08);
  border-left: 2px solid rgba(193,127,58,0.4);
}

.breakdown-card__fraction {
  font-family: var(--font-serif);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--copper);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.breakdown-card__amount {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0,0,0,0.14);
  margin-bottom: 0.4rem;
}

.breakdown-card__label {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.8rem;
}

.breakdown-card__desc {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  flex-grow: 1;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.28);
}

.breakdown-card__bar {
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 1px;
  overflow: hidden;
}

.breakdown-card__fill {
  height: 100%;
  border-radius: 1px;
}

.breakdown-card__fill--cause {
  width: 66.7%;
  background: linear-gradient(90deg, var(--copper), rgba(193,127,58,0.5));
}

.breakdown-card__fill--work {
  width: 33.3%;
  background: rgba(255,255,255,0.3);
}

/* ─── RUNNING TOTAL ─────────────────────────────────────────── */
.running-total {
  text-align: center;
  padding: 3rem 2rem;
  border: 1px solid rgba(193,127,58,0.2);
  border-radius: 2px;
  background: rgba(193,127,58,0.04);
  position: relative;
}

.running-total::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(193,127,58,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.running-total__label {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

.running-total__num {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.8rem, 7vw, 5rem);
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0,0,0,0.16);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.running-total__note {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

/* ─── MEMBER TIER ───────────────────────────────────────────── */
.member-tier {
  border: 1px solid rgba(193,127,58,0.25);
  border-radius: 2px;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: rgba(193,127,58,0.05);
  position: relative;
  overflow: hidden;
}

.member-tier::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--copper) 30%,
    var(--copper) 70%,
    transparent 100%
  );
  opacity: 0.6;
}

.member-tier__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.member-tier__amount {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0,0,0,0.14);
  line-height: 1;
}

.member-tier__period {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
}

.member-tier__list {
  list-style: none;
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.member-tier__list li {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.97rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.6;
  padding-left: 1.4rem;
  position: relative;
  text-shadow: 0 1px 6px rgba(0,0,0,0.28);
}

.member-tier__list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--copper);
  font-size: 0.8rem;
  opacity: 0.7;
}

.member-tier__list li:last-child {
  color: rgba(255,255,255,0.9);
  font-style: italic;
}

.member-tier__cta {
  width: 100%;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.member-tier__note {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-align: center;
}

/* ─── IMPACT GALLERY ────────────────────────────────────────── */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.impact-card {
  border: 1px solid rgba(193,127,58,0.14);
  border-radius: 2px;
  overflow: hidden;
  background: rgba(170,170,190,0.2);
}

.impact-card--placeholder {
  opacity: 0.7;
}

.impact-card__media {
  aspect-ratio: 4/3;
  background: rgba(155,155,175,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(193,127,58,0.1);
}

.impact-card__placeholder-text {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
}

.impact-card__info {
  padding: 1.25rem;
}

.impact-card__tag {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.impact-card__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.25rem;
}

.impact-card__date {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.impact-card__desc {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.55);
  text-shadow: 0 1px 6px rgba(0,0,0,0.28);
}

/* Add more card */
.impact-card--add {
  border-style: dashed;
  border-color: rgba(193,127,58,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: rgba(193,127,58,0.03);
}

.impact-card__add-inner {
  text-align: center;
}

.impact-card__add-icon {
  display: block;
  font-size: 1.5rem;
  color: rgba(193,127,58,0.35);
  margin-bottom: 0.5rem;
}

.impact-card__add-text {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
}

/* Impact note */
.impact-note {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1.7;
}

/* ─── CAUSE SECTION ─────────────────────────────────────────── */
.cause-section .section-title {
  margin-bottom: 2rem;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .breakdown-grid {
    grid-template-columns: 1fr;
  }

  .donate-actions {
    flex-direction: column;
  }

  .donate-btn {
    width: 100%;
  }

  .impact-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    min-height: 45vh;
    padding-top: 7rem;
  }

  .chat-gate__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-gate__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ─────────────────────────────────────────────────────────────
   MEMBER CHAT SECTION
   ─────────────────────────────────────────────────────────────
   Two states:
   1. chat-gate   — Discord invite + "I'm already a member" button
   2. chat-embed-wrapper — WidgetBot iframe (hidden by default,
      revealed by JS, remembered via localStorage)
   ───────────────────────────────────────────────────────────── */
.member-chat-section {
  background: var(--bg-s6);
  border-top: 1px solid rgba(160,152,144,0.08);
}

.member-chat__desc {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ─── Gate (default visible state) ─────────────────────────── */
.chat-gate {
  max-width: 520px;
  margin: 3rem auto 0;
  padding: 3rem 2.5rem;
  border: 1px solid rgba(160,152,144,0.18);
  border-radius: 4px;
  background: rgba(24,23,20,0.55);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.chat-gate--hiding {
  opacity: 0;
  transform: translateY(8px);
}

.chat-gate__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(160,152,144,0.1);
  border: 1px solid rgba(160,152,144,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-gate__heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--white);
  line-height: 1.2;
}

.chat-gate__text {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(236,233,226,0.62);
  max-width: 360px;
}

.chat-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  width: 100%;
  margin-top: 0.4rem;
}

.chat-gate__reveal {
  font-size: 0.78rem;
  opacity: 0.65;
  transition: opacity 0.22s ease;
}

.chat-gate__reveal:hover {
  opacity: 1;
}

.chat-gate__note {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: rgba(160,152,144,0.55);
  letter-spacing: 0.04em;
}

.chat-gate__note-link {
  color: var(--copper);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.chat-gate__note-link:hover {
  color: var(--white);
}

/* ─── Chat embed wrapper (revealed state) ───────────────────── */
.chat-embed-wrapper {
  margin-top: 2.5rem;
  border: 1px solid rgba(160,152,144,0.15);
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.chat-embed-wrapper--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Top bar above the Discord iframe */
.chat-embed__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.2rem;
  background: rgba(20,19,16,0.9);
  border-bottom: 1px solid rgba(160,152,144,0.12);
}

/* Pulsing green live dot */
.chat-embed__live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,0.5);
  animation: livePulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.85); }
}

.chat-embed__live-label {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236,233,226,0.5);
  flex: 1;
}

.chat-embed__close {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(160,152,144,0.5);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  transition: color 0.2s ease, background 0.2s ease;
}

.chat-embed__close:hover {
  color: var(--white);
  background: rgba(160,152,144,0.1);
}

/* The Discord iframe itself */
.chat-embed__iframe {
  display: block;
  width: 100%;
  height: 620px;
  border: none;
  background: #1a1916;
}

/* Footer note below iframe */
.chat-embed__footer-note {
  padding: 0.85rem 1.2rem;
  background: rgba(20,19,16,0.85);
  border-top: 1px solid rgba(160,152,144,0.1);
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: 0.72rem;
  color: rgba(160,152,144,0.5);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.chat-embed__discord-link {
  color: var(--copper);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.chat-embed__discord-link:hover {
  color: var(--white);
}

@media (max-width: 700px) {
  .chat-embed__iframe {
    height: 480px;
  }

  .chat-gate {
    padding: 2rem 1.5rem;
  }
}
