/* ============================================================
   TransformMyCity — Shared Stylesheet
   Theme: Sacred Gold · Deep Obsidian · Refined Serif
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&family=Cormorant:wght@300;400&display=swap');

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --gold:       #C9A84C;
  --gold-light: #E8CC80;
  --gold-dark:  #9B7B2E;
  --gold-dim:   rgba(201,168,76,.12);
  --gold-glow:  rgba(201,168,76,.35);

  --ink:        #0D0A07;
  --ink-2:      #141009;
  --ink-3:      #1C1510;
  --ink-4:      #251C12;
  --ink-5:      #2F2318;

  --cream:      #FAF7F2;
  --cream-2:    #F0EBE2;
  --text:       rgba(250,247,242,.92);
  --muted:      rgba(250,247,242,.50);
  --faint:      rgba(250,247,242,.18);

  --border:     rgba(201,168,76,.15);
  --border-h:   rgba(201,168,76,.40);

  --ok:  #52C97E;
  --err: #FF6B6B;

  --radius:   12px;
  --radius-lg: 22px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--ink);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
h1,h2,h3,h4,h5 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  line-height: 1.15;
}
p { line-height: 1.75; }
input, textarea, select, button { font-family: 'DM Sans', sans-serif; }

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ── SELECTION ──────────────────────────────────────────────── */
::selection { background: var(--gold); color: var(--ink); }

/* ── NOISE TEXTURE ──────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: .4;
}

/* ══════════════════════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(13,10,7,.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.nav.scrolled {
  box-shadow: 0 4px 40px rgba(0,0,0,.6);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}
.nav-logo-cross {
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(201,168,76,.5));
}
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.nav-logo-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: .02em;
}
.nav-logo-sub {
  font-size: .58rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .1rem;
}

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: .45rem .9rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 400;
  border-radius: 8px;
  letter-spacing: .01em;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--cream);
  background: rgba(255,255,255,.06);
}
.nav-links a.active {
  color: var(--gold);
}

/* CTA buttons in nav */
.nav-cta {
  display: flex;
  align-items: center;
  gap: .6rem;
}

/* Hamburger */
.nav-ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-ham span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: 70px; left: 0; right: 0;
  background: rgba(13,10,7,.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  flex-direction: column;
  gap: .25rem;
  z-index: 99;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  display: block;
  padding: .7rem .9rem;
  color: var(--muted);
  font-size: .9rem;
  border-radius: 8px;
  text-decoration: none;
  transition: var(--transition);
}
.nav-mobile a:hover,
.nav-mobile a.active { color: var(--cream); background: rgba(255,255,255,.06); }
.nav-mobile a.active { color: var(--gold); }
.nav-mobile-divider { height: 1px; background: var(--border); margin: .5rem 0; }
.nav-mobile-cta { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .25rem; }

/* ══════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .58rem 1.3rem;
  border-radius: 9px;
  font-size: .875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: .01em;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(201,168,76,.28);
}
.btn-gold:hover {
  box-shadow: 0 8px 32px rgba(201,168,76,.48);
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border-h);
}
.btn-outline:hover {
  background: var(--gold-dim);
  color: var(--gold-light);
}

.btn-ghost {
  background: rgba(255,255,255,.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); }

.btn-lg  { padding: .85rem 2.2rem; font-size: 1rem; border-radius: 11px; }
.btn-sm  { padding: .32rem .85rem; font-size: .8rem; border-radius: 7px; }
.btn-full { width: 100%; }

/* ══════════════════════════════════════════════════════════════
   LAYOUT UTILITIES
══════════════════════════════════════════════════════════════ */
.container    { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.container-md { max-width: 760px;  margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 500px;  margin: 0 auto; padding: 0 1.5rem; }

.section      { padding: 6rem 0; }
.section-sm   { padding: 3.5rem 0; }

.page-top     { padding-top: 70px; } /* offset for fixed nav */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.25rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 1.5rem; }

.flex        { display: flex; }
.flex-center { align-items: center; justify-content: center; }
.flex-mid    { align-items: center; }
.flex-between{ justify-content: space-between; }
.flex-wrap   { flex-wrap: wrap; }
.gap-sm  { gap: .5rem; }
.gap-md  { gap: 1rem; }
.gap-lg  { gap: 1.5rem; }

.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-gold    { color: var(--gold); }
.text-muted   { color: var(--muted); }
.text-sm      { font-size: .875rem; }
.text-xs      { font-size: .78rem; }
.text-lg      { font-size: 1.1rem; }

.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ══════════════════════════════════════════════════════════════
   SECTION LABELS / EYEBROWS
══════════════════════════════════════════════════════════════ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .7rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.eyebrow::before,
.eyebrow::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: .5;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--cream);
  margin-bottom: .8rem;
}
.section-title em {
  font-style: italic;
  color: var(--gold);
}
.section-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.8;
}
.section-sub.centered { margin: 0 auto; }

