:root {
  --surface-page: #FFF9F2;
  --surface-soft: #F7EFE5;
  --text-primary: #433D37;
  --text-secondary: #746D65;
  --border-subtle: #E3D6C7;
  --accent-warm: #E6BA93;
  --text-inverse: #FFF9F2;
  --state-error: #8A2F24;
  --state-success: #315B41;
  --gutter: 24px;
  --section: 64px;
  --content-max: 1120px;
  --form-max: 560px;
  --control-min: 48px;
  --radius: 8px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font-display: "MaruBuri", serif;
  --font-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
}

@media (min-width: 768px) {
  :root { --gutter: 48px; --section: 96px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}
@media (min-width: 768px) { body { font-size: 18px; } }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 var(--gutter);
  background: rgba(255, 249, 242, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-subtle);
}
.brand { font-family: var(--font-display); font-weight: 700; font-size: 22px; text-decoration: none; }
.header-link { font-size: 15px; font-weight: 600; text-decoration: none; }

/* 첫 화면 */
.hero { display: grid; }
.hero-figure { margin: 0; background: var(--surface-soft); }
.hero-figure img { width: 100%; }
.hero-text { padding: 32px var(--gutter) 0; max-width: 640px; }
.eyebrow { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--text-secondary); letter-spacing: .02em; }
h1, h2 { font-family: var(--font-display); font-weight: 700; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.22; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.3; margin-bottom: 24px; }
.lead { margin: 16px 0 24px; max-width: 34em; }

@media (min-width: 1200px) {
  .hero {
    grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
    gap: 64px; align-items: center;
    max-width: var(--content-max); margin: 48px auto 0; padding: 0 var(--gutter);
  }
  .hero-text { padding: 0; }
}

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--control-min); padding: 0 28px;
  border: 0; border-radius: var(--radius);
  background: var(--text-primary); color: var(--text-inverse);
  font: 600 16px/1.4 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}
.button:hover { background: #2F2A26; }
.button:active { transform: translateY(1px); }
.button[disabled] { opacity: .6; cursor: progress; }

/* 공통 섹션 */
.section { max-width: var(--content-max); margin: 0 auto; padding: var(--section) var(--gutter) 0; }

.beginner-grid { display: grid; gap: 24px; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.steps img { width: 100%; border-radius: 4px; }
.steps span { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.assure { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.assure li { padding-left: 20px; position: relative; max-width: 34em; }
.assure li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-warm); }
@media (min-width: 768px) {
  .beginner-grid { grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 48px; align-items: center; }
}

.facts { margin: 0; border-top: 1px solid var(--border-subtle); }
.facts > div { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border-subtle); }
.facts dt { font-weight: 600; color: var(--text-secondary); }
.facts dd { margin: 0; }
.note { display: block; font-size: 14px; color: var(--text-secondary); }
.tag { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 4px; background: var(--surface-soft); font-size: 13px; font-weight: 600; vertical-align: 2px; }
@media (min-width: 768px) { .info dl { max-width: 720px; } }

/* 신청 폼 */
.apply { padding-bottom: 96px; }
.apply h2, .apply-lead, #apply-form { max-width: var(--form-max); }
.apply-lead { margin: -8px 0 32px; }

.field { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; margin-bottom: 8px; font-weight: 600; padding: 0; }
.optional-mark { font-weight: 400; color: var(--text-secondary); font-size: 14px; }
input[type="text"], input[type="tel"], textarea {
  width: 100%; min-height: var(--control-min);
  padding: 12px 14px;
  border: 1px solid #CDBDAA; border-radius: var(--radius);
  background: #FFFDF9; color: var(--text-primary);
  font: 16px/1.5 var(--font-body);
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #9A9188; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 1px; }
[aria-invalid="true"] { border-color: var(--state-error); }
.hint { margin: 6px 0 0; font-size: 14px; color: var(--text-secondary); }
.error { margin: 6px 0 0; font-size: 14px; color: var(--state-error); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0 !important; font-weight: 500 !important; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid #CDBDAA; border-radius: 999px; background: #FFFDF9;
  transition: background-color 160ms var(--ease);
}
.chip input:checked + span { background: var(--text-primary); border-color: var(--text-primary); color: var(--text-inverse); }
.chip input:checked + span::before { content: "✓"; margin-right: 6px; }
.chip input:focus-visible + span { outline: 2px solid var(--text-primary); outline-offset: 3px; }

.check { display: flex !important; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--text-primary); }
details { margin-top: 8px; font-size: 14px; color: var(--text-secondary); }
summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
details ul { margin: 8px 0 0; padding-left: 18px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.submit { width: 100%; margin-top: 8px; }
.result { margin-top: 20px; padding: 16px; border-radius: var(--radius); background: var(--surface-soft); }
.result:focus { outline: none; }
.result.ok { color: var(--state-success); }
.result.fail { color: var(--state-error); }
.result strong { display: block; margin-bottom: 4px; }
.result p { margin: 0; color: var(--text-primary); }

.site-footer { padding: 32px var(--gutter) calc(112px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-subtle); font-size: 14px; color: var(--text-secondary); text-align: center; }
.site-footer p { margin: 4px 0; }
.ig { max-width: 640px; margin: 0 auto 32px; }
.ig-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ig-name { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); }
.ig-link { font-size: 13px; font-weight: 600; }
.works { list-style: none; margin: 0 calc(var(--gutter) * -1); padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.works img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.works a { display: block; transition: opacity .15s; }
.works a:hover { opacity: .85; }
.works a:focus-visible { outline: 2px solid var(--text-primary); outline-offset: -2px; }
@media (min-width: 768px) { .works { margin: 0; } }
.small { font-size: 13px; }

/* 휴대폰 하단 버튼 — 폼에 닿으면 숨긴다 */
.mobile-cta {
  position: fixed; left: 16px; right: 16px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; align-items: center; justify-content: center; min-height: 52px;
  border-radius: var(--radius); background: var(--text-primary); color: var(--text-inverse);
  font-weight: 600; text-decoration: none;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}
.mobile-cta.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }
@media (min-width: 768px) { .mobile-cta { display: none; } .site-footer { padding-bottom: 48px; } }
