/* =========================================================
   Bloomfield Church: styles
   Brand colors live here. Change them once, they update everywhere.
   ========================================================= */
:root {
  --yellow: #F7DA46;       /* brand petal yellow */
  --yellow-soft: #FFF6C9;  /* light yellow background */
  --yellow-deep: #E2BC12;  /* darker yellow for borders */
  --ink: #111111;          /* main text (near black) */
  --muted: #555555;        /* secondary text */
  --paper: #FFFFFF;        /* page background */
  --line: #ECECEC;

  --font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 22px;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; line-height: .95; margin: 0 0 .4em; }
h1 { font-size: clamp(3.4rem, 11vw, 8.5rem); }
h2 { font-size: clamp(2.6rem, 7vw, 4.75rem); }
h3 { font-size: 2rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 600;
  border: 2px solid var(--ink);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--yellow); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: .95rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 50;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand img { height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { text-decoration: none; font-weight: 500; position: relative; }
.site-nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: var(--yellow); transform: scaleX(0); transition: transform .25s ease; border-radius: 3px; }
.site-nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 40px) 0 72px; overflow: hidden;
  background: radial-gradient(1000px 520px at 85% 10%, var(--yellow-soft), transparent 70%), var(--paper); }
.hero-inner { position: relative; z-index: 1; }
.hero-logo { width: min(440px, 78vw); height: auto; margin-bottom: 36px; animation: rise .9s ease both; }
.eyebrow { font-weight: 600; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl::before { content: ""; position: absolute; left: -.06em; right: -.06em; bottom: .16em; height: .34em; background: var(--yellow); z-index: -1; border-radius: 4px; transform-origin: left; animation: swipe .9s .5s cubic-bezier(.2,.8,.2,1) both; }
.lead { font-size: clamp(1.08rem, 2.2vw, 1.3rem); max-width: 34ch; color: #333; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.service-chip { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; font-size: .95rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 0 rgba(247,218,70,.7); animation: pulse 2s infinite; }

/* floating petals */
.petals i { position: absolute; top: -40px; width: 18px; height: 34px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--yellow-deep); opacity: .85; animation: fall linear infinite; }
.petals i:nth-child(1) { left: 8%;  animation-duration: 15s; animation-delay: -2s; }
.petals i:nth-child(2) { left: 22%; animation-duration: 19s; animation-delay: -9s; transform: scale(.7); }
.petals i:nth-child(3) { left: 41%; animation-duration: 17s; animation-delay: -5s; }
.petals i:nth-child(4) { left: 58%; animation-duration: 21s; animation-delay: -13s; }
.petals i:nth-child(5) { left: 72%; animation-duration: 16s; animation-delay: -1s; }
.petals i:nth-child(6) { left: 86%; animation-duration: 23s; animation-delay: -7s; }
.petals i:nth-child(7) { left: 94%; animation-duration: 18s; animation-delay: -15s; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 12vw, 140px) 0; }
.section-lead { font-size: 1.15rem; max-width: 58ch; color: #333; }
.section-yellow { background: var(--yellow); }
.section-yellow .eyebrow, .section-yellow .section-lead { color: var(--ink); }
.section-dark { background: var(--ink); color: #fff; }
.section-dark .eyebrow { color: var(--yellow); }
.thin { opacity: .5; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.card { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -24px rgba(0,0,0,.25); border-color: var(--yellow); }
.card-num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); font-weight: 700; margin-bottom: 18px; }
.card p { color: var(--muted); margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }

.timeline { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.timeline li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 16px; padding: 22px 0; border-top: 2px solid rgba(0,0,0,.12); }
.timeline li:last-child { border-bottom: 2px solid rgba(0,0,0,.12); }
.timeline li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font-family: var(--font-display); font-size: 2.4rem; line-height: 1; }
.timeline strong { font-size: 1.25rem; }

.visit-info { font-style: normal; font-size: 1.2rem; line-height: 1.5; margin: 10px 0 6px; }
.visit-hours { font-size: 1.1rem; }
.small { font-size: .92rem; color: var(--muted); }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--yellow-soft); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

.handle { display: block; font-family: var(--font-body); font-size: 1.05rem; font-weight: 500; letter-spacing: 0; color: rgba(255,255,255,.6); margin-top: 10px; }
.socials { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; }
.social { display: flex; align-items: center; gap: 14px; padding: 22px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.14); text-decoration: none; transition: background .25s ease, color .25s ease, transform .25s ease; }
.social svg { width: 30px; height: 30px; fill: currentColor; flex: none; }
.social span { display: flex; flex-direction: column; line-height: 1.3; }
.social small { color: rgba(255,255,255,.6); transition: color .25s ease; }
.social:hover { background: var(--yellow); color: var(--ink); transform: translateY(-4px); }
.social:hover small { color: rgba(0,0,0,.6); }

/* ---------- Footer ---------- */
.site-footer { padding: 56px 0 110px; border-top: 1px solid var(--line); text-align: center; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-logo { width: 180px; height: auto; margin-bottom: 14px; }

/* ---------- Music button ---------- */
.music-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 18px 0 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; font: 600 .9rem var(--font-body);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.45);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.music-toggle:hover { transform: translateY(-2px); }
.music-toggle[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }
.note { width: 18px; height: 18px; fill: currentColor; }
.music-toggle[aria-pressed="true"] .note, .music-toggle[aria-pressed="false"] .bars { display: none; }
.bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.bars i { width: 3px; height: 5px; background: currentColor; border-radius: 2px; }
.music-toggle[aria-pressed="true"] .bars i { animation: eq 1s ease-in-out infinite; }
.music-toggle[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.3s; }
.music-toggle[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.6s; }

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

/* ---------- Animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes swipe { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(247,218,70,0); } 100% { box-shadow: 0 0 0 0 rgba(247,218,70,0); } }
@keyframes fall { 0% { transform: translate3d(0,-40px,0) rotate(0); } 50% { transform: translate3d(40px,55vh,0) rotate(160deg); } 100% { transform: translate3d(-20px,110vh,0) rotate(320deg); } }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 16px; } }

/* ---------- Tablet & phone ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .socials { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .br-desktop { display: none; }
}
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .brand img { height: 28px; }
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; padding: 0 10px; background: none; border: 0; cursor: pointer; }
  .nav-toggle span { height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 24px;
    background: #fff; border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .25s ease;
  }
  .site-nav.open { transform: none; opacity: 1; visibility: visible; }
  .site-nav a:not(.btn) { padding: 14px 0; font-size: 1.2rem; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 16px; }
  .hero { min-height: auto; padding: calc(var(--header-h) + 48px) 0 24px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .social { padding: 18px; }
}
@media (max-width: 420px) {
  .socials { grid-template-columns: 1fr; }
  .music-label { display: none; }
  .music-toggle { padding: 0 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .petals { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
