/* ============================================================
   Pastor Maganda Lowlings — Ministry website
   Palette: royal indigo + warm gold + cream
   ============================================================ */

:root {
  --indigo-900: #1a1340;
  --indigo-800: #241a57;
  --indigo-700: #322478;
  --indigo-600: #4733a8;
  --gold-500: #d4a32f;
  --gold-400: #e6bd54;
  --gold-300: #f2d486;
  --cream: #faf6ed;
  --cream-200: #f1e9d8;
  --ink: #1e1a2e;
  --muted: #6b6480;
  --white: #ffffff;
  --success: #1f9d5b;
  --pending: #c98a16;
  --failed: #c0392b;

  --shadow-sm: 0 4px 14px rgba(26, 19, 64, 0.08);
  --shadow-md: 0 18px 50px rgba(26, 19, 64, 0.16);
  --radius: 18px;
  --maxw: 1180px;

  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.12; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--gold-500);
  margin-bottom: 18px;
}

.section { padding: 110px 0; position: relative; }
.section-head { max-width: 680px; margin: 0 auto 60px; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); color: var(--indigo-900); }
.section-head p { color: var(--muted); margin-top: 18px; font-size: 1.08rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 700; font-size: 0.98rem;
  padding: 15px 30px; border-radius: 100px; border: none; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-gold { background: linear-gradient(135deg, var(--gold-400), var(--gold-500)); color: var(--indigo-900); box-shadow: 0 12px 30px rgba(212,163,47,.35); }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(212,163,47,.5); }
.btn-ghost { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: var(--white); }
.btn-dark { background: var(--indigo-800); color: var(--white); }
.btn-dark:hover { transform: translateY(-3px); background: var(--indigo-700); box-shadow: var(--shadow-md); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(24px, 5vw, 60px);
  transition: background .35s ease, padding .35s ease, box-shadow .35s ease;
}
.nav.scrolled { background: rgba(255,255,255,.92); backdrop-filter: blur(14px); box-shadow: var(--shadow-sm); padding: 14px clamp(24px, 5vw, 60px); }
.nav-brand { display: flex; align-items: center; gap: 12px; color: var(--white); transition: color .35s; }
.nav.scrolled .nav-brand { color: var(--indigo-900); }
.nav-mark {
  width: 44px; height: 44px; border-radius: 50%; display: block;
  box-shadow: 0 6px 18px rgba(212,163,47,.4);
}
.nav-brand b { font-family: var(--serif); font-size: 1.18rem; line-height: 1; }
.nav-brand span { display: block; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; opacity: .8; font-family: var(--sans); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--white); font-weight: 500; font-size: .96rem; transition: color .35s, opacity .2s; }
.nav.scrolled .nav-links a { color: var(--indigo-900); }
.nav-links a:not(.btn):hover { opacity: .7; }
.nav-links .btn { padding: 11px 24px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; width: 30px; height: 22px; position: relative; }
.nav-toggle span { position: absolute; left: 0; width: 100%; height: 2.5px; background: var(--white); border-radius: 4px; transition: .3s; }
.nav.scrolled .nav-toggle span { background: var(--indigo-900); }
.nav-toggle span:nth-child(1){ top: 0; } .nav-toggle span:nth-child(2){ top: 9.5px; } .nav-toggle span:nth-child(3){ top: 19px; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background:
    radial-gradient(120% 120% at 80% 0%, rgba(71,51,168,.55), transparent 50%),
    linear-gradient(150deg, var(--indigo-900) 0%, var(--indigo-800) 45%, var(--indigo-700) 100%);
  color: var(--white); overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5;
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.hero-glow.g1 { width: 480px; height: 480px; background: var(--gold-500); top: -160px; right: -120px; }
.hero-glow.g2 { width: 400px; height: 400px; background: var(--indigo-600); bottom: -160px; left: -140px; }
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; padding-top: 80px; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); margin-bottom: 22px; }
.hero h1 em { color: var(--gold-400); font-style: normal; }
.hero-lead { font-size: 1.18rem; opacity: .9; max-width: 520px; margin-bottom: 36px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-verse { margin-top: 44px; padding-left: 22px; border-left: 3px solid var(--gold-500); font-family: var(--serif); font-style: italic; font-size: 1.15rem; opacity: .92; }
.hero-verse small { display: block; font-family: var(--sans); font-style: normal; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; opacity: .7; margin-top: 8px; }

.hero-portrait { position: relative; }
.hero-portrait .frame {
  aspect-ratio: 4/5; border-radius: 200px 200px 24px 24px; overflow: hidden;
  background: linear-gradient(160deg, var(--indigo-600), var(--indigo-800));
  box-shadow: var(--shadow-md); position: relative;
  display: grid; place-items: center;
}
.hero-portrait .frame::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(circle at 50% 25%, rgba(212,163,47,.22), transparent 60%); }
.hero-portrait .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; bottom: 26px; left: -26px;
  background: var(--white); color: var(--indigo-900); border-radius: 16px;
  padding: 16px 22px; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 14px;
}
.hero-badge .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(31,157,91,.18); }
.hero-badge b { font-family: var(--sans); display: block; font-size: .95rem; }
.hero-badge span { font-size: .78rem; color: var(--muted); }

