:root {
  --stage: clamp(320px, 100vw, 400px);
  --bg: #062512;
  --gold-1: #b38a51;
  --gold-2: #f6e7c0;
  --green: #2e6548;
  --green-dark: #23563b;
  --paper: #fbfaf7;
  --gold-gradient: linear-gradient(90deg, #ebc186 0%, #f6e7c0 50%, #ebc186 100%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  overflow-x: hidden;
  color: #fff;
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  background: #062512;
}

body::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: calc(var(--stage) * 0.012);
  left: 50%;
  width: calc(var(--stage) * 1.04);
  aspect-ratio: 3840 / 1278;
  background: url("./assets/hero-arc.png") center top / 100% 100% no-repeat;
  transform: translateX(-50%);
  pointer-events: none;
}

button,
input {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.consult-panel {
  position: relative;
  width: var(--stage);
  min-height: 100vh;
  padding-top: calc(var(--stage) * 0.0475);
  padding-bottom: calc(var(--stage) * 0.09);
}

.brand {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(var(--stage) * 0.0325);
}

.brand-logo {
  display: block;
  width: calc(var(--stage) * 0.12);
  height: auto;
  filter: invert(1) brightness(2.08);
}

.hero-copy {
  margin-top: calc(var(--stage) * 0.045);
  text-align: center;
}

.headline {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: calc(var(--stage) * 0.004);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 800;
}

.headline-line {
  display: block;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.32);
}

.white-line {
  color: #fff;
  font-size: calc(var(--stage) * 0.0195);
  line-height: 1.12;
  font-weight: 600;
}

.gold-line {
  background: var(--gold-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: calc(var(--stage) * 0.029);
  line-height: 1.2;
  font-weight: 800;
  text-shadow: none;
}

.white-line + .gold-line {
  margin-top: calc(var(--stage) * 0.012);
}

.form-card {
  width: calc(var(--stage) * 0.405);
  min-height: calc(var(--stage) * 0.365);
  margin: calc(var(--stage) * 0.13) auto calc(var(--stage) * 0.065);
  padding: calc(var(--stage) * 0.025) calc(var(--stage) * 0.03) calc(var(--stage) * 0.048);
  border: 1px solid rgba(50, 98, 73, 0.22);
  border-radius: calc(var(--stage) * 0.006);
  background: #fbfaf7;
  color: #111;
  box-shadow:
    inset 0 1px 3px rgba(255, 255, 255, 0.9),
    inset 0 -5px 12px rgba(47, 99, 73, 0.045),
    0 10px 26px rgba(0, 0, 0, 0.22);
}

.form-heading {
  margin: 0 0 calc(var(--stage) * 0.022);
  padding: 0 0 calc(var(--stage) * 0.016);
  text-align: center;
  border-bottom: 2px solid rgba(0, 0, 0, 0.14);
}

.form-heading h2 {
  margin: 0;
  color: #b38a51;
  font-size: calc(var(--stage) * 0.019);
  line-height: 1.25;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0;
}

.field {
  display: grid;
  gap: calc(var(--stage) * 0.007);
  margin-top: calc(var(--stage) * 0.016);
}

.field span {
  position: relative;
  display: block;
  padding-left: calc(var(--stage) * 0.012);
  color: #151d17;
  font-size: calc(var(--stage) * 0.015);
  line-height: 1.2;
  font-weight: 700;
}

.field span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: calc(var(--stage) * 0.0065);
  height: calc(var(--stage) * 0.0065);
  border-radius: 50%;
  background: #dfc27c;
  transform: translateY(-50%);
}

.field input {
  width: 100%;
  height: calc(var(--stage) * 0.038);
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: calc(var(--stage) * 0.005);
  background: #fff;
  padding: 0 calc(var(--stage) * 0.016);
  color: #222;
  font-size: calc(var(--stage) * 0.012);
  line-height: 1;
  font-weight: 400;
  outline: none;
}

