/* Theme tokens — swap these later when brand colors arrive */
:root {
  --paper: #f7faf4;
  --paper-alt: #eef4e8;
  --paper-deep: #e0ead8;
  --white: #ffffff;
  --ink: #24301f;
  --ink-soft: #44543a;
  --muted: #5d6d52;
  --line: #d5e0cc;
  --sage: #587848;
  --sage-deep: #456338;
  --sage-soft: #e4eedb;
  --sky: #5d86a0;
  --sky-soft: #dceaf1;
  --gold: #b0895b;
  --danger: #8f3a3a;
  --ok: #2d6a55;
  --shadow: 0 18px 50px rgba(28, 47, 42, 0.08);
  --radius: 18px;
  --max: 1120px;
  --header-h: 4.5rem;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

html, body {
  background: var(--paper);
  color: var(--ink);
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  letter-spacing: -0.011em;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--sage-deep);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 999px;
}

.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, white);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner,
.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

@media (min-width: 1100px) {
  .header-inner {
    width: min(1220px, calc(100% - 2.5rem));
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-mark.has-logo {
  width: 3.5rem;
  height: 3.5rem;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.desktop-nav {
  display: none;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.4rem;
  padding: 0 0.75rem 0 2.25rem;
}

.desktop-nav a {
  text-decoration: none;
  font-size: 0.84rem;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: var(--ink);
  background: color-mix(in srgb, var(--sage-soft) 70%, white);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--sage) 18%, transparent);
}

.header-actions {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-shrink: 0;
}

.header-actions .btn {
  padding: 0.58rem 0.95rem;
  white-space: nowrap;
}

.portal-link {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.84rem;
  white-space: nowrap;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  cursor: pointer;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 1.05rem;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-icon::before { top: -5px; }
.menu-icon::after { top: 5px; }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--white);
  padding: 1rem 1.25rem 1.4rem;
}

.mobile-nav.open { display: block; }

.mobile-nav a:not(.btn) {
  display: block;
  padding: 0.7rem 0;
  text-decoration: none;
}

.mobile-actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.mobile-actions .btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0.85rem 1.35rem;
  box-sizing: border-box;
}

@media (min-width: 1100px) {
  .desktop-nav,
  .header-actions { display: flex; }
  .menu-toggle,
  .mobile-nav { display: none !important; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.78rem 1.2rem;
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--sage-deep); color: white; }
.btn-primary:hover { background: var(--sage); }
.btn-secondary {
  background: transparent;
  color: var(--sage-deep);
  border-color: color-mix(in srgb, var(--sage) 45%, var(--line));
}
.btn-secondary:hover { background: var(--sage-soft); }
.btn-light { background: white; color: var(--sage-deep); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 4rem;
  background:
    radial-gradient(circle at 12% 20%, var(--sage-soft), transparent 36%),
    radial-gradient(circle at 88% 10%, var(--sky-soft), transparent 32%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-alt) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 80px;
  background: linear-gradient(180deg, transparent, var(--paper));
}

.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 650;
  margin-bottom: 0.9rem;
}

h1, h2, h3, .serif {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  max-width: 14ch;
  margin: 0 0 1rem;
}

.lede, .hero-tagline {
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  color: var(--ink-soft);
  max-width: 34rem;
}

.hero-support {
  max-width: 38rem;
  color: var(--muted);
  margin: 1.1rem 0 1.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section { padding: 4.25rem 0; }
.section-alt { background: var(--paper-alt); }
.section-head { max-width: 40rem; margin-bottom: 2.2rem; }

.kicker {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky);
  font-weight: 650;
}

.grid-3, .grid-2, .grid-4 { display: grid; gap: 1.1rem; }

@media (min-width: 720px) {
  .grid-2, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 980px) {
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card, .pillar, .policy, .resource-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.5rem;
  box-shadow: var(--shadow);
}

.pillar h3, .card h3 { margin: 0.2rem 0 0.6rem; font-size: 1.45rem; }

.quote {
  margin: 0;
  padding: 2.4rem 1.5rem;
  text-align: center;
  background: var(--sage-deep);
  color: white;
  border-radius: 28px;
}

