:root {
  --ink: #171714;
  --paper: #f7f0db;
  --cream: #e7dfc8;
  --red: #e42b25;
  --yellow: #f7d91e;
  --green: #315d46;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --body: "Avenir Next Condensed", "Gill Sans", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--ink); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 23, 20, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 20, .045) 1px, transparent 1px),
    var(--cream);
  background-size: 24px 24px;
  font-family: var(--body);
}

a { color: inherit; }

.play-mode-nav {
  position: fixed;
  z-index: 20;
  top: 14px;
  right: 14px;
  display: flex;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
}

.play-mode-nav a {
  padding: 8px 12px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}

.play-mode-nav a + a { border-left: 3px solid var(--ink); }
.play-mode-nav a.active { background: var(--yellow); }

.download-shell { overflow: hidden; }

.download-hero {
  position: relative;
  min-height: 68vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  align-items: center;
  gap: 3rem;
  padding: clamp(5rem, 9vw, 10rem);
  color: var(--paper);
  background: var(--ink);
}

.download-hero::after {
  content: "";
  position: absolute;
  right: -8rem;
  bottom: -14rem;
  width: 32rem;
  height: 32rem;
  border: 1px solid rgba(247, 240, 219, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 5rem var(--ink), 0 0 0 calc(5rem + 1px) rgba(247, 240, 219, .18);
}

.hero-copy { position: relative; z-index: 2; }
.eyebrow, .platform-label, .section-heading > p {
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow { color: var(--yellow); }

.download-hero h1 {
  margin: 1rem 0 1.5rem;
  font-family: var(--display);
  font-size: clamp(4.5rem, 10vw, 10rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: .78;
  text-transform: uppercase;
}

.download-hero h1 span { color: var(--red); }

.hero-lede {
  max-width: 39rem;
  margin: 0;
  color: rgba(247, 240, 219, .76);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.55;
}

.card-fan {
  position: relative;
  z-index: 2;
  width: min(25rem, 34vw);
  aspect-ratio: 1;
  justify-self: center;
}

.fan-card {
  position: absolute;
  inset: 10% 20%;
  display: grid;
  place-items: center;
  border: .65rem solid var(--paper);
  border-radius: 1rem;
  color: var(--paper);
  background: var(--red);
  box-shadow: 9px 12px 0 rgba(0, 0, 0, .5), inset 0 0 0 3px var(--red), inset 0 0 0 5px rgba(247, 240, 219, .8);
  font-family: Georgia, serif;
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 900;
}

.fan-card-one { transform: rotate(-19deg) translate(-15%, 3%); background: var(--green); }
.fan-card-two { transform: rotate(2deg); }
.fan-card-three { transform: rotate(19deg) translate(15%, 3%); background: #b2282d; }

.platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: clamp(4rem, 7vw, 8rem);
}

.section-heading { grid-column: 1 / -1; margin-bottom: 2.5rem; }
.section-heading > p { margin: 0 0 .5rem; color: var(--red); }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.6rem, 5vw, 5rem); font-weight: 400; letter-spacing: -.05em; }

.platform-card {
  position: relative;
  min-height: 30rem;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 3rem);
  border: 3px solid var(--ink);
  background: var(--paper);
}

.platform-card + .platform-card { border-left: 0; }
.platform-mac { transform: rotate(-1deg) translateY(.4rem); }
.platform-windows { z-index: 2; background: var(--yellow); transform: translateY(-.5rem); box-shadow: 10px 12px 0 var(--ink); }
.platform-linux { transform: rotate(1deg) translateY(.5rem); }

.platform-number {
  align-self: flex-start;
  min-width: 2.4rem;
  border-bottom: 3px solid var(--ink);
  padding-bottom: .35rem;
  font-weight: 900;
}

.platform-label { margin: 3.5rem 0 .7rem; color: rgba(23, 23, 20, .6); }
.platform-card h3 { margin: 0; font-family: var(--display); font-size: clamp(3.7rem, 6vw, 6.5rem); font-weight: 900; letter-spacing: -.04em; line-height: .9; text-transform: uppercase; }
.platform-card > p:not(.platform-label) { max-width: 21rem; font-size: 1rem; line-height: 1.5; }

.download-button {
  min-height: 3.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  border: 3px solid var(--ink);
  padding: .9rem 1rem;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--red);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.download-button span { font-size: 1.25rem; }
.download-button:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--red); }
.download-button:focus-visible, .play-mode-nav a:focus-visible, .release-note a:focus-visible, .official-help:focus-visible { outline: 4px solid var(--red); outline-offset: 4px; }

.linux-downloads { display: grid; gap: .75rem; margin-top: auto; }
.linux-downloads .download-button { margin-top: 0; }
.download-button-secondary { color: var(--ink); background: transparent; box-shadow: none; }

