:root {
  --cream: #fdf6ee;
  --paper: #ffffff;
  --ink: #2b2320;
  --ink-soft: #6f6459;
  --terracotta: #e05e3d;
  --terracotta-dark: #c14a2e;
  --rose: #d24b74;
  --sage: #6fa476;
  --sage-dark: #4f7f58;
  --gold: #f0b64a;
  --border: #eee0d0;
  --grad: linear-gradient(120deg, #e05e3d, #d24b74);
  --radius: 16px;
  --shadow: 0 2px 10px rgba(60, 45, 30, 0.06);
  --shadow-lg: 0 8px 30px rgba(60, 45, 30, 0.14);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Elements with an explicit display (e.g. .btn's inline-flex) would otherwise
   override the UA stylesheet and ignore the hidden attribute entirely. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
}

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 700; line-height: 1.2; margin: 0 0 0.4em; letter-spacing: -0.01em; }

/* Gradient-ink text used for hero accent words */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: var(--terracotta-dark); }
.link { color: var(--terracotta-dark); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

main { max-width: 960px; margin: 0 auto; padding: 0 20px 80px; }
.view[hidden] { display: none; }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  font-size: 14px;
}

.demo-banner {
  background: var(--gold);
  color: #4a3a10;
  text-align: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
}

/* ------------------------------------------------------------------ nav */
.app-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { font-family: 'Fraunces', Georgia, serif; font-size: 21px; font-weight: 700; text-decoration: none; color: var(--ink); }
.nav-links { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 14px; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-links a.active, .nav-links a:hover { color: var(--terracotta-dark); border-bottom-color: var(--terracotta); }

/* ----------------------------------------------------------------- btns */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.05s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: white; box-shadow: var(--shadow); }
.btn-primary:hover:not(:disabled) { filter: brightness(0.92); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--terracotta); color: var(--terracotta-dark); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 90px 20px 60px; text-align: center; }
.hero-inner { max-width: 700px; margin: 0 auto; }
.eyebrow { color: var(--sage-dark); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; font-size: 13px; }
.hero h1 { font-size: 44px; margin: 12px 0 20px; }
.hero-sub { font-size: 18px; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 28px 0 10px; }
.hero-note { font-size: 13px; color: var(--ink-soft); }

/* ------------------------------------------------------- scripture verse */
.scripture-verse {
  max-width: 700px;
  margin: 0 auto;
  padding: 8px 20px 48px;
  text-align: center;
}
.scripture-verse blockquote {
  margin: 0;
  padding: 32px 28px;
  background: var(--paper);
  border-radius: var(--radius);
  border-left: 4px solid var(--terracotta);
  box-shadow: var(--shadow);
  position: relative;
}
.scripture-verse blockquote::before {
  content: '“';
  position: absolute;
  top: -6px;
  left: 20px;
  font-size: 64px;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--terracotta);
  opacity: 0.25;
  line-height: 1;
}
.scripture-verse p {
  margin: 0 0 12px;
  font-size: 19px;
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
}
.scripture-verse cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  color: var(--sage-dark);
  font-size: 14px;
}
.scripture-verse .verse-version { font-weight: 600; color: var(--ink-soft); }
.scripture-copyright {
  margin: 10px 0 0;
  font-size: 9px;
  line-height: 1.4;
  color: var(--ink-soft);
  opacity: 0.55;
}

