/* style.css — the PAINT. Colors, fonts, sizes and layout. */

/* Colors used everywhere, defined once so they are easy to change */
:root {
  --paper: #fbe3d1;      /* peach */
  --ink: #2b2620;
  --muted: #7a6f63;
  --line: #ecc9b2;
  --card: #ffffff;
  --accent: #2f5d8a;      /* blue */
  --meeting: #dce8f5;     /* light blue for discussion days */
  --today: #fff1c9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, sans-serif;
  line-height: 1.45;
}

h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; margin: 0; }
a { color: var(--accent); }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: end;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line);
}
.site { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.topbar h1 { font-size: 2.4rem; line-height: 1; }
.subtitle { margin: .2rem 0 0; color: var(--muted); font-style: italic; }
.controls { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
select, button {
  font: inherit; padding: .45rem .8rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
button { background: var(--accent); color: #fff; border-color: var(--accent); cursor: pointer; }

main { max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem 3rem; }

/* ---------- Month cards: one row that scrolls sideways on phones ---------- */
.months { display: flex; gap: .6rem; overflow-x: auto; padding: .5rem 0 1rem; }
.month-card {
  flex: 0 0 auto; min-width: 7.5rem; text-align: left; cursor: pointer;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: .6rem .8rem;
}
.month-card strong { display: block; font-family: "Cormorant Garamond", serif; font-size: 1.25rem; }
.month-card span { font-size: .8rem; color: var(--muted); }
.month-card.selected { border: 2px solid var(--accent); }

.month-title { font-size: 2rem; margin: .5rem 0 1rem; }

/* ---------- Week cards ---------- */
.weeks {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  margin-bottom: 2rem;
}
.week-card {
  background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(60, 40, 20, .08);
  display: flex; flex-direction: column;
}
.week-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.week-body { padding: .9rem 1rem; flex: 1; }
.week-number { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.week-card h3 { font-size: 1.45rem; line-height: 1.15; margin: .15rem 0 .5rem; }
.truth { font-style: italic; margin: .5rem 0; }
.facts { margin: 0; font-size: .9rem; }
.facts dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 0 0 .35rem; }
.outline { color: #fff; font-size: .8rem; padding: .5rem 1rem; }  /* background color comes from the data */

/* ---------- Calendar grid: 7 columns, Sunday to Saturday ---------- */
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekday { font-weight: 600; text-align: center; font-size: .8rem; color: var(--muted); padding: .3rem 0; }
.day {
  background: var(--card); border-radius: 6px; padding: .45rem; min-height: 8.5rem;
  font-size: .82rem; border-top: 4px solid transparent;  /* top stripe = outline color */
  display: flex; flex-direction: column;   /* stack the contents so the marker can sit at the bottom */
}
.day.empty { background: transparent; }
.day.today { background: var(--today); outline: 2px solid var(--accent); }
.date { font-weight: 600; color: var(--muted); }
.phrase { font-weight: 600; margin: .2rem 0 .3rem; }
.passage { margin-bottom: .25rem; }
.also { font-size: .75rem; color: var(--muted); }
.marker { margin-top: auto; padding-top: .3rem; font-size: .72rem; color: var(--muted); letter-spacing: .04em; }
.meeting { background: var(--meeting); border-top-color: var(--accent); }
.meeting .phrase { color: var(--accent); }

/* Phones: the calendar becomes a simple list of days */
@media (max-width: 700px) {
  .calendar { grid-template-columns: 1fr; }
  .weekday, .day.empty { display: none; }
  .day { min-height: 0; }
}

/* ---------- "Read all" button and pop-up ---------- */
.read-all {
  align-self: flex-start; margin-top: .35rem; padding: .15rem .55rem;
  font-size: .72rem; border-radius: 999px;
  background: #eef3f8; color: var(--accent); border: 1px solid #d6e2ee;   /* quiet light blue */
}
.read-all:hover { background: #dce8f5; }
.reading-dialog {
  border: none; border-radius: 14px; padding: 1.5rem 1.75rem; max-width: 30rem; width: 90vw;
  background: var(--card); color: var(--ink); box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.reading-dialog::backdrop { background: rgba(40, 30, 20, .45); }
.reading-dialog h3 { font-size: 1.4rem; padding-right: 2rem; }
.reading-dialog ul { padding-left: 1.2rem; line-height: 1.9; }
.reading-dialog .close {
  position: absolute; top: .6rem; right: .7rem; background: none; border: none;
  color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer;
}

.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem; }
