/* ============================================================
   St. John Bosco Church, Borivali — Site Stylesheet
   Palette: warm cream, navy blue, lapis accent
   ============================================================ */

:root {
  --cream: #faf6ef;
  --cream-dark: #f3ecdf;
  --white: #fffdf9;
  --primary: #1f4066;
  --primary-dark: #16304d;
  --accent: #2f6098;
  --accent-light: #b7cfe6;
  --ink: #232e3a;
  --muted: #67788c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(23, 42, 66, 0.10);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito Sans", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 16.5px;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }

.container { width: min(1160px, 92%); margin: 0 auto; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; color: var(--primary-dark); }

.section { padding: 72px 0; }
.section-alt { background: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 14px; }
.section-lead { color: var(--muted); max-width: 640px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(31, 64, 102, 0.08);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--primary-dark); line-height: 1.2; }
.brand-sub { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.nav-links { display: flex; gap: 26px; list-style: none; align-items: center; }
.nav-links a { font-weight: 700; font-size: 0.95rem; color: var(--ink); position: relative; padding: 4px 0; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0%; height: 2px;
  background: var(--accent); transition: width 0.25s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--primary); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--primary); margin: 5px 0; border-radius: 2px; transition: 0.3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex; align-items: flex-end;
  background: url("../images/hero-altar.jpg") center 30% / cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13, 27, 42, 0.15) 0%, rgba(13, 27, 42, 0.05) 40%, rgba(13, 27, 42, 0.78) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 90px 0 70px; color: #fff; }
.hero-kicker {
  font-size: 0.85rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-light); margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); color: #fff; max-width: 720px; }
.hero p { margin-top: 16px; font-size: 1.15rem; max-width: 560px; color: #e8eef5; }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 13px 28px; border-radius: 40px;
  font-weight: 800; font-size: 0.95rem; letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(47, 96, 152, 0.4); }
.btn-accent:hover { background: #275581; }
.btn-ghost { border: 2px solid rgba(255, 255, 255, 0.7); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

/* ---------- Info cards (timings) ---------- */
.info-strip { margin-top: -64px; position: relative; z-index: 5; padding-bottom: 8px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.info-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 26px; border-top: 4px solid var(--accent);
}
.info-card h3 { font-size: 1.15rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.info-card .icon { font-size: 1.3rem; }
.info-card ul { list-style: none; }
.info-card li { padding: 5px 0; border-bottom: 1px dashed rgba(31, 64, 102, 0.12); font-size: 0.95rem; display: flex; justify-content: space-between; gap: 10px; }
.info-card li:last-child { border-bottom: none; }
.info-card li span:first-child { color: var(--muted); font-weight: 700; }
.info-card li span:last-child { text-align: right; }
.info-note { margin-top: 10px; font-size: 0.82rem; color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.info-card li a {
  color: var(--accent); font-weight: 800;
  text-decoration: underline; text-decoration-color: var(--accent-light);
  text-underline-offset: 3px; transition: color 0.2s;
}
.info-card li a:hover { color: var(--primary); text-decoration-color: var(--primary); }
.info-card li a::after { content: " \2192"; font-weight: 800; }

/* ---------- Welcome / history ---------- */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 54px; align-items: center; }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split-media::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px;
  border: 2px solid var(--accent-light); border-radius: var(--radius); z-index: -1;
}
.split-body p { margin-bottom: 14px; color: #3d4a58; }
.milestones { display: flex; gap: 34px; margin: 22px 0 26px; }
.milestone strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--accent); }
.milestone span { font-size: 0.85rem; color: var(--muted); font-weight: 700; }

/* ---------- Quote band ---------- */
.quote-band {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #e8eef5; text-align: center; padding: 64px 0;
}
.quote-band blockquote { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.9rem); font-style: italic; max-width: 760px; margin: 0 auto; line-height: 1.4; }
.quote-band cite { display: block; margin-top: 16px; font-family: var(--font-body); font-style: normal; font-weight: 800; font-size: 0.9rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-light); }

