/* ==========================================================
   apply.gallery501.com — 공간 대표용 신청 랜딩 (광고 유입용)
   base.css(색·글꼴·버튼)를 같이 쓰고, 이 페이지 전용 스타일만 둔다.
   ========================================================== */

.apply-page {
  --brown: #2e1f15;
  --cream: #f3ebe0;
  --tint: #f7f3ee;
  --ap-gutter: 24px;
  font-size: 16px;
}
@media (min-width: 768px) { .apply-page { --ap-gutter: 48px; } }

.ap-wrap { max-width: 720px; margin: 0 auto; padding: 0 var(--ap-gutter); }

/* 머리말: 늘 보이는 가운데 로고 */
.ap-header {
  display: flex; justify-content: center; align-items: center;
  height: 56px; background: var(--paper);
  border-bottom: 1px solid #ece6de;
}
.ap-header .logo { color: var(--ink); }

/* 1. 첫 화면: 휴대폰은 그림 위·문구 아래, PC는 좌우 */
.ap-hero { background: var(--brown); color: var(--cream); }
.ap-hero-img img { width: 100%; height: auto; aspect-ratio: 1800 / 1586; object-fit: cover; }
.ap-hero-copy { padding: 36px var(--ap-gutter) 48px; }
.ap-kicker {
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: #c9b49c; margin-bottom: 14px;
}
.ap-title {
  font-size: clamp(30px, 8.4vw, 52px); font-weight: 700;
  line-height: 1.22; letter-spacing: -0.035em;
}
.ap-lead { margin-top: 18px; font-size: 15px; line-height: 1.7; color: #e3d6c6; }
.ap-btn {
  margin-top: 28px; width: 100%;
  background: var(--cream); color: var(--brown); border-color: var(--cream);
}
.ap-btn:hover { background: #fff; border-color: #fff; }
@media (min-width: 900px) {
  .ap-hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .ap-hero-img img { aspect-ratio: auto; height: 100%; max-height: 88vh; }
  .ap-hero-copy { padding: 64px clamp(40px, 6vw, 96px); }
  .ap-lead { font-size: 18px; }
  .ap-btn { width: auto; min-width: 240px; }
}

/* 섹션 공통 */
.ap-sec { padding: 72px 0; }
.ap-sec-tint { background: var(--tint); }
@media (min-width: 768px) { .ap-sec { padding: 104px 0; } }
.ap-label {
  font-family: var(--font-display); font-stretch: 125%;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
}
.ap-h2 {
  margin-top: 14px;
  font-size: clamp(24px, 6vw, 36px); font-weight: 700;
  line-height: 1.3; letter-spacing: -0.03em;
}
.ap-sec h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.ap-sec p { font-size: 15px; line-height: 1.7; }

/* 2. 고민 */
.ap-pains { margin-top: 28px; display: grid; gap: 10px; }
.ap-pains li {
  position: relative; padding: 16px 18px 16px 44px;
  background: var(--tint); border-radius: 12px;
  font-size: 15px; line-height: 1.55;
}
.ap-pains li::before {
  content: "“"; position: absolute; left: 16px; top: 8px;
  font-size: 30px; line-height: 1; color: var(--accent); font-weight: 700;
}
.ap-punch { margin-top: 32px; font-size: 18px !important; font-weight: 500; line-height: 1.6 !important; }
.ap-punch strong { color: var(--accent); }

/* 3. 드리는 것 */
.ap-gives { margin-top: 28px; display: grid; gap: 12px; }
.ap-gives li { padding: 22px 20px; background: var(--paper); border-radius: 12px; }
.ap-gives p { margin-top: 6px; color: var(--ink-soft); }
@media (min-width: 768px) { .ap-gives { grid-template-columns: 1fr 1fr; } }

/* 4. 비용 */
.ap-cost { margin-top: 28px; border-top: 1px solid #e2dcd4; }
.ap-cost div {
  display: grid; grid-template-columns: 7.5em 1fr; gap: 12px;
  padding: 16px 0; border-bottom: 1px solid #e2dcd4; font-size: 15px;
}
.ap-cost dt { color: var(--ink-soft); }
.ap-cost dd { margin: 0; }
.ap-cost strong { color: var(--accent); font-weight: 700; }

/* 5. 진행 방식 */
.ap-steps { margin-top: 28px; display: grid; gap: 0; }
.ap-steps li {
  display: grid; grid-template-columns: 44px 1fr; gap: 8px;
  padding: 18px 0; border-bottom: 1px solid #e2dcd4;
}
.ap-steps li:first-child { border-top: 1px solid #e2dcd4; }
.ap-no {
  font-family: var(--font-display); font-stretch: 125%;
  font-size: 13px; font-weight: 600; color: var(--accent); padding-top: 3px;
}
.ap-steps p { margin-top: 2px; color: var(--ink-soft); }

/* 6. FAQ */
.ap-faq { margin-top: 28px; border-top: 1px solid #e2dcd4; }
.ap-faq details { border-bottom: 1px solid #e2dcd4; }
.ap-faq summary {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 18px 0; cursor: pointer; list-style: none;
  font-size: 16px; font-weight: 600;
}
.ap-faq summary::-webkit-details-marker { display: none; }
.ap-faq summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 20px; line-height: 1; }
.ap-faq details[open] summary::after { content: "−"; }
.ap-faq details p { padding: 0 0 18px; color: var(--ink-soft); }

/* 7. 신청 폼 */
.ap-form-sec { background: var(--brown); color: var(--cream); }
.ap-form-sec .ap-label { color: #c9b49c; }
.ap-form-intro { margin-top: 12px; color: #e3d6c6; }
.ap-form {
  margin-top: 32px; padding: 28px 20px;
  background: var(--paper); color: var(--ink); border-radius: 16px;
}
@media (min-width: 768px) { .ap-form { padding: 40px; } }
.f-row { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.f-row > label, .f-row legend {
  display: block; margin-bottom: 8px; padding: 0;
  font-size: 15px; font-weight: 600;
}
.req, .opt { margin-left: 4px; font-size: 11px; font-weight: 600; vertical-align: 2px; }
.req { color: var(--accent); }
.opt { color: var(--ink-soft); }
.f-help { margin: -2px 0 10px; font-size: 13px !important; color: var(--ink-soft); }
.ap-form input[type="text"], .ap-form input[type="tel"], .ap-form textarea {
  width: 100%; padding: 13px 14px;
  border: 1px solid #cfc7bd; border-radius: 10px; background: #fff;
  font: inherit; font-size: 16px; /* 16px 미만이면 아이폰이 확대한다 */
  color: var(--ink);
}
.ap-form textarea { resize: vertical; }
.ap-form input:focus, .ap-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.ap-form .is-invalid { border-color: #c0392b !important; }

.f-file { position: relative; display: block; }
.f-file input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.f-file-btn {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; border: 1.5px dashed #b9ad9f; border-radius: 10px;
  font-weight: 600; color: var(--accent);
}
.f-file input:focus-visible + .f-file-btn { outline: 2px solid var(--accent); outline-offset: 2px; }
.f-file.is-invalid .f-file-btn { border-color: #c0392b; }
.f-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.f-thumbs li { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; background: var(--tint); }
.f-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.f-thumbs button {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px;
  border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; line-height: 24px;
}

.f-choices { display: grid; gap: 8px; }
.f-choices label {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; border: 1px solid #cfc7bd; border-radius: 10px;
  font-size: 15px; cursor: pointer;
}
.f-choices label:has(input:checked) { border-color: var(--accent); background: #faf5ef; }
.f-choices input, .f-agree input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.f-other { margin-top: 8px; }
.f-choices-row { grid-template-columns: repeat(3, 1fr); }
.f-choices-row label { justify-content: center; padding: 13px 8px; }
.ap-form input[type="email"] { width: 100%; padding: 13px 14px; border: 1px solid #cfc7bd; border-radius: 10px; background: #fff; font: inherit; font-size: 16px; color: var(--ink); }

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

.f-agree { margin: 6px 0 22px; padding: 16px; background: var(--tint); border-radius: 10px; }
.f-agree label { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 600; cursor: pointer; }
.f-agree-text { margin-top: 8px; font-size: 12px !important; line-height: 1.6 !important; color: var(--ink-soft); }
.f-agree-text a { text-decoration: underline; }

.f-error { margin-bottom: 14px; color: #c0392b; font-size: 14px !important; font-weight: 600; }
.f-submit { width: 100%; min-height: 56px; font-size: 17px; }
.f-submit[disabled] { opacity: .6; cursor: wait; }

.ap-done {
  margin-top: 32px; padding: 48px 24px; text-align: center;
  background: var(--paper); color: var(--ink); border-radius: 16px;
}
.ap-done:focus { outline: none; }
.ap-done-mark {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 28px !important; line-height: 56px !important;
}
.ap-done h3 { font-size: 20px; }
.ap-done p { margin-top: 6px; }
.ap-done .text-link { display: inline-block; margin-top: 20px; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }

/* 꼬리말 */
.ap-footer {
  padding: 40px var(--ap-gutter) 104px; text-align: center;
  background: var(--brown); color: #b09c86; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12px; line-height: 1.8;
}
.ap-footer .logo-img { height: 22px; margin: 0 auto 14px; }
.ap-footer a { text-decoration: underline; text-underline-offset: 3px; }

/* 따라다니는 신청 버튼 (휴대폰) */
.ap-sticky {
  position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 40; min-height: 54px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  transition: transform .3s ease, opacity .3s ease;
}
.ap-sticky.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
@media (min-width: 900px) { .ap-sticky { display: none; } .ap-footer { padding-bottom: 40px; } }
@media (prefers-reduced-motion: reduce) { .ap-sticky { transition: none; } html { scroll-behavior: auto; } }
