/* St. Anthony's Church, Kaval Bairasandra
   Plain CSS, no build step. Colours and fonts are the CSS variables at the top;
   change them there and the whole page follows. */

:root,
[data-theme="noticeboard"] {
  --bg: #f4ecdc;
  --bg-2: #ebdfc7;
  --card: #fffaf0;
  --ink: #2c1e14;
  --muted: #6b5745;
  --accent: #a9342b;
  --accent-ink: #ffffff;
  --trim: #7b4b2b;
  --line: #d8c6a8;
  --dots: #b79c78;
  --shadow: 0 12px 32px rgba(60, 35, 10, .14);
  --font-head: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --radius: 14px;
  --pill-radius: 999px;
}



/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: .15em; }
img { max-width: 100%; height: auto; display: block; }
ul.plain { list-style: none; padding: 0; margin: 0 0 1em; }
ul.plain li { padding: .2em 0; }
.small { font-size: .95rem; color: var(--muted); }
address { font-style: normal; margin: 0 0 .75em; line-height: 1.5; }
q { quotes: "“" "”"; }

.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .6em;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
  padding: .7em 1.3em;
  border-radius: var(--pill-radius);
  border: 1.5px solid var(--accent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }

.placeholder {
  border-left: 3px solid var(--line);
  padding: .4em .9em;
  color: var(--muted);
  font-style: italic;
  background: var(--bg-2);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- preview ribbon (delete when live) ---------- */
.preview-ribbon {
  background: var(--ink);
  color: var(--bg);
  text-align: center;
  font-size: .8rem;
  letter-spacing: .06em;
  padding: .35em 1em;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; margin-right: auto; }
.brand-mark { width: 34px; height: 34px; color: var(--accent); flex: none; }
.brand-text { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; line-height: 1; }
.brand-text small { display: block; font-family: var(--font-body); font-size: .72rem; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .35em; }
.nav { display: flex; gap: 1.4rem; }
.nav a { color: inherit; text-decoration: none; font-weight: 600; font-size: .98rem; padding: .3em 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--accent); }
.menu-toggle { display: none; font: inherit; font-weight: 600; background: none; border: 1.5px solid var(--line); border-radius: var(--pill-radius); padding: .45em 1em; color: inherit; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; color: #fff; min-height: min(82vh, 760px); display: grid; align-items: end; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; z-index: -2; }
.hero-scrim { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(28, 16, 8, .88) 0%, rgba(28, 16, 8, .55) 38%, rgba(28, 16, 8, .05) 75%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .9fr); gap: 2.5rem; align-items: end; padding: 7rem 0 3.5rem; }
.hero .eyebrow { color: #f3c98a; }
.hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.35rem); max-width: 36ch; color: #f4ebdc; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.7); }

