/* Craft Show Connect — Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --cream:      #FAF7F2;
  --cream-dark: #F0EBE1;
  --rust:       #B8440E;
  --rust-dark:  #8F3308;
  --rust-light: #D4622A;
  --rust-pale:  #FAE8DD;
  --forest:     #2D5A1B;
  --forest-dark:#1E3D12;
  --forest-pale:#EAF2E5;
  --gold:       #C9883A;
  --gold-pale:  #FDF3E3;
  --charcoal:   #1C1917;
  --warm-600:   #57534E;
  --warm-500:   #78716C;
  --warm-400:   #A8A29E;
  --warm-200:   #E7E5E4;
  --warm-100:   #F5F5F4;
  --white:      #FFFFFF;

  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-sm:  0 1px 3px rgba(28,25,23,.08), 0 1px 2px rgba(28,25,23,.04);
  --shadow:     0 4px 12px rgba(28,25,23,.08), 0 2px 4px rgba(28,25,23,.04);
  --shadow-md:  0 8px 24px rgba(28,25,23,.10), 0 4px 8px rgba(28,25,23,.05);
  --shadow-lg:  0 16px 48px rgba(28,25,23,.12), 0 8px 16px rgba(28,25,23,.06);
  --shadow-rust:0 4px 16px rgba(184,68,14,.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--charcoal);
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ── Navigation ─────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,247,242,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--warm-200);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--charcoal);
  white-space: nowrap;
}
.nav-logo strong { color: var(--rust); }
.nav-links {
  display: flex; gap: 4px; flex: 1;
}
.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  color: var(--warm-600);
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--charcoal); background: var(--warm-100); }
.nav-link.active { color: var(--rust); background: var(--rust-pale); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-user {
  font-size: 14px; font-weight: 500;
  color: var(--charcoal);
  padding: 6px 10px;
}
.nav-toggle { display: none; } /* hidden at all sizes by default */
@media (min-width: 769px) { .nav-toggle { display: none !important; } }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none;
  transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s, background .15s, color .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--rust);
  color: #fff;
  box-shadow: var(--shadow-rust);
}
.btn-primary:hover { background: var(--rust-dark); box-shadow: 0 6px 20px rgba(184,68,14,.35); transform: translateY(-1px); }
.btn-primary:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }

.btn-secondary {
  background: var(--white);
  color: var(--charcoal);
  border: 1.5px solid var(--warm-200);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--warm-400); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-secondary:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }

.btn-forest {
  background: var(--forest);
  color: #fff;
  box-shadow: 0 4px 16px rgba(45,90,27,.25);
}
.btn-forest:hover { background: var(--forest-dark); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--rust);
  border: 1.5px solid var(--rust);
}
.btn-ghost:hover { background: var(--rust-pale); }

.btn-sm { padding: 7px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 32px; font-size: 15px; }

.btn-primary-sm {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  background: var(--rust);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn-primary-sm:hover { background: var(--rust-dark); transform: translateY(-1px); }
.btn-primary-sm:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }

.btn-ghost-sm {
  display: inline-flex; align-items: center;
  padding: 7px 14px;
  background: transparent;
  color: var(--warm-600);
  border: 1.5px solid var(--warm-200);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.btn-ghost-sm:hover { color: var(--charcoal); border-color: var(--warm-400); background: var(--warm-100); }
.btn-ghost-sm:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }

