/* V72 FONT PATCH — the Ekkamai .ttf files have a corrupted character map
   outside Basic Latin and Thai: 44%% of the codepoints they claim to cover
   point at the wrong outline (° draws a letter, · draws an "n", × and most
   accented Latin draw Thai tone marks). The unicode-range below stops the
   browser from using these faces for anything except the two ranges they
   render correctly; everything else falls through to the next family in the
   stack. Do not widen it — widening reinstates the broken glyphs. */
/* COREVERSE How to Order — supplied responsive backgrounds, supplied type, and full-frame links. */
@font-face {
  font-family: "Howto Northwood";
  src: url("assets/fonts/northwood-high-user.ttf") format("truetype");
  font-display: swap;
  unicode-range: U+0020-007E;
}

@font-face {
  font-family: "Howto Strange";
  src: url("assets/fonts/strange-dreams-user.ttf") format("truetype");
  font-display: swap;
  unicode-range: U+0020-007E;
}

@font-face {
  font-family: "Howto Longa";
  src: url("assets/fonts/longa-iberica-user.ttf") format("truetype");
  font-display: swap;
  unicode-range: U+0020-007E;
}

@font-face {
  font-family: "Howto Ekkamai";
  src: url("assets/fonts/ekkamainew-regular-user.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0020-007E, U+0E00-0E7F;
}

@font-face {
  font-family: "Howto Ekkamai";
  src: url("assets/fonts/ekkamainew-bold-user.ttf") format("truetype");
  font-weight: 700 900;
  font-display: swap;
  unicode-range: U+0020-007E, U+0E00-0E7F;
}

#how-to-order.howto-collage {
  position: relative;
  isolation: isolate;
  min-height: 860px;
  margin: 0;
  padding: clamp(72px, 7vw, 126px) clamp(18px, 4vw, 72px) clamp(86px, 8vw, 140px);
  overflow: hidden;
  background-color: #fff;
  background-image: url("assets/how-to-order/background-desktop-v2.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #060608;
}

#how-to-order.howto-collage::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: transparent;
  pointer-events: none;
}

.howto-collage__head {
  position: relative;
  z-index: 4;
  width: min(1120px, 100%);
  margin: 0 auto clamp(16px, 1.4vw, 28px);
  text-align: center;
}

.howto-collage__head h2 {
  margin: 0;
  font: 400 clamp(82px, 10.5vw, 182px)/.72 "Howto Northwood", serif;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.howto-collage__head h2 [lang="th"] {
  font-family: "Howto Ekkamai", sans-serif;
  font-size: .55em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.045em;
}

.howto-collage__head p {
  margin: clamp(14px, 1.8vw, 26px) 0 0;
  font: 400 clamp(19px, 1.75vw, 29px)/1.3 "Howto Longa", serif;
  letter-spacing: .01em;
}

.howto-collage__head p [lang="th"] {
  font-family: "Howto Ekkamai", sans-serif;
  font-size: .74em;
  font-weight: 700;
}

.howto-collage__stage {
  position: relative;
  z-index: 2;
  width: min(1840px, 100%);
  height: clamp(540px, 41vw, 760px);
  margin: 0 auto;
}

.howto-collage__art,
.howto-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.howto-art {
  object-fit: contain;
  transform-origin: center;
  filter: contrast(1.035);
}

.howto-art--heart { transform: translate3d(-25%, 1%, 0) scale(.96) rotate(-1.4deg); }
.howto-art--doily { transform: translate3d(0, 5%, 0) scale(.73) rotate(1.1deg); }
.howto-art--frame { transform: translate3d(29%, 5%, 0) scale(.94) rotate(.7deg); }
.howto-art--mobile { display: none; }

.howto-card {
  position: absolute;
  z-index: 3;
  display: grid;
  grid-template-columns: .3fr .7fr;
  align-items: center;
  gap: clamp(5px, .5vw, 12px);
  padding: clamp(10px, 1.1vw, 20px);
  color: #fff;
  text-align: center;
  text-decoration: none;
  border-radius: 46%;
  -webkit-tap-highlight-color: transparent;
}

.howto-card::after {
  position: absolute;
  inset: 3%;
  z-index: -1;
  content: "";
  border: 2px solid transparent;
  border-radius: inherit;
  transition: border-color .22s ease, background-color .22s ease, transform .22s ease;
}

.howto-card:hover::after,
.howto-card:focus-visible::after {
  border-color: currentColor;
  background: rgba(255, 255, 255, .08);
  transform: scale(.985);
}

.howto-card:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 5px;
}

.howto-card--one {
  left: 14%;
  top: 28.5%;
  width: 27%;
  height: 39%;
  padding: 2.6% 2.8% 2.3% 2.5%;
  transform: rotate(-.8deg);
}

.howto-card--two {
  left: 38%;
  top: 36.5%;
  width: 24%;
  height: 27.5%;
  padding: 1.8% 1.9% 1.5%;
  color: #050507;
  border-radius: 42%;
  transform: rotate(.6deg);
}

.howto-card--three {
  left: 68%;
  top: 34%;
  width: 26%;
  height: 31%;
  padding: 2% 2.1% 1.8%;
  border-radius: 2%;
  transform: rotate(.35deg);
}

.howto-card__number {
  font: 400 clamp(54px, 4.8vw, 88px)/.72 "Howto Strange", serif;
  letter-spacing: -.04em;
}

.howto-card__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, .9vw, 16px);
}

