:root {
  color-scheme: light;
  --ink: #1f1831;
  --muted: #5b5369;
  --theme-ink: #452479;
  --bg: #faf8ff;
  --line: #e8e0f0;
  --soft: #eee7f8;
  --shade: 30 16 51;
  --tint: 80 40 112;
  --prayer-bg: #e6efff;
  --prayer-ink: #164f88;
  --giving-bg: #ffeadc;
  --giving-ink: #8e360f;
  --connect-bg: #e4f2ed;
  --connect-ink: #215949;
  --store-bg: #f9e5f1;
  --store-ink: #8c2b5c;
  font-family: "Aptos", "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
:root[data-season="christmas"] {
  --theme-ink: #234d37;
  --bg: #f2f6ef;
  --line: #d8e4d9;
  --soft: #e0ecdf;
  --shade: 13 36 25;
  --tint: 108 31 47;
  --prayer-bg: #deeee1;
  --prayer-ink: #225339;
  --giving-bg: #f9e4e7;
  --giving-ink: #852b40;
  --connect-bg: #e4edeb;
  --connect-ink: #275648;
  --store-bg: #f7edce;
  --store-ink: #725119;
}
:root[data-season="winter"] {
  --theme-ink: #254a76;
  --bg: #f2f7fc;
  --line: #d8e6f3;
  --soft: #e1edf9;
  --shade: 18 35 60;
  --tint: 42 105 158;
  --prayer-bg: #deebff;
  --prayer-ink: #204a82;
  --giving-bg: #e4eaf8;
  --giving-ink: #384e86;
  --connect-bg: #ddf1f3;
  --connect-ink: #215864;
  --store-bg: #e9e6fa;
  --store-ink: #513e80;
}
:root[data-season="lent"] {
  --theme-ink: #553178;
  --bg: #f8f3fc;
  --line: #e9dcee;
  --soft: #eee2f6;
  --shade: 32 17 49;
  --tint: 101 49 135;
  --prayer-bg: #e9e0fa;
  --prayer-ink: #4e3281;
  --giving-bg: #f7e2ed;
  --giving-ink: #822c5d;
  --connect-bg: #e7e5f7;
  --connect-ink: #49437d;
  --store-bg: #f6e7dc;
  --store-ink: #78462d;
}
:root[data-season="spring"] {
  --theme-ink: #2d5735;
  --bg: #f4f8ee;
  --line: #dce6d5;
  --soft: #e2eedc;
  --shade: 19 44 28;
  --tint: 55 110 53;
  --prayer-bg: #e0eedc;
  --prayer-ink: #2b5931;
  --giving-bg: #f8efcf;
  --giving-ink: #705515;
  --connect-bg: #dff1e8;
  --connect-ink: #215b45;
  --store-bg: #f6e4eb;
  --store-ink: #853754;
}
:root[data-season="summer"] {
  --theme-ink: #874018;
  --bg: #fff7ee;
  --line: #f1dfcc;
  --soft: #fde8d3;
  --shade: 56 29 23;
  --tint: 167 73 22;
  --prayer-bg: #ffeece;
  --prayer-ink: #814818;
  --giving-bg: #ffdfca;
  --giving-ink: #8a3b1b;
  --connect-bg: #e0f0ea;
  --connect-ink: #2b5d4a;
  --store-bg: #fbe4e3;
  --store-ink: #8d3f3b;
}
:root[data-season="fall"] {
  --theme-ink: #6b402a;
  --bg: #f8f2ea;
  --line: #e9ddcf;
  --soft: #efe1d1;
  --shade: 46 30 24;
  --tint: 118 71 43;
  --prayer-bg: #efdfcf;
  --prayer-ink: #634330;
  --giving-bg: #f8e4d1;
  --giving-ink: #874b25;
  --connect-bg: #e7ebdc;
  --connect-ink: #485736;
  --store-bg: #f4e0db;
  --store-ink: #813f35;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--theme-ink); outline-offset: 3px; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(100% - 2rem, 54rem); margin-inline: auto; }
.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: .65rem; min-height: 65px; }
.brand { display: inline-flex; align-items: center; padding-block: .4rem; }
.brand img { width: 136px; height: auto; display: block; filter: brightness(0) saturate(100%); }
.location { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .875rem; }
.location .icon { width: 1rem; height: 1rem; }
.sections { margin-block: 1rem; }
.sections [role="tablist"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .25rem; border-radius: 18px; background: var(--soft); }
.sections button { min-height: 43px; padding: .5rem .75rem; text-align: center; border-radius: 14px; border: 0; background: transparent; color: var(--theme-ink); font-weight: 750; cursor: pointer; }
.sections [aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 6px #24133a16; }
.hero { position: relative; overflow: hidden; display: flex; min-height: 320px; align-items: flex-end; isolation: isolate; border-radius: 1.6rem; color: white; background: rgb(var(--shade)) url("./img/worship.webp") center 47% / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(13deg, rgb(var(--shade)) 1%, rgb(var(--shade) / .92) 26%, rgb(var(--shade) / .55) 54%, rgb(var(--tint) / .26) 100%); }
:root[data-season="christmas"] #welcome > .hero {
  background-image: url("./img/christmas-worship.webp");
  background-position: 86% 50%;
}
:root[data-season="christmas"] #welcome > .hero::before {
  background: linear-gradient(12deg, rgb(var(--shade) / .98) 2%, rgb(var(--shade) / .73) 29%, rgb(var(--shade) / .26) 58%, transparent 100%);
}
.hero-content { padding: 1.55rem 1.4rem; }
.hero h1 { margin: 0; font-weight: 850; letter-spacing: -.07em; line-height: .89; font-size: clamp(3rem, 12vw, 5.8rem); }
.hero p { max-width: 31ch; margin: .9rem 0 1rem; color: #fff; line-height: 1.45; }
.service-time { border: 1px solid #fff5; background: #fff2; display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .7rem; border-radius: 999px; font-size: .875rem; font-weight: 700; }
.service-time .icon { height: 1.05rem; width: 1.05rem; }
.live { display: flex; gap: .85rem; align-items: center; margin-top: 1rem; border-radius: 1.15rem; padding: .9rem 1.05rem; text-decoration: none; color: #fff; background: #6d2446; }
.live-play { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: #fff2; }
.live-kicker { display: flex; align-items: center; gap: .4rem; font-size: .875rem; color: #ffdfeb; }
.live-kicker span { width: .5rem; height: .5rem; border-radius: 50%; background: #ffa9bf; }
.live strong, .step strong { display: block; font-size: 1.125rem; }
.block { margin-block-start: 1.85rem; }
h2 { margin: 0 0 .8rem; font-size: clamp(1.55rem, 7vw, 2.15rem); letter-spacing: -.055em; line-height: 1.08; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; }
.section-heading h2 { margin: 0; }
.calendar-link { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; color: var(--theme-ink); min-height: 44px; text-decoration: none; font-size: .875rem; font-weight: 750; white-space: nowrap; }
.calendar-link .icon { width: 1.05rem; height: 1.05rem; }
.event-feature { position: relative; display: flex; align-items: flex-end; min-height: 11rem; overflow: hidden; isolation: isolate; border-radius: 1.15rem; text-decoration: none; padding: 1rem; color: #fff; background: linear-gradient(125deg, rgb(var(--shade)), rgb(var(--tint))); }
.event-feature img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 43%; }
.event-feature::before { position: absolute; content: ""; z-index: -1; inset: 0; background: linear-gradient(5deg, rgb(var(--shade) / .97), rgb(var(--shade) / .58) 45%, rgb(var(--tint) / .22) 90%); }
.event-feature .event-name { font-size: 1.35rem; display: block; margin-bottom: .25rem; }
.event-feature .event-when { color: #fff; }
.event-list { display: grid; gap: .5rem; list-style: none; padding: 0; margin: .55rem 0 0; }
.event-row { display: flex; align-items: center; gap: .85rem; min-height: 66px; border-radius: 1rem; background: white; border: 1px solid var(--line); padding: .58rem .72rem; text-decoration: none; }
.date-chip { display: grid; place-items: center; width: 3.05rem; flex: none; min-height: 48px; padding: .25rem; line-height: 1; border-radius: .7rem; background: var(--soft); color: var(--theme-ink); }
.date-chip span:first-child { font-size: .77rem; font-weight: 750; text-transform: uppercase; }
.date-chip span:last-child { font-size: 1.2rem; font-weight: 850; }
.event-name { display: block; font-weight: 750; line-height: 1.25; }
.event-when { display: block; color: var(--muted); margin-top: .2rem; font-size: .875rem; }
.event-message { border: 1px solid var(--line); border-radius: 1rem; padding: 1rem; margin: 0; color: var(--muted); background: white; }
.quick-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.sunday-links { margin-top: .75rem; }
.sunday-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 56px;
  padding: .65rem .75rem;
  border: 1px solid transparent;
  border-radius: .85rem;
  background: var(--card);
  color: var(--accent);
  font-size: .9rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
}
.sunday-link.bulletin { --card: var(--store-bg); --accent: var(--store-ink); }
.sunday-link:disabled { color: var(--muted); background: transparent; border-color: var(--line); }
.sunday-link small { display: block; margin-top: .2rem; font-size: .8rem; font-weight: 500; }
.prayer { --card: var(--prayer-bg); --accent: var(--prayer-ink); }
.giving { --card: var(--giving-bg); --accent: var(--giving-ink); }
.connect { --card: var(--connect-bg); --accent: var(--connect-ink); }
.store { --card: var(--store-bg); --accent: var(--store-ink); }
.tile, .step { background: var(--card); color: var(--ink); border-radius: 1.05rem; text-decoration: none; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: .22rem; min-height: 8rem; padding: .7rem .6rem .85rem; }
.tile strong { font-size: 1rem; line-height: 1.2; }
.tile > span:last-child, .step strong + span { color: var(--accent); font-size: .875rem; line-height: 1.33; }
.tile-icon { display: inline-grid; flex: none; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .7rem; color: var(--accent); background: #fffc; margin-bottom: .4rem; }
.next-hero { min-height: 300px; background-image: url("./img/family.webp"); background-position: 57% 45%; }
.next-hero p { margin-bottom: 0; }
.steps { display: grid; gap: .65rem; }
.step { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; min-height: 74px; }
.step .tile-icon { margin: 0; }
.step strong + span { margin-top: .2rem; display: block; }
.footer { font-size: .875rem; color: var(--muted); padding-block: 1.85rem max(1.5rem, env(safe-area-inset-bottom)); }
.footer a { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
.footer .icon { height: 1rem; width: 1rem; }
@media (max-width: 360px) {
  .wrap { width: calc(100% - 1.25rem); }
  .tile { padding-inline: .48rem; }
}
@media (min-width: 620px) {
  .hero { min-height: 420px; background-position: 50% 43%; }
  .hero::before { background: linear-gradient(75deg, rgb(var(--shade) / .98) 2%, rgb(var(--shade) / .84) 31%, rgb(var(--tint) / .36) 73%, rgb(var(--tint) / .21)); }
  :root[data-season="christmas"] #welcome > .hero {
    background-position: 50% 48%;
  }
  :root[data-season="christmas"] #welcome > .hero::before {
    background: linear-gradient(75deg, rgb(var(--shade) / .96), rgb(var(--shade) / .76) 31%, rgb(var(--shade) / .12) 73%, transparent);
  }
  .hero-content { padding: 2.2rem; }
  .sections { margin-block: 1.25rem; }
  .event-feature { min-height: 15rem; padding: 1.25rem; }
  .event-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-links { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
  .tile { padding: 1rem; }
  .next-hero { min-height: 340px; }
}
@media (hover: hover) {
  .calendar-link:hover, .footer a:hover { text-decoration: underline; }
  .tile:hover, .step:hover, a.sunday-link:hover, .event-row:hover { box-shadow: inset 0 0 0 2px rgb(var(--tint) / .25); }
  .event-feature:hover, .live:hover { filter: brightness(1.09); }
}

.app-prompt {
  position: fixed;
  z-index: 2;
  bottom: max(.7rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 1.25rem), 28rem);
  max-height: 80vh;
  max-height: 80dvh;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: linear-gradient(150deg, var(--soft), #fff 76%);
  box-shadow: 0 12px 42px #1f18314a;
}
.app-prompt-preview {
  display: grid;
  grid-template-columns: clamp(6.25rem, 31vw, 8.75rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(.8rem, 4vw, 1.3rem);
  margin-bottom: 1rem;
}
.app-prompt-phone {
  position: relative;
  padding: .31rem;
  border: 1px solid #53535a;
  border-radius: 1.3rem;
  background: #1a1a1f;
  box-shadow: 0 7px 16px #1f18313d;
}
.app-prompt-phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: .95rem;
}
.app-prompt-copy h2 {
  margin: 0 0 .55rem;
  font-size: clamp(1.5rem, 6.7vw, 2.1rem);
  line-height: 1;
}
.app-prompt-copy p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.45;
}
.app-prompt-download, .app-prompt-dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: .75rem;
}
.app-prompt-download {
  min-height: 48px;
  padding: .5rem .75rem;
  background: var(--theme-ink);
  color: #fff;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}
.app-prompt-dismiss {
  position: absolute;
  top: .35rem;
  right: .35rem;
  width: 44px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: #fffa;
  cursor: pointer;
}
body:has(.app-prompt:not([hidden])) {
  padding-bottom: calc(min(24rem, 80vh) + env(safe-area-inset-bottom));
}
