/*
Theme Name: Rdx Join
Theme URI: https://example.com
Author: Kenebi Gabrielle
Description: A fast, single-purpose community join page. Two big buttons for WhatsApp and Telegram. Edit everything under Appearance > Customize > Join Page.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rdx-join
*/

:root {
  --bg: #0a0a0b;
  --gold: #e5b84b;
  --gold-dim: #5a5238;
  --ink: #f5f1e8;
  --muted: #b9b2a2;
  --faint: #8f8877;
  --on-gold: #1a1304;
}

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

html { -webkit-text-size-adjust: 100%; }

body.rdx-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 50% 0%, rgba(229, 184, 75, 0.2), transparent 55%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

.rdx-wrap {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 32px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Brand */
.rdx-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
}
.rdx-brand img { height: 34px; width: auto; display: block; }
.rdx-brand svg { width: 30px; height: 30px; flex-shrink: 0; }
.rdx-brand span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Chart */
.rdx-chart { margin-top: 36px; width: 100%; height: 150px; }
.rdx-chart svg { width: 100%; height: 100%; display: block; }

/* Copy */
.rdx-title {
  margin: 8px 0 0;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: clamp(34px, 10.5vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.rdx-sub {
  margin: 14px 0 0;
  max-width: 320px;
  font-size: 16px;
  color: var(--muted);
}

/* Buttons */
.rdx-actions {
  margin-top: 32px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rdx-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1.5px solid var(--gold);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.rdx-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.rdx-btn--solid { background: var(--gold); color: var(--on-gold); }
.rdx-btn--outline { background: transparent; color: var(--gold); }
.rdx-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(229, 184, 75, 0.25); }
.rdx-btn--outline:hover { background: rgba(229, 184, 75, 0.1); }
.rdx-btn:active { transform: translateY(0); }
.rdx-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Members line */
.rdx-members {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.rdx-members::before,
.rdx-members::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold-dim);
}

/* Footer */
.rdx-foot {
  margin-top: auto;
  padding-top: 40px;
  font-size: 12px;
  color: var(--faint);
}

/* Layout wrappers (mobile: a single centred column) */
.rdx-hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rdx-copy {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rdx-btn { white-space: nowrap; }
button.rdx-btn { font-family: inherit; cursor: pointer; }

/* Suspended-group pop-up */
dialog.rdx-modal {
  padding: 0;
  border: 1px solid rgba(229, 184, 75, 0.35);
  border-radius: 24px;
  background: #141310;
  color: var(--ink);
  width: calc(100% - 40px);
  max-width: 380px;
  text-align: center;
}
dialog.rdx-modal::backdrop { background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(4px); }
.rdx-modal__box { padding: 30px 24px 24px; display: flex; flex-direction: column; align-items: center; }
.rdx-modal__icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 184, 75, 0.14);
  color: var(--gold);
}
.rdx-modal__icon svg { width: 28px; height: 28px; }
.rdx-modal__title {
  margin: 16px 0 0;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
}
.rdx-modal__text { margin: 10px 0 22px; font-size: 15px; color: var(--muted); }
.rdx-modal .rdx-btn {
  flex: 0 0 auto;
  width: 100%;
  height: 54px;
  min-height: 0;
  font-size: 16px;
}
.rdx-modal__title, .rdx-modal__text { text-wrap: balance; }
dialog.rdx-modal {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(229, 184, 75, 0.1);
}
dialog.rdx-modal[open] { animation: rdx-pop 0.2s ease-out; }
@keyframes rdx-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  dialog.rdx-modal[open] { animation: none; }
}

/* Tablets: wider column, bigger type */
@media (min-width: 700px) {
  .rdx-wrap { max-width: 560px; padding-top: 56px; }
  .rdx-chart { height: 190px; }
  .rdx-title { font-size: 48px; }
  .rdx-sub { font-size: 18px; max-width: 400px; }
}

/* Laptops and desktops: two-column layout */
@media (min-width: 1000px) {
  body.rdx-body {
    background-image:
      radial-gradient(circle at 50% 0%, rgba(229, 184, 75, 0.18), transparent 50%),
      radial-gradient(circle at 78% 55%, rgba(229, 184, 75, 0.12), transparent 45%);
  }
  .rdx-wrap {
    max-width: 1200px;
    padding: 40px 64px 28px;
    align-items: stretch;
    text-align: left;
  }
  .rdx-brand { align-self: flex-start; }
  .rdx-brand img { height: 40px; }
  .rdx-brand svg { width: 34px; height: 34px; }

  .rdx-hero {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 72px;
    align-items: center;
    padding: 24px 0;
  }
  .rdx-copy { order: 1; align-items: flex-start; }

  .rdx-chart {
    order: 2;
    margin: 0;
    height: auto;
    padding: 40px 32px;
    border: 1px solid rgba(229, 184, 75, 0.2);
    border-radius: 28px;
    background-color: rgba(229, 184, 75, 0.03);
    background-image:
      linear-gradient(rgba(229, 184, 75, 0.07) 1px, transparent 1px),
      linear-gradient(90deg, rgba(229, 184, 75, 0.07) 1px, transparent 1px);
    background-size: 48px 48px;
  }
  .rdx-chart svg { height: auto; }

  .rdx-title { margin-top: 0; font-size: clamp(48px, 4.8vw, 72px); line-height: 1.05; letter-spacing: -1px; }
  .rdx-sub { margin-top: 18px; max-width: 480px; font-size: 18px; }

  .rdx-actions { margin-top: 36px; max-width: 520px; flex-direction: row; flex-wrap: wrap; gap: 14px; }
  .rdx-btn { flex: 1 1 210px; }
  .rdx-actions--stack .rdx-btn { flex-basis: 100%; }

  .rdx-members { justify-content: flex-start; margin-top: 26px; }
  .rdx-members::before { display: none; }

  .rdx-foot {
    margin-top: 0;
    padding-top: 20px;
    border-top: 1px solid rgba(229, 184, 75, 0.15);
    text-align: left;
  }
}

/* Large and ultra-wide monitors */
@media (min-width: 1600px) {
  .rdx-wrap { max-width: 1400px; padding: 48px 80px 32px; }
  .rdx-hero { gap: 96px; }
  .rdx-title { font-size: 80px; }
  .rdx-sub { font-size: 20px; max-width: 540px; }
  .rdx-actions { max-width: 580px; }
  .rdx-btn { min-height: 64px; font-size: 18px; }
  .rdx-chart { padding: 56px 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .rdx-btn { transition: none; }
  .rdx-btn:hover { transform: none; }
}

/* Support section */
.rdx-support { margin-top: 32px; width: 100%; max-width: 520px; text-align: left; }
.rdx-support__title { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); text-align: center; }
.rdx-support__list { display: flex; flex-direction: column; gap: 10px; }
.rdx-contact { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid rgba(229, 184, 75, 0.25); border-radius: 18px; background: rgba(229, 184, 75, 0.04); }
.rdx-contact__info { display: flex; flex-direction: column; min-width: 0; }
.rdx-contact__name { font-size: 13px; color: var(--muted); }
.rdx-contact__num { font-size: 16px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.rdx-contact__actions { display: flex; gap: 8px; flex-shrink: 0; }
.rdx-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--gold); color: var(--on-gold); font-size: 14px; font-weight: 600; text-decoration: none; }
.rdx-chip--ghost { background: transparent; color: var(--gold); border: 1.5px solid var(--gold); }
.rdx-chip:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (min-width: 1000px) { .rdx-support__title { text-align: left; } }
