@font-face {
  font-family: "Baloo 2";
  src: url("./fonts/baloo2-semibold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url("./fonts/baloo2-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url("./fonts/baloo2-extrabold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #2B1D12;
  --cream: #FFF6E0;
  --sand: #F2DA9C;
  --gold: #FFC63A;
  --route-gold: #FFD84A;
  --team-blue: #2F7BFF;
  --grass: #4DB53C;
  --muted: rgba(43, 29, 18, .66);
  --shade: 20, 14, 8;
  --content-width: 1136px;
  /* The design is drawn at 1280px with a 72px gutter. Below that the gutter
     shrinks with the viewport so two feature cards still fit side by side. */
  --gutter: clamp(24px, 5.625vw, 72px);
  /* Every band is full width and pads its content in to the one page column.
     The percentage resolves against the band's own width where it is used. */
  --column-inset: max(var(--gutter), calc((100% - var(--content-width)) / 2));
  /* The nav and footer sit half a gutter outside the column, as drawn. */
  --edge-inset: max(calc(var(--gutter) / 2), calc((100% - var(--content-width)) / 2 - 36px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 600 16px/1.45 "Baloo 2", system-ui, sans-serif;
}

img {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--team-blue);
  outline-offset: 3px;
}

.spacer {
  flex: 1;
}

.card {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 6px 0 var(--ink);
}

.logo {
  flex: none;
  border: 3px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
}

/* Buttons */

.button,
.nav-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  line-height: normal;
  white-space: nowrap;
}

.button {
  --button-drop: 5px;
  gap: 8px;
  padding: 15px 30px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 var(--button-drop) 0 var(--ink);
  font-size: 21px;
}

.button svg {
  flex: none;
  fill: var(--ink);
}

.nav-play {
  --button-drop: 3px;
  padding: 8px 16px;
  border: 2.5px solid var(--ink);
  border-radius: 11px;
  box-shadow: 0 var(--button-drop) 0 var(--ink);
  font-size: 15px;
}

.button:hover,
.nav-play:hover {
  transform: translateY(-2px);
}

.button:active,
.nav-play:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .nav-play {
    transition: transform .08s ease-out, box-shadow .08s ease-out;
  }
}

/* Hero and nav */

.hero {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: url("./images/hero.jpg") center / cover;
}

/* A dark fade toward the edges so the centred white text reads on the map. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(var(--shade), .15) 20%, rgba(var(--shade), .72) 100%);
}

.site-nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
  padding: 16px var(--edge-inset);
  color: #fff;
  font-weight: 800;
  line-height: normal;
  text-shadow: 0 2px 0 var(--ink);
  white-space: nowrap;
}

.site-nav .logo {
  width: 52px;
  height: 52px;
  border-radius: 11px;
}

.nav-name {
  font-size: 21px;
}

.nav-link {
  font-size: 15px;
}

.nav-play {
  text-shadow: none;
}

.hero-content {
  position: absolute;
  inset: 140px 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0 var(--column-inset);
  text-align: center;
}

.hero-tag {
  padding: 4px 14px;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: normal;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hero-title {
  color: #fff;
  /* 72px at the 1280px the design is drawn at, down to the phone size. */
  font-size: clamp(44px, 5.625vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.01em;
  text-shadow: 0 4px 0 var(--ink), 0 0 2px var(--ink);
}

.hero-lead {
  max-width: 520px;
  color: #fff;
  font-size: 18px;
  line-height: 1.5;
  text-shadow: 0 2px 0 var(--ink);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}

/* Season strip */

.season {
  position: relative;
  z-index: 2;
  margin-top: -52px;
  padding: 0 var(--column-inset);
  scroll-margin-top: 24px;
}

.season-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 30px;
  padding: 18px 22px;
  line-height: normal;
}

.season-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.season-dot {
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--gold);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.season-title {
  font-size: 21px;
  font-weight: 800;
}

.season-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 30px;
}

.season-stat dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.season-stat dd {
  font-size: 20px;
  font-weight: 800;
}

.season-join {
  margin-left: auto;
}

/* What you do */

.features {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 80px var(--column-inset) 84px;
}

.section-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.01em;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
}

.feature-map {
  position: relative;
  aspect-ratio: 550 / 334;
  /* The overlay tags are sized against this box so they shrink with it. */
  container-type: inline-size;
}

.feature-map > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-overlay {
  position: absolute;
  inset: 0;
}

.feature-overlay > * {
  position: absolute;
}

/* Overlay positions are percentages of the 550 x 334 map the design draws. */

.map-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 4px;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--ink);
  /* 13px on the phone card (352px) and wider; smaller only on a narrower map. */
  font-size: clamp(9px, 3.7cqw, 13px);
  font-weight: 800;
  line-height: normal;
  white-space: nowrap;
}

.map-tag-build {
  left: 48%;
  top: 27.66%;
}

.map-tag-gain {
  color: #2E8A2B;
}

.build-tile {
  left: 36.2%;
  top: 24.7%;
  width: 11%;
  aspect-ratio: 1;
  border: 3px dashed #fff;
  border-radius: 7px;
  box-shadow: 0 0 0 1.5px var(--ink);
}

