/* ============================================================
   Xedenyui — Shared Theme
   Palette: deep navy + gold (dignity + Ghana heritage)
   ============================================================ */

:root {
  --navy:      #0d1b2a;
  --navy-2:    #1a2d44;
  --navy-3:    #243b55;
  --gold:      #c9a84c;
  --gold-lt:   #e8c97a;
  --cream:     #f5f0e8;
  --text:      #e8e4dc;
  --text-muted:#9eafc2;
  --success:   #22c55e;
  --danger:    #ef4444;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(0,0,0,.45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

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

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

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

.gold   { color: var(--gold); }
.muted  { color: var(--text-muted); }
.small  { font-size: .85rem; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.grid-2     { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-3     { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.grid-4     { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.flex       { display: flex; align-items: center; }
.gap-1      { gap: .5rem; }
.gap-2      { gap: 1rem; }
.center     { text-align: center; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.6rem; border-radius: 8px; font-weight: 600; font-size: .95rem;
  border: none; cursor: pointer; transition: all .2s; text-decoration: none;
  white-space: nowrap;
}
.btn-gold   { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-lt); color: var(--navy); }
.btn-outline { background: transparent; border: 2px solid var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--navy); }
.btn-ghost  { background: rgba(255,255,255,.08); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm     { padding: .45rem 1rem; font-size: .85rem; }
.btn-lg     { padding: 1rem 2.2rem; font-size: 1.1rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Cards ── */
.card {
  background: var(--navy-2);
  border: 1px solid rgba(201,168,76,.15);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-body  { padding: 1.5rem; }
.card-img   { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.card-img-sq{ width: 100%; aspect-ratio: 1/1; object-fit: cover; }

/* ── Event card ── */
.event-card {}
.event-card .poster-wrap {
  position: relative; overflow: hidden;
}
.event-card .poster-wrap img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  transition: transform .4s;
}
.event-card:hover .poster-wrap img { transform: scale(1.04); }
.event-card .status-badge {
  position: absolute; top: .75rem; right: .75rem;
  padding: .25rem .7rem; border-radius: 99px; font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.badge-published  { background: rgba(34,197,94,.2);  color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.badge-memorial   { background: rgba(201,168,76,.15); color: var(--gold); border: 1px solid rgba(201,168,76,.3); }
.badge-archived   { background: rgba(148,163,184,.1); color: #94a3b8; border: 1px solid rgba(148,163,184,.2); }

.event-card .meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--text-muted); margin-top: .5rem; flex-wrap: wrap; }
.event-card .meta span { display: flex; align-items: center; gap: .3rem; }

/* ── Obituary / rich text area ── */
.obituary-text {
  font-size: 1.05rem; line-height: 1.85;
  color: var(--cream); max-width: 720px; margin: 0 auto;
  white-space: pre-wrap;
}

/* ── Schedule timeline ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: .65rem; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--gold), transparent);
}
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.6rem; top: .35rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--navy);
}
.timeline-date  { font-weight: 700; color: var(--gold); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.timeline-type  { font-size: 1.1rem; font-weight: 600; margin: .2rem 0 .3rem; }
.timeline-venue { font-size: .9rem; color: var(--text-muted); }

/* ── Photo gallery ── */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .5rem; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: pointer; transition: opacity .2s; }
.photo-grid img:hover { opacity: .85; }

/* ── Lightbox ── */
#lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img  { max-width: 90vw; max-height: 90vh; border-radius: 8px; }
#lightbox-close {
  position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem;
  color: #fff; cursor: pointer; background: none; border: none; line-height: 1;
}

/* ── Tribute wall ── */
.tribute-card {
  background: var(--navy-3); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; border-left: 3px solid var(--gold);
  margin-bottom: 1rem;
}
.tribute-author { font-weight: 600; }
.tribute-relation { font-size: .8rem; color: var(--gold); margin-left: .4rem; }
.tribute-msg { margin-top: .5rem; color: var(--cream); white-space: pre-wrap; }
.tribute-date { font-size: .75rem; color: var(--text-muted); margin-top: .5rem; }

/* ── Tribute form ── */
.tribute-form { max-width: 600px; margin: 0 auto; }
.tribute-form .form-group { margin-bottom: 1.2rem; }
.tribute-form label { display: block; font-size: .9rem; margin-bottom: .4rem; color: var(--text-muted); }
.tribute-form input, .tribute-form textarea, .tribute-form select {
  width: 100%; padding: .75rem 1rem; border-radius: 8px;
  background: var(--navy-3); border: 1px solid rgba(255,255,255,.1);
  color: var(--text); font-size: 1rem; font-family: inherit;
  transition: border-color .2s;
}
.tribute-form input:focus, .tribute-form textarea:focus {
  outline: none; border-color: var(--gold);
}
.tribute-form textarea { min-height: 130px; resize: vertical; }

/* ── Nav ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,27,42,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,.15);
  padding: 1rem 0;
}
.site-nav .inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-nav .logo  { font-size: 1.4rem; font-weight: 800; color: var(--gold); text-decoration: none; }
.site-nav .logo span { color: var(--text); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ── Footer ── */
.site-footer {
  background: var(--navy-2); border-top: 1px solid rgba(201,168,76,.1);
  padding: 3rem 0 2rem; margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: var(--gold); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-col a  { display: block; color: var(--text-muted); font-size: .9rem; margin-bottom: .5rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.06); padding-top: 1.5rem; text-align: center; color: var(--text-muted); font-size: .85rem; }

/* ── Share bar ── */
.share-bar { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
.share-btn  { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.1rem; border-radius: 6px; font-size: .85rem; font-weight: 600; cursor: pointer; border: none; }
.share-wa   { background: #25D366; color: #000; }
.share-fb   { background: #1877F2; color: #fff; }
.share-copy { background: var(--navy-3); color: var(--text); border: 1px solid rgba(255,255,255,.1); }
.share-copy:hover { border-color: var(--gold); color: var(--gold); }

/* ── QR modal ── */
.qr-modal-bg {
  display: none; position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,.7); align-items: center; justify-content: center;
}
.qr-modal-bg.open { display: flex; }
.qr-modal { background: var(--navy-2); border-radius: var(--radius); padding: 2rem; text-align: center; max-width: 320px; width: 90%; }
.qr-modal img { width: 220px; height: 220px; margin: 1rem auto; border-radius: 8px; background: #fff; padding: .5rem; }
.qr-modal h3 { color: var(--gold); margin-bottom: .5rem; }
.qr-modal p  { font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }

/* ── Hero banner ── */
.hero {
  min-height: 92vh; display: flex; align-items: center;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0d1b2a 0%, #1a2d44 60%, #0d1b2a 100%);
}
.hero-bg-pattern {
  position: absolute; inset: 0; opacity: .04;
  background-image: repeating-linear-gradient(45deg, var(--gold) 0, var(--gold) 1px, transparent 0, transparent 50%);
  background-size: 20px 20px;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow { font-size: .85rem; text-transform: uppercase; letter-spacing: .15em; color: var(--gold); margin-bottom: 1rem; }
.hero-title   { margin-bottom: 1.5rem; }
.hero-sub     { font-size: 1.15rem; color: var(--text-muted); max-width: 540px; margin-bottom: 2.5rem; }
.hero-cta     { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ── Stats strip ── */
.stats-strip  { background: var(--navy-2); border-top: 1px solid rgba(201,168,76,.12); border-bottom: 1px solid rgba(201,168,76,.12); }
.stats-inner  { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 2rem; padding: 2.5rem 0; text-align: center; }
.stat-item .num { font-size: 2.2rem; font-weight: 800; color: var(--gold); }
.stat-item .lbl { font-size: .85rem; color: var(--text-muted); }

/* ── Pricing ── */
.price-card { border: 1px solid rgba(201,168,76,.2); border-radius: var(--radius); padding: 2rem; background: var(--navy-2); }
.price-card.featured { border-color: var(--gold); position: relative; }
.price-card.featured::before { content: 'Popular'; position: absolute; top: -1px; right: 1.5rem; background: var(--gold); color: var(--navy); font-size: .75rem; font-weight: 700; padding: .2rem .75rem; border-radius: 0 0 6px 6px; text-transform: uppercase; letter-spacing: .05em; }
.price-card .price { font-size: 2.5rem; font-weight: 800; color: var(--gold); }
.price-card .price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.price-card ul { list-style: none; margin: 1.5rem 0; }
.price-card ul li { padding: .45rem 0; font-size: .95rem; border-bottom: 1px solid rgba(255,255,255,.05); display: flex; align-items: center; gap: .6rem; }
.price-card ul li::before { content: '✓'; color: var(--gold); font-weight: 700; flex-shrink: 0; }
.price-card ul li.no::before { content: '✗'; color: rgba(255,255,255,.2); }
.price-card ul li.no { color: var(--text-muted); }

/* ── Forms (generic) ── */
.form-group   { margin-bottom: 1.25rem; }
.form-label   { display: block; font-size: .9rem; color: var(--text-muted); margin-bottom: .4rem; }
.form-control {
  width: 100%; padding: .75rem 1rem; border-radius: 8px;
  background: var(--navy-3); border: 1px solid rgba(255,255,255,.1);
  color: var(--text); font-size: 1rem; font-family: inherit; transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--gold); }
.form-control::placeholder { color: rgba(255,255,255,.3); }
select.form-control { cursor: pointer; }
textarea.form-control { min-height: 100px; resize: vertical; }
.form-hint    { font-size: .78rem; color: var(--text-muted); margin-top: .35rem; }
.form-error   { font-size: .78rem; color: var(--danger); margin-top: .35rem; }

/* ── Alerts ── */
.alert { padding: .85rem 1.25rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.alert-success { background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.3); color: #4ade80; }
.alert-error   { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.25); color: #f87171; }
.alert-info    { background: rgba(201,168,76,.1);  border: 1px solid rgba(201,168,76,.25); color: var(--gold-lt); }

/* ── Spinner ── */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 640px) {
  .section { padding: 3rem 0; }
  .hero    { min-height: 80vh; }
  .hero-cta { flex-direction: column; }
  .nav-links { display: none; }
}