.howto-card strong {
  display: block;
  font: 400 clamp(19px, 1.62vw, 30px)/1.03 "Howto Strange", serif;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.howto-card strong [lang="th"] {
  font-family: "Howto Ekkamai", sans-serif;
  font-size: .74em;
  font-weight: 800;
  line-height: 1.14;
}

.howto-card__action {
  display: inline-block;
  max-width: 100%;
  padding: 0 1px 5px;
  border-bottom: 3px solid currentColor;
  font: 400 clamp(13px, 1.08vw, 20px)/1 "Howto Longa", serif;
  letter-spacing: .005em;
  text-transform: uppercase;
  white-space: nowrap;
}

.howto-card__action [lang="th"] {
  font-family: "Howto Ekkamai", sans-serif;
  font-size: .72em;
  font-weight: 800;
}

.howto-card--two .howto-card__copy { gap: clamp(5px, .55vw, 10px); }
.howto-card--three .howto-card__copy { gap: clamp(6px, .65vw, 12px); }
.howto-collage__lace { display: none; }

@media (max-width: 980px) {
  #how-to-order.howto-collage { min-height: 720px; padding-inline: 10px; }
  .howto-collage__stage { height: clamp(500px, 53vw, 620px); }
  .howto-card strong { font-size: clamp(17px, 2.1vw, 22px); }
  .howto-card__action { font-size: clamp(12px, 1.5vw, 16px); border-bottom-width: 2px; }
}

@media (max-width: 700px) {
  #how-to-order.howto-collage {
    min-height: 0;
    padding: clamp(82px, 21vw, 108px) 0 clamp(78px, 19vw, 102px);
    overflow: hidden;
    background-image: url("assets/how-to-order/background-mobile-v2.png");
    background-position: center top;
    background-size: 100% 100%;
  }

  #how-to-order.howto-collage::before { background: transparent; }

  .howto-collage__head {
    width: calc(100% - 28px);
    margin-bottom: clamp(8px, 2vw, 14px);
  }

  .howto-collage__head h2 {
    font-size: clamp(78px, 23vw, 122px);
    line-height: .74;
  }

  .howto-collage__head h2 [lang="th"] { font-size: .52em; line-height: 1; }

  .howto-collage__head p {
    width: min(88%, 430px);
    margin: clamp(14px, 4vw, 22px) auto 0;
    font-size: clamp(18px, 5.5vw, 28px);
    line-height: 1.2;
  }

  .howto-collage__stage {
    width: 100%;
    height: min(145vw, 700px);
    margin: 0;
  }

  .howto-collage__art {
    top: max(-27vw, -132px);
    height: min(178vw, 860px);
  }

  .howto-art--heart,
  .howto-art--doily,
  .howto-art--frame { display: none; }

  .howto-art--mobile {
    display: block;
    object-fit: contain;
    object-position: center top;
    transform: none;
    filter: contrast(1.04);
  }

  .howto-card {
    grid-template-columns: .28fr .72fr;
    gap: 4px;
    padding: 12px;
  }

  .howto-card--one {
    left: 11.5%;
    top: 12.5%;
    width: 40%;
    height: 28.5%;
    padding: 3.8% 3.5% 3.2%;
    transform: rotate(-1deg);
  }

  .howto-card--two {
    left: 38%;
    top: 32.5%;
    width: 56%;
    height: 19.5%;
    padding: 2.7% 3% 2.3%;
    transform: rotate(.7deg);
  }

  .howto-card--three {
    left: 22%;
    top: 49.5%;
    width: 48%;
    height: 22.5%;
    padding: 3.1% 3% 2.7%;
    transform: rotate(.3deg);
  }

  .howto-card__number { font-size: clamp(52px, 14vw, 80px); }
  .howto-card strong { font-size: clamp(20px, 5.2vw, 29px); line-height: .96; }
  .howto-card strong [lang="th"] { font-size: .88em; }
  .howto-card__copy { gap: clamp(7px, 2vw, 12px); }
  .howto-card__action {
    padding-bottom: 3px;
    border-bottom-width: 2px;
    font-size: clamp(12px, 3.35vw, 19px);
  }

  .howto-card__action [lang="th"] { font-size: .84em; }

  .howto-card--two .howto-card__copy,
  .howto-card--three .howto-card__copy { gap: clamp(6px, 1.8vw, 11px); }

  .howto-collage__lace { display: none; }
}

@media (max-width: 390px) {
  .howto-card__number { font-size: clamp(48px, 13.2vw, 58px); }
  .howto-card strong { font-size: clamp(18px, 5.1vw, 22px); }
  .howto-card__action { font-size: clamp(11px, 3.1vw, 14px); }
}

@media (prefers-reduced-motion: no-preference) {
  .howto-art--heart { animation: howtoHeartFloat 8.8s ease-in-out infinite alternate; }
  .howto-art--doily { animation: howtoDoilyFloat 10.5s ease-in-out -2s infinite alternate; }
  .howto-art--frame { animation: howtoFrameFloat 9.6s ease-in-out -4s infinite alternate; }
}

@keyframes howtoHeartFloat {
  from { transform: translate3d(-25.4%, 1.5%, 0) scale(.96) rotate(-1.7deg); }
  to { transform: translate3d(-24.7%, .2%, 0) scale(.968) rotate(-1.1deg); }
}

@keyframes howtoDoilyFloat {
  from { transform: translate3d(-.3%, 5.6%, 0) scale(.727) rotate(.7deg); }
  to { transform: translate3d(.35%, 4.4%, 0) scale(.736) rotate(1.35deg); }
}

@keyframes howtoFrameFloat {
  from { transform: translate3d(28.6%, 5.5%, 0) scale(.938) rotate(.35deg); }
  to { transform: translate3d(29.3%, 4.3%, 0) scale(.947) rotate(.9deg); }
}

@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .howto-art--mobile { animation: none; }
}
