/* 아옴 거품안: 토큰, 기본 요소, 부품, 상단 띠, 하단 버튼, 푸터, 견적 요청 창.
   구역별 배치는 scenes.css, 거품 놀이는 bubbles.css, 움직임 없는 모드는 flow.css에 있다.
   규칙: 영상과 사진 위 글자는 모두 불투명한 면 위에 놓는다. 무지갯빛은 거품 테두리에만 쓴다. */

/* ---------- 토큰 ---------- */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --ink: #0B1B3A;
  --ink-2: #2B3F66;
  --sky: #8CD5FF;
  --sky-deep: #5CBEFA;
  --sky-soft: #BFE8FF;
  --pale: #E4F5FF;
  --mist: #F3FBFF;
  --rule: #A9C9E3;
  --field: #55709A;
  --error: #B3261E;
  --film-stops: #FF9CD2, #C9D5FF, #7FD6FF, #FFD3BF, #EFBEFF, #8FD6FF, #FF9CD2;

  --r0: 10px;
  --r1: 20px;
  --r2: 44px;
  --dome: 72px;

  --vh: 1vh;
  --stage-h: calc(var(--vh) * 100);
  --vh-gap: 0px;
  --gutter: 64px;
  --bar-h: 80px;
  --dock-h: 0px;
  --panel-w: clamp(600px, 52vw, 1040px);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-move: cubic-bezier(.65, 0, .2, 1);
  --ease-pop: cubic-bezier(.2, 1.5, .4, 1);

  /* 글자 단계. 이 값들만 쓴다 */
  --t-note: 14px;
  --t-ui: 16px;
  --t-body: 18px;
  --t-lead: 22px;
  --t-h3: 28px;
  --t-num: 44px;
  --t-h2: 72px;
  --t-h1: 104px;
  --seat-num: 96px;
}
@supports (height: 1svh) { :root { --vh: 1svh; } }

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

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light only; background: var(--sky-soft); }
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: -.012em;
  color: var(--ink);
  background: var(--sky-soft);
  word-break: keep-all;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, h4 { margin: 0; font-weight: 900; line-height: 1.14; letter-spacing: -.04em; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 800; line-height: 1.25; letter-spacing: -.025em; }
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; }
.nw { white-space: nowrap; }
.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; }
}
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: #fff; }
.skip { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 12px 20px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 800; 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;
  text-decoration: none; color: inherit;
}
/* 이응 두 개가 거품색이다 */
.logo-mark {
  display: block; width: 84px; height: 44px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round;
}
.lg-o { stroke: url(#film-g); }
.ico {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.note { font-size: var(--t-note); line-height: 1.55; font-weight: 600; }
.stack { display: inline-grid; }
.stack > * { grid-area: 1 / 1; pointer-events: none; }
.kicker { display: block; margin-bottom: .22em; font-size: max(.26em, 22px); font-weight: 800; letter-spacing: -.02em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 32px;
  border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: var(--t-body); font-weight: 800; line-height: 1.3; letter-spacing: -.015em;
  text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease-pop);
}
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(.96); }
.btn .ico { transition: transform .2s var(--ease-out); }
.btn:hover .ico { transform: translateX(4px); }
/* 주요 버튼: 남색 알맹이에 비누막 테두리가 천천히 돈다 */
.btn-main { position: relative; isolation: isolate; background: var(--ink); color: #fff; }
.btn-main::before {
  content: ""; position: absolute; inset: -4px; z-index: -2; border-radius: inherit;
  background: conic-gradient(from var(--spin), var(--film-stops));
  animation: film-spin 5s linear infinite;
}
.btn-main::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--ink); }
@keyframes film-spin { to { --spin: 360deg; } }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-lg { min-height: 72px; font-size: var(--t-lead); width: 100%; }
.btn-line {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 72px; padding: 0 16px;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff; 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: #fff; }

/* 세 자리 표시: 빈 방울의 수가 남은 자리 수와 같다 */
.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: 32px; height: 32px; border-width: 3px; }

/* 안내 한 줄 */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 20px); z-index: 60;
  max-width: calc(100vw - 32px); padding: 12px 24px; border-radius: 999px;
  background: var(--ink); color: #fff; 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: 10px 24px auto 24px; z-index: 50;
  height: 60px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 8px 0 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(11, 27, 58, .14);
  transform: translateY(-140%);
  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 .logo-mark { width: 68px; height: 36px; }