/* ---------- stats ---------- */
.stats { background: var(--indigo-900); color: var(--white); padding: 56px 0; }
.stats .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat b { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); color: var(--gold-400); display: block; }
.stat span { opacity: .75; font-size: .92rem; letter-spacing: .04em; }

/* ---------- about ---------- */
.about .container { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.about-visual { position: relative; }
.about-visual .photo {
  aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--cream-200), #e3d6b8); box-shadow: var(--shadow-md);
}
.about-visual .photo img { width: 100%; height: 100%; object-fit: cover; }
.about-visual .quote-card {
  position: absolute; right: -24px; bottom: -28px; background: var(--indigo-800); color: var(--white);
  border-radius: 16px; padding: 22px 26px; max-width: 260px; box-shadow: var(--shadow-md);
  font-family: var(--serif); font-style: italic; font-size: 1.05rem;
}
.about h2 { font-size: clamp(2rem, 4vw, 2.9rem); color: var(--indigo-900); margin-bottom: 22px; }
.about p { color: var(--muted); margin-bottom: 18px; font-size: 1.06rem; }
.about .signature { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--indigo-700); margin-top: 8px; }

/* ---------- services ---------- */
.services { background: var(--cream-200); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.service-card {
  background: var(--white); border-radius: var(--radius); padding: 36px 30px; box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease; border: 1px solid rgba(26,19,64,.05); position: relative; overflow: hidden;
}
.service-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--gold-400), var(--gold-500)); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.service-card:hover::before { transform: scaleX(1); }
.service-card .ic { width: 58px; height: 58px; border-radius: 14px; background: var(--cream); display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 22px; }
.service-card h3 { font-size: 1.4rem; color: var(--indigo-900); margin-bottom: 10px; }
.service-card .time { font-weight: 700; color: var(--gold-500); font-size: .95rem; margin-bottom: 12px; }
.service-card p { color: var(--muted); font-size: .98rem; }

/* ---------- beliefs strip ---------- */
.beliefs { background: var(--indigo-900); color: var(--white); }
.beliefs .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.belief { text-align: center; }
.belief .ic { font-size: 2.2rem; margin-bottom: 14px; }
.belief h4 { font-size: 1.2rem; margin-bottom: 8px; color: var(--gold-300); }
.belief p { opacity: .75; font-size: .92rem; }

