:root {
  --cream: #fbf7ef;
  --sand: #f3e3ce;
  --terracotta: #cb6f4f;
  --terracotta-dark: #a9553c;
  --plum: #402a27;
  --sage: #8b9271;
  --gold: #cda66a;
  --whatsapp: #0aa357;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: #ead9c4;
  color: var(--plum);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

button { font: inherit; }

.page-shell {
  min-height: 100dvh;
  padding: clamp(12px, 2vw, 28px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 255, 255, 0.82), transparent 28%),
    linear-gradient(135deg, #ead7bf, #f8eee1 58%, #e7cfb4);
}

.landing-card {
  position: relative;
  width: min(1460px, 100%);
  height: min(900px, calc(100dvh - clamp(24px, 4vw, 56px)));
  min-height: 650px;
  display: grid;
  grid-template-columns: 48% 52%;
  grid-template-rows: 67% 26% 7%;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at 85% 93%, rgba(226, 171, 118, 0.2), transparent 25%),
    linear-gradient(145deg, #fffdf8, var(--cream));
  box-shadow: 0 22px 55px rgba(91, 61, 39, 0.18);
}

.hero-copy {
  z-index: 3;
  padding: clamp(42px, 5vw, 92px) clamp(34px, 5vw, 86px) 24px;
  align-self: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: clamp(18px, 2.2vw, 32px);
  padding: 10px 20px;
  border-radius: 999px;
  background: #f5dcc7;
  color: var(--terracotta-dark);
  font-size: clamp(15px, 1.15vw, 20px);
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: clamp(48px, 5vw, 82px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.015em;
}

h1 span { display: block; }

.lead {
  margin: clamp(20px, 2.4vw, 34px) 0 24px;
  color: #4f403b;
  font-size: clamp(17px, 1.35vw, 23px);
  line-height: 1.75;
  letter-spacing: 0.035em;
}

.whatsapp-button,
.modal-submit {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--whatsapp), #0ab864);
  box-shadow: 0 10px 22px rgba(10, 163, 87, 0.22);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.whatsapp-button {
  min-height: 72px;
  padding: 13px 25px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-radius: 14px;
  font-size: clamp(20px, 1.65vw, 28px);
  font-weight: 700;
}

.whatsapp-button:hover,
.modal-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(10, 163, 87, 0.3);
}

.whatsapp-button:focus-visible,
.modal-submit:focus-visible,
.option:focus-visible,
.modal-close:focus-visible {
  outline: 3px solid rgba(10, 163, 87, 0.35);
  outline-offset: 3px;
}

.whatsapp-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 3px solid currentColor;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}

.whatsapp-mark.small {
  width: 31px;
  height: 31px;
  border-width: 2px;
  font-size: 16px;
}

.reassurance {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #52443e;
  font-size: clamp(16px, 1.2vw, 20px);
  letter-spacing: 0.06em;
}

.person-mark {
  position: relative;
  width: 24px;
  height: 24px;
  color: var(--gold);
  font-size: 25px;
  line-height: 15px;
}

.person-mark::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 0;
  width: 16px;
  height: 8px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.hero-photo {
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: 29% 18%;
}

.hero-photo::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: 16%;
  background: linear-gradient(90deg, var(--cream), transparent);
  pointer-events: none;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 29%;
}

.steps-wrap {
  position: relative;
  z-index: 4;
  grid-column: 1 / -1;
  padding: 28px clamp(34px, 5vw, 82px) 8px;
}

.steps-heading {
  position: absolute;
  z-index: 2;
  top: 1px;
  left: 50%;
  transform: translate(-50%, -20%);
  padding: 9px 42px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--terracotta), #dc8868);
  color: white;
  font-size: clamp(15px, 1.15vw, 19px);
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.steps {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid #edd1b6;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.72);
}

.step-card {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 15px;
  padding: 26px 26px 18px;
}

.step-card + .step-card { border-left: 1px solid #eed5bd; }

.step-number {
  position: absolute;
  top: 15px;
  left: 17px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--terracotta);
  color: white;
  font-weight: 700;
}