.value-props {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.value-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.value-icon { font-size: 32px; margin-bottom: 10px; }
.value-card h3 { margin-bottom: 8px; }
.value-card p { margin: 0; font-size: 14px; }

.how-it-works { max-width: 720px; margin: 0 auto; padding: 40px 20px; text-align: center; }
.steps { list-style: none; margin: 30px 0 0; padding: 0; text-align: left; display: grid; gap: 20px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--sage);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.steps p { margin: 2px 0 0; font-size: 14px; }

.about-section, .guidelines-preview {
  max-width: 700px;
  margin: 20px auto;
  padding: 32px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.guidelines-preview ul { padding-left: 20px; }
.guidelines-preview li { margin-bottom: 8px; color: var(--ink-soft); }

.final-cta { text-align: center; padding: 60px 20px; }

/* ------------------------------------------------------ community stats */
.community-stats {
  max-width: 700px;
  margin: 20px auto;
  padding: 32px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.stats-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 24px 0 8px; }
.stat-tile { background: var(--cream); border-radius: var(--radius); padding: 18px 28px; min-width: 130px; }
.stat-num { font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--ink-soft); font-weight: 600; margin-top: 4px; }
.map-heading { margin-top: 28px; }
.map-caption { font-size: 13px; margin-bottom: 12px; }
#activity-map { height: 320px; border-radius: var(--radius); overflow: hidden; }
.map-note { font-size: 14px; color: var(--ink-soft); background: var(--cream); border-radius: var(--radius); padding: 24px; }

/* ----------------------------------------------------------- map page */
#activity-map-full { height: 60vh; min-height: 420px; border-radius: var(--radius); overflow: hidden; margin-top: 24px; }
#view-map .stats-row { margin-top: 20px; }
#view-map .stat-num { font-size: 26px; }

/* ----------------------------------------------------------------- auth */
.auth-card {
  max-width: 420px;
  margin: 60px auto;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 32px;
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; background: var(--cream); border-radius: 999px; padding: 4px; }
.auth-tab { flex: 1; border: none; background: transparent; padding: 8px; border-radius: 999px; font-weight: 700; cursor: pointer; color: var(--ink-soft); }
.auth-tab.active { background: var(--terracotta); color: white; }
.auth-form label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.auth-form input, textarea, select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--cream);
}
.form-sub { font-size: 13px; margin-top: -6px; }
.form-error { color: var(--terracotta-dark); font-size: 13px; margin-top: 10px; }
.form-success { color: var(--sage-dark); font-size: 13px; margin-top: 10px; }
.auth-footer { text-align: center; margin-top: 16px; }

.confirm-card { text-align: center; }
.confirm-icon { font-size: 44px; margin-bottom: 8px; }
.confirm-lead { font-size: 15px; color: var(--ink); margin-bottom: 10px; }
.confirm-card .btn-block { margin-top: 12px; }
.confirm-tips { text-align: left; font-size: 13px; color: var(--ink-soft); margin: 16px 0; padding-left: 20px; }
.confirm-tips li { margin-bottom: 6px; }

/* ------------------------------------------------------------- discover */
.page-header { display: flex; justify-content: space-between; align-items: center; margin: 32px 0 20px; flex-wrap: wrap; gap: 10px; }
.page-sub { margin-top: -10px; }

.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 24px; background: var(--paper); padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow); }
.filters label { font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
.filters input, .filters select { padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 8px; background: var(--cream); }

.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.event-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}
.event-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.event-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12px; }
.event-card h3 { margin-bottom: 6px; font-size: 18px; }
.event-date { color: var(--ink-soft); font-weight: 600; }
.event-loc { font-size: 13px; margin-bottom: 6px; }
.event-desc { font-size: 13px; margin-bottom: 12px; }
.event-card-bottom { display: flex; justify-content: space-between; align-items: center; }
.host-by { font-size: 12px; color: var(--ink-soft); }

.pill { display: inline-block; background: var(--sage); color: white; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pill-muted { background: var(--border); color: var(--ink-soft); }

.avatar-stack { display: flex; align-items: center; }
.avatar-dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--terracotta);
  color: white; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--paper);
  margin-left: -8px;
}
.avatar-stack .avatar-dot:first-child { margin-left: 0; }
.avatar-more { background: var(--ink-soft); }
.avatar-empty { font-size: 12px; color: var(--ink-soft); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-soft); }

.reminder-banner { background: #fff4e0; border: 1.5px solid var(--gold); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; font-size: 14px; }

/* --------------------------------------------------------------- event */
.back-link { display: inline-block; margin: 20px 0; }
.event-detail-header { margin-bottom: 16px; }
.event-detail-header h1 { margin-top: 10px; }
.event-meta { font-size: 14px; margin-bottom: 4px; }
.event-description { background: var(--paper); padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow); }
.event-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 30px; align-items: flex-start; }

