/* ============================================================
   BGL — Wild West Saloon Theme
   Fonts: Rye (display) + Oswald (body/UI)
   Mobile-first: base = mobile, min-width breakpoints for larger
   ============================================================ */

:root {
  --bg:        #180b05;
  --surface:   #200e07;
  --surface2:  #2c1209;
  --border:    #3e1e0a;
  --border-hi: #6a3618;
  --text:      #ede0c8;
  --muted:     #b08050;
  --dim:       #5a3820;
  --gold:      #c8902a;
  --gold-hi:   #e0aa40;
  --gold-dim:  #7a5018;
  --red:       #8a1515;
  --red-hi:    #b02020;

  --display: 'Rye', Georgia, 'Times New Roman', serif;
  --body:    'Oswald', 'Arial Narrow', sans-serif;
  --radius:  2px;
  --t:       0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.4rem;        /* Oswald condensed: 22.4px reads like ~18px in regular sans */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ==================== NAVIGATION ==================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 5, 2, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(180, 110, 40, 0.2);
}

.nav__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 56px;
  display: grid;
  /* Mobile: logo left, hamburger right */
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}

.nav__logo {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.nav__logo-icon {
  color: var(--gold);
  font-size: 1.2rem;
  line-height: 1;
}

.nav__logo-name {
  font-family: var(--display);
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Hidden on mobile, shown at desktop breakpoint */
.nav__links {
  display: none;
  align-items: center;
  gap: 0;
}

.nav__link {
  font-family: var(--body);
  font-size: 1rem;          /* UI label — intentionally smaller than body text */
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 220, 180, 0.75);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  transition: color var(--t);
  white-space: nowrap;
}
.nav__link:hover { color: var(--gold-hi); }

/* Hidden on mobile, shown at desktop breakpoint */
.nav__actions {
  display: none;
  align-items: center;
  gap: 1rem;
}

.nav__user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__welcome {
  font-family: var(--display);
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
}

/* Visible on mobile, hidden at desktop breakpoint */
.nav__hamburger {
  display: flex;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.4rem;
  min-width: 44px;              /* touch target */
  min-height: 44px;
  align-items: center;
  justify-content: center;
  transition: color var(--t);
}
.nav__hamburger:hover { color: var(--text); }

.nav__mobile {
  background: rgba(10, 5, 2, 0.97);
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.nav__mobile .nav__link {
  display: block;
  padding: 0.7rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(60, 30, 10, 0.5);
}
.nav__mobile .nav__link:last-of-type { border-bottom: none; }
.nav__mobile .nav__user {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

/* ==================== BUTTONS ==================== */

.btn {
  font-family: var(--body);
  font-size: 0.8rem;           /* UI chrome — intentionally smaller than body */
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.65rem 1.5rem;
  min-height: 44px;            /* touch target */
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
}

.btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0.18em;
  padding: 0.75rem 2.5rem;
}
.btn--primary:hover { background: var(--red-hi); border-color: var(--red-hi); }

.btn--outline {
  background: transparent;
  border-color: rgba(200, 144, 42, 0.5);
  color: var(--text);
}
.btn--outline:hover { border-color: var(--gold); color: var(--gold-hi); }

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding-left: 0; padding-right: 0;
  letter-spacing: 0.08em;
  min-height: 44px;
}
.btn--ghost:hover { color: var(--text); }

.btn--danger {
  background: var(--red);
  border-color: var(--red);
  color: var(--text);
}
.btn--danger:hover { background: var(--red-hi); }

.btn--gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}
.btn--gold:hover { background: var(--gold-hi); border-color: var(--gold-hi); }

.btn--full { width: 100%; }

/* ==================== HERO ==================== */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;              /* safe viewport height — avoids mobile browser chrome */
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scene__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Stacks hero__card + dyk__card vertically, centred over the SVG scene */
.hero__body {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0 1.25rem;
}

.hero__card {
  position: relative;          /* needed for ::before/::after corner marks */
  background: rgba(8, 4, 1, 0.90);
  border: 1px solid rgba(180, 110, 40, 0.5);
  box-shadow:
    0 0 0 1px rgba(100, 50, 10, 0.2),
    0 20px 80px rgba(0, 0, 0, 0.7),
    inset 0 0 40px rgba(160, 90, 20, 0.04);
  padding: 1.75rem 1.5rem 2rem;
  width: min(480px, 100%);
  text-align: center;
  animation: cardIn 0.7s 0.1s ease both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__card::before,
.hero__card::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--gold-dim);
  border-style: solid;
}
.hero__card::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.hero__card::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.hero__overline {
  font-family: var(--body);
  font-size: 0.7rem;           /* label — intentionally small, uppercase tracking */
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  animation: cardIn 0.6s 0.2s ease both;
}

.hero__title {
  font-family: var(--display);
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 1.25rem;
  animation: cardIn 0.6s 0.28s ease both;
}

