@font-face {
  font-family: Rubik;
  src: url("assets/fonts/Rubik.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: "Press Start 2P";
  src: url("assets/fonts/PressStart2P.ttf") format("truetype");
  font-display: swap;
}

:root {
  --blue: #303083;
  --yellow: #ffd100;
  --green: #14a598;
  --pink: #e35fff;
  --gray: #f2f2f2;
  --gutter: clamp(20px, 6.6667vw, 80px);
  font-family: Rubik, sans-serif;
  text-rendering: geometricPrecision;
  color: #000;
  background: var(--yellow);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
picture { display: block; }
main > section { position: relative; overflow: clip; }
.wrap { width: min(1040px, 100% - 2 * var(--gutter)); margin-inline: auto; position: relative; }
h1, h2, h3 { font-weight: 900; }
h2 { font-size: clamp(34px, 4.5vw, 54px); line-height: 1.0926; }
.mobile-break { display: none; }

.hero { background: var(--blue); padding-block: 32px 140px; }
.hero-content { display: grid; gap: 56px; }
.masthead, .hero-stage, .hero-actions { display: flex; }
.masthead { justify-content: space-between; align-items: center; }
.masthead img { width: 230px; height: auto; }
.level {
  background: var(--pink);
  border: 2px solid;
  border-radius: 4px;
  box-shadow: 4px 4px #000;
  padding: 12px 14px;
  font: 14px/1 "Press Start 2P", monospace;
  white-space: nowrap;
}

.hero-stage { padding-top: 40px; align-items: center; gap: 32px; }
.window {
  background: #fff;
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: 8px 8px #000;
  overflow: hidden;
}

.window-bar {
  --bar: var(--yellow);
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 16px 12px 82px;
  position: relative;
  color: #000;
  background: var(--bar);
  font-size: 15px;
  font-weight: 700;
  line-height: 15px;
}
.computer .window-bar { min-height: 38px; }
.window-bar > span { transform: translateY(1px); }
.window-bar::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 16px;
  width: 58px;
  height: 14px;
  background: url("assets/75397.svg") left center / 14px 14px no-repeat,
    url("assets/75397.svg") center / 14px 14px no-repeat,
    url("assets/75397.svg") right center / 14px 14px no-repeat;
}

.title-window { flex: 0 0 min(57.6923%, 600px); box-shadow: 12px 12px #000; }
.title-content { padding: clamp(22px, 3.3333vw, 40px); }
.title-content h1 {
  display: grid;
  gap: 6px;
  font-size: clamp(32px, 5.1667vw, 62px);
  line-height: 1.080645;
  text-transform: uppercase;
}
.title-content h1 span:nth-child(2) { color: var(--green); }
.event-date {
  display: inline-block;
  margin-top: 26px;
  padding: 10px 14px;
  background: var(--yellow);
  border: 2px solid;
  border-radius: 4px;
  font-size: clamp(14px, 1.6667vw, 20px);
  font-weight: 700;
  line-height: 1.2;
}
.tree { flex: 1 1 0; min-width: 0; display: grid; justify-items: center; }
.tree img { width: min(410.4px, 100% + 2.4px); max-width: none; height: auto; aspect-ratio: 410.4 / 425.6; }
.hero-actions { align-items: flex-end; justify-content: space-between; gap: 32px; }
.countdown { display: grid; gap: 14px; }
.countdown > p { color: #fff; font-size: 19px; line-height: 28px; font-weight: 500; }
.timer { display: grid; width: min(512px, 100%); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hero-actions .timer { width: min(512px, 45vw); }
.timer-tile {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding-block: 16px;
  background: #fff;
  border: 3px solid;
  border-radius: 4px;
  box-shadow: 4px 4px #000;
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
}
.timer-number { font: 30px/33px "Press Start 2P", monospace; }
.hero-join { display: grid; gap: 16px; width: min(380px, 38%); }
.join {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  color: #000;
  background: var(--yellow);
  border: 3px solid #000;
  border-radius: 4px;
  box-shadow: 6px 6px #000;
  padding: 22px 16px;
  font: 900 22px/1.1 Rubik, sans-serif;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.join:enabled { cursor: pointer; }
.join:enabled:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px #000; }
.join:enabled:active { transform: translate(3px, 3px); box-shadow: 3px 3px #000; }
.join:focus-visible { outline: 3px solid #fff; outline-offset: -7px; }
.hero .join:focus-visible { outline-color: #000; }
.join:disabled { opacity: 1; }
.join span { transform: translateY(1px); }
.join img { flex: none; }
.join-hint { color: #fff; font-size: 15px; line-height: 22px; text-align: center; }

.invitation { background: var(--gray); padding-block: 112px; }
.invitation-content { display: grid; grid-template-columns: minmax(0, 1fr) min(42.3077%, 440px); gap: clamp(32px, 6.6667vw, 80px); align-items: start; }
.greeting { display: grid; gap: 24px; }
.greeting h2 { display: flex; align-items: center; gap: 20px; font-size: clamp(40px, 5.3333vw, 64px); line-height: 1.09375; }
.greeting p { translate: 0 .5px; font-size: 22px; line-height: 34px; }
.inventory .window-bar { --bar: var(--green); }
.inventory-content { padding: 24px; display: grid; gap: 12px; }
.inventory h3 { font-size: 20px; line-height: 29px; font-weight: 700; }
.checklist { display: grid; gap: 12px; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 2px solid;
  border-radius: 4px;
  background: var(--gray);
  font-size: 19px;
  font-weight: 500;
  line-height: 28px;
}
.check { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border: 2px solid; background: var(--yellow); }

.program { background: var(--green); padding-block: 144px 140px; }
.program-content { display: grid; gap: 56px; }
.program-heading { text-align: center; }
.program-heading h2 { color: #fff; }
.program-heading p { margin-top: 16px; font-size: 21px; line-height: 30px; font-weight: 500; }
.program-cards { display: grid; gap: clamp(16px, 2.6667vw, 32px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.games .window-bar { --bar: var(--pink); }
.gifts .window-bar { --bar: var(--blue); color: #fff; }
.program-card-content { padding: 36px 24px; display: grid; gap: 14px; text-align: center; }
.program-icon { height: 100px; display: grid; place-items: center; }
.program-icon img { translate: 0 -2px; }
.program-card h3 { font-size: 30px; line-height: 36px; }
.program-card p { font-size: 18px; line-height: 26px; min-height: 78px; }
.toast {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: center;
  background: #000;
  color: #fff;
  padding: 18px 28px;
  border-radius: 8px;
  font-size: 21px;
  line-height: 30px;
  font-weight: 700;
}
.toast img { flex: none; }

.connection { padding-block: 112px; background: #fff; }
.connection-content { display: grid; gap: 64px; }
.connection h2 { text-align: center; }
.devices { width: min(824px, 100%); justify-self: center; display: flex; align-items: flex-end; gap: clamp(24px, 5.3333vw, 64px); justify-content: center; }
.computer { width: min(560px, 68%); box-shadow: 12px 12px #000; }
.computer-screen { display: grid; place-items: center; height: clamp(210px, 26.6667vw, 320px); background: var(--blue); }
.computer-screen picture { width: min(360px, 78%); }
.computer-screen img { height: auto; }
.phone {
  display: grid;
  place-items: center;
  flex: 0 0 min(200px, 24.3%);
  height: clamp(270px, 31.6667vw, 380px);
  border: 8px solid;
  border-radius: 30px;
  background: var(--blue);
  box-shadow: 12px 12px #000;
}
.phone span {
  display: grid;
  align-content: center;
  justify-items: center;
  width: min(144px, 89%);
  aspect-ratio: 1;
  border: 2px solid;
  border-radius: 4px;
  background: #fff;
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  text-align: center;
}
.instructions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5.3333vw, 64px); }
.instructions > div { display: grid; align-content: start; gap: 12px; }
.instructions > div::before { content: ""; width: 24px; height: 24px; border: 3px solid; background: var(--yellow); }
.instructions > div:nth-child(2)::before { background: var(--pink); }
.instructions h3 { font-size: 26px; line-height: 33px; font-weight: 700; }
.instructions p { font-size: 20px; line-height: 29px; }

.closing { background: var(--yellow); padding-block: 150px 112px; }
.closing-content { display: grid; justify-items: center; gap: 44px; }
.closing h2 { font-size: clamp(46px, 5.6667vw, 68px); line-height: 1.10294; text-align: center; }
.closing .join { width: min(380px, 100%); background: var(--blue); color: #fff; }
.closing-logo img { width: 200px; height: auto; }

@media (max-width: 900px) and (min-width: 701px) {
  .timer-number { font-size: 24px; }
  .program-card-content { padding-inline: 13px; }
  .program-card h3 { font-size: 26px; }
}

@media (max-width: 700px) {
  :root { --gutter: 20px; }
  .wrap { max-width: 520px; }
  h2 { font-size: 32px; line-height: 35px; }
  .mobile-break { display: initial; }
  .hero { padding-block: 20px 88px; font-kerning: none; }
  .hero-content { gap: 32px; }
  .masthead img { width: 150px; }
  .level { font-size: 11px; padding: 10px; }
  .hero-stage { display: grid; padding-top: 32px; gap: 40px; }
  .title-window { box-shadow: 6px 6px #000; }
  .title-content { padding: 24px 20px; }
  .title-content h1 { gap: 4px; font-size: clamp(29px, 9.4444vw, 34px); line-height: 1.088235; }
  .event-date { display: block; margin-top: 18px; font-size: clamp(13px, 4.4444vw, 16px); line-height: 19px; white-space: nowrap; }
  .tree img { width: min(302.4px, 100%); aspect-ratio: 302.4 / 313.6; }
  .hero-actions { display: grid; gap: 28px; }
  .countdown > p { font-size: 17px; line-height: 25px; }
  .hero-actions .timer, .timer { width: 100%; gap: 10px; }
  .timer-tile { gap: 8px; padding-block: 12px; font-size: 13px; line-height: 19px; }
  .timer-number { font-size: 20px; line-height: 22px; }
  .hero-join { width: 100%; }
  .join { padding-block: 18px; font-size: 19px; }
  .join-hint { position: relative; top: 2px; font-size: 14px; line-height: 20px; }

  .invitation { padding-block: 64px; }
  .invitation-content { grid-template-columns: 1fr; gap: 40px; }
  .greeting { gap: 16px; }
  .greeting h2 { font-size: 40px; line-height: 44px; }
  .greeting h2 { position: relative; top: 1px; }
  .greeting h2 img { translate: 0 -1px; width: 48px; height: 48px; }
  .greeting p { font-size: 18px; line-height: 28px; letter-spacing: -0.04px; }
  .inventory h3 { font-size: 18px; line-height: 26px; }
  .checklist li { font-size: 17px; line-height: 25px; }

  .program { padding-block: 88px; }
  .program-content { gap: 32px; }
  .program-heading p { max-width: 260px; margin-inline: auto; font-size: 17px; line-height: 25px; }
  .program-cards { grid-template-columns: 1fr; gap: 28px; }
  .program-card-content { padding-block: 28px; }
  .program-icon { height: 80px; }
  .program-icon img { width: 70px; height: 77px; translate: 0 -1px; }
  .games .program-icon img { width: 112px; height: 72px; translate: 0 -2px; }
  .gifts .program-icon img { width: 77px; height: 70px; translate: 0 -3px; }
  .program-card h3 { font-size: 26px; line-height: 31px; }
  .program-card p { font-size: 17px; line-height: 25px; min-height: 0; }
  .toast { width: 100%; padding: 18px; font-size: 16px; line-height: 23px; }
  .toast span { translate: 0 1px; }

  .connection { padding-block: 64px; }
  .connection-content { gap: 40px; }
  .connection h2 { text-align: left; }
  .devices { width: min(318px, 100%); gap: 18px; }
  .computer { width: min(200px, 63%); box-shadow: 6px 6px #000; }
  .computer-screen { height: 124px; }
  .computer-screen picture { width: min(150px, 89%); }
  .phone { height: 184px; flex-basis: min(100px, 31.5%); border-width: 5px; border-radius: 18px; box-shadow: 6px 6px #000; }
  .phone span { width: min(74px, 94%); font-size: 13px; line-height: 17px; }
  .instructions { grid-template-columns: 1fr; gap: 28px; }
  .instructions h3 { font-size: 21px; line-height: 26px; }
  .instructions p { font-size: 17px; line-height: 25px; letter-spacing: -0.04px; }

  .closing { padding-block: 96px 72px; }
  .closing-content { gap: 32px; }
  .closing-smile img { width: 72px; height: 72px; }
  .closing h2 { font-size: 38px; line-height: 42px; }
  .closing .join { width: 100%; }
  .closing-logo img { width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .join { transition: none; }
}