/* ── Badges ──────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge-open    { background: var(--forest-pale); color: var(--forest); }
.badge-soon    { background: var(--gold-pale);   color: #7A5200; }
.badge-closed  { background: var(--warm-100);    color: var(--warm-500); }
.badge-featured{ background: var(--rust-pale);   color: var(--rust); }
.badge-type    { background: var(--cream-dark);  color: var(--warm-600); }

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.event-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
  display: flex; flex-direction: column;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.event-card-img {
  position: relative; height: 180px; overflow: hidden;
  background: var(--cream-dark);
}
.event-card-img img { width: 100%; height: 100%; object-fit: cover; }
.event-card-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(28,25,23,.5) 0%, transparent 60%);
}
.event-card-img-badges {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  display: flex; gap: 6px;
}
.event-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.event-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.event-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px; font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
}
.event-card-details { display: flex; flex-direction: column; gap: 5px; margin-top: auto; }
.event-card-detail {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--warm-600);
}
.event-card-detail svg { flex-shrink: 0; }
.event-card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--warm-100);
  display: flex; align-items: center; justify-content: space-between;
}
.event-card-fee {
  font-size: 15px; font-weight: 600; color: var(--charcoal);
}
.event-card-fee span { font-size: 12px; font-weight: 400; color: var(--warm-500); margin-left: 2px; }

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 13px; font-weight: 600;
  color: var(--charcoal);
  letter-spacing: .01em;
}
.form-label .required { color: var(--rust); margin-left: 2px; }
.form-hint { font-size: 12px; color: var(--warm-500); }
.form-input,
.form-select,
.form-textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--warm-200);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--warm-400); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(184,68,14,.12);
}
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-select { appearance: none; cursor: pointer; }
.form-error {
  font-size: 12px; color: #B91C1C;
  display: flex; align-items: center; gap: 4px;
}
.input-error { border-color: #F87171 !important; }
.input-success { border-color: var(--forest) !important; }

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

.checkbox-group { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-group input[type=checkbox] { margin-top: 2px; accent-color: var(--rust); cursor: pointer; }
.checkbox-group label { font-size: 14px; color: var(--charcoal); cursor: pointer; line-height: 1.5; }

/* ── Section ────────────────────────────────────────────────────────────────── */
.section { padding: 80px 24px; }
.section-sm { padding: 48px 24px; }
.container { max-width: 1200px; margin: 0 auto; }
.container-sm { max-width: 720px; margin: 0 auto; }
.section-header { margin-bottom: 48px; }
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--rust);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--charcoal);
}
.section-sub {
  font-size: 16px; color: var(--warm-600);
  line-height: 1.7; margin-top: 12px;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,.7);
  padding: 64px 24px 32px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; color: #fff;
}
.footer-logo strong { color: #E88055; }
.footer-tagline { font-size: 13px; line-height: 1.6; }
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 14px;
}
.footer-col a {
  display: block; margin-bottom: 8px;
  font-size: 14px; color: rgba(255,255,255,.6);
  transition: color .15s;
}
.footer-col a:hover { color: #fff; }
.footer-donate {
  max-width: 1200px; margin: 40px auto 0;
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.footer-donate-text {
  font-size: 13px; color: rgba(255,255,255,.45); line-height: 1.5; flex: 1;
}
.footer-donate-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px;
  background: #0070BA; color: #fff;
  border-radius: 99px;
  font-size: 13px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
  text-decoration: none;
  transition: background .15s, transform .15s;
  box-shadow: 0 4px 14px rgba(0,112,186,.35);
}
.footer-donate-btn:hover { background: #005EA6; transform: translateY(-1px); }
.footer-donate-btn:active { transform: scale(.98); }
.footer-bottom {
  max-width: 1200px; margin: 24px auto 0;
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: rgba(255,255,255,.35);
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1/-1; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ── Toast ───────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--charcoal);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  max-width: 320px;
  display: flex; align-items: center; gap: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success .toast-icon { color: #4ADE80; }
.toast-error   .toast-icon { color: #F87171; }

/* ── Responsive nav ─────────────────────────────────────────────────────────── */

/* The drawer is hidden by default; only used on mobile */
.nav-drawer { display: none; }

@media (max-width: 768px) {
  /* Hide the desktop nav-links and nav-actions inside nav-inner */
  .nav-links  { display: none; }
  .nav-actions { display: none; }

  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; background: none; border: none; cursor: pointer;
    margin-left: auto; flex-shrink: 0; padding: 0;
  }
  .nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--charcoal); border-radius: 2px;
    transition: transform .25s, opacity .25s;
  }

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

  /* Single unified drawer — no gap, no absolute positioning tricks */
  .nav-drawer {
    display: none;
    flex-direction: column;
    background: var(--cream);
    border-top: 1px solid var(--warm-200);
    box-shadow: 0 8px 24px rgba(28,25,23,.08);
  }
  .site-nav.open .nav-drawer {
    display: flex;
  }
  .nav-drawer-links {
    display: flex; flex-direction: column;
    padding: 10px 12px 6px;
    gap: 2px;
  }
  .nav-drawer-links .nav-link {
    padding: 12px 14px;
    font-size: 15px;
    border-radius: var(--radius);
    display: block;
  }
  .nav-drawer-actions {
    display: flex; flex-direction: row; gap: 8px;
    padding: 10px 12px 14px;
    border-top: 1px solid var(--warm-100);
  }
  .nav-drawer-actions a,
  .nav-drawer-actions button {
    flex: 1; justify-content: center; text-align: center;
    padding: 10px 12px; font-size: 14px; min-height: 44px;
  }
}

/* ── Mobile global fixes ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Prevent iOS Safari from zooming in on input focus */
  .form-input, .form-select, .form-textarea {
    font-size: 16px !important;
  }

  /* Tighter section padding */
  .section     { padding: 48px 16px; }
  .section-sm  { padding: 32px 16px; }

  /* Footer stacks to single column on small phones */
  .footer-inner { grid-template-columns: 1fr !important; gap: 28px; }
  .footer-brand { grid-column: auto !important; }

  /* Toast: full-width at bottom */
  #toast-container {
    bottom: 0; right: 0; left: 0;
    padding: 12px;
  }
  .toast { max-width: 100%; width: 100%; }

  /* Buttons: make full-width when stacked */
  .btn-stack-mobile { width: 100%; justify-content: center; }

  /* Ensure minimum touch target */
  .btn, .btn-primary-sm, .btn-ghost-sm {
    min-height: 44px;
  }
}

/* ── Divider ─────────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--warm-200); }

/* ── Skip link ───────────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -40px; left: 16px;
  background: var(--rust); color: #fff;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; z-index: 9999;
  transition: top .15s;
}
.skip-link:focus { top: 8px; }
