/* Calhoun Presbyterian Church — Phase 0 wireframes
   Quiet paper / cream Presbyterian direction. No framework. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #F7F3EB;
  --surface: #FFFCF7;
  --text: #2C2A26;
  --muted: #5C574F;
  --accent: #7A3B3B;
  --accent-hover: #5E2D2D;
  --border: #E4DDD0;
  --focus: #7A3B3B;
  --content-max: 40rem;
  --shell-max: 68rem;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(44, 42, 38, 0.05);
  --space: 1.5rem;
  --space-lg: 2.25rem;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  z-index: 1000;
  padding: 0.55rem 0.95rem;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}

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

/* Shell */
.shell {
  width: min(100% - 1.75rem, var(--shell-max));
  margin-inline: auto;
}

.content {
  width: min(100%, var(--content-max));
}

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  padding: 1.35rem 0 0;
}

.brand {
  text-decoration: none;
  color: inherit;
  display: block;
  max-width: 44rem;
}

.brand:hover {
  color: inherit;
}

.brand:focus-visible {
  outline-offset: 4px;
}

.brand__name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--text);
}

.brand__solas {
  margin: 0.45rem 0 0;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.5;
  max-width: 40rem;
}

/* Prefer breaks between sola phrases on small screens */
.brand__solas .sola {
  white-space: nowrap;
}

.brand__solas .sep {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .brand__solas .sola {
    white-space: normal;
  }

  .brand__solas .sep::after {
    content: "\A";
    white-space: pre;
  }

  .brand__solas .sep {
    font-size: 0; /* hide middot visually when stacking */
  }

  .brand__solas .sola {
    display: block;
    font-size: 0.8rem;
  }
}

/* ---------- Nav ---------- */
.nav-wrap {
  margin-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.nav-toggle {
  display: block;
}

.nav-toggle summary {
  list-style: none;
  cursor: pointer;
  padding: 0.8rem 0;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.nav-toggle summary::-webkit-details-marker {
  display: none;
}

.nav-toggle summary::after {
  content: "";
  width: 1.15rem;
  height: 0.85rem;
  background:
    linear-gradient(var(--muted), var(--muted)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--muted), var(--muted)) 0 50% / 100% 2px no-repeat,
    linear-gradient(var(--muted), var(--muted)) 0 100% / 100% 2px no-repeat;
}

.nav-toggle[open] summary::after {
  background:
    linear-gradient(var(--muted), var(--muted)) 0 50% / 100% 2px no-repeat;
  height: 2px;
  margin-block: 0.4rem;
}

.site-nav {
  margin: 0;
  padding: 0 0 0.35rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.15rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.4rem 0.7rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
}

.site-nav a:hover {
  color: var(--accent);
  background: rgba(122, 59, 59, 0.06);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
  background: transparent;
}

.site-nav a[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
}

/* Mobile menu */
@media (max-width: 639px) {
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding-bottom: 0.65rem;
  }

  .site-nav a {
    width: 100%;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    padding: 0.7rem 0.15rem;
    min-height: 46px;
  }

  .site-nav a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--accent);
    padding-left: 0.65rem;
  }
}

/* Desktop: always show horizontal nav; hide summary */
@media (min-width: 640px) {
  .nav-toggle > summary {
    display: none;
  }

  details.nav-toggle > *:not(summary) {
    display: block !important;
  }

  .site-nav {
    padding: 0.2rem 0 0.45rem;
  }

  .site-nav ul {
    gap: 0.05rem 0.1rem;
  }
}

@media (min-width: 900px) {
  .site-nav a {
    padding: 0.45rem 0.85rem;
  }
}

/* ---------- Main ---------- */
.site-main {
  padding: 1.85rem 0 3.25rem;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: 0;
  margin-bottom: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 40%;
  background: #e8e0d4;
}

.hero__body {
  padding: 1.35rem 1.35rem 1.5rem;
}

