/* =========================================================
   AMENT 공통 스타일 — 모든 페이지에서 함께 사용
   (색상·헤더·푸터·버튼·섹션 제목·폼·모달)
   ========================================================= */
:root {
  --yellow: #f4c23a;        /* 명함 메인 컬러 */
  --yellow-soft: #fdf0c4;
  --yellow-deep: #e2a50c;
  --bg: #fffbf1;            /* 따뜻한 크림 배경 */
  --surface: #ffffff;
  --ink: #2b2118;           /* 순검정 대신 따뜻한 먹색 */
  --muted: #7c7062;
  --line: #efe5cf;
  --font: "Inter", "Noto Sans KR", system-ui, sans-serif;
  --hand: "Nanum Pen Script", cursive;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .35 0 0 0 0 .1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--yellow); color: var(--ink); }
.hand { font-family: var(--hand); font-weight: 400; }
.mark { background: linear-gradient(transparent 58%, var(--yellow) 58% 92%, transparent 92%); padding: 0 .06em; }
.paper { position: absolute; inset: 0; pointer-events: none; background-image: var(--paper); mix-blend-mode: multiply; opacity: .28; }
.sub-page main { padding-top: 76px; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  transition: background .3s, padding .3s, box-shadow .3s;
}
.header.scrolled { background: rgba(255,251,241,.88); backdrop-filter: blur(14px); padding-block: 12px; box-shadow: 0 1px 0 var(--line); }
.header .brand img { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 38px); }
.nav a { font-size: 15px; font-weight: 700; color: var(--ink); position: relative; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: 0; height: 8px; background: var(--yellow); z-index: -1; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.hero-yellow .header:not(.scrolled) .nav a::after { background: #fff; }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.cta-link { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; transition: transform .25s var(--ease); }
.nav a.cta-link::after { display: none; }
.nav a.cta-link:hover { transform: translateY(-2px); }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; }

/* ---------- Buttons ---------- */
.btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 800 14px/1 var(--font); letter-spacing: .1em; cursor: pointer;
  padding: 18px 28px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--ink); color: #fff; transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s, opacity .25s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(43,33,24,.18); }