/* ---------- events ---------- */
.event-list { display: grid; gap: 18px; max-width: 880px; margin: 0 auto; }
.event {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 26px; align-items: center;
  background: var(--white); border-radius: var(--radius); padding: 24px 30px; box-shadow: var(--shadow-sm);
  transition: transform .25s ease; border: 1px solid rgba(26,19,64,.05);
}
.event:hover { transform: translateX(6px); }
.event-date { text-align: center; background: var(--cream); border-radius: 14px; padding: 12px 0; }
.event-date b { font-family: var(--serif); font-size: 1.9rem; color: var(--indigo-800); display: block; line-height: 1; }
.event-date span { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-500); }
.event-info h4 { font-size: 1.25rem; color: var(--indigo-900); }
.event-info p { color: var(--muted); font-size: .94rem; }

/* ---------- posts / sermons ---------- */
.posts { background: var(--cream-200); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease; cursor: pointer;
  border: 1px solid rgba(26,19,64,.05);
}
.post-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.post-thumb { aspect-ratio: 16/10; background: linear-gradient(160deg, var(--indigo-700), var(--indigo-900)); overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-thumb img { transform: scale(1.05); }
.post-meta { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.post-meta .pdate { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-500); margin-bottom: 8px; }
.post-meta h3 { font-size: 1.3rem; color: var(--indigo-900); margin-bottom: 10px; line-height: 1.2; }
.post-meta p { color: var(--muted); font-size: .96rem; flex: 1; }
.post-meta .read { margin-top: 16px; font-weight: 700; color: var(--indigo-700); font-size: .92rem; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,11,38,.7); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; z-index: 1; background: var(--white); border-radius: 22px; max-width: 640px; width: 100%;
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-md); animation: fade .3s ease;
}
.modal-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--indigo-800); }
.modal-img[src=""] , .modal-img:not([src]) { display: none; }
.modal-body { padding: 32px 36px 40px; }
.modal-date { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-500); }
.modal-body h3 { font-size: 1.9rem; color: var(--indigo-900); margin: 8px 0 18px; }
.modal-body #modalText p { color: var(--ink); margin-bottom: 14px; line-height: 1.7; }
.modal-close {
  position: absolute; top: 14px; right: 16px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.9); color: var(--indigo-900); font-size: 1.6rem; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: .2s;
}
.modal-close:hover { background: var(--white); transform: rotate(90deg); }

/* ---------- donate ---------- */
.donate { background: linear-gradient(155deg, var(--indigo-900), var(--indigo-700)); color: var(--white); }
.donate .section-head h2 { color: var(--white); }
.donate .section-head p { color: rgba(255,255,255,.78); }
.donate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.donate-card { background: var(--white); color: var(--ink); border-radius: 24px; padding: 40px; box-shadow: var(--shadow-md); }
.donate-card h3 { font-size: 1.6rem; color: var(--indigo-900); margin-bottom: 6px; }
.donate-card .sub { color: var(--muted); font-size: .95rem; margin-bottom: 26px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; font-size: .86rem; margin-bottom: 8px; color: var(--indigo-800); }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border: 1.5px solid #e0d9ea; border-radius: 12px;
  font-family: var(--sans); font-size: 1rem; transition: border .2s, box-shadow .2s; background: #fbfaff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--indigo-600); box-shadow: 0 0 0 4px rgba(71,51,168,.12); }
.field textarea { resize: vertical; min-height: 70px; }
.amount-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.chip {
  flex: 1; min-width: 90px; padding: 12px; border: 1.5px solid #e0d9ea; border-radius: 12px; background: #fbfaff;
  font-family: var(--sans); font-weight: 700; cursor: pointer; transition: .2s; color: var(--indigo-800); font-size: .95rem;
}
.chip:hover { border-color: var(--gold-500); }
.chip.active { background: var(--indigo-800); color: var(--white); border-color: var(--indigo-800); }
.donate-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.donate-note { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 16px; }

