/* The Ministry of Lunch: slogan and portrait, the Five-Tin Plan, and the wall the calculator hangs on.
   The green is sampled from the Five-Tin Plan painting so the picture sits in the page. */

.ministry {
  --focus: var(--gold);
  padding: clamp(3.5rem, 8vw, 7rem) 0;
  border-top: 6px solid var(--gold);
  background-color: var(--ministry);
  background-image: var(--grain);
  color: var(--ministry-cream);
}

.ministry__head {
  display: grid;
  gap: 3rem clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.ministry__office {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
}

.ministry__emblem {
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
}

.ministry__title {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  font-size: clamp(4.25rem, 21vw, 9rem);
}

.ministry__lede {
  max-width: 31em;
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
}

/* Bangkok time and what the Ministry makes of it. Filled in by ministry.js. */
.ministry__status {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.65rem;
  margin-top: 1.5rem;
  padding: 0.55rem 0.9rem;
  border: 1.5px solid rgba(255, 240, 200, 0.5);
  font-weight: 500;
  line-height: 1.3;
}

.ministry__status[hidden] {
  display: none;
}

.ministry__status time {
  color: var(--gold);
  font-weight: 800;
  font-stretch: 75%;
  font-variant-numeric: tabular-nums;
}

/* The portrait: a print pasted to the wall, a little off true. */
.ministry__poster {
  justify-self: center;
  width: min(100%, 31rem);
  rotate: 1.6deg;
}

.ministry__poster img {
  width: 100%;
  border: 0.55rem solid var(--label-cream);
  box-shadow: 0 1.4rem 2.2rem rgba(6, 22, 15, 0.5);
}

.ministry__poster figcaption {
  margin-top: 0.9rem;
  color: rgba(255, 240, 200, 0.82);
  font-size: 0.9375rem;
}

@media (min-width: 36em) {
  .ministry__title {
    font-size: clamp(7rem, 19vw, 11rem);
  }
}

@media (min-width: 60em) {
  .ministry__head {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }

  .ministry__title {
    font-size: clamp(6.5rem, 12.4vw, 14.5rem);
  }
}

/* ---------- Staff of the Ministry ---------- */

.roster__title {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
}

.roster {
  display: grid;
  gap: 1.75rem clamp(1.5rem, 4vw, 4rem);
  margin-top: 1.25rem;
}

.roster li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  padding-top: 1.25rem;
  border-top: 2px solid currentColor;
}

.roster img {
  width: 5.25rem;
  height: 5.25rem;
  border: 3px solid var(--label-cream);
  border-radius: 50%;
}

/* The Minister is shown by her seal, which brings its own ring. */
.roster__lead img {
  width: 6.75rem;
  height: 6.75rem;
  border: 0;
}

.roster__name {
  font-size: 1.875rem;
}

.roster__post {
  margin-top: 0.2rem;
  color: var(--gold);
  font-weight: 700;
}

.roster__duty {
  max-width: 24em;
  margin-top: 0.45rem;
  font-size: 0.9375rem;
  line-height: 1.45;
}

@media (min-width: 52em) {
  .roster {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* ---------- The Five-Tin Plan ---------- */

.plan {
  display: grid;
  gap: 1.5rem clamp(2rem, 5vw, 5rem);
  align-items: center;
  margin-top: clamp(3rem, 7vw, 6rem);
}

.plan__art img {
  width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 93%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 93%, transparent);
}

.plan__copy {
  padding-inline: var(--gutter);
}

.plan__title {
  font-size: clamp(2.25rem, 1.2rem + 4.4vw, 4.75rem);
}

.plan__copy > p {
  max-width: 26em;
  margin-top: 1rem;
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.375rem);
  line-height: 1.45;
}

.plan__manifest {
  max-width: 30rem;
  margin: 1.75rem 0 1.1rem;
  border-top: 2px solid currentColor;
}

.plan__manifest li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 240, 200, 0.35);
  font-weight: 500;
}

.plan__manifest b {
  flex: none;
  min-width: 1.4rem;
  color: var(--gold);
  font-size: 2.75rem;
  line-height: 1;
}

.plan__price {
  margin-bottom: 1.6rem;
  font-weight: 500;
}

.plan__price .soon-tag {
  margin-left: 0.6rem;
  vertical-align: 0.35em;
}

.plan__price b {
  margin-right: 0.35rem;
  color: var(--gold);
  font-size: 2.75rem;
  line-height: 1;
}

/* Wide screens: copy on the left, the box running off the right-hand edge. */
@media (min-width: 60em) {
  .plan {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  }

  .plan__art {
    order: 2;
  }

  .plan__art img {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 93%, transparent), linear-gradient(to right, transparent, #000 5%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 93%, transparent), linear-gradient(to right, transparent, #000 5%);
    mask-composite: intersect;
  }

  .plan__copy {
    padding-right: 0;
    padding-left: max(var(--gutter), (100vw - var(--max)) / 2);
  }

  .plan__title {
    font-size: clamp(2.25rem, 4.2vw, 4.5rem);
    white-space: nowrap;
  }
}