.share-wrap { position: relative; }
.share-menu {
  position: absolute;
  top: 46px;
  left: 0;
  min-width: 230px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 150;
}
.share-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.share-item:hover { background: var(--cream); }

@media (max-width: 700px) {
  .share-menu { left: auto; right: 0; }
}

.attendees-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.attendee { display: flex; gap: 12px; align-items: center; }
.attendee-name { font-weight: 700; font-size: 14px; }
.attendee-intro { font-size: 13px; color: var(--ink-soft); }

.chat-box { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; max-height: 260px; overflow-y: auto; margin-bottom: 12px; }
.chat-msg { font-size: 14px; margin-bottom: 8px; }
.chat-form { display: flex; gap: 10px; margin-bottom: 40px; }
.chat-form input { flex: 1; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--paper); }

/* --------------------------------------------------------------- create */
.template-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.chip { border: 1.5px solid var(--border); background: var(--paper); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--terracotta); }
.chip.active { background: var(--terracotta); color: white; border-color: var(--terracotta); }

.create-form { max-width: 560px; background: var(--paper); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.create-form label { display: block; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.field-row { display: flex; gap: 14px; }
.field-row label { flex: 1; }

.tabs { display: flex; gap: 8px; margin: 16px 0 24px; }
.tab-btn { border: 1.5px solid var(--border); background: var(--paper); border-radius: 999px; padding: 8px 18px; font-weight: 700; cursor: pointer; color: var(--ink-soft); }
.tab-btn.active { background: var(--sage); color: white; border-color: var(--sage); }

.guidelines-body h3 { margin-top: 24px; }

/* ----------------------------------------------------------------- admin */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.admin-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-soft); font-weight: 700; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table td.wrap { white-space: normal; min-width: 200px; }
.admin-table .status-select {
  padding: 5px 8px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--cream);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
}
.admin-empty { padding: 40px 20px; text-align: center; color: var(--ink-soft); }

/* --------------------------------------------------------- notifications */
.notif-wrap { position: relative; }
.notif-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 16px;
  cursor: pointer;
  position: relative;
}
.notif-btn:hover { border-color: var(--terracotta); }
.notif-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--terracotta);
  color: white;
  font-size: 10px;
  font-weight: 800;
  min-width: 17px; height: 17px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.notif-badge[hidden] { display: none; }
.notif-panel {
  position: absolute;
  right: 0;
  top: 46px;
  width: 320px;
  max-width: 86vw;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  z-index: 150;
  max-height: 380px;
  overflow-y: auto;
}
.notif-panel h3 { font-size: 15px; margin-bottom: 10px; }
.notif-empty { font-size: 13px; color: var(--ink-soft); margin: 0; }
.notif-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  padding: 10px 4px;
  cursor: pointer;
  font: inherit;
}
.notif-item:hover { background: var(--cream); }
.notif-unread { background: #fff7ea; }
.notif-msg { display: block; font-size: 13px; color: var(--ink); }
.notif-time { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 3px; }

/* --------------------------------------------------------------- footer */
.app-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 36px;
  display: flex;
  justify-content: center;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: var(--ink-soft);
}
.footer-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
}
.footer-link:hover { color: var(--terracotta-dark); }
.feedback-alt { font-size: 13px; margin: 14px 0 0; }

/* ---------------------------------------------------------------- modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(30, 20, 10, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal { background: var(--paper); border-radius: var(--radius); padding: 28px; max-width: 420px; width: 100%; position: relative; box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; top: 14px; right: 14px; background: none; border: none; font-size: 16px; cursor: pointer; color: var(--ink-soft); }
.modal label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.invite-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

@media (max-width: 700px) {
  .nav-inner { flex-wrap: wrap; row-gap: 10px; }
  /* On narrow screens the bell sits near the left edge, so a right-anchored
     dropdown would overflow — pin the panel to the viewport instead. */
  .notif-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .nav-links {
    order: 3;
    flex: 1 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
  }
  .nav-links a { flex-shrink: 0; white-space: nowrap; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .field-row { flex-direction: column; }
}