/* status box */
.status-box { display: none; margin-top: 22px; border-radius: 14px; padding: 20px; text-align: center; border: 1.5px solid; }
.status-box.show { display: block; animation: fade .4s ease; }
.status-box.pending { background: #fff7e6; border-color: #f0c75e; color: var(--pending); }
.status-box.success { background: #e8f8ef; border-color: #7bd3a4; color: var(--success); }
.status-box.failed  { background: #fdecea; border-color: #e6a59c; color: var(--failed); }
.status-box .ic { font-size: 2.2rem; margin-bottom: 8px; }
.status-box b { font-family: var(--serif); font-size: 1.3rem; display: block; }
.status-box small { color: var(--muted); display: block; margin-top: 6px; }
.spinner { width: 34px; height: 34px; border: 3px solid #f0c75e; border-top-color: transparent; border-radius: 50%; margin: 0 auto 10px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* impact side */
.impact { color: var(--white); }
.impact h3 { font-size: 1.7rem; margin-bottom: 8px; }
.impact > p { opacity: .82; margin-bottom: 28px; }
.impact-item { display: flex; gap: 16px; margin-bottom: 22px; }
.impact-item .ic { flex: 0 0 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,.1); display: grid; place-items: center; font-size: 1.3rem; }
.impact-item h4 { font-family: var(--sans); font-size: 1.05rem; margin-bottom: 2px; }
.impact-item p { opacity: .75; font-size: .92rem; }

/* donation wall */
.wall { padding-top: 0; }
.wall-card { background: var(--white); border-radius: 24px; padding: 34px; box-shadow: var(--shadow-md); max-width: 980px; margin: -60px auto 0; position: relative; z-index: 3; }
.wall-card h3 { color: var(--indigo-900); font-size: 1.5rem; }
.wall-card .wsub { color: var(--muted); font-size: .92rem; margin-bottom: 22px; }
.wall-list { display: grid; gap: 12px; max-height: 460px; overflow-y: auto; padding-right: 6px; }
.wall-row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center;
  padding: 14px 16px; border-radius: 14px; background: var(--cream); border: 1px solid rgba(26,19,64,.05);
}
.wall-row .av { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--indigo-600), var(--indigo-800)); color: var(--white); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; }
.wall-row .who b { color: var(--indigo-900); }
.wall-row .who span { display: block; color: var(--muted); font-size: .84rem; }
.wall-row .right { text-align: right; }
.wall-row .amt { font-weight: 700; color: var(--indigo-800); }
.badge { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; letter-spacing: .04em; }
.badge.success { background: #e8f8ef; color: var(--success); }
.badge.pending { background: #fff7e6; color: var(--pending); }
.badge.failed  { background: #fdecea; color: var(--failed); }
.wall-empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- contact / footer ---------- */
.footer { background: var(--indigo-900); color: var(--white); padding: 80px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 50px; }
.footer-brand .nav-brand { color: var(--white); margin-bottom: 18px; }
.footer-brand p { opacity: .72; font-size: .95rem; max-width: 280px; }
.footer h5 { font-family: var(--sans); font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 18px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; opacity: .78; font-size: .95rem; }
.footer ul li a:hover { color: var(--gold-300); opacity: 1; }
.socials { display: flex; gap: 12px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; transition: .25s; }
.socials a:hover { background: var(--gold-500); color: var(--indigo-900); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; text-align: center; opacity: .6; font-size: .86rem; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero .container, .about .container, .donate-grid { grid-template-columns: 1fr; }
  .hero-portrait { display: none; }
  .stats .grid, .beliefs .grid, .service-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px); flex-direction: column; align-items: flex-start;
    background: var(--indigo-900); padding: 100px 32px 32px; gap: 22px; transform: translateX(100%); transition: transform .35s ease;
  }
  .nav-links.open { transform: none; }
  .nav-links a, .nav.scrolled .nav-links a { color: var(--white); }
  .nav-toggle { display: block; z-index: 110; }
}
@media (max-width: 560px) {
  .section { padding: 80px 0; }
  .stats .grid, .service-grid, .beliefs .grid, .footer-grid, .post-grid { grid-template-columns: 1fr; }
  .event { grid-template-columns: 70px 1fr; }
  .event .btn { grid-column: 1 / -1; }
  .donate-card { padding: 28px 22px; }
}