.quote p {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  margin: 0;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 0.8rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.steps li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1rem 1rem 3.4rem;
  position: relative;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 0.9rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.form {
  position: relative;
  display: grid;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-row { display: grid; gap: 1rem; }

@media (min-width: 720px) {
  .form-row.two { grid-template-columns: 1fr 1fr; }
}

label, .legend {
  display: block;
  font-size: 0.88rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
}

.hint { font-weight: 450; color: var(--muted); font-size: 0.82rem; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}

textarea { min-height: 8rem; resize: vertical; }
.choices { display: grid; gap: 0.45rem; }

.choice {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-weight: 450;
  font-size: 0.95rem;
}

.choice input { width: auto; margin-top: 0.3rem; }

.form-error, .banner-error { color: var(--danger); font-size: 0.9rem; }

.banner, .banner-ok, .banner-error, .banner-empty {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.banner-ok {
  background: color-mix(in srgb, var(--ok) 10%, white);
  border-color: color-mix(in srgb, var(--ok) 28%, var(--line));
}

.banner-ok h2,
.banner-error h2 {
  margin: 0 0 0.55rem;
}

.confirm-card {
  scroll-margin-top: calc(var(--header-h) + 1rem);
  padding: 1.6rem 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}

.confirm-card:focus {
  outline: none;
}

.confirm-card .eyebrow {
  margin-bottom: 0.4rem;
}

.confirm-card h2 {
  margin: 0.1rem 0 0.85rem;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
}

.confirm-card p:last-child {
  margin-bottom: 0;
}

.banner-error { background: #fdf4f4; }
.banner-empty { background: var(--paper-alt); color: var(--muted); }

.give-option { text-align: left; width: 100%; cursor: pointer; }
.give-option.selected {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-soft);
}

.amount {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.8rem;
  margin: 0.2rem 0 0.4rem;
}

.site-footer {
  background: var(--ink);
  color: #e7f1ec;
  padding: 3.4rem 0 1.6rem;
  margin-top: auto;
}

.site-footer a { color: #e7f1ec; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.site-footer .btn {
  text-decoration: none;
}

.site-footer .btn-light {
  background: #f7fbf9;
  color: var(--sage-deep);
  border-color: #f7fbf9;
}

.site-footer .btn-light:hover {
  background: #ffffff;
  color: var(--ink);
}

.site-footer .btn-secondary {
  background: transparent;
  color: #e7f1ec;
  border-color: color-mix(in srgb, white 42%, transparent);
}

.site-footer .btn-secondary:hover {
  background: color-mix(in srgb, white 12%, transparent);
  color: #ffffff;
}

.footer-top { display: grid; gap: 2rem; }

@media (min-width: 800px) {
  .footer-top { grid-template-columns: 1.3fr 1fr 1fr; }
}

.footer-brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links, .social-links { display: grid; gap: 0.45rem; }

.kingdom-band {
  margin: 2.4rem 0;
  padding: 1.5rem;
  border: 1px solid color-mix(in srgb, white 16%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, white 6%, transparent);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid color-mix(in srgb, white 14%, transparent);
  color: #b7c7c0;
  font-size: 0.88rem;
}

.muted { color: var(--muted); }
.center { text-align: center; }
.prose { max-width: 42rem; }
.prose p { margin: 0 0 1rem; }

.emergency {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: #fff8f8;
  border: 1px solid #efd0d0;
  border-radius: 18px;
  padding: 1rem 1.2rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.chip {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 0.86rem;
  font-family: inherit;
}

.chip[aria-pressed="true"] {
  background: var(--sage-deep);
  color: white;
  border-color: var(--sage-deep);
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.narrow { max-width: 760px; }
.narrow-sm { max-width: 520px; }

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.admin-tabs [aria-selected="true"] {
  background: var(--sage-deep);
  color: white;
  border-color: var(--sage-deep);
}

.admin-toolbar {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

@media (min-width: 720px) {
  .admin-toolbar {
    grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
    align-items: end;
  }
}

.application-card + .application-card,
#people-list .card + .card,
#schedule-list .card + .card {
  margin-top: 1rem;
}

.application-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 650;
  background: var(--paper-alt);
}

.status-pending { background: #f4ead3; color: #6d5420; }
.status-approved, .status-accepted, .status-completed { background: var(--sage-soft); color: var(--sage-deep); }
.status-inactive, .status-declined, .status-no_show { background: #f4dede; color: var(--danger); }
.status-invited { background: var(--sky-soft); color: #35586c; }

.hours-stat {
  text-align: right;
  line-height: 1.15;
}

.hours-stat strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
}

.hours-stat span {
  color: var(--muted);
  font-size: 0.8rem;
}

.schedule-row,
.ask-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.ask-row { border-top: 0; margin-top: 0.6rem; }
.ask-row select { flex: 1 1 220px; }

.ask-box {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