.field input:focus {
  border-color: #c19754;
  box-shadow: 0 0 0 2px rgba(193, 151, 84, 0.16);
}

.privacy-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: calc(var(--stage) * 0.009);
  width: 100%;
  margin: calc(var(--stage) * 0.02) 0 calc(var(--stage) * 0.023);
  padding: calc(var(--stage) * 0.01) calc(var(--stage) * 0.008);
  border-radius: calc(var(--stage) * 0.006);
  background: rgba(47, 99, 73, 0.095);
  color: #2b332e;
  font-size: calc(var(--stage) * 0.0125);
  line-height: 1;
  text-align: left;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--stage) * 0.008);
  font-weight: 400;
  white-space: nowrap;
}

.check-label input {
  width: calc(var(--stage) * 0.013);
  height: calc(var(--stage) * 0.013);
  margin: 0;
  accent-color: var(--green);
}

.text-button {
  border: 0;
  background: transparent;
  color: #2b6548;
  padding: 0;
  font-size: calc(var(--stage) * 0.0125);
  line-height: 1;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.form-message {
  min-height: calc(var(--stage) * 0.006);
  margin: 0 0 calc(var(--stage) * 0.003);
  color: #2b6548;
  text-align: center;
  font-size: calc(var(--stage) * 0.01);
  line-height: 1;
  font-weight: 400;
}

.form-message:not(.success) {
  color: #9a241d;
}

.submit-button,
.agree-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--stage) * 0.009);
  width: calc(var(--stage) * 0.305);
  height: calc(var(--stage) * 0.047);
  margin: 0 auto;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #326a4c 0%, #27593f 100%);
  color: #fff;
  font-size: calc(var(--stage) * 0.013);
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.2),
    inset 0 -5px 9px rgba(7, 42, 24, 0.3),
    0 5px 11px rgba(25, 64, 43, 0.2);
}

.submit-button {
  width: 100%;
  font-size: calc(var(--stage) * 0.0175);
  font-weight: 800;
}

.button-arrow {
  display: inline-block;
  width: calc(var(--stage) * 0.012);
  height: calc(var(--stage) * 0.0175);
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='24' height='32' viewBox='0 0 24 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 5L19 16L6 27' stroke='black' stroke-width='6' stroke-linecap='round' stroke-linejoin='miter' stroke-miterlimit='2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='24' height='32' viewBox='0 0 24 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 5L19 16L6 27' stroke='black' stroke-width='6' stroke-linecap='round' stroke-linejoin='miter' stroke-miterlimit='2'/%3E%3C/svg%3E") center / contain no-repeat;
  border: 0;
  line-height: 1;
}

.submit-button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.privacy-modal {
  width: clamp(620px, 64vw, 840px);
  max-width: none;
  min-height: min(92dvh, 900px);
  max-height: 96dvh;
  max-block-size: none;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  overflow: hidden;
}

.privacy-modal::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.modal-inner {
  position: relative;
  min-height: min(92dvh, 900px);
  max-height: 96dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(48px, 4vw, 66px) clamp(42px, 4vw, 64px) clamp(46px, 3.8vw, 62px);
  background: var(--paper);
  color: #18211c;
  border: 1px solid rgba(47, 99, 73, 0.26);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

button.modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0b2118;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}

button.modal-close::before,
button.modal-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 2.5px;
  background: #050505;
  border-radius: 999px;
  transform-origin: center;
}

button.modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

button.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-kicker {
  margin: 0 0 10px;
  color: #c19754;
  font-size: 20px;
  font-weight: 800;
}

.modal-inner h2 {
  margin: 0 56px 26px 0;
  color: #0f291f;
  font-size: clamp(30px, 2.25vw, 38px);
  line-height: 1.32;
  font-weight: 800;
}

.mobile-title-break {
  display: none;
}

.policy-text {
  flex: 1 1 auto;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 12px;
  margin-bottom: 56px;
}