/* ---------- Events ---------- */
.events-grid { display: grid; grid-template-columns: 380px 1fr; gap: 40px; align-items: start; margin-top: 34px; }
.event-poster img { border-radius: var(--radius); box-shadow: var(--shadow); }
.event-list { display: flex; flex-direction: column; gap: 16px; }
.event-item {
  display: flex; gap: 20px; align-items: center;
  background: var(--white); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.event-item:hover { transform: translateX(4px); }
.event-date {
  flex: 0 0 auto; text-align: center; background: var(--cream-dark); border-radius: 10px; padding: 10px 16px;
}
.event-date strong { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--primary); line-height: 1; }
.event-date span { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.event-item h3 { font-size: 1.1rem; margin-bottom: 3px; }
.event-item p { font-size: 0.9rem; color: var(--muted); }

/* ---------- Gallery preview ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.gallery-grid figure { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-grid figure:hover img { transform: scale(1.05); }
.gallery-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 18px 14px;
  background: linear-gradient(transparent, rgba(13, 27, 42, 0.85));
  color: #fff; font-weight: 700; font-size: 0.9rem;
}

/* ---------- Bulletin ---------- */
.bulletin-card {
  display: flex; align-items: center; justify-content: space-between; gap: 26px;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 34px 38px; margin-top: 30px; flex-wrap: wrap; border-left: 5px solid var(--accent);
}
.bulletin-card h3 { font-size: 1.35rem; margin-bottom: 6px; }
.bulletin-card p { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #d7e0ea; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 44px; padding-bottom: 44px; }
.footer-grid h3 { color: #fff; font-size: 1.1rem; margin-bottom: 16px; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.footer-brand img { height: 56px; }
.footer-grid p, .footer-grid li { font-size: 0.93rem; color: #b9c8d8; }
.footer-grid ul { list-style: none; }
.footer-grid li { padding: 5px 0; }
.footer-grid a { color: #dbe6f0; }
.footer-grid a:hover { color: var(--accent-light); }
.social-row { display: flex; gap: 12px; margin-top: 14px; }
.social-row a {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.1); color: #fff; font-weight: 800; font-size: 0.85rem;
  transition: background 0.2s;
}
.social-row a:hover { background: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 0; text-align: center; font-size: 0.85rem; color: #8fa2b8;
}

/* ---------- Subpages ---------- */
.page-hero {
  position: relative; padding: 84px 0 64px; color: #fff;
  background: linear-gradient(rgba(13, 27, 42, 0.55), rgba(13, 27, 42, 0.55)), url("../images/nave.jpg") center 40% / cover no-repeat;
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); }
.page-hero p { color: #dfe8f1; margin-top: 10px; max-width: 620px; font-size: 1.08rem; }

.content-narrow { max-width: 800px; }
.content-narrow p { margin-bottom: 16px; color: #3d4a58; }

/* clergy */
.clergy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-top: 36px; }
.clergy-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 20px; text-align: center; border-top: 4px solid var(--accent); }
.clergy-card img { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; object-position: top; margin: 0 auto 16px; border: 3px solid var(--accent-light); }
.clergy-card h3 { font-size: 1.08rem; margin-bottom: 4px; }
.clergy-card p { font-size: 0.85rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* notices */
.notice-date-badge {
  display: inline-block; background: var(--accent); color: #fff; border-radius: 40px;
  padding: 7px 20px; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px;
}
.notice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 22px; margin-top: 30px; }
.notice-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 24px; border-left: 4px solid var(--accent); }
.notice-card h3 { font-size: 1.05rem; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; }
.notice-card p { font-size: 0.93rem; color: #3d4a58; margin-bottom: 8px; }
.notice-card p:last-child { margin-bottom: 0; }
.notice-card ul { padding-left: 18px; font-size: 0.93rem; color: #3d4a58; }
.notice-card li { margin-bottom: 6px; }
.notice-highlight { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #e8eef5; border-left-color: var(--accent-light); }
.notice-highlight h3 { color: #fff; }
.notice-highlight p { color: #dfe8f1; }

/* publications */
.pub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; margin-top: 34px; }
.pub-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.pub-card .pub-cover { aspect-ratio: 3 / 4; overflow: hidden; background: var(--cream-dark); }
.pub-card .pub-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.pub-card:hover .pub-cover img { transform: scale(1.04); }
.pub-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pub-body h3 { font-size: 1.1rem; }
.pub-body p { font-size: 0.88rem; color: var(--muted); flex: 1; }
.pub-body .btn { align-self: flex-start; padding: 9px 20px; font-size: 0.85rem; }

/* gallery page */
.album { margin-top: 46px; }
.album h2 { font-size: 1.5rem; margin-bottom: 6px; }
.album > p { color: var(--muted); margin-bottom: 20px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.album-grid a { display: block; overflow: hidden; border-radius: 10px; aspect-ratio: 4 / 3; }
.album-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.album-grid a:hover img { transform: scale(1.06); }
.album-grid a.tile-flyer img { object-fit: contain; background: var(--cream-dark); }

/* contact page */
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: 36px; }
.map-wrap iframe { display: block; width: 100%; height: 420px; border: 0; }

@media (max-width: 900px) {
  .page-hero { padding: 60px 0 44px; }
}

/* ---------- Scroll-reveal animations ----------
   .reveal is added by js/main.js — without JS nothing is hidden */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in-view { opacity: 1; transform: none; }

/* variety: media slides in from the side, quote gently scales */
.split-media.reveal { transform: translateX(-32px); }
.split-body.reveal { transform: translateX(32px); }
.split-media.reveal.in-view, .split-body.reveal.in-view { transform: none; }
.quote-band blockquote.reveal { transform: scale(0.96); }
.quote-band blockquote.reveal.in-view { transform: scale(1); }

/* hero entrance on page load */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}
.hero-kicker, .hero h1, .hero p, .hero-actions {
  animation: heroRise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.hero h1 { animation-delay: 0.15s; }
.hero p { animation-delay: 0.3s; }
.hero-actions { animation-delay: 0.45s; }

/* smooth everything a touch */
.info-card, .bulletin-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.info-card:hover { transform: translateY(-5px); box-shadow: 0 16px 38px rgba(23, 42, 66, 0.16); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-kicker, .hero h1, .hero p, .hero-actions { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .info-grid, .gallery-grid { grid-template-columns: 1fr; }
  .split, .events-grid, .footer-grid { grid-template-columns: 1fr; }
  .split-media::before { display: none; }
  .events-grid { gap: 26px; }
  .event-poster { max-width: 380px; margin: 0 auto; }
  .info-strip { margin-top: -40px; }
  .hero { min-height: 68vh; }

  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--white);
    box-shadow: var(--shadow); display: none; padding: 10px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 13px 0; }
  .nav-links a::after { display: none; }
}