/* ============================================================= animation */

html { scroll-behavior: smooth; }

/* ------------------------------------------------------- view transitions */
/* Toggling the `hidden` attribute (display:none -> block) restarts CSS
   animations, so this just replays every time the router shows a view. */
.view:not([hidden]) {
  animation: view-in 0.5s cubic-bezier(0.16, 0.8, 0.3, 1);
}
@keyframes view-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------- hero motion */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-glow {
  position: absolute;
  inset: -10%;
  z-index: -2;
  background: linear-gradient(120deg, #fde3d3, #e9f0e0 30%, #fdf6ee 55%, #fadbe3 80%, #fde3d3);
  background-size: 300% 300%;
  animation: hero-gradient 22s ease infinite;
}
@keyframes hero-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-blob {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.35;
  animation: hero-float 14s ease-in-out infinite;
}
.hero-blob-a {
  width: 280px; height: 280px;
  top: -60px; left: 8%;
  background: var(--terracotta);
}
.hero-blob-b {
  width: 220px; height: 220px;
  bottom: -40px; right: 10%;
  background: var(--sage);
  animation-delay: -6s;
  animation-direction: reverse;
}
@keyframes hero-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -24px) scale(1.08); }
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 {
  animation: fade-up 0.7s cubic-bezier(0.16, 0.8, 0.3, 1) 0.05s both;
}
.eyebrow { animation: fade-up 0.6s cubic-bezier(0.16, 0.8, 0.3, 1) both; }
.hero-sub { animation: fade-up 0.7s cubic-bezier(0.16, 0.8, 0.3, 1) 0.12s both; }
.hero-ctas { animation: fade-up 0.7s cubic-bezier(0.16, 0.8, 0.3, 1) 0.2s both; }
.hero-note { animation: fade-up 0.7s cubic-bezier(0.16, 0.8, 0.3, 1) 0.26s both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------- scroll reveal */
/* .reveal / .in-view are added by animations.js via IntersectionObserver. */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 0.8, 0.24, 1), transform 0.6s cubic-bezier(0.16, 0.8, 0.24, 1);
  transition-delay: calc(var(--reveal-i, 0) * 60ms);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------- hover / tap fx */
.btn {
  transition: transform 0.15s cubic-bezier(0.16, 0.8, 0.3, 1), box-shadow 0.2s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.97); }
.btn-ghost:hover { box-shadow: none; }

.event-card {
  transition: transform 0.25s cubic-bezier(0.16, 0.8, 0.3, 1), box-shadow 0.25s ease;
}
.event-card:hover { transform: translateY(-4px) scale(1.01); }
.event-card:active { transform: translateY(-1px) scale(0.995); }