.next-card {
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem 1.2rem;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--accent);
}
.next-when { font-family: var(--font-head); font-size: 1.9rem; font-weight: 600; line-height: 1.1; margin: 0 0 .25em; }
.next-what { margin: 0 0 1em; color: var(--muted); font-size: 1.05rem; }
.office-badge { margin: 0; font-size: .92rem; padding-top: .8em; border-top: 1px dotted var(--dots); color: var(--muted); }
.office-badge::before { content: ""; display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: #b6b0a6; margin-right: .5em; vertical-align: .05em; }
.office-badge.open::before { background: #2f8f4e; }

/* ---------- sections ---------- */
section { padding: 4.5rem 0; }
.section-head { margin-bottom: 2rem; }
.section-head h2 { margin-bottom: .2em; }
.note { color: var(--muted); margin: 0; }

/* ---------- the notice board ---------- */
.board-section { background: var(--bg-2); }
.board {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 2.2rem 2.4rem 1.6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 3rem;
}
.pill-row { display: flex; align-items: center; gap: .9rem; margin: 1.4rem 0 .6rem; }
.pill-row:first-child { margin-top: 0; }
.pill-row::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.pill {
  margin: 0;
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: .5em 1em .45em;
  border-radius: var(--pill-radius);
  white-space: nowrap;
}
.leaders { list-style: none; margin: 0; padding: 0; }
.leaders li { display: flex; align-items: baseline; gap: .6rem; padding: .32em 0; }
.leaders li::before { content: ""; order: 2; flex: 1; min-width: 1.5rem; border-bottom: 2px dotted var(--dots); transform: translateY(-.3em); }
.leaders .what { order: 1; flex: 0 1 auto; min-width: 0; }
.leaders .when { order: 3; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; text-align: right; }
.leaders .what em { font-style: normal; color: var(--muted); font-size: .92em; }
.leaders .what em::before { content: " · "; }
.leaders li.day, .leaders li.aside { display: block; }
.leaders li.day::before, .leaders li.aside::before { content: none; }
.leaders li.day { font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; padding-top: .7em; padding-bottom: .1em; }
.leaders li.aside { font-size: .92rem; color: var(--muted); font-style: italic; padding-top: 0; }

/* ---------- the week ---------- */
.week { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: .8rem; }
.week > li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem 1.1rem; }
.week > li.sunday { border-color: var(--accent); box-shadow: inset 0 4px 0 var(--accent); }
.week h3 { font-size: 1.3rem; margin-bottom: .5em; }
.week ul { list-style: none; padding: 0; margin: 0; font-size: .92rem; line-height: 1.35; }
.week ul li { padding: .3em 0; border-top: 1px dotted var(--dots); }
.week ul li:first-child { border-top: 0; }
.week ul b { display: block; font-variant-numeric: tabular-nums; color: var(--accent); }
.week ul li.first { color: var(--muted); font-size: .86rem; }
.week ul li.first b { display: inline; color: inherit; }
.week ul li.soft { color: var(--muted); font-style: italic; }

/* ---------- about ---------- */
.about-section { background: var(--bg-2); }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }
.about-text p { max-width: 60ch; }
.about-figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.about-figure img { aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; width: 100%; }
.about-figure figcaption { padding: 1.3rem 1.5rem 1rem; }
.about-figure figcaption p { font-size: .98rem; margin: 0; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gallery a { display: block; position: relative; border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none; box-shadow: var(--shadow); background: var(--bg-2); }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery span { position: absolute; inset: auto 0 0 0; padding: 2.2rem .9rem .8rem; font-size: .92rem; background: linear-gradient(to top, rgba(20,10,5,.78), transparent); }

/* ---------- visit ---------- */
.visit-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; align-items: start; }
.visit-text h3 { margin-top: 2rem; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--bg-2); }
.map iframe { display: block; width: 100%; height: 420px; border: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--bg); padding: 3rem 0 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 200px 1fr; gap: 2.5rem; align-items: center; }
.footer-church { width: 200px; opacity: .85; }
.site-footer p { margin: 0 0 .5em; }
.site-footer .small { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.site-footer a { color: inherit; }
.credit { opacity: .7; }

/* ---------- lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1100px); max-height: 94vh; }
.lightbox::backdrop { background: rgba(10, 5, 2, .88); }
.lightbox figure { margin: 0; }
.lightbox img { max-width: min(96vw, 1100px); max-height: 84vh; width: auto; margin-inline: auto; border-radius: 6px; }
.lightbox figcaption { color: #fff; text-align: center; padding: .8em 0 0; font-size: .95rem; }
.lightbox .close { position: fixed; top: 1rem; right: 1.2rem; font-size: 2rem; line-height: 1; background: none; border: 0; color: #fff; cursor: pointer; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .board { grid-template-columns: 1fr; padding: 1.6rem 1.4rem 1.2rem; }
  .week { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .visit-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.6rem; padding-top: 5rem; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: .9em 1.2em; border-bottom: 1px solid var(--line); }
  .brand-text { font-size: 1.15rem; }
  .hero { min-height: min(70vh, 600px); }
  .week { grid-template-columns: 1fr 1fr; }
  .week > li.sunday { grid-column: 1 / -1; }
  section { padding: 3.2rem 0; }
  .leaders li::before { min-width: 1rem; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .map iframe { height: 300px; }
}
