/* Beth Mardutho — starter stylesheet.
   Palette leans on manuscript tones: parchment, ink, and a deep
   burgundy accent. Refine during the design pass (task 3). */

:root {
  /* Palette. Default is the proposed burgundy; the old site's blue is
     available as an alternative via <html data-palette="blue"> (see the
     draft-phase palette switcher in the footer). */
  --ink: #26211c;
  --parchment: #faf6ef;
  --parchment-deep: #f0e9dc;
  --accent: #6d1a2d;
  --accent-dark: #521323;
  --highlight: #b08d3e;
  --on-accent-soft: #e8d7b0;
  --muted: #6d645a;
  --max-width: 68rem;
}

:root[data-palette="blue"] {
  /* The current bethmardutho.org colors: #2ea3f2 top bar, #006799 accents */
  --parchment: #f7fafc;
  --parchment-deep: #e4edf2;
  --accent: #006799;
  --accent-dark: #004e74;
  --highlight: #2ea3f2;
  --on-accent-soft: #bfe3f7;
  --muted: #5a6b74;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--parchment);
  line-height: 1.65;
}

.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
}
.skip-link:focus { left: 0; z-index: 30; color: #fff; }

/* Header */
.site-header {
  background: var(--accent);
  color: #fff;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}
.brand { text-decoration: none; color: #fff; display: flex; align-items: center; gap: 0.7rem; }
.brand-logo { border-radius: 50%; background: #fff; }
.brand-name { display: block; font-size: 1.35rem; font-weight: 700; letter-spacing: 0.02em; }
.brand-sub { display: block; font-size: 0.85rem; color: var(--on-accent-soft); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.site-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 4px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem;
}
.site-nav a:hover, .site-nav a:focus { background: var(--accent-dark); color: #fff; }

/* Simple CSS-only dropdowns; revisit for touch/keyboard polish in design pass */
.site-nav .has-children { position: relative; }
.site-nav .subnav {
  visibility: hidden;
  opacity: 0;
  /* grace period so the menu survives a diagonal mouse path into it */
  transition: opacity 0.12s ease, visibility 0s linear 0.3s;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 14rem;
  background: var(--accent-dark);
  padding: 0.35rem;
  border-radius: 0 0 6px 6px;
  z-index: 20;
}
.site-nav .has-children:hover .subnav,
.site-nav .has-children:focus-within .subnav {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}
.site-nav .subnav li { width: 100%; }

/* Content */
main { padding-block: 2.5rem 3.5rem; }
img { max-width: 100%; height: auto; }
.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 1.25rem;
  border-left: 4px solid var(--highlight);
  background: var(--parchment-deep);
  font-style: italic;
}
blockquote p:last-child { font-style: normal; color: var(--muted); }

/* Manuscript transcriptions (Mardin Kurkmo letters) */
.transcription {
  font-size: 1.25rem;
  line-height: 2;
  background: #fff;
  border: 1px solid var(--parchment-deep);
  border-radius: 6px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}
.page h1, .hero h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  color: var(--accent);
  border-bottom: 2px solid var(--highlight);
  padding-bottom: 0.4rem;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

.placeholder-note {
  background: var(--parchment-deep);
  border-left: 4px solid var(--highlight);
  padding: 0.75rem 1rem;
  color: var(--muted);
  font-style: italic;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.button:hover, .button:focus { background: var(--accent-dark); color: #fff; }

/* Home hero */
.hero { text-align: center; padding-block: 1rem 2rem; }
.hero h1 { border-bottom: none; font-size: 2.4rem; }
.hero .tagline { font-size: 1.15rem; color: var(--muted); font-style: italic; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  padding: 0;
  list-style: none;
}
.card {
  background: #fff;
  border: 1px solid var(--parchment-deep);
  border-radius: 6px;
  padding: 1.25rem;
}
.card h2, .card h3 { margin-top: 0; color: var(--accent); font-size: 1.15rem; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #d8d2c8;
  margin-top: 2rem;
  font-size: 0.92rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2rem 1rem;
}
.footer-name { font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
.footer-tagline { font-style: italic; margin-top: 0; }
.site-footer a { color: var(--on-accent-soft); }
.site-footer a:hover, .site-footer a:focus { color: #fff; }
.site-footer nav ul { list-style: none; padding: 0; margin: 0; }
.site-footer nav li { margin-bottom: 0.35rem; }
.footer-legal { border-top: 1px solid #3a342d; padding-block: 0.75rem; color: var(--muted); }

@media (max-width: 640px) {
  /* no hover on touch; show flat list */
  .site-nav .subnav { position: static; min-width: 0; visibility: visible; opacity: 1; }
}

/* PayPal buttons are POST forms styled like links */
.paypal-form { display: inline-block; margin: 0.25rem 0; }
.paypal-form .button {
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* Home feature tiles */
.tile-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  padding: 0;
  list-style: none;
}
.tile { flex: 0 1 19rem; min-width: 14rem; }
.tile a {
  display: block;
  background: #fff;
  border: 1px solid var(--parchment-deep);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  height: 100%;
}
.tile a:hover, .tile a:focus { border-color: var(--highlight); }
.tile img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.tile-label { padding: 0.7rem 1rem 0.9rem; }
.tile-label strong { display: block; color: var(--accent); font-size: 1.05rem; }
.tile-label span { color: var(--muted); font-size: 0.9rem; }

/* Collapsible link sections (home page) */
details.link-section {
  background: #fff;
  border: 1px solid var(--parchment-deep);
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  margin: 0.75rem 0;
}
details.link-section summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent);
  font-family: "Helvetica Neue", Arial, sans-serif;
}
details.link-section ul { columns: 2; column-gap: 2rem; padding-left: 1.25rem; margin: 0.75rem 0 0.5rem; }
details.link-section li { margin-bottom: 0.4rem; break-inside: avoid; }
@media (max-width: 640px) { details.link-section ul { columns: 1; } }

/* Draft-phase palette switcher (removed automatically at launch via site.noindex) */
.palette-switcher {
  text-align: center;
  padding-block: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid #3a342d;
}
.palette-switcher button {
  background: none;
  border: 1px solid var(--muted);
  color: var(--on-accent-soft);
  border-radius: 4px;
  padding: 0.15rem 0.7rem;
  margin-inline: 0.2rem;
  cursor: pointer;
  font-size: 0.85rem;
}
.palette-switcher button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.section-heading {
  color: var(--accent);
  border-bottom: 2px solid var(--highlight);
  padding-bottom: 0.3rem;
  margin-top: 2.5rem;
}
