/* ==========================================================================
   The front page
   St. Martin de Porres

   Leans entirely on the variables in app.css and the components in
   family.css. Nothing new is invented here - it is the same parish, and it
   should look like it whether somebody is reading a consent form or deciding
   whether this site is real.
   ========================================================================== */

body.home { background: var(--surface); }

/* Staff only. Never rendered for a parent. */
.homestale {
  margin: 0;
  padding: var(--s3) var(--s4);
  background: var(--warn-pale);
  border-bottom: 1px solid #E8D3A8;
  color: var(--warn);
  font-size: 13.5px;
  text-align: center;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.homehero {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: var(--s6) var(--s4) var(--s6);
}

.homehero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.homehero__title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: var(--s2) 0 var(--s2);
}

.homehero__lede {
  font-size: 15px;
  color: var(--slate);
  line-height: 1.6;
  max-width: 48ch;
  margin: 0 auto var(--s5);
}

/* --------------------------------------------------------------------------
   The two doors

   Parents in ink, staff in paper. Not decoration: for every catechist who
   signs in, ten parents do, and everybody who arrives from a printed slip is
   a parent. The weight should say so before anybody reads a word.
   -------------------------------------------------------------------------- */

.homedoors {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  max-width: 620px;
  margin: 0 auto;
}

.homedoor {
  flex: 1;
  border-radius: var(--radius);
  padding: var(--s5);
  text-align: left;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.homedoor h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin: var(--s2) 0 var(--s1);
}

.homedoor p {
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0 0 var(--s4);
}

.homedoor__btn { width: 100%; }

.homedoor__second {
  display: block;
  text-align: center;
  margin-top: var(--s3);
  font-size: 13px;
  text-decoration: none;
}

.homedoor--parents {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-lift);
}
.homedoor--parents svg { color: var(--masthead-gold); }
.homedoor--parents h2  { color: #fff; }
.homedoor--parents p   { color: var(--masthead-text); }
.homedoor--parents .fambtn {
  background: #fff; color: var(--ink); border-color: #fff;
}
.homedoor--parents .fambtn:hover { background: var(--rule-soft); border-color: var(--rule-soft); }
.homedoor--parents .homedoor__second { color: var(--masthead-gold); }
.homedoor--parents .homedoor__second:hover { text-decoration: underline; }

.homedoor--staff svg { color: var(--rubric); }
.homedoor--staff h2  { color: var(--ink); }
.homedoor--staff p   { color: var(--slate); }
.homedoor__second--mute { color: var(--slate-pale); }

/* --------------------------------------------------------------------------
   Body
   -------------------------------------------------------------------------- */

.homegrid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--s5) var(--s4) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s4);

  /* Cards size to their content instead of stretching to match the tallest
     one in the row. An empty news panel should not force a wall of white
     down the side of it. */
  align-items: start;
}

.homecard {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--s5);
}

.homecard--tight { padding: var(--s4); }

.homecard__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s3);
}

.homecard__head h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.homeside { display: grid; gap: var(--s4); align-content: start; }

/* --------------------------------------------------------------------------
   News
   -------------------------------------------------------------------------- */

.homenews {
  padding: var(--s3) 0;
  border-top: 1px solid var(--rule-soft);
}
.homenews:first-of-type { border-top: 0; padding-top: 0; }

.homenews__meta {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 0 0 var(--s1);
  font-size: 12px;
  color: var(--slate-pale);
}

.homenews h3 {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--s1);
  line-height: 1.35;
}

.homenews__body {
  margin: 0;
  font-size: 14px;
  color: var(--slate);
  line-height: 1.6;
}

/* Said quietly. A notice nobody can read is worse than one in the other
   language, but the reader should still know why it looks odd. */
.homenews__lang {
  margin: var(--s1) 0 0;
  font-size: 12px;
  color: var(--slate-pale);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Requirements

   The one thing on this page a family genuinely has to know, so it is the one
   thing that is not white.
   -------------------------------------------------------------------------- */

.homereq {
  background: var(--rubric-pale);
  border: 1px solid #DCC79A;
  border-radius: var(--radius);
  padding: var(--s4);
}

.homereq__row {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  margin-top: var(--s2);
  font-size: 13.5px;
  color: var(--slate);
  line-height: 1.5;
}

.homereq__n {
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  flex: none;
}

/* --------------------------------------------------------------------------
   Lists of times and levels
   -------------------------------------------------------------------------- */

.homelist {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s2) 0;
  border-top: 1px solid var(--rule-soft);
  font-size: 14px;
  color: var(--ink);
}
.homelist:first-of-type { border-top: 0; }

.homelist__sub {
  display: block;
  font-size: 12px;
  color: var(--slate-pale);
}

.homelang {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--field);
  border: 1px solid var(--rule);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--slate-pale);
  letter-spacing: .06em;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.homefoot { background: var(--ink); color: var(--masthead-text); margin-top: var(--s7); }

.homefoot__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--s6) var(--s4) var(--s5);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s4);
}

.homefoot__rubric {
  display: block;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--masthead-gold);
  font-weight: 600;
  margin-bottom: var(--s1);
}

.homefoot p { margin: 0; font-size: 13.5px; line-height: 1.7; }
.homefoot a { color: var(--masthead-text); }
.homefoot a:hover { color: #fff; }

.homefoot__bar {
  background: var(--ink-deep);
  padding: var(--s3) var(--s4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  justify-content: space-between;
  font-size: 12.5px;
  color: #8FA0C4;
}
.homefoot__bar a { color: #8FA0C4; }

/* --------------------------------------------------------------------------
   Wider screens
   -------------------------------------------------------------------------- */

@media (min-width: 620px) {
  .homedoors { flex-direction: row; }
  .homedoor__btn { width: 100%; }
}

@media (min-width: 821px) {
  .homehero { padding: var(--s8) var(--s4) var(--s7); }
  .homehero__title { font-size: 34px; }
  .homehero__lede { font-size: 16px; }

  /* Both rows share one column ruler, so the four cards line up down the
     page instead of each row picking its own proportions. */
  .homegrid,
  .homegrid--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); }

  .homefoot__inner { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
}