/* ══════════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════════ */
.card {
  background: var(--ink-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-body { padding: 1.75rem; }
.card-hover {
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--border-h);
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
}

/* ══════════════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .7rem;
  border-radius: 50px;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .04em;
}
.badge-gold  { background: rgba(201,168,76,.12); color: var(--gold);  border: 1px solid rgba(201,168,76,.22); }
.badge-ok    { background: rgba(82,201,126,.1);  color: var(--ok);    border: 1px solid rgba(82,201,126,.22); }
.badge-gray  { background: rgba(255,255,255,.06);color: var(--muted); border: 1px solid var(--border); }

/* ══════════════════════════════════════════════════════════════
   FORM ELEMENTS
══════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.3rem; }
.form-label {
  display: block;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .5rem;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: .78rem 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--cream);
  font-size: .95rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  -webkit-appearance: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 3px rgba(201,168,76,.12);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--faint); }
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.form-hint { font-size: .78rem; color: var(--muted); margin-top: .4rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Alert / Flash */
.alert {
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.alert-ok  { background: rgba(82,201,126,.1);  border: 1px solid rgba(82,201,126,.25);  color: var(--ok); }
.alert-err { background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.25); color: var(--err); }

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--ink-2);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
}
.footer-brand-desc {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
  max-width: 300px;
}
.footer-heading {
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.footer-links a {
  font-size: .875rem;
  color: var(--muted);
  transition: color var(--transition);
  text-decoration: none;
}
.footer-links a:hover { color: var(--cream); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { font-size: .8rem; color: var(--muted); }
.footer-scripture {
  font-family: 'Cormorant Garamond', serif;
  font-size: .9rem;
  font-style: italic;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes crossGlow {
  0%,100% { filter: drop-shadow(0 0 14px rgba(201,168,76,.3)); }
  50%      { filter: drop-shadow(0 0 50px rgba(201,168,76,.7)); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .45; }
}

.animate-fade-up  { animation: fadeUp .55s ease both; }
.animate-fade-in  { animation: fadeIn .45s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }
.delay-5 { animation-delay: .5s; }

/* ══════════════════════════════════════════════════════════════
   EVENT CARDS
══════════════════════════════════════════════════════════════ */
.event-card {
  background: var(--ink-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: block;
  text-decoration: none;
  color: inherit;
}
.event-card:hover {
  border-color: var(--border-h);
  box-shadow: 0 16px 50px rgba(0,0,0,.55);
  transform: translateY(-4px);
  text-decoration: none;
  color: inherit;
}
.event-card-img {
  height: 160px;
  background: linear-gradient(135deg, var(--ink-4), var(--ink-5));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
}
.event-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.4));
}
.event-card-body { padding: 1.4rem; }
.event-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--cream);
  margin-bottom: .4rem;
  line-height: 1.3;
}
.event-card-desc {
  font-size: .845rem;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-card-foot {
  padding: .9rem 1.4rem;
  background: rgba(0,0,0,.2);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.event-meta {
  display: flex;
  gap: 1rem;
}
.event-meta-item { font-size: .76rem; color: var(--muted); }

/* ══════════════════════════════════════════════════════════════
   GOLD DIVIDER / ORNAMENT
══════════════════════════════════════════════════════════════ */
.ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}
.ornament-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-glow), transparent);
}
.ornament-cross {
  color: var(--gold);
  font-size: 1rem;
  opacity: .6;
}

/* ══════════════════════════════════════════════════════════════
   PAGE HERO (shared across pages)
══════════════════════════════════════════════════════════════ */
.page-hero {
  padding: 8rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(201,168,76,.1) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--cream);
  margin-bottom: .75rem;
}
.page-hero-title em { font-style: italic; color: var(--gold); }
.page-hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-ham { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 4rem 0; }
  .page-hero { padding: 6rem 0 3.5rem; }
}
@media (max-width: 480px) {
  .container, .container-md, .container-sm { padding: 0 1rem; }
  .btn-lg { padding: .75rem 1.6rem; font-size: .95rem; }

  /* Nav — keep logo readable */
  .nav { padding: 0 1rem; }
  .nav-logo-name { font-size: 1.05rem; }
  .nav-logo-sub { display: none; }
  .nav-mobile { padding: 1rem; }
  .nav-mobile-cta { flex-direction: column; }
  .nav-mobile-cta .btn { width: 100%; text-align: center; }

  /* Hero CTA stack vertically */
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 320px; }

  /* Section padding */
  .section { padding: 3rem 0; }
  .section-sm { padding: 2.5rem 0; }

  /* Section headings */
  .section-title { font-size: clamp(1.6rem, 7vw, 2.4rem); }

  /* Stats bar — 2 columns on small mobile */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .stat-num { font-size: 2.2rem; }

  /* Mission strip */
  .mission-strip { padding: 2rem 1.25rem; }
  .mission-strip .flex { flex-direction: column; align-items: center; }
  .mission-strip .btn { width: 100%; max-width: 280px; }

  /* Footer */
  .footer { padding: 2.5rem 0 1.5rem; }
  .footer-grid { gap: 1.5rem; }
  .footer-bottom { gap: .5rem; }

  /* Cards */
  .feature-card { padding: 1.5rem; }
  .card-body { padding: 1.25rem; }

  /* Event cards */
  .event-card-foot { flex-direction: column; gap: .6rem; align-items: flex-start; }

  /* Buttons */
  .btn { font-size: .85rem; }
  .btn-sm { font-size: .78rem; padding: .3rem .75rem; }
}

/* Prevent horizontal scroll globally */
html, body { max-width: 100%; overflow-x: hidden; }

/* Ensure images don't overflow */
img, video, iframe { max-width: 100%; }

/* Touch-friendly tap targets */
@media (max-width: 768px) {
  .btn, a.btn, button { min-height: 44px; }
  .nav-links a { min-height: 40px; display: flex; align-items: center; }
  .nav-mobile a { min-height: 48px; display: flex; align-items: center; }
}
