/* Colours from the photo:
   glaze #2E2D28, label #ECEBE2, ink #1F1C1A, gingham #C4404E, mustard #C9A64B */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* height: 100% (rather than 100vh) matches the visible screen on phones,
   so the browser's address bar never pushes the page into scrolling */
html {
  height: 100%;
  background-color: #2E2D28;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100%;
  /* anchored to the top so the logo in the photo is always visible */
  background-color: #2E2D28;
  background-image: url("poster.webp");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Phones (portrait) ---------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* top padding clears the logo printed in the photo */
  padding: 14vh 5vw 4vh;
}

h1 {
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  font-size: 11.5vw;
  line-height: 0.9;
  letter-spacing: -0.025em;
}

.tag {
  margin-top: 5vw;
  background: #ECEBE2;
  color: #1F1C1A;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 4.4vw;
  line-height: 1;
  letter-spacing: -0.01em;
  padding: 0.42em 0.6em 0.38em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 6vw;
}

.btn {
  /* at least 44px tall so it is easy to tap */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1;
  font-size: 14px;
  padding: 0.85em 1.15em 0.8em;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: #ECEBE2;
  color: #1F1C1A;
}

.btn-primary:hover {
  background: #C9A64B;
}

.btn-secondary {
  color: #ffffff;
  box-shadow: inset 0 0 0 2px #ffffff;
}

.btn-secondary:hover {
  background: #C4404E;
  box-shadow: inset 0 0 0 2px #C4404E;
}

.btn:focus {
  outline: 3px solid #C9A64B;
  outline-offset: 3px;
}

/* Studio details: printed at the bottom of the photo on tall screens.
   On wider screens that part of the photo is cropped away, so show them as text. */
.credits {
  display: none;
  grid-template-columns: auto auto;
  justify-content: center;
  column-gap: 8vw;
  padding: 0 1rem 3.5vh;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.05;
  font-size: 12px;
}

.credits div {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 1.6em;
}

.credits span:nth-child(odd) {
  text-align: right;
}

/* ---------- Tablets (portrait) ---------- */

@media (min-width: 600px) {
  .btn { font-size: 2.6vw; }
}

/* ---------- Wide screens: photo fills the width ---------- */

@media (min-aspect-ratio: 4/5) {
  main { padding-top: 17.5vw; }
}

/* ---------- Landscape: size text by screen height ---------- */

@media (min-aspect-ratio: 17/20) {
  h1       { font-size: 11vh; }
  .tag     { font-size: 3.7vh; margin-top: 4.6vh; }
  .actions { margin-top: 5vh; }
  .btn     { font-size: 14px; }
  .credits { display: grid; }
}

/* Taller laptops and desktops: let buttons and details grow with the screen */
@media (min-aspect-ratio: 17/20) and (min-height: 700px) {
  .btn     { font-size: 2vh; }
  .credits { font-size: 1.9vh; }
}

/* Phones turned sideways: not enough height for the footer details */
@media (min-aspect-ratio: 17/20) and (max-height: 500px) {
  main     { padding-bottom: 3vh; }
  .credits { display: none; }
}
