:root {
  --cocoa: #3b160a;
  --espresso: #1d0904;
  --paper: #f7d58d;
  --orange: #ff6b00;
  --tangerine: #ff9d1e;
  --ink: #211007;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--paper);
  background: var(--espresso);
  font-family: "Archivo", Arial, sans-serif;
}

button { font: inherit; }

.page-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 26px 0 18px;
}

.masthead,
.intro,
.board-heading,
.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.masthead { align-items: flex-start; border-bottom: 1px solid rgba(247, 213, 141, .45); padding-bottom: 18px; }

.wordmark {
  color: var(--orange);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.7rem);
  line-height: .7;
  letter-spacing: -.025em;
  text-decoration: none;
}

.issue, .total-label, .footer p {
  margin: 0;
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.issue { padding-top: 4px; text-align: right; }

.intro { align-items: end; padding: clamp(54px, 10vw, 124px) 0 clamp(44px, 7vw, 84px); }

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3, .count, .total-count {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-weight: 400;
}

h1 {
  max-width: 8ch;
  margin-bottom: 0;
  font-size: clamp(5.5rem, 16.5vw, 12.5rem);
  line-height: .77;
  letter-spacing: -.025em;
}

.intro-copy { max-width: 30ch; margin-bottom: 5px; font-size: clamp(1rem, 1.5vw, 1.24rem); font-weight: 600; line-height: 1.35; }

.counter-board { background: var(--orange); color: var(--ink); padding: clamp(22px, 4vw, 48px); }

.board-heading { align-items: end; border-bottom: 3px solid var(--ink); padding-bottom: 20px; }

h2 { margin-bottom: 0; font-size: clamp(3.6rem, 8.5vw, 6.3rem); line-height: .75; letter-spacing: -.02em; }

.total-wrap { display: grid; justify-items: end; }

.total-count { font-size: clamp(5.2rem, 10vw, 8rem); line-height: .72; }

.cabins { display: grid; grid-template-columns: repeat(3, 1fr); }

.cabin { min-height: 360px; display: grid; grid-template-rows: auto 1fr auto; padding: 20px 20px 0; }
.cabin + .cabin { border-left: 2px solid var(--ink); }
.cabin-one { background: var(--paper); }
.cabin-two { background: var(--tangerine); }
.cabin-three { background: #d34d00; color: #fff0bd; }

.cabin-label { display: flex; justify-content: flex-end; align-items: flex-start; gap: 12px; }
.cabin-label h3 { margin-bottom: 0; font-size: clamp(2.25rem, 4vw, 3.45rem); line-height: .8; letter-spacing: -.015em; text-align: right; }

.count { align-self: center; font-size: clamp(8rem, 18vw, 14rem); line-height: .7; letter-spacing: -.045em; }

.count-button, #reset-button {
  cursor: pointer;
  border: 0;
  border-radius: 0;
  font-size: .77rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  transition: transform 160ms ease-out, background-color 160ms ease-out, color 160ms ease-out;
}

.count-button { width: calc(100% + 40px); margin-left: -20px; padding: 18px 16px; color: var(--paper); background: var(--ink); }
.cabin-three .count-button { color: var(--ink); background: var(--paper); }
.count-button:hover { color: var(--ink); background: var(--orange); }
.cabin-three .count-button:hover { background: var(--tangerine); }
.count-button:active { transform: translateY(3px); }

.footer { align-items: center; padding-top: 18px; }
.footer p { line-height: 1.4; }
#reset-button { padding: 10px 0; color: var(--paper); background: transparent; text-decoration: underline; text-underline-offset: 4px; }
#reset-button:hover { color: var(--tangerine); }

button:focus-visible, a:focus-visible { outline: 3px solid var(--tangerine); outline-offset: 4px; }

@media (max-width: 700px) {
  .page-shell { width: min(100% - 22px, 560px); padding-top: 16px; }
  .intro { display: block; padding: 60px 0 54px; }
  .intro-copy { margin-top: 28px; }
  .cabins { grid-template-columns: 1fr; }
  .cabin { min-height: 260px; }
  .cabin + .cabin { border-top: 2px solid var(--ink); border-left: 0; }
  .count { font-size: 10rem; }
  .footer { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
