:root {
  --ink: #17212f;
  --muted: #667487;
  --subtle: #8a97a8;
  --line: #dce4ec;
  --soft: #f4f7f9;
  --paper: #ffffff;
  --brand: #0f766e;
  --brand-strong: #0b4f4a;
  --brand-soft: #dff4ef;
  --accent: #2d6cdf;
  --shadow: 0 18px 48px rgba(23, 33, 47, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  background: var(--paper);
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 5vw, 76px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(220, 228, 236, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--brand-strong);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 15px;
  font-weight: 800;
}

nav a {
  padding: 10px 13px;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

nav a:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  background: var(--ink);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-open .menu-toggle span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.site-header.is-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .menu-toggle span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: clamp(468px, 59.4vh, 594px);
  padding: clamp(44px, 7vw, 82px) clamp(20px, 5vw, 76px) 58px;
  color: white;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(8, 46, 54, 0.9), rgba(10, 84, 93, 0.72) 46%, rgba(15, 118, 110, 0.58)),
    url("./public/assets/hero-chatgpt.png") center/cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(6, 28, 32, 0.3));
  pointer-events: none;
}

.hero-content,
.notice-panel,
.hero-credit {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 820px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 28px;
  font-size: clamp(44px, 6.4vw, 76px);
  line-height: 1.08;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

.headline-mobile {
  display: none;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  letter-spacing: 0;
}

.section-label {
  margin: 0 0 13px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions,
.form-actions,
.signature-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-link,
.secondary-link,
.primary-button,
.secondary-button,
.card-button,
.inline-button,
.plain-button,
.upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-link,
.primary-button,
.card-button,
.inline-button {
  color: white;
  background: var(--brand);
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.24);
}

.primary-link:hover,
.primary-button:hover,
.card-button:hover,
.inline-button:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
}

.secondary-link,
.secondary-button,
.plain-button,
.upload-label {
  color: var(--ink);
  background: white;
  border-color: var(--line);
}

.secondary-link:hover,
.secondary-button:hover,
.plain-button:hover,
.upload-label:hover {
  border-color: #b9c7d5;
  transform: translateY(-1px);
}

.hero .secondary-link {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(10px);
}

.notice-panel {
  padding: 26px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.notice-panel strong,
.notice-panel span {
  display: block;
}

.notice-panel strong {
  margin-bottom: 12px;
  color: var(--brand);
  font-size: 14px;
}

.notice-panel span {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.35;
}

.hero .hero-credit {
  position: absolute;
  left: clamp(20px, 5vw, 76px);
  bottom: 16px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  line-height: 1;
}

.about-section,
.action-section,
.contact-section {
  padding: clamp(68px, 9vw, 108px) clamp(20px, 5vw, 76px);
}

.about-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(210px, 320px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 88px);
}

.about-copy {
  max-width: 820px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.about-copy p {
  margin-bottom: 22px;
}

.about-copy ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  color: var(--ink);
  list-style: none;
}

.about-copy li {
  position: relative;
  padding-left: 26px;
}

.about-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: 999px;
}

.inline-button {
  margin-top: 32px;
}