.hero__suits {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  animation: cardIn 0.6s 0.33s ease both;
}
.hero__suits span:nth-child(1) { color: var(--text); }
.hero__suits span:nth-child(2) { color: #c04040; }
.hero__suits span:nth-child(3) { color: #c04040; }
.hero__suits span:nth-child(4) { color: var(--text); }

.hero__desc {
  font-family: var(--body);
  font-size: 1.4rem;           /* regular text */
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--muted);
  max-width: 340px;
  margin: 0 auto 2rem;
  line-height: 1.55;
  animation: cardIn 0.6s 0.38s ease both;
}

.hero__cta {
  animation: cardIn 0.6s 0.45s ease both;
}

/* ==================== POKER SCENE ==================== */

.poker-scene {
  background: #200e07;
  position: relative;
  overflow: hidden;
  line-height: 0;              /* removes inline whitespace gap under SVG */
}

/* Thin gold separator at top and bottom — ties section to surrounding dark sections */
.poker-scene::before,
.poker-scene::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(180,110,40,0.28) 25%,
    rgba(200,144,42,0.55) 50%,
    rgba(180,110,40,0.28) 75%,
    transparent 100%
  );
  z-index: 2;
}
.poker-scene::before { top: 0; }
.poker-scene::after  { bottom: 0; }

.poker-scene__svg {
  display: block;
  width: 100%;
  max-width: 100%;
  /* Warm ambient glow around the whole scene */
  filter: drop-shadow(0 0 28px rgba(200, 144, 42, 0.10));
}

/* ==================== SECTION COMMONS ==================== */

.section {
  padding: 3.5rem 1.25rem;     /* mobile-first: narrower padding */
  background: var(--bg);
}
.section--alt { background: var(--surface); }

.section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section__header { margin-bottom: 2.5rem; }