.march-route {
  left: 0;
  top: 0;
  width: 100%;
  fill: none;
  stroke-linecap: round;
}

.march-route-edge {
  stroke: var(--ink);
  stroke-width: 9;
  opacity: .5;
}

.march-route-line {
  stroke: var(--route-gold);
  stroke-width: 5;
  stroke-dasharray: 12 10;
}

.march-unit {
  left: 12%;
  top: 65.21%;
  width: 13%;
  height: auto;
  border-radius: 50%;
}

.map-tag-march {
  left: 48%;
  top: 29.64%;
}

.camp-ring {
  left: 77%;
  top: 26.68%;
  /* The design's ring is 15.5% of the map inside its 3px border. */
  width: calc(15.5% + 6px);
  aspect-ratio: 1;
  border: 3px solid var(--route-gold);
  border-radius: 9px;
  box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 6px rgba(255, 216, 74, .35);
}

.map-tag-camp {
  left: 18%;
  top: 7.9%;
}

.map-tag-alliance {
  left: 6%;
  bottom: 6.59%;
}

.alliance-dot {
  flex: none;
  width: 13px;
  height: 13px;
  background: var(--team-blue);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.feature-text {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px 22px;
  border-top: 3px solid var(--ink);
}

.feature-icon {
  flex: none;
  width: 46px;
  height: 46px;
  background: var(--grass) center / cover;
  border: 2.5px solid var(--ink);
  border-radius: 11px;
  box-shadow: 0 2px 0 var(--ink);
}

.feature-icon-wheat {
  background-image: url("./images/t-wheat.png");
}

.feature-icon-knight {
  background-image: url("./images/s-knight.png");
}

.feature-icon-camp {
  background-image: url("./images/t-camp.png");
}

.feature-icon-crown {
  background-image: url("./images/roc.png");
}

.feature-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-copy h3 {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.15;
}

.feature-copy p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

/* Divider */

.divider {
  height: 102px;
  background: var(--grass) url("./images/strip.jpg") center / auto 100% repeat-x;
  border-block: 3px solid var(--ink);
}

/* Questions */

.faq {
  padding: 80px var(--column-inset);
  background: var(--sand);
}

.faq-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 760px;
  margin: 0 auto;
}

.faq-card {
  padding: 8px 28px;
}

.faq-item {
  padding: 16px 0;
}

.faq-item + .faq-item {
  border-top: 2px dashed rgba(43, 29, 18, .3);
}

.faq-item h3 {
  font-size: 19px;
  font-weight: 800;
  line-height: normal;
}

.faq-item p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

/* Closing call to action */

.closing {
  position: relative;
  padding: 96px var(--column-inset);
  background: url("./images/hero.jpg") center 70% / cover;
  text-align: center;
}

.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(var(--shade), .55);
}

.closing-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.closing-title {
  color: #fff;
  text-shadow: 0 3px 0 var(--ink);
}

/* Footer */

.site-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px var(--edge-inset);
  background: var(--ink);
  color: var(--cream);
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
}

.site-footer .logo {
  width: 36px;
  height: 36px;
  border-radius: 7px;
}

/* Narrower than the design's desktop, the strip no longer fits on one row:
   the title takes its own row so the stats and the button stay together. */
@media (max-width: 1239.98px) {
  .season-head {
    flex-basis: 100%;
  }
}

/* Phone layout */

@media (max-width: 599.98px) {
  :root {
    --gutter: 16px;
  }

  .button {
    padding: 13px 22px;
    font-size: 18px;
  }

  .nav-play {
    padding: 7px 13px;
    font-size: 14px;
  }

  .hero {
    height: 660px;
    background-image: url("./images/hero-m.jpg");
  }

  .site-nav {
    gap: 10px;
    padding: 12px 14px;
  }

  .site-nav .logo {
    width: 44px;
    height: 44px;
    border-radius: 9px;
  }

  .nav-name {
    font-size: 18px;
  }

  .nav-link {
    display: none;
  }

  .hero-content {
    top: 110px;
    gap: 16px;
  }

  .hero-title {
    font-size: 44px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .season {
    margin-top: -56px;
  }

  .season-card {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }

  .season-title {
    font-size: 19px;
  }

  .season-stats {
    gap: 18px;
    justify-content: space-between;
  }

  .season-stat dd {
    font-size: 18px;
  }

  .season-join {
    margin-left: 0;
  }

  .features {
    gap: 26px;
    padding: 52px var(--gutter) 56px;
  }

  .section-title {
    font-size: 32px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* The phone design draws the map at 352 x 215, a shade taller than desktop. */
  .feature-map {
    aspect-ratio: 352 / 215;
  }

  .feature-text {
    padding: 14px 16px 18px;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
  }

  .feature-copy h3 {
    font-size: 20px;
  }

  .feature-copy p {
    font-size: 15px;
  }

  .divider {
    height: 70px;
  }

  .faq {
    padding: 52px var(--gutter);
  }

  .faq-column {
    gap: 22px;
  }

  .faq-card {
    padding: 6px 18px;
  }

  .faq-item h3 {
    font-size: 18px;
  }

  .closing {
    padding: 70px var(--gutter);
  }

  .site-footer {
    padding: 18px 16px 26px;
  }
}
