:root {
  --bg: #f3e8d2;
  --panel: #ffffff;
  --accent: #b32b2b;
  --muted: #4b4339;
  --text: #2c241c;
  --shadow: 0 10px 35px rgba(0,0,0,0.18);
  --radius: 14px;
  --font: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --sans: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --nav: #1f1a18;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: #f8f0dc;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.banner {
  width: 100%;
  background: #f8f0dc;
  padding: 0;
  box-shadow: none;
  display: flex;
  justify-content: center;
}
.banner img {
  width: 100%;
  max-width: 960px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  background: transparent;
}
.nav-shell {
  width: 100%;
  max-width: 960px;
  background: var(--nav);
  padding: 12px 18px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.site-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center;
  align-items: center;
}
.site-nav > a,
.site-nav > .nav-item > a {
  color: #f5efe4;
  padding: 9px 12px;
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
}
.site-nav > a:hover,
.site-nav > .nav-item > a:hover {
  background: rgba(255,255,255,0.08);
}
.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.subnav {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  padding: 8px 0;
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 220px;
  display: none;
  flex-direction: column;
  z-index: 20;
}
.subnav a {
  color: var(--text);
  padding: 10px 16px;
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 0;
}
.subnav a:hover {
  background: rgba(0,0,0,0.05);
  color: var(--accent);
  text-decoration: none;
}
.nav-item:hover > .subnav,
.nav-item:focus-within > .subnav {
  display: flex;
}
.site-main { flex: 1; padding: 24px 12px 40px; display: flex; justify-content: center; }
.page-width { width: 100%; max-width: 960px; }
.hero {
  display: grid;
  gap: 24px;
}
.hero-card, .content-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
}
.content-card .content { color: var(--muted); line-height: 1.7; font-family: var(--sans); }
.hero h1 { margin-top: 0; margin-bottom: 12px; font-size: 1.8rem; letter-spacing: 0.01em; }
.hero p { color: var(--muted); line-height: 1.6; font-family: var(--sans); }
.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  font-family: var(--sans);
  box-shadow: 0 12px 26px rgba(179,43,43,0.25);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.button:hover,
button.button:hover {
  text-decoration: none;
  filter: brightness(1.06);
}
.button.secondary,
button.button.secondary {
  background: var(--accent);
  color: #fff;
  border: 0;
  box-shadow: 0 12px 26px rgba(179,43,43,0.25);
}
.button.small,
button.button.small {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  box-shadow: 0 8px 18px rgba(179,43,43,0.18);
}
.button.small.secondary,
button.button.small.secondary {
  background: var(--accent);
  color: #fff;
  border: 0;
  box-shadow: 0 8px 18px rgba(179,43,43,0.18);
}
.content table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.content table th, .content table td { padding: 10px 14px; border-bottom: 1px solid rgba(0,0,0,0.08); vertical-align: top; }
.content table th { text-align: left; font-family: var(--sans); color: var(--text); }
.content table tr:last-child td { border-bottom: none; }
.feature-image {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: block;
}
.site-footer { text-align: center; padding: 18px; color: var(--muted); font-family: var(--sans); }
.form { display: grid; gap: 12px; }
.input { padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.1); background: #fff; color: var(--text); }
.alert { padding: 12px 14px; border-radius: 10px; background: rgba(179,43,43,0.1); color: var(--text); border: 1px solid rgba(179,43,43,0.25); }
.alert.alert-success {
  background: rgba(38, 133, 68, 0.16);
  border: 1px solid rgba(38, 133, 68, 0.38);
  color: #153c22;
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.profile-card {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #fff, #f4ebdb);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 14px;
  box-shadow: var(--shadow);
  flex-wrap: nowrap;
}
.profile-photo {
  flex: 0 0 50%;
  width: 425px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}
.profile-meta {
  flex: 0 0 50%;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.profile-meta h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}
.profile-line {
  margin: 4px 0;
  font-family: var(--sans);
  color: var(--muted);
}
.vicar-letter { font-family: var(--sans); line-height: 1.7; color: var(--muted); }
.vicar-letter .profile-photo {
  float: left;
  width: 46%;
  max-width: 320px;
  height: auto;
  margin: 0 18px 12px 0;
  box-shadow: var(--shadow);
  border-radius: 12px;
}
.vicar-letter::after { content: ""; display: table; clear: both; }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; margin: 16px 0; }
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.yt-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0;
}
.yt-grid-fallback { grid-column: 1 / -1; }
.yt-grid-item {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 10px;
}
.yt-frame { position: relative; padding-bottom: 56.25%; height: 0; }
.yt-frame iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}
.yt-grid-item p {
  margin: 10px 4px 2px;
  font-family: var(--sans);
  color: var(--muted);
  line-height: 1.4;
}
.verify-progress-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #fff8ee, #f4e5cc);
  border: 1px solid rgba(179,43,43,0.15);
}
.verify-progress-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(179,43,43,0.12), transparent 38%),
    radial-gradient(circle at 85% 80%, rgba(31,26,24,0.08), transparent 42%);
  pointer-events: none;
}
.verify-progress-card > * {
  position: relative;
  z-index: 1;
}
.verify-eyebrow {
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.verify-loader {
  width: 56px;
  height: 56px;
  margin: 6px 0 14px;
  border-radius: 50%;
  border: 4px solid rgba(179,43,43,0.18);
  border-top-color: var(--accent);
  animation: verify-spin 0.9s linear infinite;
}
.verify-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(31,26,24,0.12);
}
.verify-progress-fill {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b32b2b, #d36429);
  animation: verify-progress 1.7s ease-in-out infinite;
}
.verify-note {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 0.93rem;
}
@keyframes verify-spin {
  to { transform: rotate(360deg); }
}
@keyframes verify-progress {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}
@media (max-width: 960px) {
  .yt-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .yt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .profile-card {
    flex-wrap: wrap;
  }
  .profile-photo, .profile-meta {
    flex: 1 1 100%;
  }
}
@media (max-width: 760px) {
  .site-main { padding: 18px; }
  .site-nav { justify-content: center; }
  .banner img {
    max-width: 100%;
  }
  .nav-shell {
    padding: 10px 12px;
  }
}
@media (max-width: 760px) {
  .vicar-letter .profile-photo {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 12px;
  }
}
