/* Siddur Duo — site styles.
   Palette mirrors the app's "Dawn" theme; dark mode mirrors "Midnight". */

:root {
  color-scheme: light dark;
  --bg: #fbf6f0;
  --bg-tint: #f4ece3;
  --card: #ffffff;
  --text: #2a2320;
  --muted: #6e615b;
  --accent: #8c3a5c;
  --accent-soft: rgba(140, 58, 92, 0.1);
  --hairline: rgba(42, 35, 32, 0.12);
  --shadow: 0 10px 30px rgba(42, 35, 32, 0.07);
  --radius: 18px;
  --measure: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10131a;
    --bg-tint: #161b24;
    --card: #171c25;
    --text: #ece8e3;
    --muted: #a49d96;
    --accent: #d38aa6;
    --accent-soft: rgba(211, 138, 166, 0.14);
    --hairline: rgba(236, 232, 227, 0.14);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
  font: 600 17px/1 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  letter-spacing: 0.01em;
}

.brand svg { width: 26px; height: 26px; display: block; }

nav.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

nav.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 7px 11px;
  border-radius: 999px;
}

nav.site-nav a:hover { color: var(--text); background: var(--accent-soft); }

nav.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

/* ---------- typography ---------- */

h1, h2, h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 { font-size: clamp(30px, 5vw, 40px); }

h2 {
  font-size: 20px;
  margin: 0 0 10px;
}

h3 { font-size: 16px; margin: 0 0 4px; }

p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }

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

.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.lede {
  font-size: 17.5px;
  color: var(--muted);
  margin: 14px 0 0;
}

.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }

/* ---------- layout ---------- */

main { padding: 40px 0 56px; }

.page-head { margin-bottom: 28px; }

.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 16px; }

.section { margin-top: 30px; }

.section > h2 { margin-bottom: 12px; }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 26px;
}

.grid .card { margin-top: 0; }

.grid .card a.more { font-weight: 600; text-decoration: none; }

.grid .card a.more:hover { text-decoration: underline; }

/* ---------- list rows ---------- */

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

ul.plain li {
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
}

ul.plain li:last-child { border-bottom: 0; }

ul.bullets { margin: 0 0 14px; padding-left: 20px; }

ul.bullets li { margin-bottom: 6px; }

/* ---------- faq ---------- */

details {
  border-bottom: 1px solid var(--hairline);
  padding: 14px 0;
}

details:last-of-type { border-bottom: 0; }

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

summary::-webkit-details-marker { display: none; }

summary::before {
  content: "+";
  color: var(--accent);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  width: 12px;
  flex: none;
}

details[open] summary::before { content: "\2013"; }

details p {
  margin: 8px 0 0 22px;
  color: var(--muted);
  font-size: 15px;
}

details p:last-child { margin-bottom: 4px; }

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: 0;
}

.button:hover { filter: brightness(1.06); }

@media (prefers-color-scheme: dark) {
  .button { color: #171c25; }
}

.button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: 13.5px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: space-between;
}

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

.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- misc ---------- */

.hero-mark {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: var(--bg-tint);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.hero-mark svg { width: 34px; height: 34px; }

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
}

.kv { width: 100%; border-collapse: collapse; font-size: 14.5px; }

.kv th, .kv td {
  text-align: left;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

.kv th { font-weight: 600; width: 38%; color: var(--muted); }

.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }

code {
  font: 13.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: 5px;
}

hr { border: 0; border-top: 1px solid var(--hairline); margin: 26px 0; }

@media (max-width: 520px) {
  body { font-size: 15.5px; }
  .card { padding: 18px; }
  main { padding: 28px 0 44px; }
}