.mobile-release {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(18rem, .9fr) minmax(18rem, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  margin-top: 4rem;
  border: 3px solid var(--ink);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  color: var(--paper);
  background: var(--green);
  box-shadow: 10px 12px 0 var(--red);
}
.mobile-release h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.3rem, 4vw, 4.5rem); font-weight: 400; letter-spacing: -.045em; line-height: .95; }
.mobile-release > p { max-width: 35rem; margin: 0; font-size: 1rem; line-height: 1.55; }
.mobile-release > span { border: 2px solid var(--yellow); padding: .8rem 1rem; color: var(--yellow); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-align: center; text-transform: uppercase; transform: rotate(-1deg); }

.first-launch-guide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(17rem, .75fr);
  margin-top: 4rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 10px 12px 0 var(--ink);
}

.mac-help { padding: clamp(1.5rem, 4vw, 3.5rem); }
.guide-kicker {
  margin: 0 0 .7rem;
  color: var(--red);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.mac-help h2 {
  max-width: 44rem;
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1;
}

.guide-intro { max-width: 44rem; margin: 1.25rem 0 2rem; font-size: 1rem; line-height: 1.55; }
.install-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.install-steps li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: 2px solid var(--ink);
}

.install-steps li > span {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--red);
  font-family: var(--display);
  font-size: 1.35rem;
}

.install-steps strong { display: block; margin-bottom: .3rem; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.install-steps p { margin: 0; line-height: 1.45; }
.timing-note { max-width: 43rem; margin: 1rem 0; color: rgba(23, 23, 20, .7); font-size: .82rem; line-height: 1.5; }
.official-help { display: inline-block; color: var(--red); font-size: .75rem; font-weight: 900; letter-spacing: .08em; text-underline-offset: .25em; text-transform: uppercase; }

.windows-help {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-left: 3px solid var(--ink);
  color: var(--paper);
  background: var(--green);
}

.windows-help .guide-kicker { color: var(--yellow); }
.windows-help h3 { margin: 0 0 1rem; font-family: var(--display); font-size: clamp(2.5rem, 4vw, 4rem); line-height: .9; text-transform: uppercase; }
.windows-help p { line-height: 1.55; }
.signing-status { margin-top: 2rem; border-top: 1px solid rgba(247, 240, 219, .35); padding-top: 1rem; color: rgba(247, 240, 219, .7); font-size: .8rem; }

.release-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem clamp(2rem, 7vw, 8rem);
  color: var(--paper);
  background: var(--green);
}

.release-note p { margin: 0; line-height: 1.45; }
.release-note a { color: var(--yellow); font-weight: 900; text-underline-offset: .2em; }
.all-releases { flex: 0 0 auto; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 850px) {
  .download-hero { min-height: auto; grid-template-columns: 1fr; gap: 1.5rem; padding: 5rem 2rem 3.25rem; }
  .download-hero h1 { font-size: clamp(4rem, 18vw, 7rem); }
  .card-fan { width: min(20rem, 68vw); }
  .platforms { grid-template-columns: 1fr; padding: 4rem 1.25rem; }
  .platform-card { min-height: 24rem; }
  .platform-card + .platform-card { border-top: 0; border-left: 3px solid var(--ink); }
  .platform-mac, .platform-windows, .platform-linux { transform: none; }
  .platform-windows { box-shadow: 8px 8px 0 var(--ink); }
  .mobile-release { grid-template-columns: 1fr; }
  .mobile-release > span { justify-self: start; }
  .first-launch-guide { grid-template-columns: 1fr; }
  .windows-help { border-top: 3px solid var(--ink); border-left: 0; }
  .release-note { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .download-hero {
    padding: calc(46px + env(safe-area-inset-top, 0px)) 1.25rem 2.75rem;
  }
  .download-hero h1 { font-size: clamp(3.65rem, 19vw, 5.25rem); }
  .hero-lede { font-size: 1rem; }
  .card-fan { width: min(18rem, 74vw); margin-top: .5rem; }
  .fan-card { border-width: .45rem; border-radius: .75rem; }
  .platforms { padding: 3.5rem .75rem; }
  .section-heading { padding-inline: .5rem; }
  .section-heading h2 { font-size: 2.75rem; }
  .platform-card { min-height: 22rem; padding: 1.4rem; }
  .platform-label { margin-top: 2.5rem; }
  .platform-card h3 { font-size: 3.7rem; }
  .download-button { min-height: 3.75rem; }
  .mobile-release,
  .first-launch-guide { margin-top: 2.5rem; box-shadow: 6px 7px 0 var(--red); }
  .mobile-release { padding: 1.5rem; }
  .mobile-release h2 { font-size: 2.35rem; }
  .mobile-release > span { min-height: 44px; display: inline-flex; align-items: center; }
  .mac-help,
  .windows-help { padding: 1.5rem; }
  .install-steps li { grid-template-columns: 2.25rem minmax(0, 1fr); gap: .8rem; }
  .install-steps li > span { width: 2.25rem; height: 2.25rem; }
  .official-help { min-height: 44px; display: inline-flex; align-items: center; }
  .release-note { padding: 1.75rem 1.25rem 2.25rem; }
  .all-releases { min-height: 44px; display: inline-flex; align-items: center; }
}

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