:root {
  --how-navy: #18345f;
  --how-navy-deep: #10294d;
  --how-yellow: #f6c744;
  --how-cream: #fffaf0;
  --how-blue: #eef5ff;
  --how-mint: #eef8f4;
  --how-peach: #fff1ec;
  --how-ink: #15243b;
  --how-muted: #667085;
  --how-border: rgba(24, 52, 95, 0.1);
  --how-shadow: 0 24px 70px -40px rgba(24, 52, 95, 0.42);
}

.how-page {
  color: var(--how-ink);
  background: #fff;
}

.how-page main {
  padding-bottom: 96px;
}

.how-page .mlb-nav-links a:focus-visible,
.how-page a:focus-visible,
.how-page button:focus-visible {
  outline: 3px solid var(--how-yellow);
  outline-offset: 4px;
}

.how-eyebrow {
  margin-bottom: 14px;
  color: var(--how-navy);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.lang-th .how-eyebrow {
  letter-spacing: 0.02em;
  text-transform: none;
}

.how-hero {
  padding: 36px 0 34px;
}

.how-hero-grid {
  min-height: 670px;
  padding: clamp(48px, 6vw, 82px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(480px, 1.08fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: center;
  border: 1px solid rgba(246, 199, 68, 0.3);
  border-radius: 42px;
  background:
    radial-gradient(circle at 8% 88%, rgba(246, 199, 68, 0.26) 0 88px, transparent 89px),
    radial-gradient(circle at 99% 8%, rgba(207, 232, 251, 0.42) 0 92px, transparent 93px),
    var(--how-cream);
  box-shadow: var(--how-shadow);
  overflow: hidden;
}

.how-hero-copy {
  position: relative;
  z-index: 2;
}

.how-hero h1 {
  max-width: 650px;
  color: var(--how-navy);
  font-family: var(--mlb-font-display);
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

body.lang-th .how-hero h1 {
  font-family: var(--mlb-font-thai);
  font-size: clamp(42px, 4.7vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1.13;
}

.how-hero-lead {
  max-width: 590px;
  margin-top: 24px;
  color: var(--how-muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.75;
}

.how-hero-actions {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.how-primary-btn {
  min-height: 58px;
  padding: 16px 24px;
  color: #fff;
  background: var(--how-navy);
  border-radius: 14px;
  box-shadow: 0 18px 34px -22px rgba(24, 52, 95, 0.78);
}

.how-primary-btn:hover {
  background: var(--how-navy-deep);
}

.how-text-link,
.how-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--how-navy);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.how-hero-note {
  margin-top: 22px;
  color: var(--how-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.how-hero-visual {
  position: relative;
  min-height: 530px;
}

.how-phone {
  position: relative;
  width: min(100%, 330px);
  padding: 8px;
  border: 2px solid #071325;
  border-radius: 42px;
  background: linear-gradient(135deg, #152946, #050b14 68%, #243a59);
  box-shadow: 0 34px 70px -32px rgba(5, 16, 33, 0.72), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.how-phone::before {
  content: "";
  position: absolute;
  top: 25%;
  left: -5px;
  width: 4px;
  height: 56px;
  border-radius: 4px 0 0 4px;
  background: #0a1729;
}

.how-phone-screen {
  position: relative;
  aspect-ratio: 720 / 1404;
  overflow: hidden;
  border-radius: 33px;
  background: #fff;
}

.how-phone-screen img {
  width: 100%;
  max-width: none;
  transform: translateY(-9.85%);
  transform-origin: top center;
}

.how-phone--register .how-phone-screen {
  aspect-ratio: 720 / 1260;
}

.how-phone--register .how-phone-screen img {
  transform: translateY(-9.85%);
}

.how-phone--hero-home,
.how-phone--hero-menu {
  position: absolute;
  bottom: 8px;
  width: min(58%, 330px);
}

.how-phone--hero-home {
  left: 1%;
  z-index: 1;
  transform: rotate(-3deg);
}

.how-phone--hero-menu {
  right: 0;
  z-index: 2;
  transform: rotate(3deg);
}

.how-proof {
  padding: 16px 0 74px;
}

.how-proof-grid {
  padding: 22px 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--how-border);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 46px -36px rgba(24, 52, 95, 0.38);
}

.how-proof-grid > div {
  min-height: 64px;
  padding: 6px 24px;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
}

.how-proof-grid > div + div {
  border-left: 1px solid var(--how-border);
}

.how-proof-icon {
  grid-row: 1 / -1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--how-cream);
  color: var(--how-navy);
  font-weight: 900;
}

.how-proof-grid strong {
  align-self: end;
  color: var(--how-navy);
  font-size: 18px;
  line-height: 1.2;
}

.how-proof-grid strong + span {
  align-self: start;
  color: var(--how-muted);
  font-size: 13px;
  font-weight: 700;
}

.how-intro {
  padding: 48px 0 62px;
  text-align: center;
}

.how-intro h2 {
  max-width: 780px;
  margin: 0 auto;
  color: var(--how-navy);
  font-family: var(--mlb-font-display);
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

body.lang-th .how-intro h2 {
  font-family: var(--mlb-font-thai);
  letter-spacing: -0.018em;
}

.how-intro p:last-child {
  max-width: 650px;
  margin: 22px auto 0;
  color: var(--how-muted);
  font-size: 17px;
  line-height: 1.75;
}

.how-steps {
  display: grid;
  gap: 30px;
}

.how-step {
  min-height: 640px;
  padding: clamp(34px, 4.5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr);
  gap: clamp(34px, 5vw, 74px);
  align-items: center;
  border: 1px solid var(--how-border);
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 22px 60px -46px rgba(24, 52, 95, 0.5);
  overflow: hidden;
}

.how-step--reverse {
  grid-template-columns: minmax(390px, 1.1fr) minmax(0, 0.9fr);
}

.how-step--reverse .how-step-copy {
  order: 2;
}

.how-step--reverse .how-step-media {
  order: 1;
}

.how-step-number {
  display: block;
  margin-bottom: 36px;
  color: var(--how-yellow);
  font-family: var(--mlb-font-display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.how-step--blue .how-step-number {
  color: #4f96ec;
}

.how-step--mint .how-step-number {
  color: #63ad97;
}

.how-step--peach .how-step-number {
  color: #ef7057;
}

.how-step-copy h2 {
  max-width: 520px;
  color: var(--how-navy);
  font-family: var(--mlb-font-display);
  font-size: clamp(36px, 3.7vw, 54px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

body.lang-th .how-step-copy h2 {
  font-family: var(--mlb-font-thai);
  letter-spacing: -0.018em;
}

.how-step-copy > p:not(.how-eyebrow) {
  max-width: 510px;
  margin-top: 22px;
  color: var(--how-muted);
  font-size: 17px;
  line-height: 1.8;
}

.how-inline-link {
  margin-top: 26px;
}

.how-step-media {
  min-height: 520px;
  margin: 0;
  padding: 36px 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  border-radius: 28px;
  overflow: hidden;
}

.how-step--yellow .how-step-media {
  background: radial-gradient(circle at 70% 35%, rgba(255, 255, 255, 0.74) 0 120px, transparent 121px), #fff3cf;
}

.how-step--blue .how-step-media {
  background: radial-gradient(circle at 25% 78%, rgba(255, 255, 255, 0.8) 0 140px, transparent 141px), var(--how-blue);
}

.how-step--mint .how-step-media {
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.78) 0 100px, transparent 101px), var(--how-mint);
}

.how-step--peach .how-step-media {
  background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.72) 0 130px, transparent 131px), var(--how-peach);
}

.how-step-media .how-phone {
  width: min(100%, 300px);
  flex: 0 0 auto;
}

.how-step-media figcaption {
  width: calc(100% + 64px);
  min-height: 52px;
  margin-top: 20px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.84);
  color: var(--how-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  backdrop-filter: blur(8px);
}

.how-closing {
  margin-top: 84px;
  padding: clamp(54px, 7vw, 92px) 32px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 8% 80%, rgba(246, 199, 68, 0.28) 0 3px, transparent 4px) 0 0 / 24px 24px,
    linear-gradient(135deg, var(--how-navy-deep), var(--how-navy));
  color: #fff;
  text-align: center;
  box-shadow: 0 32px 70px -40px rgba(16, 41, 77, 0.8);
}

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

.how-closing h2 {
  max-width: 820px;
  margin: 0 auto;
  font-family: var(--mlb-font-display);
  font-size: clamp(40px, 4.5vw, 62px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

body.lang-th .how-closing h2 {
  font-family: var(--mlb-font-thai);
  letter-spacing: -0.018em;
}

.how-closing > p:not(.how-eyebrow) {
  max-width: 650px;
  margin: 22px auto 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.7;
}

.how-closing-actions {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.how-closing-btn {
  min-height: 58px;
  padding: 16px 26px;
  border-radius: 14px;
  background: var(--how-yellow);
  color: var(--how-navy-deep);
  box-shadow: 0 16px 32px -20px rgba(0, 0, 0, 0.66);
}

.how-closing-btn .mlb-line-icon {
  background: var(--how-navy-deep);
  color: #fff;
}

.how-closing-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.mlb-footer {
  padding: 34px 0 36px;
  background: #fff;
  border-top: 1px solid var(--how-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 34px;
  align-items: start;
}

.footer-col h3 {
  margin-bottom: 9px;
  color: var(--mlb-green-900);
  font-size: 13px;
  font-weight: 800;
}

.footer-col a,
.footer-col p {
  display: block;
  margin-top: 5px;
  color: var(--mlb-muted);
  font-size: 12px;
  font-weight: 700;
}

.footer-col a[aria-current="page"] {
  color: var(--how-navy);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-meta p {
  max-width: 190px;
}

.social-row {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.social-row a {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mlb-green-100);
  color: var(--mlb-green-900);
  font-weight: 800;
}

@media (max-width: 1120px) {
  .how-hero-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr);
    min-height: 610px;
    padding: 52px 44px;
  }

  .how-hero-visual {
    min-height: 470px;
  }

  .how-step,
  .how-step--reverse {
    grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
    gap: 38px;
  }

  .how-step--reverse {
    grid-template-columns: minmax(340px, 1.08fr) minmax(0, 0.92fr);
  }
}

@media (max-width: 980px) {
  .how-page main {
    padding-bottom: 112px;
  }

  .how-hero {
    padding-top: 18px;
  }

  .how-hero-grid {
    width: min(100% - 36px, var(--mlb-max));
    grid-template-columns: minmax(0, 0.92fr) minmax(330px, 1.08fr);
    gap: 24px;
    min-height: 560px;
    padding: 42px 34px;
    border-radius: 32px;
  }

  .how-hero h1,
  body.lang-th .how-hero h1 {
    font-size: clamp(36px, 5vw, 48px);
  }

  .how-hero-lead {
    font-size: 16px;
  }

  .how-hero-visual {
    min-height: 420px;
  }

  .how-proof {
    padding-bottom: 52px;
  }

  .how-proof-grid {
    width: min(100% - 36px, var(--mlb-max));
    padding: 16px;
  }

  .how-proof-grid > div {
    padding: 6px 14px;
  }

  .how-steps {
    width: min(100% - 36px, var(--mlb-max));
  }

  .how-step,
  .how-step--reverse {
    min-height: 560px;
    padding: 36px;
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
    gap: 30px;
    border-radius: 28px;
  }

  .how-step--reverse {
    grid-template-columns: minmax(300px, 1.1fr) minmax(0, 0.9fr);
  }

  .how-step-copy h2 {
    font-size: clamp(32px, 4.5vw, 44px);
  }

  .how-step-media {
    min-height: 470px;
    padding: 28px 24px 0;
  }

  .how-step-media .how-phone {
    width: min(100%, 265px);
  }

  .how-closing {
    width: min(100% - 36px, var(--mlb-max));
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .how-page main {
    padding-bottom: 96px;
  }

  .how-hero {
    padding: 10px 0 20px;
  }

  .how-hero-grid {
    width: min(100% - 28px, var(--mlb-max));
    min-height: auto;
    padding: 38px 22px 30px;
    grid-template-columns: 1fr;
    gap: 34px;
    border-radius: 28px;
  }

  .how-hero-copy {
    text-align: center;
  }

  .how-hero h1,
  body.lang-th .how-hero h1 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .how-hero-lead {
    margin-right: auto;
    margin-left: auto;
  }

  .how-hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .how-primary-btn {
    width: 100%;
  }

  .how-text-link {
    justify-content: center;
  }

  .how-hero-visual {
    min-height: 410px;
  }

  .how-phone--hero-home,
  .how-phone--hero-menu {
    width: min(58%, 245px);
  }

  .how-phone--hero-home {
    left: 4%;
  }

  .how-phone--hero-menu {
    right: 4%;
  }

  .how-proof {
    padding: 4px 0 48px;
  }

  .how-proof-grid {
    width: min(100% - 28px, var(--mlb-max));
    padding: 10px 6px;
    border-radius: 18px;
  }

  .how-proof-grid > div {
    min-width: 0;
    min-height: 84px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    text-align: center;
  }

  .how-proof-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
  }

  .how-proof-grid strong {
    font-size: 14px;
  }

  .how-proof-grid strong + span {
    font-size: 10px;
  }

  .how-intro {
    padding: 38px 0 42px;
  }

  .how-intro h2 {
    font-size: 34px;
  }

  .how-intro p:last-child {
    margin-top: 16px;
    font-size: 15px;
  }

  .how-steps {
    width: min(100% - 28px, var(--mlb-max));
    gap: 20px;
  }

  .how-step,
  .how-step--reverse {
    min-height: auto;
    padding: 30px 20px 0;
    grid-template-columns: 1fr;
    gap: 26px;
    border-radius: 24px;
  }

  .how-step--reverse .how-step-copy,
  .how-step-copy {
    order: 1;
  }

  .how-step--reverse .how-step-media,
  .how-step-media {
    order: 2;
  }

  .how-step-number {
    margin-bottom: 24px;
    font-size: 30px;
  }

  .how-step-copy h2 {
    font-size: 34px;
  }

  .how-step-copy > p:not(.how-eyebrow) {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.72;
  }

  .how-step-media {
    width: calc(100% + 40px);
    min-height: 500px;
    margin-left: -20px;
    padding: 28px 16px 0;
    border-radius: 0;
  }

  .how-step-media .how-phone {
    width: min(82%, 290px);
  }

  .how-step-media figcaption {
    width: calc(100% + 32px);
    min-height: 58px;
    font-size: 11px;
  }

  .how-closing {
    width: min(100% - 28px, var(--mlb-max));
    margin-top: 54px;
    padding: 48px 22px;
    border-radius: 26px;
  }

  .how-closing h2 {
    font-size: 36px;
  }

  .how-closing > p:not(.how-eyebrow) {
    font-size: 15px;
  }

  .how-closing-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .how-closing-btn {
    width: 100%;
  }

  .how-closing-link {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    text-align: center;
  }

  .social-row {
    justify-content: center;
  }

  .footer-meta p {
    max-width: none;
  }
}

@media (max-width: 420px) {
  .how-hero-visual {
    min-height: 350px;
  }

  .how-phone--hero-home,
  .how-phone--hero-menu {
    width: min(60%, 210px);
  }

  .how-step-media {
    min-height: 450px;
  }

  .how-step-media .how-phone {
    width: min(86%, 260px);
  }
}

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

  .how-page *,
  .how-page *::before,
  .how-page *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
