/* Connect Gamston
   Colours come from the stained-glass cross in the logo: navy leading,
   deep teal, aqua, red and pale stone glass.
   Layout: one readable column (about 68ch) with a wide band for the Sunday
   block and card grids; header and footer share the same inner width. */
:root {
  --paper: #f5f6f1;      /* pale stone glass */
  --card: #ffffff;
  --ink: #1f3446;        /* navy leading and lettering */
  --muted: #56636d;
  --line: #d9dbd0;
  --accent: #2f6d84;     /* deep teal glass */
  --accent-ink: #ffffff;
  --pop: #c8342a;        /* red glass */
  --pop-ink: #ffffff;
  --aqua: #67b4bf;       /* aqua glass */
  --glass-teal: #397990; /* logo colours, same in both themes */
  --glass-stone: #d7d8cd;
  --glass-navy: #2d465a;
  --wash: #e4f0f1;

  --font-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: 2.3rem;
  --step-4: clamp(2.6rem, 7vw, 4.4rem);

  --wrap: 68rem;
  --measure: 40rem;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #152230;
    --card: #1b2b3b;
    --ink: #e9edf0;
    --muted: #a6b3bc;
    --line: #2c3e4f;
    --accent: #7cc4ce;
    --accent-ink: #0f1d27;
    --pop: #c8342a;
    --pop-ink: #ffffff;
    --aqua: #67b4bf;
    --wash: #213547;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #152230;
  --card: #1b2b3b;
  --ink: #e9edf0;
  --muted: #a6b3bc;
  --line: #2c3e4f;
  --accent: #7cc4ce;
  --accent-ink: #0f1d27;
  --pop: #c8342a;
  --pop-ink: #ffffff;
  --aqua: #67b4bf;
  --wash: #213547;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pop); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}
.prose { max-width: var(--measure); display: grid; gap: 1rem; }
.eyebrow {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--muted);
}

/* Header, with a strip of the logo's glass colours along the top */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg,
    var(--pop) 0 14%, var(--glass-teal) 14% 31%, var(--aqua) 31% 42%, var(--glass-stone) 42% 55%,
    var(--glass-teal) 55% 63%, var(--pop) 63% 72%, var(--aqua) 72% 86%, var(--glass-navy) 86% 100%);
}
.brand-logo { width: 52px; height: 52px; flex: none; }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 0.9rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--pop);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; color: var(--pop-ink);
  font-size: 0.95rem; letter-spacing: -0.02em;
  flex: none;
}
.brand-text { display: grid; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.brand-sub { font-size: var(--step--1); color: var(--muted); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.2rem; }
.site-nav a {
  display: block; padding: 0.35rem 0.6rem; border-radius: 999px;
  text-decoration: none; color: var(--ink); font-size: 0.97rem;
}
.site-nav a:hover { background: var(--wash); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* Sections */
main { display: block; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 0.5rem; margin-bottom: 1.75rem; max-width: var(--measure); }
.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) 0.5rem; }
.page-head .prose { margin-top: 1rem; }
.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.5; }

/* Home hero */
.hero { padding-block: clamp(1.5rem, 3.5vw, 2.5rem) clamp(2rem, 5vw, 3.5rem); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.hero-copy { display: grid; gap: 1.1rem; min-width: 0; padding-top: 0.5rem; }
.hero-copy .lede { max-width: 34rem; }
.sunday {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.75rem 1.5rem 1.5rem;
  display: grid;
  gap: 1rem;
  overflow: hidden;
  min-width: 0;
}
.sunday-time { display: flex; align-items: center; gap: 1rem; }
.sun-disc {
  width: 6.5rem; height: 6.5rem; border-radius: 50%;
  background: var(--pop); color: var(--pop-ink);
  display: grid; place-items: center; flex: none;
  font-family: var(--font-display); font-weight: 800;
  font-size: 2.3rem; letter-spacing: -0.04em;
}
.sunday-day { font-family: var(--font-display); font-weight: 800; font-size: var(--step-3); line-height: 1; }
.sunday-length { color: var(--muted); }
.sunday address { font-style: normal; line-height: 1.45; }
.sunday-notes { display: grid; gap: 0.4rem; padding: 0; margin: 0; list-style: none; color: var(--muted); }
.sunday-notes li { display: flex; gap: 0.5rem; }
.sunday-notes li::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--accent); margin-top: 0.62em; flex: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Overlapping photo bubbles under the home page intro, like the church's posters */
.hero-bubbles {
  position: relative;
  width: 100%;
  max-width: 32rem;
  aspect-ratio: 100 / 56;
  margin-top: 0.25rem;
}
.bubble {
  position: absolute;
  margin: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid var(--card);
  background: var(--wash);
}
.bubble img { width: 100%; height: 100%; object-fit: cover; }
.bubble.b1 { width: 56%; left: 0; top: 0; z-index: 1; }
.bubble.b2 { width: 40%; left: 50%; top: 16%; z-index: 2; }
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.15rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 1rem;
  border: 2px solid var(--accent);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--accent); background: transparent; }
