/* 아옴 포스터 시안: 토큰, 기본 요소, 인쇄 장치(도장, 스티커, 띠), 상단 띠, 하단 버튼, 푸터, 견적 요청 창.
   구역별 배치는 scenes.css, 움직임 없는 모드는 flow.css, 서비스 화면은 screens.css에 있다.
   규칙: 색은 크림, 먹, 코발트 셋뿐이다. 코발트는 면으로 쓰고, 먹 면 위 글자에는 쓰지 않는다(대비 부족).
   영상과 사진 위 글자는 모두 불투명한 면 위에 놓는다. */

/* ---------- 토큰 ---------- */
:root {
  --paper: #F4EFE6;
  --paper-2: #E7DFCF;
  --ink: #15130F;
  --ink-2: #4A463E;
  --cobalt: #1F3BFF;
  --cobalt-press: #142BD6;

  --line: 3px;
  --vh: 1vh;
  --stage-h: calc(var(--vh) * 100);
  --vh-gap: 0px;
  --gutter: 40px;
  --bar-h: 64px;
  --dock-h: 0px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-move: cubic-bezier(.65, 0, .2, 1);
  --ease-slam: cubic-bezier(.3, 1.5, .5, 1);

  /* 글자 단계 */
  --t-note: 14px;
  --t-ui: 16px;
  --t-body: 18px;
  --t-lead: 22px;
  --t-h3: 28px;
  --t-num: 44px;
  --track-big: -.055em;

  /* 폭을 꽉 채우는 제목: 쓸 수 있는 폭을 글자 폭(em)으로 나눈다 */
  --fill: calc(100vw - var(--gutter) * 2);
  --seat-num: min(13vh, 9vw);
}
@supports (height: 1svh) { :root { --vh: 1svh; } }

