/* ==========================================================================
   Great Garden Buffet: home page
   --------------------------------------------------------------------------
   The hero, the "today at the buffet" board, the price tables, and the two
   columns at the bottom. Only index.html loads this.

   Needs base.css and chrome.css loaded first.
   ========================================================================== */


/* --------------------------------------------------------------------------
   Hero, over the photo
   -------------------------------------------------------------------------- */

.hero-band {
  color: var(--on-dark);
}

/* The dark wash over the photo. Raise these numbers if a new photo is bright
   enough to make the white heading hard to read. */
.hero-band::after {
  background: linear-gradient(rgba(18, 15, 16, 0.45), rgba(18, 15, 16, 0.8));
}

.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-block: clamp(2.5rem, 7vw, 5.5rem);
}

.hero h1 {
  max-width: 13em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.hero .lede {
  color: var(--on-dark);
}

/* Wide screens put the board beside the heading instead of underneath. */
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
    gap: 3.5rem;
  }
}


/* --------------------------------------------------------------------------
   Today board: a light sign on the dark wall.
   Everything inside it is filled in by js/site.js from js/data.js.
   -------------------------------------------------------------------------- */

.board {
  position: relative;
  padding: 1.6rem 1.6rem 1.4rem;
  border: 3px solid var(--red);
  border-radius: 6px;
  outline: 1px solid var(--red);      /* the thin inner line */
  outline-offset: -10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.board-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
}

.board-top h2 {
  margin: 0;
  font-size: 1.5rem;
}


/* Open or closed, with a dot in front. Also used on the contact page. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin: 0;
  font-weight: 600;
}

.status::before {
  content: "";
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--muted);
}

.status.is-open {
  color: var(--jade);
}

.status.is-open::before {
  background: var(--jade);
}

.status.is-closed {
  color: var(--red);
}

.status.is-closed::before {
  background: var(--red);
}


/* What's being served right now, and what it costs. */
.serving {
  display: flex;
  flex-direction: column;
  margin: 1.1rem 0 1.4rem;
}

.serving-label {
  font-size: 0.95rem;
  color: var(--muted);
}

.serving-meal {
  font-size: 1.3rem;
  font-weight: 600;
}

.serving-price {
  font-family: var(--deco);
  font-size: 2.4rem;
  line-height: 1.2;
  color: var(--red);
}

.serving-price small {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--muted);
}


/* --------------------------------------------------------------------------
   Timeline of today's buffet sittings
   The segments are positioned in percentages by site.js, so a sitting that
   runs 11am to 3pm lands in the right part of the bar on its own.
   -------------------------------------------------------------------------- */

.timeline {
  margin-bottom: 1.3rem;
}

/* The hatched stripes show hours when the buffet line isn't running. */
.bar {
  position: relative;
  height: 3.6rem;
  border-radius: 3px;
  background: repeating-linear-gradient(135deg, var(--paper) 0 5px, var(--stone) 5px 7px);
  box-shadow: inset 0 0 0 1px var(--rule);
}

.seg {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-inline: 0.7rem;
  overflow: hidden;
  border-right: 2px solid var(--paper);
  background: var(--stone);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.2;
}

.seg:last-of-type {
  border-right: 0;
}

/* keeps the label above the "now" line */
.seg span,
.seg b {
  position: relative;
  z-index: 2;
}

.seg b {
  font-size: 1.05rem;
}

/* the sitting happening right now */
.seg.is-now {
  background: var(--red);
  color: #fff;
}

/* the line marking the current time */
.now-marker {
  position: absolute;
  z-index: 1;
  top: -7px;
  bottom: -7px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--ink);
}

.now-marker::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: var(--ink);
}

/* clock times under the bar */
.ticks {
  position: relative;
  height: 1.5em;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.ticks span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.ticks .first {
  transform: none;                /* keep the opening time inside the bar */
}

.ticks .last {
  transform: translateX(-100%);   /* and the closing time too */
}

/* kids' prices and the seniors note, along the bottom of the board */
.kids {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--rule);
  list-style: none;
  font-size: 1rem;
}


/* --------------------------------------------------------------------------
   Full width sections below the hero
   -------------------------------------------------------------------------- */

.band {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.band-paper {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.prices-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .prices-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 4rem;
  }
}


/* --------------------------------------------------------------------------
   Buffet price table. Rows come from priceTable in js/data.js.
   -------------------------------------------------------------------------- */

.price-table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
  border-top: 3px solid var(--red);
}

.price-table th,
.price-table td {
  padding: 0.75rem 0.5rem 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.price-table th {
  font-weight: 600;
  white-space: nowrap;
}

.price-table td {
  color: var(--muted);
}

.price-table .num {
  padding-right: 0;
  text-align: right;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.2rem;
}

.price-table .kids-row th,
.price-table .kids-row td {
  font-size: 1rem;
}

/* On narrow screens each row stacks: meal and price on one line, when it's
   served on the next, so nothing gets squeezed. */
@media (max-width: 600px) {
  .price-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--rule);
  }

  .price-table th,
  .price-table td {
    padding: 0;
    border: 0;
  }

  .price-table th {
    grid-row: 1;
    grid-column: 1;
  }

  .price-table .num {
    grid-row: 1;
    grid-column: 2;
  }

  .price-table td:not(.num) {
    grid-row: 2;
    grid-column: 1 / -1;
    font-size: 1rem;
  }
}


/* --------------------------------------------------------------------------
   Buffet to go, priced by the pound. Sits in a .card (base.css).
   -------------------------------------------------------------------------- */

.togo-list {
  margin: 0 0 1rem;
  padding: 0;
  border-top: 3px solid var(--red);
  list-style: none;
}

.togo-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.togo-list .num {
  font-weight: 600;
}


/* --------------------------------------------------------------------------
   Two columns at the bottom: takeout menu, and party orders
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  gap: 2.5rem;
  padding-inline: var(--gutter);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.split p {
  max-width: 32em;
}