.hero__body h1 {
  margin: 0 0 0.7rem;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.012em;
}

.hero__body > p {
  margin: 0 0 1.1rem;
  color: var(--muted);
  max-width: 36rem;
}

.hero__body .cta-row {
  margin-top: 0;
  margin-bottom: 0;
}

.hero__body .note {
  margin-top: 0.85rem;
  margin-bottom: 0;
}

@media (min-width: 820px) {
  .hero {
    grid-template-columns: 1.12fr 1fr;
    align-items: stretch;
  }

  .hero__image {
    aspect-ratio: auto;
    height: 100%;
    min-height: 300px;
    max-height: 380px;
  }

  .hero__body {
    padding: 1.75rem 1.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: var(--space);
  margin-bottom: var(--space-lg);
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}

.card--featured {
  border-color: #d8cdb8;
  box-shadow: var(--shadow), inset 3px 0 0 var(--accent);
}

.card h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.card__media {
  float: left;
  width: 5.25rem;
  margin: 0 0.95rem 0.7rem 0;
  border-radius: 3px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.card p {
  margin: 0 0 0.7rem;
  color: var(--muted);
}

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

.card::after {
  content: "";
  display: table;
  clear: both;
}

.schedule {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  clear: both;
}

.schedule li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
}

.schedule time {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  white-space: nowrap;
  font-weight: 700;
}

/* Address band */
.address-band {
  text-align: center;
  padding: 1rem 1.2rem;
  margin-bottom: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.55;
}

.address-band a {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}

.address-band a:hover {
  color: var(--accent);
}

/* Solas strip */
.solas-strip {
  margin: 0;
  padding: 1.15rem 1rem;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.solas-strip p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 46rem;
  margin-inline: auto;
}

.solas-strip .sola {
  white-space: nowrap;
}

@media (max-width: 520px) {
  .solas-strip .sola {
    white-space: normal;
  }
}

/* CTA / buttons */
.cta-row,
.page-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.page-nav-links {
  margin: 0.35rem 0 var(--space-lg);
  max-width: var(--content-max);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.45rem 1.05rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: rgba(122, 59, 59, 0.06);
  color: var(--accent-hover);
  border-color: #d0c6b4;
}

.note {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Interior pages ---------- */
.page-intro {
  margin-bottom: var(--space-lg);
  max-width: var(--content-max);
}

.page-intro h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.8vw, 2.15rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.page-intro p {
  margin: 0 0 0.95rem;
  color: var(--muted);
}

.page-intro p:last-child {
  margin-bottom: 0;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem 1.2rem;
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow);
  max-width: var(--content-max);
}

.toc h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

.toc li {
  margin: 0.3rem 0;
}

.toc a {
  text-decoration: none;
  font-weight: 500;
}

.toc a:hover {
  text-decoration: underline;
}

.glance {
  max-width: var(--content-max);
  margin-bottom: var(--space-lg);
}

.glance h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
}

.glance ul {
  margin: 0 0 0.9rem;
  padding-left: 1.2rem;
  color: var(--muted);
}

.glance li {
  margin: 0.35rem 0;
}

.glance > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.belief {
  max-width: var(--content-max);
  margin-bottom: 2.35rem;
  padding-top: 0.15rem;
  scroll-margin-top: 1rem;
}

.belief h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

.belief h3 {
  margin: 1.15rem 0 0.45rem;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
}

.belief p {
  margin: 0 0 0.95rem;
  color: var(--text);
}

.belief p.muted,
.belief .muted {
  color: var(--muted);
}

.belief blockquote {
  margin: 0 0 0.95rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  font-family: var(--font-serif);
  font-style: italic;
}

.belief ul {
  margin: 0 0 0.95rem;
  padding-left: 1.2rem;
}

.belief li {
  margin: 0.45rem 0;
}