/* 세로 화면(폰, 세로 태블릿) */
@media (max-width: 899.98px), (max-aspect-ratio: 4/5) {
  :root {
    --gutter: 16px;
    --bar-h: 0px;
    --dock-h: calc(68px + env(safe-area-inset-bottom));
    --t-lead: 20px;
    --t-h3: 20px;
    --t-num: 32px;
    --seat-num: 60px;
  }
  /* 주소창이 접혀도 빈 틈이 없게 무대는 큰 높이로 잡고, 내용은 작은 높이 안에 둔다 */
  @supports (height: 1lvh) {
    :root { --stage-h: 100lvh; --vh-gap: calc(100lvh - 100svh); }
  }
}
@media (min-width: 600px) and (max-aspect-ratio: 4/5) {
  :root { --gutter: 32px; --t-lead: 22px; --t-h3: 28px; --t-num: 44px; --seat-num: 110px; }
}
@media (min-width: 900px) and (min-aspect-ratio: 4/5) and (max-height: 660px) {
  :root { --t-body: 16px; --t-lead: 18px; --t-h3: 22px; }
}

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light only; background: var(--ink); }
html.lenis, html.lenis body { height: auto; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: var(--t-body);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -.015em;
  color: var(--ink);
  background: var(--paper);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, h4 { margin: 0; font-weight: 900; line-height: .98; letter-spacing: var(--track-big); }
h3 { font-size: var(--t-h3); font-weight: 800; line-height: 1.2; letter-spacing: -.03em; }
p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, canvas { display: block; }
a { color: inherit; }
em, i { font-style: normal; }
button { font: inherit; color: inherit; }
small { font-size: inherit; }
.sprite { position: absolute; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.only-m, .only-tall { display: none; }
@media (max-width: 899.98px), (max-aspect-ratio: 4/5) {
  .only-pc { display: none; }
  .only-m, .only-tall { display: inline; }
}
@media (min-width: 600px) and (max-aspect-ratio: 4/5) {
  .only-m { display: none; }
}
.on-dark { color: var(--paper); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--paper); }
.offer :focus-visible, .vs :focus-visible { outline-color: var(--cobalt); }
::selection { background: var(--cobalt); color: var(--paper); }
.skip { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 12px 20px; background: var(--paper); color: var(--ink); font-weight: 700; border: var(--line) solid var(--ink); transform: translateY(-200%); }
.skip:focus { transform: none; }
[tabindex="-1"]:focus { outline: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- 부품 ---------- */
.logo {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px;
  font-size: 30px; font-weight: 900; letter-spacing: -.07em; line-height: 1;
  text-decoration: none; color: inherit;
}
.ico {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: square; stroke-linejoin: miter;
}
.note { font-size: var(--t-note); line-height: 1.5; font-weight: 600; }
.stack { display: inline-grid; }
.stack > * { grid-area: 1 / 1; pointer-events: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  border: 0; border-radius: 0; cursor: pointer;
  font: inherit; font-size: var(--t-body); font-weight: 800; line-height: 1.3; letter-spacing: -.02em;
  text-decoration: none; white-space: nowrap;
  transition: background-color .15s;
}
.btn .ico { transition: transform .2s var(--ease-out); }
.btn:hover .ico { transform: translateX(6px); }
.btn-cobalt { background: var(--cobalt); color: var(--paper); }
.btn-cobalt:hover { background: var(--cobalt-press); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: var(--paper-2); }
.btn-lg { min-height: 68px; font-size: var(--t-lead); font-weight: 900; width: 100%; }
.btn-line {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 72px; padding: 0 16px;
  border: var(--line) solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink);
  font-size: var(--t-ui); font-weight: 800; line-height: 1.3; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.btn-line:hover { background: var(--ink); color: var(--paper); }

/* 세 자리 표시: 빈 고리의 수가 남은 자리 수와 같다 */
.dots { display: inline-flex; gap: 5px; flex: none; }
.dots u { display: block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; text-decoration: none; }
.dots u.f { background: currentColor; }
.dots-lg { gap: 10px; }
.dots-lg u { width: 28px; height: 28px; border-width: 3px; }

/* 띠 문구: 인쇄물의 흐르는 글자. 내용을 두 벌 넣고 절반만큼 흘린다 */
.ticker { overflow: hidden; background: var(--cobalt); color: var(--paper); white-space: nowrap; font-size: var(--t-lead); font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.ticker-run { display: inline-flex; align-items: center; padding: 12px 0; animation: ticker 44s linear infinite; will-change: transform; }
.ticker-run span { padding: 0 18px; }
.ticker-run i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.ticker-ink { background: var(--ink); }
@keyframes ticker { to { transform: translate3d(-50%, 0, 0); } }

/* 도장 찍는 움직임 */
@keyframes stamp {
  0% { transform: rotate(calc(var(--tilt, -10deg) - 18deg)) scale(2.6); opacity: 0; }
  55% { transform: rotate(var(--tilt, -10deg)) scale(.9); opacity: 1; }
  100% { transform: rotate(var(--tilt, -10deg)) scale(1); opacity: 1; }
}

/* 안내 한 줄 */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 20px); z-index: 60;
  max-width: calc(100vw - 32px); padding: 14px 22px;
  background: var(--ink); color: var(--paper); font-size: var(--t-ui); font-weight: 700; line-height: 1.5;
  transform: translateX(-50%); width: max-content; text-align: center;
}
.toast[hidden] { display: none; }

/* ---------- 상단 띠, 하단 고정 버튼 ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 var(--gutter);
  background: var(--paper);
  border-bottom: var(--line) solid var(--ink);
  transform: translateY(-101%);
  transition: transform .35s var(--ease-out);
}
.motion .bar { visibility: hidden; transition: transform .35s var(--ease-out), visibility 0s .35s; }
.motion .bar.is-on { visibility: visible; transform: none; transition: transform .35s var(--ease-out); }
.flow .bar { transform: none; }
.bar-note { font-size: var(--t-note); font-weight: 700; color: var(--ink-2); line-height: 1.5; white-space: nowrap; }
.bar-nav { display: flex; gap: 2px; margin: 0 auto; }
.bar-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: var(--t-ui); font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap; }
.bar-nav a:hover { background: var(--paper-2); }
.bar-nav a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.bar-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: var(--t-ui); font-weight: 800; white-space: nowrap; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.bar-cta { align-self: stretch; margin: 0 calc(var(--gutter) * -1) 0 0; min-height: 44px; padding: 0 28px; font-size: var(--t-ui); font-weight: 900; }

.dock { position: fixed; inset: auto 0 0 0; z-index: 50; display: none; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--paper); border-top: var(--line) solid var(--ink); }
.dock-cta { width: 100%; min-height: 52px; font-size: var(--t-lead); font-weight: 900; padding: 0 16px; }
@media (max-width: 899.98px), (max-aspect-ratio: 4/5) {
  .bar { display: none; }
  .dock { display: block; }
}
@media (max-width: 1099.98px) {
  .bar-note { display: none; }
  .bar-nav a { padding: 0 10px; }
}

/* ---------- 푸터: 맨 끝에 로고를 포스터 크기로 찍는다 ---------- */
.foot { position: relative; z-index: 8; background: var(--ink); padding: 48px var(--gutter); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 48px; align-items: end; }
.foot-mark { font-size: min(22vw, 340px); letter-spacing: -.08em; line-height: .86; min-height: 0; }
.foot-side { display: grid; gap: 24px; justify-items: end; text-align: right; }
.foot-text { display: grid; gap: 4px; font-size: var(--t-note); line-height: 1.6; font-weight: 600; }
.foot-law { font-size: var(--t-body); font-weight: 800; margin-bottom: 8px; line-height: 1.5; }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 24px; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-ui); font-weight: 800; text-underline-offset: 5px; text-decoration-thickness: 2px; }
@media (max-width: 899.98px), (max-aspect-ratio: 4/5) {
  .foot { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 40px var(--gutter) calc(var(--dock-h) + 32px); }
  .foot-mark { font-size: 44vw; }
  .foot-side { justify-items: start; text-align: left; }
  .foot-nav { justify-content: flex-start; }
}

