@font-face {
  font-family: Nunito;
  src: url("assets/fonts/Nunito-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
}

@font-face {
  font-family: "Saira Stencil One";
  src: url("assets/fonts/SairaStencilOne-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --red: #a61931;
  --red-dark: #711528;
  --gold: #f4c92b;
  --gold-soft: #ffe5a1;
  --ink: #302023;
  --paper: #fffaf0;
  --cream: #ffedbd;
  --white: #fffefa;
  --muted: #5b4b4d;
  --border: #e9d6ae;
  font-family: Nunito, sans-serif;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid #284c95;
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  z-index: 20;
  top: -5rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  color: var(--red-dark);
  font-weight: 900;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 3rem, 1240px);
  margin-inline: auto;
}

.senyera-ribbon {
  height: 27px;
  background: repeating-linear-gradient(to bottom, var(--gold) 0 3px, var(--red) 3px 6px);
}

.site-header {
  background: var(--red);
  color: var(--white);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 84px;
}

.wordmark {
  color: var(--gold);
  font-family: "Saira Stencil One", sans-serif;
  font-size: 1.9rem;
  letter-spacing: 0.025em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark span {
  color: var(--white);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-weight: 900;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.site-nav__cta {
  padding: 0.65rem 1.05rem;
  border-radius: 11px;
  background: var(--gold);
  color: var(--red-dark);
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #fff5d4 0%, #ffe8a2 67%, #fbd876 100%);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  padding-block: clamp(5rem, 7vw, 7rem);
}

.hero__copy {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-heading__eyebrow,
.download__eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.86rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-block;
  padding: 0.55rem 0.8rem;
  border-radius: 5px;
  background: var(--red);
  color: var(--white);
}

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

h1,
h2 {
  text-wrap: balance;
}

.hero h1 {
  max-width: 10.4em;
  margin-bottom: 1.5rem;
  color: var(--ink);
  font-size: clamp(3.1rem, 5vw, 5rem);
  font-weight: 1000;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

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

.hero__intro {
  max-width: 33rem;
  margin-bottom: 2rem;
  color: #433438;
  font-size: 1.13rem;
  line-height: 1.6;
}

.store-actions,
.download__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.store-button {
  display: inline-flex;
  min-width: 168px;
  min-height: 68px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0.65rem 1.2rem;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 1.12rem;
  line-height: 1.25;
  text-decoration: none;
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.store-button:hover {
  transform: translateY(-3px);
}

.store-button__overline {
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
}

.store-button strong {
  font-weight: 1000;
}

.store-button--primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 5px 0 var(--red-dark);
}

.store-button--secondary {
  border-color: var(--red);
  background: var(--white);
  color: var(--red-dark);
}

.store-button--secondary:hover {
  background: #fff5df;
}

.text-link {
  display: inline-block;
  margin-top: 1.8rem;
  color: var(--red-dark);
  font-weight: 1000;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.text-link span {
  margin-left: 0.25rem;
}

.hero__art {
  position: relative;
  isolation: isolate;
  margin: 0 1.1rem 1.5rem 0;
}

.hero__art::before {
  position: absolute;
  z-index: -1;
  top: -1.25rem;
  right: -1.25rem;
  bottom: 1.5rem;
  left: 2rem;
  border-radius: 22px;
  background: repeating-linear-gradient(to bottom, var(--gold) 0 22px, var(--red) 22px 44px);
  content: "";
}

.hero__art img {
  width: 100%;
  height: auto;
  border: 5px solid var(--red);
  border-radius: 22px;
  background: #86a5c4;
  box-shadow: 0 20px 35px rgb(82 31 32 / 18%);
}

.hero__art figcaption {
  position: absolute;
  right: -0.6rem;
  bottom: -1.35rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  max-width: calc(100% + 1rem);
  padding: 0.65rem 0.95rem;
  border-radius: 5px;
  background: var(--red);
  color: var(--gold);
  font-family: "Saira Stencil One", sans-serif;
  font-size: 1.55rem;
  line-height: 1;
  white-space: nowrap;
}

.hero__art figcaption span {
  color: var(--white);
  font-family: Nunito, sans-serif;
  font-size: 0.74rem;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.highlights {
  border-top: 4px solid var(--gold);
  border-bottom: 4px solid var(--gold);
  background: var(--red);
  color: var(--white);
}

.highlights__inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  min-height: 90px;
  padding-block: 0.8rem;
}

.highlights p {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  text-align: center;
}

.highlights strong {
  color: var(--gold);
  font-weight: 1000;
}

.highlights__divider {
  width: 1px;
  height: 2rem;
  flex: none;
  background: rgb(255 255 255 / 45%);
}

.games {
  padding-block: clamp(4.5rem, 7vw, 7rem);
  background: var(--paper);
}

.section-heading {
  max-width: 47rem;
  margin-bottom: 2.75rem;
}

.section-heading__eyebrow {
  margin-bottom: 0.65rem;
  color: var(--red);
}

.section-heading h2,
.download h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 1000;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.section-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.games__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.game-card {
  display: grid;
  grid-template-columns: minmax(0, 37%) minmax(0, 1fr);
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: var(--white);
  box-shadow: 0 9px 0 #edddb9;
}

.game-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #90b0c0;
}

.game-card__body {
  align-self: center;
  padding: 1.35rem 1.45rem;
}

.game-card__genre {
  margin-bottom: 0.65rem;
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 1000;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-transform: uppercase;
}

.game-card h3 {
  margin-bottom: 1rem;
  color: var(--ink);
  font-size: clamp(1.55rem, 2vw, 1.9rem);
  font-weight: 1000;
  line-height: 1.1;
}

.game-card__rule {
  margin-bottom: 0.65rem;
  color: #403438;
  font-size: 0.98rem;
  line-height: 1.45;
}

.game-card__rule strong {
  display: block;
  margin-bottom: 0.1rem;
  color: var(--red-dark);
  font-size: 0.81rem;
  font-weight: 1000;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.game-card__rule:last-child {
  margin-bottom: 0;
}

.download {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 7vw, 7rem);
  background: var(--red);
  color: var(--white);
}

.download::after {
  position: absolute;
  top: -3rem;
  right: -7rem;
  width: 20rem;
  height: 130%;
  background: repeating-linear-gradient(to bottom, var(--gold) 0 15px, #bd233e 15px 30px);
  content: "";
  opacity: 0.18;
  transform: rotate(18deg);
}

.download__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.download__inner > div:first-child {
  max-width: 40rem;
}

.download__eyebrow {
  margin-bottom: 0.85rem;
  color: var(--gold);
}

.download h2 {
  margin-bottom: 0.9rem;
}

.download__inner > div:first-child > p:last-child {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.download__actions {
  justify-content: flex-end;
  min-width: 360px;
}

.store-button--light {
  background: var(--gold);
  color: var(--red-dark);
}

.store-button--outline {
  border-color: var(--white);
  color: var(--white);
}

.store-button--outline:hover {
  background: rgb(255 255 255 / 12%);
}

.site-footer {
  padding-block: 2.7rem;
  background: var(--red-dark);
  color: var(--white);
}

.site-footer__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark--footer {
  font-size: 1.6rem;
}

.site-footer p {
  margin: 0.7rem 0 0;
  color: #f5dce0;
  font-size: 0.95rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 800;
}

.site-footer nav a {
  color: var(--white);
  text-decoration: none;
}

@media (max-width: 980px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 3.8rem;
    padding-block: 4.5rem 5rem;
  }

  .hero__copy {
    max-width: 42rem;
  }

  .hero__art {
    width: min(100% - 1.25rem, 700px);
    margin-inline: auto;
  }

  .games__grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
    min-height: 300px;
  }

  .download__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .download__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 2rem, 560px);
  }

  .senyera-ribbon {
    height: 18px;
    background-size: auto 4px;
  }

  .site-header__inner {
    min-height: 72px;
  }

  .wordmark {
    font-size: 1.5rem;
  }

  .site-nav {
    gap: 0.9rem;
    font-size: 0.9rem;
  }

  .site-nav__cta {
    padding: 0.5rem 0.7rem;
  }

  .hero__inner {
    gap: 3.75rem;
    padding-block: 3.5rem 4.5rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.8rem, 9vw, 4.3rem);
  }

  .hero__intro {
    font-size: 1.04rem;
  }

  .hero__art {
    margin-right: 0.8rem;
  }

  .hero__art::before {
    top: -0.8rem;
    right: -0.8rem;
    bottom: 1rem;
    left: 1rem;
    background: repeating-linear-gradient(to bottom, var(--gold) 0 14px, var(--red) 14px 28px);
  }

  .hero__art figcaption {
    right: -0.55rem;
    bottom: -1rem;
    font-size: 1.22rem;
  }

  .hero__art figcaption span {
    font-size: 0.62rem;
  }

  .highlights__inner {
    flex-direction: column;
    gap: 0;
    padding-block: 0.75rem;
  }

  .highlights p {
    padding-block: 0.45rem;
  }

  .highlights__divider {
    width: 60%;
    height: 1px;
  }

  .game-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .game-card > img {
    height: 230px;
    object-position: center 32%;
  }

  .game-card__body {
    padding: 1.4rem;
  }

  .game-card h3 {
    font-size: 1.65rem;
  }

  .download__actions {
    min-width: 0;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 430px) {
  .site-nav > a:first-child {
    display: none;
  }

  .store-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .store-actions .store-button {
    min-width: 0;
    padding-inline: 0.8rem;
    font-size: 1rem;
  }

  .game-card__body {
    padding: 1.25rem;
  }

  .game-card__genre {
    font-size: 0.74rem;
  }

  .game-card h3 {
    font-size: 1.55rem;
  }

  .game-card__rule {
    font-size: 0.94rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .store-button {
    transition: none;
  }
}