.step-icon {
  width: 67px;
  height: 67px;
  display: grid;
  place-items: center;
  margin-top: 19px;
  border: 2px solid var(--sage);
  border-radius: 50%;
  color: var(--terracotta);
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 700;
}

.step-card h2 {
  margin: 12px 0 6px;
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: clamp(22px, 1.6vw, 28px);
}

.step-card p {
  margin: 0;
  color: #62514a;
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.55;
}

.disclaimer {
  z-index: 3;
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  margin: 0;
  color: #78675c;
  font-size: clamp(12px, 0.95vw, 15px);
  letter-spacing: 0.02em;
}

.disclaimer span { margin-right: 10px; color: var(--gold); }

.leaf-decoration {
  position: absolute;
  z-index: 1;
  width: 56px;
  height: 20px;
  border-radius: 100% 0 100% 0;
  background: rgba(139, 146, 113, 0.52);
  transform: rotate(-35deg);
}

.leaf-one { left: 18px; bottom: 28px; }
.leaf-two { right: 25px; bottom: 150px; transform: rotate(145deg) scale(0.8); }

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(45, 31, 27, 0.62);
  backdrop-filter: blur(9px);
}

.modal-backdrop[hidden],
[hidden] {
  display: none !important;
}

.screening-modal {
  position: relative;
  width: min(690px, 100%);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: clamp(25px, 4vw, 48px);
  border: 1px solid rgba(205, 166, 106, 0.48);
  border-radius: 27px;
  background: #fffaf2;
  box-shadow: 0 26px 80px rgba(35, 24, 21, 0.3);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f4e5d4;
  color: var(--plum);
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.modal-kicker {
  color: var(--terracotta-dark);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.screening-modal > h2 {
  margin: 8px 0;
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: clamp(30px, 5vw, 43px);
}

.modal-intro { margin: 0 0 24px; color: #6d5c54; }

fieldset { margin: 0 0 23px; padding: 0; border: 0; }

legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 700;
}

legend span {
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #f0d2bd;
  color: var(--terracotta-dark);
}

.option-grid { display: grid; gap: 9px; }
.four-options { grid-template-columns: repeat(4, 1fr); }
.three-options { grid-template-columns: repeat(3, 1fr); }
.condition-options { grid-template-columns: repeat(2, 1fr); }

.option {
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid #dfc8b2;
  border-radius: 12px;
  background: white;
  color: #5b4942;
  cursor: pointer;
  transition: 150ms ease;
}

.option:hover { border-color: var(--terracotta); background: #fff5ec; }

.option.active {
  border-color: var(--terracotta-dark);
  background: #f5dcc7;
  color: #733d2e;
  box-shadow: inset 0 0 0 1px var(--terracotta-dark);
}

.form-status {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5e4d5;
  color: #7b402f;
  font-size: 14px;
  line-height: 1.5;
}

.modal-next {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--terracotta), #d98565);
  color: white;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.course-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.course-choice {
  min-height: 112px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 16px;
  cursor: pointer;
}

.course-choice strong { font-size: 19px; }
.course-choice span { font-size: 13px; line-height: 1.4; }

.course-choice.yes {
  border: 1px solid #07904d;
  background: linear-gradient(135deg, var(--whatsapp), #0ab864);
  color: white;
  box-shadow: 0 9px 20px rgba(10, 163, 87, 0.2);
}

.course-choice.no {
  border: 1px solid #dec8b3;
  background: white;
  color: #6d5c54;
}

.course-choice:focus-visible,
.modal-next:focus-visible,
.modal-back:focus-visible {
  outline: 3px solid rgba(10, 163, 87, 0.3);
  outline-offset: 3px;
}

.modal-back {
  display: block;
  margin: 2px auto 0;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: #806e64;
  font-size: 13px;
  cursor: pointer;
}

.modal-submit {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
}

.modal-submit:disabled { cursor: wait; filter: grayscale(0.25); }

.privacy-note {
  margin: 11px 0 0;
  color: #86746a;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 900px) {
  .page-shell { padding: 0; }

  .landing-card {
    width: 100%;
    height: 100dvh;
    min-height: 610px;
    grid-template-columns: 1fr;
    grid-template-rows: 31% auto minmax(0, 1fr) auto;
    border-radius: 0;
  }

  .hero-photo { grid-row: 1; border-radius: 0 0 36% 8%; }
  .hero-photo::before { display: none; }
  .hero-photo img { object-position: center 24%; }

  .hero-copy {
    grid-row: 2;
    padding: 13px 24px 4px;
    align-self: stretch;
  }

  .eyebrow {
    margin: -22px 0 9px;
    padding: 7px 14px;
    font-size: 12px;
  }

  h1 { font-size: clamp(35px, 9.8vw, 52px); line-height: 1.08; }

  .lead {
    margin: 9px 0 11px;
    font-size: clamp(13px, 3.7vw, 17px);
    line-height: 1.5;
  }

  .lead br { display: none; }

  .whatsapp-button {
    width: 100%;
    min-height: 52px;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 12px;
    font-size: clamp(16px, 4.6vw, 21px);
  }

  .whatsapp-mark { width: 33px; height: 33px; border-width: 2px; font-size: 17px; }

  .reassurance { margin-top: 8px; justify-content: center; font-size: 13px; }

  .steps-wrap { grid-row: 3; padding: 9px 17px 3px; }
  .steps-heading { display: none; }

  .steps {
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
    background: transparent;
    gap: 5px;
  }

  .step-card {
    min-height: 0;
    grid-template-columns: 34px 47px 1fr;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid #ecd5bf;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
  }

  .step-card + .step-card { border-left: 1px solid #ecd5bf; }

  .step-number {
    position: static;
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .step-icon {
    width: 41px;
    height: 41px;
    margin: 0;
    border-width: 1.5px;
    font-size: 17px;
  }

  .step-card h2 { margin: 0 0 1px; font-size: 17px; }
  .step-card p { font-size: 11px; line-height: 1.35; }

  .disclaimer {
    grid-row: 4;
    padding: 0 18px;
    font-size: 10px;
    line-height: 1.35;
    text-align: center;
  }

  .leaf-decoration { display: none; }
}

@media (max-width: 560px) {
  .screening-modal { padding: 24px 18px 20px; border-radius: 22px; }
  .screening-modal > h2 { font-size: 30px; }
  .modal-intro { margin-bottom: 17px; font-size: 13px; }
  fieldset { margin-bottom: 17px; }
  legend { font-size: 15px; }
  .four-options { grid-template-columns: repeat(2, 1fr); }
  .three-options { grid-template-columns: 1fr; }
  .condition-options { grid-template-columns: 1fr; }
  .option { min-height: 43px; font-size: 13px; }
  .course-choice-grid { grid-template-columns: 1fr; }
  .course-choice { min-height: 78px; padding: 12px; }
}

@media (max-width: 900px) and (max-height: 780px) {
  .landing-card {
    min-height: 0;
    grid-template-rows: 27% auto minmax(0, 1fr) auto;
  }

  .hero-copy { padding: 8px 20px 2px; }

  .eyebrow {
    margin: -15px 0 6px;
    padding: 5px 12px;
    font-size: 11px;
  }

  h1 { font-size: clamp(32px, 8.7vw, 40px); line-height: 1.04; }

  .lead {
    margin: 6px 0 8px;
    font-size: 12px;
    line-height: 1.4;
  }

  .whatsapp-button { min-height: 48px; padding-block: 5px; }
  .reassurance { margin-top: 4px; font-size: 12px; }
  .steps-wrap { padding-top: 5px; padding-bottom: 2px; }
  .steps { gap: 4px; }
  .step-card { padding-top: 3px; padding-bottom: 3px; }
  .step-card p { display: none; }
  .disclaimer { padding-bottom: 3px; font-size: 9px; }
}

@media (max-width: 390px), (max-height: 680px) and (max-width: 900px) {
  .landing-card { grid-template-rows: 26% auto minmax(0, 1fr) auto; }
  .hero-copy { padding-left: 18px; padding-right: 18px; }
  h1 { font-size: 34px; }
  .lead { font-size: 12px; }
  .step-card { padding-top: 4px; padding-bottom: 4px; }
  .step-card p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