.action-section {
  background:
    linear-gradient(180deg, #f8fbfc 0%, #eef5f4 100%);
  border-top: 1px solid rgba(220, 228, 236, 0.7);
  border-bottom: 1px solid rgba(220, 228, 236, 0.7);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.action-card {
  position: relative;
  min-height: 290px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(205, 217, 228, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 14px 38px rgba(23, 33, 47, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.action-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 22px 54px rgba(23, 33, 47, 0.12);
}

.card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--brand-strong);
  font-weight: 900;
  background: var(--brand-soft);
  border-radius: 999px;
}

.action-card h3 {
  margin: 28px 0 12px;
  font-size: clamp(26px, 3vw, 34px);
}

.action-card p {
  min-height: 58px;
  margin-bottom: 28px;
  color: var(--muted);
  line-height: 1.75;
}

.contact-section {
  background: white;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.contact-list div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  min-height: 52px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-list dt,
.contact-list dd {
  margin: 0;
  padding: 14px 16px;
}

.contact-list dt {
  color: var(--ink);
  font-weight: 900;
}

.contact-list dd {
  color: var(--muted);
  border-left: 1px solid var(--line);
}

.modal {
  width: min(920px, calc(100vw - 28px));
  max-height: min(900px, calc(100vh - 28px));
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(8, 20, 28, 0.64);
  backdrop-filter: blur(2px);
}

.modal-wide {
  width: min(1120px, calc(100vw - 28px));
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.modal-header h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.rules-viewer {
  background: #e5e7eb;
}

iframe {
  width: 100%;
  height: min(70vh, 760px);
  border: 0;
}

.application-form {
  padding: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label,
legend {
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}

.full {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.fee-field,
.signature-field {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.signature-field {
  margin-top: 22px;
}

.fee-field {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.fee-field[hidden] {
  display: none;
}

.fee-field legend,
.signature-field legend {
  padding: 0 6px;
}

.fee-field label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fee-field input {
  width: auto;
  margin: 0;
}

.fee-field p,
.signature-field p {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.signature-tools {
  margin: 10px 0 12px;
}

.upload-label input {
  display: none;
}

canvas {
  display: block;
  width: 100%;
  height: 220px;
  background: white;
  border: 1px dashed #aebdcb;
  border-radius: var(--radius);
  touch-action: none;
}

.template-links {
  padding: 16px 0 10px;
}

.template-links a {
  color: var(--brand-strong);
  font-weight: 900;
}

.form-actions {
  justify-content: flex-end;
  padding-top: 10px;
}

.pdf-document {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10000;
  width: 794px;
  min-height: 1122px;
  color: #000;
  background: white;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
  pointer-events: none;
}

.pdf-page {
  width: 794px;
  height: 1122px;
  padding: 46px 18px 34px;
  background: #fff;
}

.pdf-application h1 {
  margin: 16px 0 48px;
  color: #000;
  font-size: 36px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0;
}

.pdf-box {
  min-height: 920px;
  border: 2px solid #000;
}

.pdf-section-title {
  display: flex;
  align-items: center;
  min-height: 84px;
  padding: 0 20px;
  background: #f1f1f1;
  border-bottom: 1px solid #000;
  font-size: 24px;
  font-weight: 900;
}

.pdf-info-grid {
  display: grid;
  grid-template-columns: 160px 1fr 168px 1fr;
  border-bottom: 1px solid #000;
}

.pdf-label,
.pdf-value {
  display: flex;
  align-items: center;
  min-height: 92px;
  padding: 12px 18px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  font-size: 20px;
}

.pdf-label {
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0;
}

.pdf-value {
  justify-content: flex-start;
  font-size: 19px;
  font-weight: 700;
  word-break: break-word;
}

.pdf-info-grid > :nth-child(4n) {
  border-right: 0;
}

.pdf-info-grid > :nth-last-child(-n + 4) {
  border-bottom: 0;
}

.pdf-fee-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  border-bottom: 1px solid #000;
  font-size: 20px;
  font-weight: 900;
}

.pdf-fee-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 98px;
  border-bottom: 1px solid #000;
}

.pdf-fee-grid > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  font-size: 19px;
  font-weight: 800;
}

.pdf-fee-grid > div:first-child {
  border-right: 1px dotted #000;
}

.pdf-fee-grid small {
  display: block;
  margin-left: 8px;
  font-size: 14px;
  font-weight: 500;
}

.pdf-statement {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 28px 28px 10px;
  font-size: 21px;
  line-height: 1.65;
  text-align: center;
}

.pdf-statement p {
  margin: 0;
}

.pdf-statement-withdraw {
  min-height: 250px;
}

.pdf-date-line {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 34px 0;
  font-size: 20px;
}

.pdf-date-line span {
  min-width: 42px;
  text-align: center;
}

.pdf-signer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 78px;
  padding: 8px 34px;
  font-size: 18px;
}

.pdf-signer strong {
  min-width: 120px;
  font-size: 18px;
  text-align: center;
}

.pdf-signature-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 120px;
  min-height: 56px;
}

.pdf-signature-wrap img {
  position: absolute;
  right: 34px;
  max-width: 110px;
  max-height: 52px;
  object-fit: contain;
}

.pdf-signature-wrap span {
  position: relative;
  z-index: 1;
}

.pdf-recipient {
  margin-top: 18px;
  padding: 0 20px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}

@media (max-width: 820px) {
  body.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(8, 20, 28, 0.36);
  }

  .site-header {
    padding: 12px 18px;
  }

  .menu-toggle {
    display: grid;
  }

  nav {
    position: fixed;
    top: 66px;
    left: 18px;
    right: 18px;
    z-index: 25;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-header.is-open nav {
    display: flex;
  }

  nav a {
    padding: 14px 16px;
    border-radius: var(--radius);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 560px;
    padding: 52px 20px 48px;
  }

  h1 {
    max-width: 360px;
    font-size: clamp(36px, 9vw, 46px);
    line-height: 1.12;
  }

  .headline-desktop {
    display: none;
  }

  .headline-mobile {
    display: block;
    white-space: nowrap;
  }

  .notice-panel {
    align-self: start;
    padding: 20px;
  }

  .hero .hero-credit {
    left: 20px;
    bottom: 12px;
  }

  .about-section,
  .contact-section,
  .action-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .about-section,
  .action-section,
  .contact-section {
    padding: 62px 20px;
  }

  .about-copy {
    font-size: 16px;
  }

  .action-card {
    min-height: 0;
    padding: 24px;
  }

  .contact-list div {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .modal-header,
  .application-form {
    padding: 20px;
  }

  .rules-viewer iframe {
    height: calc(100vh - 116px);
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions a {
    width: 100%;
  }

  h1 {
    font-size: 34px;
  }
}