.section__overline {
  font-size: 0.7rem;           /* label */
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.section__title {
  font-family: var(--display);
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  letter-spacing: 0.03em;
  color: var(--text);
  line-height: 1.15;
}

.section__sub {
  margin-top: 0.625rem;
  color: var(--muted);
  font-size: 1.4rem;           /* regular text */
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.55;
}

/* ==================== DID YOU KNOW (inside hero) ==================== */

/* Fact strip: sits directly below hero__card inside .hero__body */
.dyk__card {
  width: min(480px, 100%);
  background: rgba(8, 4, 1, 0.82);
  border: 1px solid rgba(180, 110, 40, 0.35);
  border-top: 2px solid var(--gold-dim);
  display: flex;
  align-items: center;
  gap: 0;
  animation: cardIn 0.6s 0.55s ease both;  /* staggered after hero__card */
  user-select: none;
  touch-action: pan-y;          /* allow vertical scroll, capture horizontal swipe */
}

/* Central content: header + text + counter */
.dyk__content {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 1rem 0.25rem 0.875rem;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.dyk__content--out-left  { opacity: 0; transform: translateX(-14px); }
.dyk__content--out-right { opacity: 0; transform: translateX(14px); }

.dyk__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.dyk__suit {
  color: var(--gold-dim);
  font-size: 0.65rem;
  line-height: 1;
}

.dyk__label {
  font-family: var(--body);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.dyk__text {
  font-family: var(--body);
  font-size: 1.15rem;           /* slightly smaller than body — it's a caption strip */
  font-weight: 300;
  color: var(--text);
  line-height: 1.55;
  letter-spacing: 0.02em;
  min-height: 2.8em;            /* prevents layout jump when text length varies */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
}

.dyk__counter {
  font-family: var(--body);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

/* Prev / next navigation arrows */
.dyk__nav {
  background: none;
  border: none;
  color: var(--gold-dim);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color var(--t);
}
.dyk__nav:hover  { color: var(--gold); }
.dyk__nav:active { color: var(--gold-hi); }

/* ==================== EVENTS SIGNUP ==================== */

.event-card-signup {
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius);
}

.event-highlight {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-dim);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.event-highlight__title {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 0.2rem;
  letter-spacing: 0.03em;
}

.event-highlight__meta {
  font-size: 0.875rem;         /* uppercase meta label — legible but not body text */
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ==================== GALLERY ==================== */

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;          /* mobile: single column */
  gap: 1.25rem;
}

.gallery-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t), transform var(--t);
}
.gallery-item:hover { border-color: var(--gold-dim); transform: translateY(-3px); }

.gallery-item__thumb {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.gallery-item__thumb--green  { background: linear-gradient(145deg, #1a3c1a, #0d2010); }
.gallery-item__thumb--blue   { background: linear-gradient(145deg, #18283c, #0d1520); }
.gallery-item__thumb--purple { background: linear-gradient(145deg, #28183c, #150d22); }

.gallery-item__body { padding: 1.125rem 1.25rem; }

.gallery-item__title {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.gallery-item__desc {
  font-size: 1.4rem;           /* regular text */
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1.5;
}

/* ==================== ADMIN ==================== */

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-title {
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: 0.03em;
  color: var(--text);
  line-height: 1.1;
}

.admin-sub {
  color: var(--muted);
  font-size: 1.4rem;           /* regular text */
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
  line-height: 1.55;
}

/* Restyle Tailwind event cards */
#eventsList > div { margin-bottom: 1rem; }
#eventsList .bg-slate-700 {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  border-radius: var(--radius) !important;
}
#eventsList h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  color: var(--text) !important;
}
#eventsList .text-slate-400 { color: var(--muted) !important; }
#eventsList .text-slate-300 { color: rgba(237, 224, 200, 0.8) !important; }
#eventsList .bg-blue-500,
#eventsList .bg-green-500,
#eventsList .bg-slate-500,
#eventsList .bg-red-500 {
  font-size: 0.65rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  padding: 0.2rem 0.5rem !important;
  border-radius: 1px !important;
  font-family: var(--body) !important;
}
#eventsList .bg-blue-600  { background: #1a3a6a !important; border-radius: 2px !important; }
#eventsList .bg-purple-600 { background: #3a1a5a !important; border-radius: 2px !important; }
#eventsList .bg-red-600   { background: var(--red) !important; border-radius: 2px !important; }

/* ==================== INVITATION SECTION ==================== */

.invitation-container { max-width: 640px; margin: 0 auto; }

.invitation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.75rem 1.25rem;    /* mobile-first */
  border-radius: var(--radius);
}

.invitation-title {
  font-family: var(--display);
  font-size: 1.75rem;
  letter-spacing: 0.03em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.invitation-event-details {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-dim);
  padding: 1.125rem 1.25rem;
  margin-bottom: 2rem;
}

.invitation-meta {
  display: grid;
  grid-template-columns: 1fr;  /* mobile: stacked */
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 1.4rem;           /* regular text */
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1.5;
}

.invitation-success { text-align: center; padding: 2.5rem 0; }
.invitation-success__icon { display: block; font-size: 2.5rem; color: var(--gold); margin-bottom: 1.25rem; }
.invitation-success__title {
  font-family: var(--display);
  font-size: 1.75rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.625rem;
}

/* ==================== FORMS ==================== */

.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.7rem;           /* UI label — uppercase tracking */
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.4rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;             /* ≥ 16px (1rem): prevents iOS auto-zoom on focus */
  font-weight: 300;
  letter-spacing: 0.04em;
  transition: border-color var(--t);
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;            /* touch target */
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus { outline: none; border-color: var(--gold-dim); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--dim); }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }  /* mobile: stacked */

.form-error {
  font-size: 1rem;             /* user-facing error text — readable */
  letter-spacing: 0.02em;
  color: #c04040;
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ==================== MODALS ==================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: flex-start;    /* mobile: top-aligned so modals don't clip */
  justify-content: center;
  z-index: 200;
  padding: 1rem;
  overflow-y: auto;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;   /* mobile-first */
  max-width: 480px;
  width: 100%;
  position: relative;
  margin: auto;
}
.modal--lg { max-width: 640px; }

.modal__close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.3rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--t);
}
.modal__close:hover { color: var(--text); }

.modal__title {
  font-family: var(--display);
  font-size: 1.65rem;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.modal__sub {
  font-size: 1.4rem;           /* regular text */
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 1.75rem;
  line-height: 1.55;
}

.modal__actions {
  display: flex;
  flex-direction: column;     /* mobile: stacked */
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ==================== FOOTER ==================== */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.625rem;
}
.footer__logo-icon { color: var(--gold); }
.footer__desc {
  font-size: 1.1rem;           /* slightly smaller than full body — footer is secondary content */
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 0.5rem;
  line-height: 1.55;
}
.footer__copy {
  font-size: 0.8rem;           /* fine print */
  letter-spacing: 0.06em;
  color: var(--dim);
}

/* ==================== SPINNER ==================== */

.spinner {
  width: 34px; height: 34px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 1.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== UTILITIES ==================== */

.text-gold  { color: var(--gold); }
.text-muted { color: var(--muted); }
.text-red   { color: #c04040; }
.hidden     { display: none !important; }

/* ==================== RESPONSIVE — TABLET (≥ 640px) ==================== */

@media (min-width: 640px) {
  .section { padding: 4rem 2rem; }
  .section__header { margin-bottom: 3rem; }

  .hero__card { padding: 2.25rem 2.5rem 2.5rem; }

  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

  .form-grid { grid-template-columns: 1fr 1fr; }
  .invitation-meta { grid-template-columns: 1fr 1fr; }

  .invitation-card { padding: 2.5rem 2rem; }
  .event-card-signup { padding: 2.25rem; }

  .modal { padding: 2.25rem; }
  .modal__actions { flex-direction: row; }
}

/* ==================== RESPONSIVE — DESKTOP (≥ 860px) ==================== */

@media (min-width: 860px) {
  .nav__inner {
    padding: 0 1.5rem;
    grid-template-columns: 1fr auto 1fr;  /* logo | links | actions */
  }
  .nav__links   { display: flex; }
  .nav__actions { display: flex; justify-self: end; }
  .nav__hamburger { display: none; }

  .section { padding: 5rem 2rem; }

  .modal { padding: 2.5rem; }
}
