/* Home page (/). Desktop lengths are mockup 01-home px x 1.257 (its 864 px drawing of the 1086 px column);
   phone lengths are half the 724 px phone mockup. Band heights, art and card tiles follow the column
   width; type and paddings stay in px, and the shell's zoom enlarges them on wide windows. */

/* ---- Hero: the headline on navy at left; the citadel fills the right and melts into the navy ---- */
.hero {
  --art-w: 82%;
  --art-pos: 50% 0%;
  /* No fixed minimum, so copy taller than the ratio (narrow windows) stretches the band. */
  min-height: auto;
  aspect-ratio: 1086 / 532;
  margin: 0 -10px -12px;
}
.hero__art { --fade-l: 28%; --fade-r: 0%; --fade-t: 5%; --fade-b: 0%; }
/* From about here the column stops at --page and navy shows beyond it, so the scene fades on its right too. */
@media (min-width: 1452px) { .hero__art { --fade-r: 9%; } }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; max-width: 54%; padding: 40px 0 40px 43px; }
.hero__title { font: 700 60px/66px var(--display); }
.hero__lede { margin-top: 14px; font-size: 25px; line-height: 29.5px; }
.hero__start { margin-top: 28px; min-height: 67px; padding: 6px 37px; font-size: 27px; }
.hero__note { margin-top: 12px; font-size: 20px; line-height: 24px; }

/* ---- Cards: three collectible tiles in a parchment panel ---- */
.cards { display: flex; flex-direction: column; align-items: center; padding: 28px 40px 36px; text-align: center; }
.cards__title { font: 700 53px/59px var(--display); }
.cards .rule { width: 87%; margin: 7px 0 0; }
.cards__lede { margin-top: 5px; font-size: 26.5px; line-height: 35px; }
.cards__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 4.1%; width: 85%; margin-top: 28px; }
.cards .mcard { aspect-ratio: 203 / 282; }
.cards__link { margin-top: 30px; font-size: 25px; line-height: 30px; text-underline-offset: 6px; text-decoration-thickness: 3px; }

/* ---- Farm: the farm scene filling the frame's left, fading into the navy behind the copy ---- */
.farm { display: grid; grid-template-columns: 61.9% minmax(0, 1fr); align-items: center; aspect-ratio: 1066 / 373; }
.farm > .farm__art { inset: 6px auto 6px 6px; width: calc(61.9% - 6px); --fade-r: 14%; }
.farm__art img { object-position: 50% 30%; }
.farm__copy { grid-column: 2; padding: 0 12px 16px 30px; }
.farm__title { max-width: 8.4em; font: 700 45px/50px var(--display); }
.farm__lede { max-width: 330px; margin-top: 11px; font-size: 25px; line-height: 30px; }
.farm__copy .farm__link { display: inline-block; margin-top: 20px; font-size: 25px; line-height: 30px; text-underline-offset: 6px; }

