/* Monopolization – shared styles for every page of this site.
   Linked as style.css?v=N : raise N in every page when this file changes,
   so visitors do not keep seeing old styles. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid #233f23; outline-offset: 3px; }

/* ───────────────────────── Front page ───────────────────────── */
.home {
  --blue: #a2bde8;   /* the page's own colour */
  --navy: #1c3660;   /* the page's own text colour */
  --tan: #e2d489;    /* box lid */
  --green: #233f23;  /* money bag */
  --gold: #e8b41c;   /* dollar sign */
  --ink: #1c3660;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vh, 40px) clamp(16px, 4vw, 64px);
  background-color: var(--blue);
  color: var(--ink);
  font-family: "Times New Roman", Times, Georgia, serif;
}
.hero {
  width: 100%;
  max-width: 1320px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, clamp(320px, 30vw, 440px));
  align-items: center;
  gap: clamp(24px, 5vw, 88px);
}
.box {
  position: relative;
  display: block;
  justify-self: center;
  width: min(100%, calc((100vh - 96px) * 1286 / 1250));
  max-width: 780px;
  aspect-ratio: 1286 / 1250;
}
/* the two pictures take turns: they swap every 3 seconds, with a 0.3 second cross-fade */
.box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 14px rgba(16, 30, 60, .35));
  animation: box-turn 6s ease-in-out infinite;
}
.box .second { opacity: 0; animation-name: box-turn-second; }
@keyframes box-turn {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes box-turn-second {
  0%, 45% { opacity: 0; }
  50%, 95% { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .box img { animation-timing-function: step-end; }
}
.panel { text-align: center; }
.home h1 {
  margin: 0;
  font-size: clamp(28px, 2.9vw, 44px);
  line-height: 1.05;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.rule {
  width: 72%;
  height: 0;
  margin: clamp(10px, 1.6vh, 16px) auto;
  border: 0;
  border-top: 3px double var(--navy);
}
.tag {
  margin: 0 auto;
  max-width: 34em;
  font-size: clamp(15px, 1.15vw, 17.5px);
  line-height: 1.45;
  font-weight: bold;
}
.links {
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.25vh, 12px);
  margin-top: clamp(14px, 2.4vh, 24px);
}
.links a {
  display: block;
  padding: clamp(8px, 1.35vh, 12px) 16px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: var(--navy);
  color: var(--tan);
  font-size: clamp(16px, 1.45vw, 21px);
  font-weight: bold;
  letter-spacing: .05em;
  text-decoration: none;
  box-shadow: 0 3px 0 rgba(10, 20, 40, .4);
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.links a:hover { background: var(--green); border-color: var(--green); color: var(--gold); transform: translateY(-1px); }
.links a:active { transform: translateY(2px); box-shadow: none; }
.links a.play { font-size: clamp(18px, 1.7vw, 24px); }
.links a.unavailable {
  background: rgba(28, 54, 96, .1);
  border-style: dashed;
  color: var(--ink);
  box-shadow: none;
}
.links a.unavailable:hover { background: var(--green); border-color: var(--green); border-style: solid; color: var(--gold); }
/* SOUNDTRACK button above the title: plays/pauses the front page's music.
   Both symbols show; the one in effect is bright (play while music plays). */
.sound {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  margin: 0 auto clamp(10px, 1.6vh, 16px);
  padding: clamp(6px, 1vh, 9px) 16px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: var(--navy);
  color: var(--tan);
  font: inherit;
  font-size: clamp(14px, 1.15vw, 17px);
  font-weight: bold;
  letter-spacing: .08em;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(10, 20, 40, .4);
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.sound:hover { background: var(--green); border-color: var(--green); color: var(--gold); transform: translateY(-1px); }
.sound:active { transform: translateY(2px); box-shadow: none; }
.sound-icons { display: inline-flex; gap: .3em; }
.sound svg { width: .8em; height: .95em; fill: currentColor; opacity: .4; }
.sound[aria-pressed="true"] .i-play, .sound[aria-pressed="false"] .i-pause { opacity: 1; }
.links .pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(7px, 1.25vh, 12px); }

@media (max-width: 860px), (orientation: portrait) and (max-width: 1000px) {
  .home { align-items: flex-start; }
  .hero { grid-template-columns: 1fr; gap: 12px; max-width: 520px; }
  .box { width: min(100%, 420px); }
}
@media (max-width: 420px) { .links .pair { grid-template-columns: 1fr; } }