.verse {
  text-align: center;
  margin: 2.25rem 0 0;
  padding: 1.15rem 0.5rem 0;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--muted);
  border-top: 1px solid var(--border);
  max-width: var(--content-max);
  font-size: 0.98rem;
  line-height: 1.5;
}

.section-block {
  max-width: var(--content-max);
  margin-bottom: var(--space-lg);
}

.section-block > h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

.section-block > p {
  margin: 0 0 0.95rem;
  color: var(--text);
}

/* Worship pattern / elements */
.pattern-list {
  list-style: none;
  margin: 0 0 var(--space);
  padding: 0;
  max-width: var(--content-max);
  display: grid;
  gap: 0.65rem;
}

.pattern-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.05rem;
  box-shadow: var(--shadow);
}

.pattern-list strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.pattern-list span {
  color: var(--muted);
  font-size: 0.92rem;
}

.elements {
  max-width: var(--content-max);
  margin: 0 0 var(--space);
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.elements > li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.05rem 1.2rem 1.1rem;
  box-shadow: var(--shadow);
}

.elements h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
}

.elements p {
  margin: 0;
  color: var(--muted);
}

/* Order of service */
.service-flow {
  max-width: var(--content-max);
  margin: 0 0 var(--space);
  padding: 0;
  list-style: none;
  counter-reset: service-step;
  border-left: 2px solid var(--border);
}

.service-flow > li {
  position: relative;
  padding: 0 0 1.2rem 1.3rem;
  counter-increment: service-step;
}

.service-flow > li:last-child {
  padding-bottom: 0;
}

.service-flow > li::before {
  content: counter(service-step);
  position: absolute;
  left: -0.8rem;
  top: 0.12rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.service-flow h2 {
  margin: 0 0 0.3rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  border: none;
  padding: 0;
}

.service-flow p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.service-flow .optional {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.82rem;
  font-family: var(--font-sans);
}

/* Embeds */
.embed {
  margin: 0 0 1.15rem;
  max-width: 52rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.embed--calendar {
  min-height: 26rem;
}

.embed--map {
  aspect-ratio: 4 / 3;
  min-height: 15rem;
}

@media (min-width: 720px) {
  .embed--map {
    aspect-ratio: 16 / 10;
    min-height: 22rem;
  }

  .embed--calendar {
    min-height: 36rem;
  }
}

.embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
}

.embed--calendar iframe {
  min-height: 26rem;
  height: 34rem;
}

@media (min-width: 720px) {
  .embed--calendar iframe {
    min-height: 36rem;
    height: 40rem;
  }
}

.embed--map iframe {
  width: 100%;
  height: 100%;
  min-height: 15rem;
}

/* Roster / contact */
.roster {
  max-width: var(--content-max);
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.roster li {
  display: grid;
  gap: 0.15rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 520px) {
  .roster li {
    grid-template-columns: 9.25rem 1fr;
    align-items: baseline;
  }
}

.roster .label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.roster .value {
  margin: 0;
  color: var(--muted);
}

.contact-grid {
  display: grid;
  gap: var(--space);
  margin-bottom: var(--space-lg);
  max-width: 44rem;
}

@media (min-width: 640px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-card h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.contact-card p {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

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

.media-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.media-list li {
  margin: 0 0 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.media-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.media-list a {
  font-weight: 600;
  text-decoration: none;
}

.media-list a:hover {
  text-decoration: underline;
}

.media-list .note {
  margin-top: 0.2rem;
}

.media-list .secondary {
  font-weight: 500;
  color: var(--muted);
}

.media-list .secondary a {
  font-weight: 500;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.35rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer__inner {
  display: grid;
  gap: 1.35rem;
}

@media (min-width: 640px) {
  .site-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 2.5rem;
  }
}

.site-footer p {
  margin: 0 0 0.3rem;
}

.site-footer p strong {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-links {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.95rem;
}

.footer-meta {
  text-align: left;
}

@media (min-width: 640px) {
  .footer-meta {
    text-align: right;
    padding-top: 0.15rem;
  }
}

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