/* ============================================================
   Chain & Chisel Artists Guild — Global Styles
   ============================================================ */

:root {
  --bg:           #0f0f10;
  --bg-surface:   #171718;
  --bg-card:      #1e1e1f;
  --border:       rgba(255, 255, 255, 0.10);
  --gold:         #d4a96a;
  --gold-hover:   #e8bf87;
  --text:         #f3f3f3;
  --text-muted:   #bdbdbd;
  --text-faint:   #777;
  --accent:       #5a8a6a;   /* guild green — carving/nature tone */
  --radius:       8px;
  --max-w:        1100px;
  --font:         system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--text-muted); }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hover); }

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 72px 0;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 40px;
}

/* ── Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--gold); }

.nav-links .btn-cta {
  background: var(--gold);
  color: #0f0f10 !important;
  font-weight: 700;
  padding: 6px 16px;
}

.nav-links .btn-cta:hover { background: var(--gold-hover); }

.nav-signin {
  display: flex !important;
  align-items: center;
  gap: 7px;
  color: var(--text-muted) !important;
  font-size: 13px !important;
  font-weight: 600;
  padding: 6px 12px !important;
  border: 1px solid var(--border);
  border-radius: 20px !important;
  transition: color 0.15s, border-color 0.15s, background 0.15s !important;
  white-space: nowrap;
}
.nav-signin:hover {
  color: var(--text) !important;
  border-color: var(--gold) !important;
  background: rgba(212,169,106,0.07) !important;
}
.nav-signin svg { flex-shrink: 0; }

/* ── Hero ── */
.hero {
  padding: 96px 0 80px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  padding: 4px 12px;
  border: 1px solid rgba(212, 169, 106, 0.3);
  border-radius: 20px;
}

.hero h1 { margin-bottom: 20px; }

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.btn-primary {
  background: var(--gold);
  color: #0f0f10;
}
.btn-primary:hover { background: var(--gold-hover); color: #0f0f10; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.04); }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s;
}

.card:hover { border-color: rgba(212, 169, 106, 0.3); }

.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ── Stats strip ── */
.stats-strip {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  text-align: center;
}