.value-card, .about-section, .community-stats, .guidelines-preview, .stat-tile {
  transition: transform 0.25s cubic-bezier(0.16, 0.8, 0.3, 1), box-shadow 0.25s ease;
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-tile { transition: transform 0.2s cubic-bezier(0.16, 0.8, 0.3, 1); }
.stat-tile:hover { transform: translateY(-2px) scale(1.03); }

.chip, .tab-btn, .auth-tab {
  transition: transform 0.15s cubic-bezier(0.16, 0.8, 0.3, 1), background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip:hover, .tab-btn:hover { transform: translateY(-1px); }
.chip:active, .tab-btn:active, .auth-tab:active { transform: scale(0.96); }
.chip.active { animation: pop 0.25s cubic-bezier(0.16, 0.8, 0.3, 1); }
@keyframes pop {
  0% { transform: scale(0.94); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.nav-links a {
  position: relative;
  transition: color 0.15s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 2px; right: 2px; bottom: -2px;
  height: 2px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.16, 0.8, 0.3, 1);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.brand { display: inline-block; transition: transform 0.2s cubic-bezier(0.16, 0.8, 0.3, 1); }
.brand:hover { transform: scale(1.04); }

.notif-btn { transition: transform 0.15s ease, border-color 0.15s ease; }
.notif-btn:hover { transform: scale(1.06); }
.notif-btn:active { transform: scale(0.94); }
.notif-badge:not([hidden]) { animation: badge-pop 0.35s cubic-bezier(0.16, 0.8, 0.3, 1); }
@keyframes badge-pop {
  0% { transform: scale(0.3); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}
.notif-panel:not([hidden]) { animation: panel-in 0.2s cubic-bezier(0.16, 0.8, 0.3, 1); transform-origin: top right; }
.notif-item { transition: background-color 0.15s ease; }
.share-menu:not([hidden]) { animation: panel-in 0.2s cubic-bezier(0.16, 0.8, 0.3, 1); transform-origin: top left; }
@keyframes panel-in {
  from { opacity: 0; transform: scale(0.95) translateY(-6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.avatar-dot { transition: transform 0.15s ease; }
.attendee:hover .avatar-dot { transform: scale(1.12); }

.auth-form input, .create-form input, .create-form textarea, .create-form select,
.filters input, .filters select, .modal input, .modal textarea, .modal select {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-form input:focus, .create-form input:focus, .create-form textarea:focus, .create-form select:focus,
.filters input:focus, .filters select:focus, .modal input:focus, .modal textarea:focus, .modal select:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(193, 105, 79, 0.15);
}

.toast {
  animation: toast-in 0.3s cubic-bezier(0.16, 0.8, 0.3, 1);
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.modal-overlay:not([hidden]) { animation: overlay-in 0.2s ease; }
.modal-overlay:not([hidden]) .modal { animation: modal-in 0.25s cubic-bezier(0.16, 0.8, 0.3, 1); }
@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close { transition: transform 0.15s ease, color 0.15s ease; }
.modal-close:hover { transform: rotate(90deg); color: var(--terracotta-dark); }

/* ------------------------------------------------------ spread the word */
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 20px; }
.share-card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.share-card h3 { font-size: 17px; margin-bottom: 12px; }
.share-card-qr { text-align: center; }
.share-qr { width: 200px; height: 200px; max-width: 100%; border-radius: 12px; }
.share-url { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 19px; color: var(--ink); margin: 10px 0 14px; }
.share-card-actions { display: flex; flex-direction: column; gap: 8px; }
.share-hint { font-size: 12px; margin: 12px 0 0; }
.share-blurb { background: var(--cream); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--ink); line-height: 1.5; }
.btn-copy-blurb { width: 100%; }
.donate-card { border: 2px solid var(--gold); background: #fffaf0; }
.donate-copy { font-size: 14px; }

/* -------------------------------------------------------- countdown pills */
.pill-when { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--border); color: var(--ink-soft); }
.pill-today { background: var(--grad); color: white; }
.pill-soon { background: var(--gold); color: #4a3a10; }

/* --------------------------------------------------------------- confetti */
.confetti-piece {
  position: fixed;
  top: -14px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  z-index: 500;
  pointer-events: none;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(105vh) rotate(720deg); }
}

/* ------------------------------------------------------------ print flyer */
#flyer-sheet { display: none; }
@media print {
  body.printing-flyer > *:not(#flyer-sheet) { display: none !important; }
  body.printing-flyer #flyer-sheet { display: block; }
  #flyer-sheet .flyer-inner { text-align: center; padding: 60px 40px; }
  .flyer-logo { font-family: 'Fraunces', Georgia, serif; font-size: 64px; font-weight: 700; }
  .flyer-tagline { font-family: 'Fraunces', Georgia, serif; font-size: 30px; margin: 8px 0 18px; }
  .flyer-lead { font-size: 17px; max-width: 480px; margin: 0 auto 30px; line-height: 1.5; }
  .flyer-qr { width: 280px; height: 280px; }
  .flyer-url { font-size: 26px; font-weight: 800; margin-top: 18px; }
  .flyer-foot { font-size: 14px; margin-top: 10px; color: #555; }
}

/* ------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-blob, .hero-glow { animation: none !important; }
}