.bar-note { font-size: var(--t-note); font-weight: 700; color: var(--ink-2); line-height: 1.6; white-space: nowrap; }
.bar-nav { display: flex; gap: 2px; margin: 0 auto; }
.bar-nav a, .bar-link { 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-2); border-radius: 999px; white-space: nowrap; }
.bar-nav a:hover, .bar-link:hover { background: var(--pale); color: var(--ink); }
.bar-nav a[aria-current="true"] { background: var(--ink); color: #fff; font-weight: 800; }
.bar-link { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.bar-cta { min-height: 44px; padding: 0 22px; font-size: var(--t-ui); }

.dock { position: fixed; inset: auto 0 0 0; z-index: 50; display: none; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -8px 24px rgba(11, 27, 58, .1); }
.dock-cta { width: 100%; min-height: 52px; font-size: var(--t-lead); padding: 0 16px; }
@media (max-width: 899.98px), (max-aspect-ratio: 4/5) {
  .bar { display: none; }
  .dock { display: block; }
}
@media (max-width: 1239.98px) {
  .bar-note, .bar-link { display: none; }
  .bar-nav a { padding: 0 10px; }
}

/* ---------- 푸터: 거품 더미가 흰 면으로 이어진다 ---------- */
.foot {
  --foam: 20vw;
  position: relative; z-index: 9;
  padding: calc(var(--foam) + 32px) var(--gutter) 56px;
  display: flex; gap: 64px; align-items: flex-start;
  background: linear-gradient(to bottom, var(--sky) 0, var(--sky) calc(var(--foam) * .42), #fff calc(var(--foam) * .8));
  color: var(--ink);
}
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--foam); background: url(assets/foam.webp) center top / 100% auto no-repeat; -webkit-mask-image: linear-gradient(#000 74%, transparent); mask-image: linear-gradient(#000 74%, transparent); pointer-events: none; }
.foot .logo-mark { width: 92px; height: 48px; }
.foot-text { flex: 1; display: grid; gap: 4px; color: var(--ink-2); font-size: var(--t-note); font-weight: 600; line-height: 1.6; }
.foot-law { color: var(--ink); font-size: var(--t-ui); font-weight: 800; margin-bottom: 8px; line-height: 1.6; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-ui); font-weight: 700; text-underline-offset: 4px; }
@media (max-width: 899.98px), (max-aspect-ratio: 4/5) {
  .foot { --foam: 34vw; flex-direction: column; gap: 12px; padding: calc(var(--foam) + 12px) var(--gutter) calc(var(--dock-h) + 32px); }
}

/* ---------- 견적 요청 창 ---------- */
.quote {
  border: 0; padding: 0; margin: auto;
  width: min(580px, calc(100vw - 32px));
  max-height: min(820px, calc(var(--vh) * 100 - 32px));
  border-radius: var(--r2);
  background: #fff; color: var(--ink);
  overflow: hidden;
  overscroll-behavior: contain;
}
.quote:focus, .quote:focus-visible { outline: 0; }
.quote::backdrop { background: rgba(92, 190, 250, .94); }
.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: 22px 22px 8px 32px; }
.quote-top h2 { font-size: var(--t-h3); font-weight: 900; }
.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; border-radius: 50%; cursor: pointer; color: var(--ink); }
.quote-x[data-close] { margin-left: auto; }
.quote-back { margin-left: -12px; }
.quote-x:hover { background: var(--pale); }
.quote-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 4px 32px 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: 8px; }
.q-spaces label { position: relative; cursor: pointer; }
.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; border-radius: 999px; background: var(--pale); font-size: var(--t-ui); font-weight: 700; line-height: 1.3; transition: transform .25s var(--ease-pop); }
.q-spaces input:checked + span { background: var(--ink); color: #fff; font-weight: 800; transform: scale(1.04); }
.q-spaces input:focus-visible + span { outline: 3px solid var(--ink); 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 20px;
  border: 2px solid var(--field); border-radius: 28px; background: #fff;
  font: inherit; font-size: var(--t-body); color: var(--ink);
}
.q-field input::placeholder { color: #4C6186; opacity: 1; }
.q-field input:focus-visible, .q-field select:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.q-field input[aria-invalid="true"], .q-field select[aria-invalid="true"] { border-color: var(--error); }
.q-unit { position: relative; }
.q-unit input { padding-right: 52px; }
.q-unit span { position: absolute; right: 20px; 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 18px; border-radius: 999px; background: var(--pale); font-size: var(--t-ui); font-weight: 700; line-height: 1.5; }
.q-lock .ico { width: 20px; height: 20px; stroke-width: 2.4; }
.q-err { font-size: var(--t-ui); font-weight: 700; color: var(--error); line-height: 1.5; }
.q-err:not(:empty) { margin-top: 6px; }
.quote-note { color: var(--ink-2); }
.quote-foot { flex: none; padding: 12px 32px 26px; }
.quote-foot .quote-note { margin-bottom: 10px; }
.done-seats { display: flex; align-items: center; gap: 16px; padding: 8px 0 16px; }
.done-seats b { font-size: var(--t-lead); font-weight: 900; }
.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-radius: 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; }
}