.stat-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Type badges ── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-chainsaw  { background: rgba(180, 100, 40, 0.2);  color: #e8905a; }
.badge-ice       { background: rgba(80, 160, 200, 0.2);  color: #7ecde8; }
.badge-wood      { background: rgba(100, 160, 100, 0.2); color: #8fd48f; }
.badge-stone     { background: rgba(140, 120, 100, 0.2); color: #a89880; }
.badge-multiple  { background: rgba(160, 130, 200, 0.15); color: #c4a8e8; }
.badge-other     { background: rgba(120, 120, 120, 0.15); color: #aaaaaa; }

/* ── Forms ── */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input, select, textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  padding: 10px 14px;
  transition: border-color 0.15s;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
}

select option { background: var(--bg-surface); }
textarea { resize: vertical; min-height: 120px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ── Footer ── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  text-align: center;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.footer-logo span { color: var(--gold); }

.footer-tagline {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
  font-size: 12px;
  color: var(--text-faint);
}

/* ── Utility ── */
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.mt-8  { margin-top:  8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom:  8px; }
.mb-16 { margin-bottom: 16px; }

/* ══════════════════════════════════════════════════════════════════
   AUTH MODAL SYSTEM
   ══════════════════════════════════════════════════════════════════ */

.auth-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px) saturate(0.8);
  -webkit-backdrop-filter: blur(8px) saturate(0.8);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-overlay.open {
  display: flex;
}
.auth-overlay .auth-modal,
.auth-overlay .qualify-modal,
.auth-overlay .free-modal,
.auth-overlay .apply-modal {
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.auth-overlay.open .auth-modal,
.auth-overlay.open .qualify-modal,
.auth-overlay.open .free-modal,
.auth-overlay.open .apply-modal {
  transform: translateY(0);
  opacity: 1;
}

/* ── Base modal box ── */
.auth-modal, .qualify-modal, .free-modal {
  background: rgba(20, 20, 22, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 14px;
  width: 100%;
  max-width: 360px;
  position: relative;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.qualify-modal { max-width: 460px; }
.free-modal    { max-width: 420px; }

.apply-modal {
  background: rgba(20, 20, 22, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 14px;
  width: 100%;
  max-width: 660px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.modal-inner { padding: 28px 28px 24px; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* ── Auth modal header ── */
.modal-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.modal-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}
.modal-subtitle {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ── Email state indicator ── */
.email-status {
  font-size: 12px;
  margin-top: 5px;
  min-height: 16px;
  transition: color 0.2s;
}
.email-status.found    { color: #8fd48f; }
.email-status.notfound { color: var(--gold); }
.email-status.checking { color: var(--text-faint); }
.email-status.invalid  { color: #e88f8f; }

/* ── Slide-in fields ── */
.field-slide {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease;
  margin-bottom: 0;
}
.field-slide.visible {
  max-height: 120px;
  opacity: 1;
  margin-bottom: 16px;
}

/* ── CARVE button ── */
.btn-carve {
  width: 100%;
  background: var(--gold);
  color: #1a1a1a;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 8px;
}
.btn-carve:hover { background: var(--gold-hover); }
.btn-carve:active { transform: scale(0.98); }
.btn-carve:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Modal divider ── */
.modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.modal-divider::before, .modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Qualifying popup ── */
.qualify-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.qualify-choice {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: left;
  width: 100%;
}
.qualify-choice:hover { border-color: var(--gold); background: rgba(212,169,106,0.06); }
.qualify-choice .qc-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.qualify-choice .qc-sub   { font-size: 13px; color: var(--text-faint); line-height: 1.5; margin-bottom: 10px; }
.qualify-choice .qc-icon  { font-size: 28px; margin-bottom: 10px; }
.qualify-choice .qc-perks {
  list-style: none;
  margin: 8px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.qualify-choice .qc-perks li {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.qualify-choice .qc-giveaway {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
  background: rgba(212,169,106,0.1);
  border: 1px solid rgba(212,169,106,0.25);
  border-radius: 20px;
  padding: 4px 12px;
  margin-top: 2px;
}

/* ── Free access notification areas ── */
.area-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212,169,106,0.12);
  border: 1px solid rgba(212,169,106,0.25);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--gold);
  margin: 4px 4px 0 0;
}
.area-chip button {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  opacity: 0.7;
}
.area-chip button:hover { opacity: 1; }
.areas-wrap { margin-bottom: 8px; min-height: 10px; }

/* ── Apply popup step indicator ── */
.apply-steps {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.apply-step {
  flex: 1;
  padding: 14px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-right: 1px solid var(--border);
  transition: color 0.2s;
}
.apply-step:last-child { border-right: none; }
.apply-step.active { color: var(--gold); }
.apply-step.done   { color: var(--accent); }

/* ── Hamburger button ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.15s;
  flex-shrink: 0;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.05); }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s, background 0.15s;
}
.nav-hamburger:hover span { background: var(--text); }

/* X state */
.site-nav.nav-open .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav.nav-open .nav-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.site-nav.nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu drawer ── */
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding: 8px 16px 20px;
  gap: 2px;
}
.nav-mobile-menu a {
  display: block;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 13px 10px;
  border-radius: 6px;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, background 0.15s;
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-mobile-menu .nav-mobile-signin {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold) !important;
  font-weight: 600;
  margin-top: 6px;
  border: 1px solid rgba(212,169,106,0.25);
  border-radius: 8px;
  padding: 13px 14px !important;
}
.nav-mobile-menu .nav-mobile-signin:hover {
  background: rgba(212,169,106,0.07) !important;
  border-color: var(--gold) !important;
}

@media (max-width: 768px) {
  section { padding: 48px 0; }
  .hero   { padding: 64px 0 48px; }
  .nav-links    { display: none; }
  .nav-hamburger { display: flex; }
  .site-nav.nav-open .nav-mobile-menu { display: flex; }
}

/* ── Auth gate ───────────────────────────────────────────────────────────── */
.auth-gate {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  gap: 16px;
}
.auth-gate-icon { font-size: 48px; line-height: 1; }
.auth-gate h2 { font-size: 1.5rem; font-weight: 800; color: var(--text); margin: 0; }
.auth-gate p  { color: var(--text-muted); font-size: 15px; max-width: 400px; margin: 0; line-height: 1.6; }
.auth-gate-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ── CCAG Member badge ───────────────────────────────────────────────────── */
.badge-guild-member {
  background: rgba(212, 169, 106, 0.15);
  color: var(--gold);
  border: 1px solid rgba(212, 169, 106, 0.35);
  font-weight: 700;
}

/* ── Gallery button (member cards) ──────────────────────────────────────── */
.btn-gallery {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(212, 169, 106, 0.12);
  color: var(--gold);
  border: 1px solid rgba(212, 169, 106, 0.3);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn-gallery:hover {
  background: rgba(212, 169, 106, 0.22);
  border-color: var(--gold);
}

/* ── Events nav link: hidden until events are populated ─────────────────── */
/* Remove this rule when events.html has real content */
.nav-links a[href="events.html"],
.nav-mobile-menu a[href="events.html"] { display: none; }
