:root {
  --green-950: #0d2c25;
  --green-800: #173f35;
  --green-700: #245b4d;
  --green-100: #e8f2ef;
  --gold: #c6943d;
  --gold-soft: #f7ecd5;
  --ink: #18211e;
  --muted: #55635e;
  --paper: #ffffff;
  --canvas: #f4f2ec;
  --line: #d9dfdc;
  --shadow: 0 14px 34px rgba(13, 44, 37, 0.11);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

a { color: var(--green-700); }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 12px 18px;
  background: white;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 118px;
  padding: max(24px, env(safe-area-inset-top)) max(24px, calc((100% - 1060px) / 2));
  background: linear-gradient(125deg, var(--green-950), var(--green-700));
  color: white;
}

.brand-mark {
  display: grid;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 2px solid rgba(255,255,255,.65);
  border-radius: 18px;
  background: rgba(255,255,255,.1);
  color: white;
  font-family: Georgia, serif;
  font-size: 38px;
  font-weight: 700;
}

.church-name {
  margin: 0 0 2px;
  color: #dceae6;
  font-size: .88rem;
  font-weight: 650;
  letter-spacing: .025em;
}

.site-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  line-height: 1.1;
}

main {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 56px;
}

.welcome { max-width: 720px; margin-bottom: 30px; }
.eyebrow {
  margin: 0 0 5px;
  color: var(--green-700);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 4vw, 2.05rem);
  line-height: 1.2;
}

p { margin: 0 0 1rem; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.service-card {
  position: relative;
  display: flex;
  min-height: 400px;
  flex-direction: column;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--line);
  border-top: 7px solid var(--green-700);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.service-card.contemporary { border-top-color: var(--gold); }

.service-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 30px;
  font-weight: 700;
}

.contemporary .service-icon { background: var(--gold-soft); color: #805915; }
.service-time { margin: 0; color: var(--green-700); font-size: 1.15rem; font-weight: 800; }
.service-card h2 { font-size: 1.75rem; }
.service-description { color: var(--muted); }

.plan-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  margin-top: auto;
  padding: 15px 20px;
  border-radius: 12px;
  background: var(--green-800);
  color: white;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.contemporary .plan-button { background: #815b18; }
.plan-button span { font-size: 1.5rem; }
.plan-button:hover, .plan-button:focus-visible { filter: brightness(1.12); transform: translateY(-1px); }

.notice-panel,
.install-panel {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 26px;
  padding: 25px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}

.notice-panel p:last-child,
.install-panel p:last-child { margin-bottom: 0; }

.notice-icon { color: var(--gold); font-size: 1.6rem; }
.install-panel { justify-content: space-between; }

.secondary-button {
  min-width: 170px;
  min-height: 54px;
  padding: 12px 18px;
  border: 2px solid var(--green-700);
  border-radius: 10px;
  background: white;
  color: var(--green-800);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.offline-message {
  margin-top: 22px;
  padding: 15px;
  border-radius: 10px;
  background: #fff0cf;
  color: #684500;
  font-weight: 700;
  text-align: center;
}

footer {
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
  background: var(--green-950);
  color: white;
  text-align: center;
}

footer p { margin: 0 0 5px; font-weight: 700; }
footer a { color: white; }

dialog {
  width: min(540px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
}

dialog::backdrop { background: rgba(13, 44, 37, .72); }
.dialog-content { position: relative; padding: 32px; }
.dialog-content ol { padding-left: 24px; }
.dialog-content li { margin-bottom: 12px; }
.close-button {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-950);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

button:focus-visible, a:focus-visible { outline: 4px solid #f3bf4f; outline-offset: 3px; }

@media (max-width: 720px) {
  body { font-size: 17px; }
  .site-header { padding-left: 18px; padding-right: 18px; }
  .brand-mark { flex-basis: 54px; width: 54px; height: 54px; border-radius: 15px; font-size: 32px; }
  .church-name { font-size: .74rem; }
  main { width: min(100% - 24px, 540px); padding-top: 30px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 360px; padding: 25px; }
  .install-panel { align-items: stretch; flex-direction: column; }
  .secondary-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