.policy-text h3 {
  margin: 22px 0 8px;
  color: #113226;
  font-size: 22px;
  font-weight: 800;
}

.policy-text p {
  margin: 0;
  color: #3e4943;
  font-size: 19px;
  line-height: 1.74;
  word-break: keep-all;
}

.modal-inner .agree-button {
  width: 100%;
  height: 62px;
  min-height: 62px;
  font-size: 21px;
}

@media (max-width: 768px) {
  html,
  body {
    min-height: 100%;
    background: var(--bg);
    overflow-x: hidden;
  }

  body {
    min-height: 100dvh;
  }

  .page-shell {
    min-height: 100dvh;
  }

  .consult-panel {
    width: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    padding: 30px 18px 72px;
  }

  body::before {
    top: 148px;
    width: 100vw;
  }

  .brand {
    height: 34px;
  }

  .brand-logo {
    width: 112px;
  }

  .hero-copy {
    margin-top: 32px;
  }

  .headline {
    gap: 5px;
  }

  .white-line {
    font-size: 18px;
    line-height: 1.22;
  }

  .gold-line {
    font-size: 25px;
    line-height: 1.22;
  }

  .white-line + .gold-line {
    margin-top: 10px;
  }

  .form-card {
    width: min(calc(100vw - 42px), 390px);
    min-height: auto;
    margin: 102px auto 48px;
    padding: 28px 26px 32px;
    border-radius: 7px;
  }

  .form-heading {
    margin-bottom: 20px;
    padding-bottom: 14px;
  }

  .form-heading h2 {
    font-size: 19px;
    line-height: 1.35;
    font-weight: 900;
    text-shadow: 0 0 0.01px currentColor;
  }

  .field {
    gap: 8px;
    margin-top: 15px;
  }

  .field span {
    padding-left: 12px;
    font-size: 15px;
  }

  .field span::before {
    width: 5px;
    height: 5px;
  }

  .field input {
    height: 50px;
    padding: 0 14px;
    border-radius: 5px;
    font-size: 16px;
  }

  .privacy-row {
    gap: 8px;
    margin: 28px 0 22px;
    padding: 13px 11px;
    border-radius: 6px;
    font-size: 15px;
  }

  .check-label {
    gap: 8px;
  }

  .check-label input {
    width: 18px;
    height: 18px;
  }

  .text-button {
    font-size: 15px;
  }

  .form-message {
    min-height: 8px;
    margin-bottom: 6px;
    font-size: 12px;
  }

  .submit-button {
    height: 60px;
    font-size: 18px;
  }

  .button-arrow {
    width: 13px;
    height: 18px;
  }

  .privacy-modal {
    width: min(calc(100vw - 84px), 340px);
    min-height: 0;
    max-height: 76dvh;
  }

  .privacy-modal::backdrop {
    background: rgba(0, 0, 0, 0.42);
  }

  .modal-inner {
    min-height: 0;
    max-height: 76dvh;
    padding: 24px 22px 22px;
  }

  button.modal-close {
    top: 14px;
    right: 14px;
    width: 26px;
    height: 26px;
    background: transparent;
    font-size: 0;
  }

  button.modal-close::before,
  button.modal-close::after {
    width: 26px;
    height: 2px;
  }

  .modal-kicker {
    margin-bottom: 7px;
    font-size: 14px;
  }

  .modal-inner h2 {
    margin: 0 34px 16px 0;
    font-size: 20px;
    line-height: 1.32;
  }

  .mobile-title-break {
    display: block;
  }

  .policy-text {
    padding-right: 7px;
    margin-bottom: 22px;
  }

  .policy-text h3 {
    margin: 16px 0 5px;
    font-size: 16px;
  }

  .policy-text p {
    font-size: 14.5px;
    line-height: 1.62;
  }

  .modal-inner .agree-button {
    height: 48px;
    min-height: 48px;
    font-size: 16px;
  }
}

@media (min-width: 769px) {
  :root {
    --stage: min(100vw, 1920px);
  }
}