/* ---------- 견적 요청 창 ---------- */
.quote {
  border: var(--line) solid var(--ink); padding: 0; margin: auto;
  width: min(560px, calc(100vw - 32px));
  max-height: min(820px, calc(var(--vh) * 100 - 32px));
  border-radius: 0;
  background: var(--paper); color: var(--ink);
  overflow: hidden;
  overscroll-behavior: contain;
}
.quote:focus, .quote:focus-visible { outline: 0; }
.quote::backdrop { background: rgba(21, 19, 15, .92); }
.quote-form, .quote-done { display: flex; flex-direction: column; max-height: inherit; }
.quote-done[hidden], .quote-form[hidden], .quote-body[hidden], .quote-x[hidden] { display: none; }
.quote-top { flex: none; display: flex; align-items: center; gap: 4px; padding: 20px 20px 8px 28px; }
.quote-top h2 { font-size: 36px; }
.quote-top h2:focus { outline: 0; }
.quote-step { margin-left: 12px; font-size: var(--t-ui); font-weight: 700; color: var(--ink-2); }
.quote-x { width: 48px; height: 48px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--ink); }
.quote-x[data-close] { margin-left: auto; }
.quote-back { margin-left: -12px; }
.quote-x:hover { background: var(--paper-2); }
.quote-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 4px 28px 8px; }
.quote-lead { margin-bottom: 18px; font-size: var(--t-ui); color: var(--ink-2); line-height: 1.6; }
.quote fieldset { border: 0; margin: 0; padding: 0; }
.quote legend, .q-field label { display: block; padding: 0; margin-bottom: 8px; font-size: var(--t-ui); font-weight: 800; line-height: 1.5; }
.q-spaces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); border-left: 2px solid var(--ink); }
.q-spaces label { position: relative; cursor: pointer; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.q-spaces input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.q-spaces span { display: flex; align-items: center; justify-content: center; min-height: 52px; font-size: var(--t-ui); font-weight: 700; line-height: 1.3; }
.q-spaces input:checked + span { background: var(--cobalt); color: var(--paper); font-weight: 900; }
.q-spaces input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.q-field { margin-top: 18px; }
.q-first { margin-top: 0; }
.q-field input, .q-field select {
  width: 100%; min-height: 56px; padding: 0 16px;
  border: 2px solid var(--ink); border-radius: 0; background: #FBF8F2;
  font: inherit; font-size: var(--t-body); color: var(--ink);
}
.q-field input::placeholder { color: var(--ink-2); opacity: 1; }
.q-field input:focus-visible, .q-field select:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 1px; border-color: var(--cobalt); }
.q-field input[aria-invalid="true"], .q-field select[aria-invalid="true"] { border-color: var(--cobalt); border-width: 3px; }
.q-unit { position: relative; }
.q-unit input { padding-right: 48px; }
.q-unit span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: var(--t-body); font-weight: 700; color: var(--ink-2); }
.q-hint { margin-top: 6px; font-size: var(--t-note); color: var(--ink-2); line-height: 1.5; }
.q-lock { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding: 12px 14px; background: var(--ink); color: var(--paper); font-size: var(--t-ui); font-weight: 700; line-height: 1.5; }
.q-lock .ico { width: 20px; height: 20px; }
.q-err { font-size: var(--t-ui); font-weight: 800; color: var(--cobalt); line-height: 1.5; }
.q-err:not(:empty) { margin-top: 6px; }
.quote-note { color: var(--ink-2); }
.quote-foot { flex: none; padding: 12px 28px 24px; }
.quote-foot .quote-note { margin-bottom: 10px; }
.done-seats { display: flex; align-items: center; gap: 16px; padding: 8px 0 16px; color: var(--cobalt); }
.done-seats b { font-size: var(--t-lead); font-weight: 900; color: var(--ink); }
.done-text { margin-bottom: 12px; }
html.is-quote-open .dock { visibility: hidden; }
@media (max-width: 899.98px), (max-aspect-ratio: 4/5) {
  .quote { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border: 0; }
  .quote-form, .quote-done { height: 100%; max-height: none; }
  .quote-top { padding: 12px 8px 8px 20px; }
  .quote-body { padding: 4px 20px 8px; }
  .quote-foot { padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }
}
@media (max-height: 660px) {
  .quote-lead { margin-bottom: 12px; }
  .q-field { margin-top: 12px; }
  .q-first { margin-top: 0; }
  .q-field input, .q-field select { min-height: 52px; }
  .q-spaces span { min-height: 48px; }
  .btn-lg.quote-send { min-height: 56px; }
}