.btn.ghost { background: #fff; color: var(--ink); border-color: #fff; }
.btn.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Section helpers ---------- */
section.block { padding: clamp(96px, 13vw, 170px) var(--gutter); position: relative; }
.label { font-size: 13px; font-weight: 800; letter-spacing: .32em; color: var(--ink); margin-bottom: 26px; display: flex; align-items: center; gap: 12px; }
.label::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
.h2 { font-size: clamp(34px, 5vw, 68px); font-weight: 900; line-height: 1.18; letter-spacing: -.035em; word-break: keep-all; }
.lead-text { color: var(--muted); line-height: 1.75; word-break: keep-all; font-size: 17px; }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* 서브페이지 상단 노란 패널 */
.page-hero { position: relative; margin: 20px var(--gutter) 0; padding: clamp(56px, 9vw, 110px) clamp(24px, 5vw, 72px); background: var(--yellow); border-radius: clamp(24px, 3vw, 40px); overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--paper); mix-blend-mode: multiply; opacity: .28; pointer-events: none; }
.page-hero > * { position: relative; }
.page-hero .eyebrow { font-weight: 800; font-size: 13px; letter-spacing: .32em; margin-bottom: 20px; }
.page-hero h1 { font-size: clamp(34px, 5.6vw, 72px); font-weight: 900; line-height: 1.18; letter-spacing: -.035em; word-break: keep-all; }
.page-hero h1 .hand { color: #fff; font-size: 1.15em; text-shadow: 0 3px 0 rgba(150,95,0,.25); }
.page-hero p.desc { margin-top: 22px; font-size: clamp(15px, 1.4vw, 19px); line-height: 1.7; color: #4a3a22; max-width: 640px; word-break: keep-all; }

/* ---------- Forms ---------- */
.form-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.form-side { position: sticky; top: 100px; }
.contact-box { margin-top: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: grid; gap: 16px; }
.contact-box a, .contact-box div { display: flex; align-items: center; gap: 14px; font-weight: 700; }
.contact-box small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .06em; }
.contact-box .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--yellow); display: grid; place-items: center; flex-shrink: 0; }
.contact-box .ic svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: clamp(22px, 2.4vw, 32px); padding: clamp(24px, 4vw, 52px); box-shadow: 0 30px 60px rgba(180,130,20,.08); }
.form h3 { font-size: 24px; font-weight: 900; letter-spacing: -.02em; margin-bottom: 6px; }
.form .form-note { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.form .req { color: #e5484d; margin-left: 2px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field > label, .field > .flabel { font-size: 14px; font-weight: 800; }
.field .hint { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea {
  font: 500 16px/1.4 var(--font); color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 15px 16px; width: 100%;
  transition: border-color .2s, box-shadow .2s, background .2s; outline: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--yellow); background: #fff; box-shadow: 0 0 0 4px var(--yellow-soft); }
.field.invalid input, .field.invalid select, .field.invalid textarea, .field.invalid .chips { border-color: #e5484d !important; }
.field.invalid .chips { padding: 6px; }
.field .err { font-size: 12px; color: #e5484d; display: none; }
.field.invalid .err { display: block; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; }
.inline .btn { padding: 0 18px; font-size: 13px; letter-spacing: .02em; border-radius: 14px; flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 1.5px solid transparent; border-radius: 14px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 11px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); font-size: 14px; font-weight: 700; transition: all .2s; cursor: pointer; user-select: none; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:checked + span::before { content: "✓"; color: var(--yellow); }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px var(--yellow-soft); }
.agree { grid-column: 1 / -1; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 18px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.agree details summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.agree label { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 15px; font-weight: 800; color: var(--ink); cursor: pointer; }
.agree input { width: 20px; height: 20px; accent-color: var(--ink); }
.agree.invalid { border-color: #e5484d; }
.form .submit { width: 100%; margin-top: 26px; padding: 22px; font-size: 16px; }
.hp { position: absolute; left: -9999px; }

/* 접수 완료 모달 */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(43,33,24,.45); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal .box { position: relative; overflow: hidden; background: var(--yellow); border-radius: 32px; padding: 48px 36px 36px; max-width: 440px; width: 100%; text-align: center; transform: translateY(20px) scale(.96); transition: transform .4s var(--ease); }
.modal.open .box { transform: none; }
.modal .box > * { position: relative; }
.modal img { width: 160px; margin: 0 auto 20px; animation: grin 3s ease-in-out infinite; }
.modal h4 { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.modal p { margin: 12px 0 26px; color: #4a3a22; line-height: 1.7; word-break: keep-all; }

/* ---------- Footer ---------- */
.footer { padding: 0 var(--gutter); color: var(--muted); font-size: 13px; line-height: 1.9; overflow: hidden; border-top: 1px solid var(--line); }
.footer .top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 48px; }
.footer .top img { height: 48px; width: auto; }
.footer .top .hand { font-size: 28px; color: var(--ink); }
.footer .info { display: flex; flex-wrap: wrap; column-gap: 12px; margin-top: 24px; }
.footer .info span:not(:last-child)::after { content: "|"; margin-left: 12px; color: #dccfb4; }
.footer .bottom { margin-top: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer .bottom a:hover { color: var(--ink); }
.footer .giant { width: 100%; margin-top: 48px; transform: translateY(18%); opacity: .95; }

/* ---------- Keyframes ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes grin { 0%, 70%, 100% { transform: none; } 78% { transform: scale(1.04, 1.12) translateY(1%); } 86% { transform: scale(.99, .96); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,59,48,.6); } 70% { box-shadow: 0 0 0 10px rgba(255,59,48,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .form-wrap { grid-template-columns: 1fr; }
  .form-side { position: static; }
}
@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 0 0 auto 0; padding-top: 72px; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); box-shadow: 0 10px 30px rgba(0,0,0,.08); z-index: -1;
    transform: translateY(-100%); transition: transform .4s var(--ease);
  }
  .nav.open { transform: none; }
  .nav a { padding: 18px var(--gutter); font-size: 20px; border-top: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav a.cta-link { border-radius: 0; }
  .header .brand img { height: 32px; }
}
@media (max-width: 600px) {
  .fields { grid-template-columns: 1fr; }
}
