/* aricnesheim.com — stylesheet v2
   Clean modern base with a typographic personality: Fraunces display serif
   for headings, Inter for body, one accent color per class. */

:root {
  --bg: #fdfdfc;
  --bg-soft: #f5f5f2;
  --text: #1d1f24;
  --muted: #626977;
  --border: #e6e5e0;
  --accent: #4338ca;        /* default (home): indigo */
  --accent-soft: #edeffb;
}

body[data-page="history"]    { --accent: #b45309; --accent-soft: #fbf1e4; }
body[data-page="theology"]   { --accent: #1d4ed8; --accent-soft: #e8eefc; }
body[data-page="literature"] { --accent: #15803d; --accent-soft: #e7f4ec; }
body[data-page="choir"]      { --accent: #7e22ce; --accent-soft: #f4ebfb; }

* { box-sizing: border-box; }

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

::selection { background: var(--accent-soft); }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, .brand {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(253, 253, 252, 0.93);
  backdrop-filter: blur(8px);
  border-top: 4px solid var(--accent);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 860px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

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

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

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

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ---------- hero / page-head band ---------- */

.band {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2.1rem 2.2rem 1.9rem;
  margin-bottom: 2rem;
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-soft) 0%, rgba(255, 255, 255, 0) 62%),
    var(--bg);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-size: 2.7rem;
  line-height: 1.08;
  margin: 0 0 0.6rem;
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
  max-width: 44rem;
}

.meta {
  font-size: 0.92rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0;
}

h2 {
  font-size: 1.45rem;
  margin: 0 0 0.6rem;
}

section + section { margin-top: 1.6rem; }

/* ---------- cards ---------- */

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem 1.5rem;
}

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

.note-card {
  border-left: 4px solid var(--accent);
  background: linear-gradient(100deg, var(--accent-soft) 0%, #fff 55%);
}

/* ---------- class grid (home) ---------- */

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

.class-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.35rem 1.4rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 130ms ease, transform 130ms ease, box-shadow 130ms ease;
}

.class-card:hover {
  border-color: var(--card-accent, var(--accent));
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(29, 31, 36, 0.07);
}

.class-card .icon {
  width: 30px;
  height: 30px;
  color: var(--card-accent, var(--accent));
  margin-bottom: 0.55rem;
}

.class-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
  color: var(--card-accent, var(--accent));
}

.class-card p { margin: 0 0 0.4rem; font-size: 0.95rem; }

.class-card .when {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.class-card.history    { --card-accent: #b45309; }
.class-card.theology   { --card-accent: #1d4ed8; }
.class-card.literature { --card-accent: #15803d; }
.class-card.choir      { --card-accent: #7e22ce; }

/* ---------- links ---------- */

ul.links { padding-left: 1.2rem; margin: 0; }
ul.links li { margin: 0.3rem 0; }

a { color: var(--accent); text-underline-offset: 3px; }

/* ---------- choir: piece cards ---------- */

.piece {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin-top: 1rem;
}

.piece h3 { margin: 0 0 0.2rem; font-size: 1.35rem; }

.piece-meta {
  margin: 0 0 1.1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.part-group-label {
  margin: 1.1rem 0 0.2rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.part-grid { border-top: 1px solid var(--border); }

.part-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.part-name { font-weight: 600; font-size: 0.97rem; }

.part-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.part {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.42rem 1rem;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.part::before { content: "▶ "; font-size: 0.72em; }

.part:hover { border-color: var(--accent); }

.part.playing { background: var(--accent); color: #fff; }

.part.playing::before { content: "❙❙ "; }

.part.paused { border-color: var(--accent); }

.part.unavailable {
  color: var(--muted);
  background: var(--bg-soft);
}

.part.unavailable::before { content: ""; }

.score-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.42rem 1rem;
  transition: border-color 120ms ease, color 120ms ease;
}

/* the music note belongs to choir score buttons only */
body[data-page="choir"] .part-actions .score-btn::before {
  content: "♪ ";
  margin-right: 0.3rem;
  color: var(--accent);
}

.score-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- choir: player bar ---------- */

.player-bar {
  display: none;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.1rem;
}

.player-bar.active { display: flex; }

.now-playing {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.scrub { flex: 1; accent-color: var(--accent); }

.time {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.player-msg {
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.speed {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  cursor: pointer;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: color 120ms ease, border-color 120ms ease;
}

.speed:hover { color: var(--accent); border-color: var(--accent); }

.speed.slowed {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- choir: inline score viewer ---------- */

.score-viewer {
  margin-top: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.score-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.score-title { font-weight: 600; font-size: 0.92rem; }

.score-close {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  cursor: pointer;
}

.score-close:hover { color: var(--accent); border-color: var(--accent); }

.score-frame {
  display: block;
  width: 100%;
  height: 72vh;
  min-height: 460px;
  border: 0;
}

/* ---------- document cards (PDF readers) ---------- */

.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.doc-title { margin: 0; font-weight: 600; }

.doc-meta {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.doc-actions { display: flex; gap: 0.5rem; }

.doc-actions a[download]::before { content: "↓ "; margin-right: 0.3rem; color: var(--accent); }

.year-teaser {
  position: relative;
  overflow: hidden;
}

.year-teaser::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, #b45309 0 25%, #1d4ed8 25% 50%, #15803d 50% 75%, #7e22ce 75% 100%);
}

.year-teaser .eyebrow { margin-bottom: 0.35rem; }
.year-teaser h2 { margin-bottom: 0.3rem; }
.year-teaser .doc-meta { max-width: 35rem; }

/* ---------- homework at a glance (home) ---------- */

.hw-row {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.hw-row:last-of-type { border-bottom: 0; padding-bottom: 0; }

.hw-class { margin: 0 0 0.15rem; }

.hw-class a {
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}

.hw-row.history a    { color: #b45309; }
.hw-row.theology a   { color: #1d4ed8; }
.hw-row.literature a { color: #15803d; }
.hw-row.choir a      { color: #7e22ce; }

.hw-item { margin: 0.15rem 0 0; font-size: 0.95rem; }

/* ---------- "the road ahead" loose calendar ---------- */

.up-note {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.up-row {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.up-row:last-of-type { border-bottom: 0; }

.up-date {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.up-what { margin: 0.15rem 0 0; }

.up-due {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  color: #b42318;
}

.up-due .due-label { font-weight: 700; }

.up-due-none { color: var(--muted); }

.up-notes {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.up-more { margin-top: 0.9rem; cursor: pointer; }

/* ---------- contact form ---------- */

.field { margin-top: 1rem; }

.field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 0.97rem;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.55;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #b42318;
}

.field-error {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: #b42318;
}

.form-actions { margin-top: 1.2rem; }

.send-btn {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.55rem 1.35rem;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.send-btn:hover { opacity: 0.88; }

.form-status {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.address-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

.address {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--accent);
  overflow-wrap: anywhere;
}

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

footer {
  border-top: 1px solid var(--border);
  padding: 1.6rem 1.25rem 2.6rem;
  background: var(--bg-soft);
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- small screens ---------- */

.nav-short { display: none; }

@media (max-width: 560px) {
  .nav-tail, .nav-long { display: none; }
  .nav-short { display: inline; }
  .nav-links a { font-size: 0.88rem; padding: 0.28rem 0.5rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.05rem; }
  .band { padding: 1.6rem 1.3rem 1.4rem; }
  main { padding-top: 1.5rem; }
  .part-row { flex-wrap: wrap; }
}