/* ---- Facts: "Before you set out." in three columns ---- */
.facts { padding: 21px 40px 36px 62px; }
.facts__title { font: 700 50px/54px var(--display); text-align: center; }
.facts .rule { width: 87%; margin: 2px auto 0; }
.facts__list { display: grid; grid-template-columns: minmax(0, 298fr) minmax(0, 340fr) minmax(0, 326fr); margin-top: 14px; }
.facts__item + .facts__item { padding-left: 42px; border-left: 2px solid #a8652f; }
.facts__name { font: 800 27px/32px var(--sans); }
.facts__text { max-width: 272px; margin-top: 9px; font-size: 22px; line-height: 27px; }

/* ---- Closing: headline and account button; the dragon stands on the frame's floor in front of the
   citadel, which fades into the navy behind the copy ---- */
.closing { display: flex; align-items: center; aspect-ratio: 1066 / 258; padding: 0 0 6px 57px; }
.closing__copy { display: flex; flex-direction: column; align-items: flex-start; }
.closing__title { max-width: 8.2em; font: 700 55px/52px var(--display); }
.closing__cta { margin-top: 17px; min-height: 73px; padding: 6px 49px; font-size: 29px; }
.closing__art::before {
  content: '';
  position: absolute;
  inset: 0 0 0 42%;
  background: url(/assets/art/scenes/home-citadel.webp) 60% 3% / 200% auto no-repeat;
  opacity: 0.7;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 50%), linear-gradient(transparent, #000 15%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 50%), linear-gradient(transparent, #000 15%);
  mask-composite: intersect;
}
.closing__art img { position: absolute; right: 9%; bottom: -36%; width: auto; height: 136%; }

/* ---- Narrow windows: the menu button replaces the nav and the column is 750 to 1000 px ---- */
@media (max-width: 1000px) {
  .hero__copy { max-width: 62%; }
  .hero__title { font-size: 48px; line-height: 52px; }
  .hero__lede { font-size: 21px; line-height: 25px; }
  .hero__start { margin-top: 22px; min-height: 58px; padding-inline: 30px; font-size: 23px; }
  .hero__note { font-size: 17px; }
  .cards__title { font-size: 44px; line-height: 50px; }
  .cards__lede { font-size: 22px; line-height: 30px; }
  .cards__link { font-size: 21px; }
  .farm { grid-template-columns: 58% minmax(0, 1fr); }
  .farm > .farm__art { width: calc(58% - 6px); }
  .farm__title { font-size: 34px; line-height: 40px; }
  .farm__lede { font-size: 20px; line-height: 25px; }
  .farm__copy .farm__link { margin-top: 14px; font-size: 20px; }
  .facts { padding-inline: 32px; }
  .facts__title { font-size: 40px; line-height: 46px; }
  .facts__item + .facts__item { padding-left: 20px; }
  .facts__name { font-size: 19px; line-height: 24px; }
  .facts__text { max-width: 15em; margin-top: 6px; font-size: 16px; line-height: 21px; }
  .closing { padding-left: 40px; }
  .closing__title { font-size: 42px; line-height: 45px; }
  .closing__cta { min-height: 58px; padding-inline: 36px; font-size: 23px; }
}

/* ---- Phones: the phone mockup at 362 px, the same split hero, cards three across ---- */
@media (max-width: 767px) {
  .hero { flex-direction: row; align-items: center; aspect-ratio: 362 / 225; margin: 0 -5px -7px; }
  .hero__art { position: absolute; inset: 10px 0 calc(-1 * var(--gap)) auto; width: 90%; height: auto; --fade-l: 32%; --fade-r: 0%; --fade-t: 6%; --fade-b: 0%; }
  .hero__copy { max-width: none; padding: 14px 0 14px 17px; }
  .hero__title { font-size: 23px; line-height: 25px; }
  .hero__lede { max-width: 10.6em; margin-top: 8px; font-size: 12px; line-height: 13.75px; }
  .hero__start { max-width: 8.6em; min-height: 44px; margin-top: 11px; padding: 4px 10px; font-size: 15px; line-height: 14.5px; white-space: normal; }
  .hero__note { margin-top: 4px; font-size: 12px; line-height: 14.4px; }

  .cards { padding: 14px 10px 16px; }
  .cards__title { font-size: 20.5px; line-height: 24px; }
  .cards .rule { width: 86%; height: 9px; margin-top: 4px; }
  .cards .rule > i { width: 9px; height: 9px; background-size: 9px; }
  .cards__lede { margin-top: 2px; font-size: 11.2px; line-height: 15px; }
  .cards__tiles { width: 96%; column-gap: 3.4%; margin-top: 11px; }
  .cards__link { margin-top: 10px; font-size: 15px; line-height: 18px; text-underline-offset: 3px; text-decoration-thickness: 2px; }

  .farm { grid-template-columns: minmax(0, 1fr); aspect-ratio: auto; text-align: center; }
  .farm > .farm__art { position: relative; inset: auto; width: auto; margin: 6px 6px 0; aspect-ratio: 340 / 132; --fade-r: 0%; --fade-b: 16%; }
  .farm__art img { object-position: 50% 40%; }
  .farm__copy { grid-column: 1; padding: 6px 10px 10px; }
  .farm__title { max-width: none; font-size: 21px; line-height: 23px; }
  .farm__lede { max-width: none; margin-top: 1px; font-size: 13px; line-height: 16px; }
  .farm__copy .farm__link { margin-top: 2px; font-size: 13px; line-height: 16px; text-underline-offset: 3px; text-decoration-thickness: 2px; }

  .facts { padding: 11px 20px 11px; }
  .facts__title { font-size: 23px; line-height: 25px; }
  .facts .rule { width: 92%; height: 9px; margin-top: 3px; }
  .facts .rule > i { width: 9px; height: 9px; background-size: 9px; }
  .facts__list { display: block; margin-top: 2px; }
  .facts__item { padding: 0 0 6px 7px; }
  .facts__item + .facts__item { padding: 2px 0 6px 7px; border-left: 0; border-top: 1.5px solid #a8652f; }
  .facts__item:last-child { padding-bottom: 0; }
  .facts__name { font-size: 13px; line-height: 16px; }
  .facts__text { max-width: 228px; margin-top: 1px; font-size: 10.5px; line-height: 11.5px; }

  .closing { aspect-ratio: 352 / 87; padding: 8px 0 8px 20px; }
  .closing__title { max-width: none; font-size: 20.5px; line-height: 19.5px; }
  .closing__cta { width: 146px; min-height: 26px; margin: 6px 0 0 2px; padding: 2px 8px; font-size: 12px; }
  .closing__art::before { left: 36%; }
  .closing__art img { right: 3%; bottom: -46%; height: 150%; }
}

/* ---- Large phones and small tablets (480 to 767 px): the phone layout with type between phone and tablet ---- */
@media (min-width: 480px) and (max-width: 767px) {
  .hero__copy { padding: 20px 0 20px 24px; }
  .hero__title { font-size: 32px; line-height: 34px; }
  .hero__lede { margin-top: 10px; font-size: 16px; line-height: 19px; }
  .hero__start { min-height: 56px; margin-top: 14px; padding: 6px 14px; font-size: 19px; line-height: 19px; }
  .hero__note { margin-top: 6px; font-size: 15px; line-height: 18px; }
  .cards { padding: 20px 16px 22px; }
  .cards__title { font-size: 28px; line-height: 32px; }
  .cards__lede { margin-top: 4px; font-size: 15px; line-height: 20px; }
  .cards__tiles { margin-top: 16px; }
  .cards__link { margin-top: 14px; font-size: 18px; line-height: 22px; }
  .farm__copy { padding: 10px 16px 16px; }
  .farm__title { font-size: 28px; line-height: 32px; }
  .farm__lede { margin-top: 4px; font-size: 17px; line-height: 22px; }
  .farm__copy .farm__link { margin-top: 6px; font-size: 17px; line-height: 22px; }
  .facts { padding: 16px 28px 18px; }
  .facts__title { font-size: 30px; line-height: 34px; }
  .facts__list { margin-top: 6px; }
  .facts__item { padding: 0 0 10px 8px; }
  .facts__item + .facts__item { padding: 6px 0 10px 8px; }
  .facts__name { font-size: 17px; line-height: 22px; }
  .facts__text { max-width: 300px; margin-top: 2px; font-size: 14px; line-height: 18px; }
  .closing { padding: 12px 0 12px 22px; }
  .closing__title { font-size: 28px; line-height: 28px; }
  .closing__cta { width: auto; min-height: 40px; margin-top: 10px; padding: 4px 22px; font-size: 16px; }
}