.btn-ghost:hover { background: var(--wash); }

/* Photo slots (to be replaced with the real photos) */
.photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, var(--wash) 0 14px, transparent 14px 28px),
    var(--card);
  border: 1px dashed var(--line);
  aspect-ratio: 3 / 2;
  max-width: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: var(--step--1);
  text-align: center;
  padding: 1rem;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo:has(img) { padding: 0; border: 0; background: none; }
.photo.natural { aspect-ratio: auto; }
.photo.natural img { height: auto; object-fit: contain; }
.banner {
  margin: 1.75rem 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21 / 8;
  max-width: 100%;
}
.banner img { width: 100%; height: 100%; object-fit: cover; }
.card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.35rem;
}
.next-special {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--wash);
}
.next-special h2 { font-size: var(--step-2); }
.next-special a { font-weight: 700; }
.card-img.natural { aspect-ratio: auto; height: auto; object-fit: contain; }
.contact-list .note { font-size: var(--step--1); color: var(--muted); }
@media (max-width: 760px) { .banner { aspect-ratio: 3 / 2; } }

/* Two-column feature rows */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.split > * { min-width: 0; }
.split .prose { gap: 0.9rem; }

/* Card grids */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.25rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
  min-width: 0;
}
.card p { color: var(--muted); }
.card .when { font-weight: 700; color: var(--ink); }

/* Latest talk on home */
.latest {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: grid;
  gap: 0.75rem;
  max-width: var(--measure);
}
.latest audio { width: 100%; }

/* Talks archive */
.talk-tools { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1.5rem; }
.talk-tools label { font-weight: 700; }
.talk-tools input {
  font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.55rem 1rem; width: min(100%, 22rem);
}
.talk-count { color: var(--muted); font-size: var(--step--1); }
.year-group { display: grid; gap: 0; margin-bottom: 2.25rem; }
.year-group h2 { font-size: var(--step-2); padding-bottom: 0.6rem; border-bottom: 2px solid var(--ink); }
.talk {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  gap: 0.4rem 1.25rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.talk-date { font-variant-numeric: tabular-nums; font-weight: 700; padding-top: 0.15rem; }
.talk-body { display: grid; gap: 0.35rem; min-width: 0; }
.talk-body p { color: var(--muted); }
.talk-passage {
  display: inline-block; font-size: var(--step--1); font-weight: 700;
  background: var(--wash); color: var(--ink);
  padding: 0.1rem 0.55rem; border-radius: 999px; justify-self: start;
}
.talk-length { font-variant-numeric: tabular-nums; color: var(--muted); font-size: var(--step--1); padding-top: 0.2rem; white-space: nowrap; }
.talk audio { width: 100%; max-width: 30rem; margin-top: 0.35rem; }
.pending { font-size: var(--step--1); color: var(--muted); font-style: italic; }
.no-results { color: var(--muted); padding-block: 1rem; }

/* Contact */
.contact-list { display: grid; gap: 1.25rem; padding: 0; margin: 0; list-style: none; }
.contact-list li { display: grid; gap: 0.15rem; }
.contact-list .label { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.09em; font-weight: 700; color: var(--muted); }
.contact-list .value { font-size: var(--step-1); overflow-wrap: anywhere; }

/* Notice */
.notice {
  background: var(--wash);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  max-width: var(--measure);
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 1rem; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem;
  padding-block: 2rem 2.5rem; color: var(--muted); font-size: var(--step--1);
}
.site-footer p { max-width: 36rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }

@media (max-width: 760px) {
  .hero .wrap, .split { grid-template-columns: minmax(0, 1fr); }
  .split .photo { order: -1; }
  .talk { grid-template-columns: minmax(0, 1fr) auto; }
  .talk-date { grid-column: 1; }
  .talk-length { grid-column: 2; grid-row: 1; }
  .talk-body { grid-column: 1 / -1; }
  .sun-disc { width: 5.25rem; height: 5.25rem; font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
