/* Match the page colour so no white shows when iOS bounces past the edges. */
body.dow-page {
  background-color: #1b2230;
}

/*
 * The section is its own full-screen scroll area. Its background stays still while the content
 * scrolls inside it, which works on iOS where background-attachment: fixed and fixed layers do not.
 */
.dow-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 3rem 0;
  text-align: center;
  background-color: #1b2230;
  background-image: url("../img/dow/background.jpg");
  background-size: cover;
  background-position: center;
}

/* Leave room for the site sidebar on desktop. */
@media (min-width: 1200px) {
  .dow-menu {
    left: 300px;
  }
}

.dow-title {
  color: #e8eef5;
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 0.5rem;
}

.dow-subtitle {
  max-width: 640px;
  margin: 0 auto 2rem auto;
  color: #d3dce6;
  text-shadow: 1px 1px 0 #000;
}

.dow-group {
  max-width: 640px;
  margin: 0 auto 1.5rem auto;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 12px;
}

/*
 * The crossroads card. It keeps the proportions of the printed card and scales with the screen,
 * but grows taller when a card has more text than fits. Text sizes follow the card width.
 */
.dow-card {
  container-type: inline-size;
  width: 100%;
  max-width: 554px;
  aspect-ratio: 554 / 762;
  margin: 0 auto;
  padding: 9% 8% 8% 8%;
  text-align: left;
  color: #2b1d0e;
  background-image: url("../img/dow/crossroad_bg.jpg");
  background-size: 100% 100%;
  border-radius: 6px;
  box-shadow: 3px 3px 0 #000;
}

.dow-card-title,
.dow-card-choice {
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
  text-align: center;
}

.dow-card-title {
  margin-bottom: 0.4em;
  font-size: 28px;
  font-size: 7cqw;
  line-height: 1.1;
}

.dow-card-trigger,
.dow-card-text {
  font-family: "Lucida Bright", Georgia, serif;
  font-weight: 700;
  font-size: 14px;
  font-size: max(12px, 3.1cqw);
  line-height: 1.35;
}

.dow-card-trigger {
  margin-bottom: 0.6em;
  font-style: italic;
}

.dow-card-choice {
  margin-top: 0.6em;
  font-size: 20px;
  font-size: 4.3cqw;
  color: #6b1010;
}

/* Button on the lower part of the card that reveals the choices. */
.dow-reveal {
  display: block;
  width: 100%;
  margin-top: 1em;
  padding: 1.25em 1em;
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  font-size: 18px;
  font-size: 4.3cqw;
  font-weight: 700;
  color: #6b1010;
  background: rgba(107, 16, 16, 0.08);
  border: 2px dashed rgba(107, 16, 16, 0.6);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.dow-reveal:hover,
.dow-reveal:focus {
  background: rgba(107, 16, 16, 0.16);
}

.dow-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.dow-button {
  flex: 0 0 auto;
  min-width: 80px;
  padding: 0.5rem 1rem;
  font-size: 1.75rem;
  line-height: 1;
  color: #e8eef5;
  background: #8b1a1a;
  border: 2px solid #c9d6e3;
  border-radius: 8px;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.dow-button:hover,
.dow-button:focus {
  background: #a82222;
}

.dow-button:active {
  transform: translateY(2px);
}

.dow-counter {
  min-width: 5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #e8eef5;
}
