/* 아옴 시네마: 토큰, 기본 요소, 부품, 상단 띠, 하단 버튼, 푸터, 견적 요청 창.
   구역별 배치는 scenes.css, 움직임 없는 모드는 flow.css에 있다.
   규칙: 빛 색은 하나뿐이고 켜진 것에만 쓴다. 영상과 사진 위 글자는 모두 불투명한 면 위에 놓는다. */

/* ---------- 토큰 ---------- */
:root {
  color-scheme: dark only;

  --night: #0E0F11;
  --night-2: #16171A;
  --night-3: #202125;
  --hair: #3A3B40;
  --field: #85827B;
  --sun: #FFD9A8;
  --sun-press: #FFCC8C;
  --on-sun: #1B130A;
  --paper: #F5EFE6;
  --paper-2: #C9C3B8;
  --paper-3: #A8A297;
  --lit: #FBEBD6;
  --ink: #17140F;
  --ink-2: #51483B;
  --error: #FFB3A1;

  --r1: 2px;

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

  /* 글자 단계. 이 값들만 쓴다 */
  --t-note: 14px;
  --t-ui: 16px;
  --t-body: 18px;
  --t-lead: 22px;
  --t-h3: 28px;
  --t-num: 40px;
  --t-h2: min(64px, 5vw);
  --t-h1: 96px;
  --seat-num: clamp(64px, calc(var(--vh) * 13), 120px);
}
@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));
    --t-lead: 20px;
    --t-h3: 20px;
    --t-num: 28px;
    --t-h2: 36px;
    --t-h1: 52px;
    --seat-num: 64px;
  }
  /* 주소창이 접혀도 빈 틈이 없게 무대는 큰 높이로 잡고, 내용은 작은 높이 안에 둔다 */
  @supports (height: 1lvh) {
    :root { --stage-h: 100lvh; --vh-gap: calc(100lvh - 100svh); }
  }
}
@media (max-width: 374.98px) { :root { --t-h1: 46px; --t-h2: 32px; } }
@media (min-width: 600px) and (max-aspect-ratio: 4/5) {
  :root { --gutter: 48px; --t-h1: 88px; --t-h2: 56px; --t-lead: 22px; --t-h3: 28px; --t-num: 40px; --seat-num: 120px; }
}
@media (min-width: 1800px) and (min-height: 1000px) {
  :root { --gutter: 96px; --t-h1: 120px; --t-h2: 80px; --t-body: 20px; --t-lead: 24px; }
}
@media (min-width: 900px) and (min-aspect-ratio: 4/5) and (max-height: 800px) {
  :root { --t-h1: 80px; --t-h2: min(48px, 5vw); --t-lead: 20px; }
}
@media (min-width: 900px) and (min-aspect-ratio: 4/5) and (max-height: 660px) {
  :root { --t-h1: 64px; --t-h2: min(40px, 5vw); --t-body: 16px; --t-lead: 18px; --t-h3: 22px; }
}
@media (min-width: 900px) and (max-width: 1099.98px) and (min-aspect-ratio: 4/5) {
  :root { --gutter: 40px; }
}

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
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.65;
  letter-spacing: -.005em;
  color: var(--paper);
  background: var(--night);
  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: 600; line-height: 1.18; letter-spacing: -.015em; }
h1 { font-size: var(--t-h1); line-height: 1.1; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.3; letter-spacing: -.01em; }
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; }
}
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
::selection { background: var(--sun); color: var(--on-sun); }
.skip { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 12px 20px; background: var(--sun); color: var(--on-sun); font-weight: 700; 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: var(--t-lead); font-weight: 700; letter-spacing: -.01em; line-height: 1.2;
  text-decoration: none; color: inherit;
}
.ico {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.note { font-size: var(--t-note); line-height: 1.6; font-weight: 500; }
.stack { display: inline-grid; }
.stack > * { grid-area: 1 / 1; pointer-events: none; }
/* 장면 번호: 영화 자막처럼 작게. 세로 화면은 자리가 빠듯해 쓰지 않는다 */
.kicker { margin-bottom: 12px; font-size: var(--t-ui); font-weight: 600; line-height: 1.5; color: var(--sun); }
@media (max-width: 899.98px), (max-aspect-ratio: 4/5) { .kicker { display: none; } }
@media (min-width: 900px) and (min-aspect-ratio: 4/5) and (max-height: 720px) { .kicker { margin-bottom: 4px; font-size: var(--t-note); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 28px;
  border: 0; border-radius: var(--r1); cursor: pointer;
  font: inherit; font-size: var(--t-body); font-weight: 600; line-height: 1.3;
  text-decoration: none; white-space: nowrap;
  transition: background-color .15s, box-shadow .3s;
}
.btn .ico { transition: transform .2s var(--ease-out); }
.btn:hover .ico { transform: translateX(4px); }
/* 화면에서 켜져 있는 유일한 면이라 은은하게 빛을 낸다 */
.btn-sun { background: var(--sun); color: var(--on-sun); box-shadow: 0 0 40px rgba(255, 217, 168, .26); }
.btn-sun:hover { background: var(--sun-press); box-shadow: 0 0 64px rgba(255, 217, 168, .5); }
.btn-lg { min-height: 64px; font-size: var(--t-body); width: 100%; }
.btn-line {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 72px; padding: 0 16px;
  border: 1px solid var(--ink); border-radius: var(--r1); background: transparent; color: var(--ink);
  font-size: var(--t-ui); font-weight: 600; line-height: 1.3; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.btn-line:hover { background: var(--ink); color: var(--lit); }

/* 작은 조명 세 개: 켜진 수가 찬 자리 수와 같다 */
.dots { display: inline-flex; gap: 6px; flex: none; }
.dots u { display: block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; text-decoration: none; }
.dots u.f { background: var(--sun); border-color: var(--sun); box-shadow: 0 0 10px 2px rgba(255, 217, 168, .6); }
.dots-lg { gap: 12px; }
.dots-lg u { width: 24px; height: 24px; border-width: 2px; }

/* 안내 한 줄 */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 20px); z-index: 60;
  max-width: calc(100vw - 32px); padding: 12px 20px;
  background: var(--paper); color: var(--ink); font-size: var(--t-ui); font-weight: 600; 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(--night);
  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: 500; color: var(--paper-2); line-height: 1.6; white-space: nowrap; }
.bar-nav { display: flex; gap: 4px; 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: 500; text-decoration: none; color: var(--paper-2); white-space: nowrap; }
.bar-nav a:hover, .bar-link:hover { color: var(--paper); }
.bar-nav a[aria-current="true"] { color: var(--sun); font-weight: 600; }
.bar-cta { min-height: 44px; padding: 0 20px; font-size: var(--t-ui); box-shadow: none; }

.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(--night); }
.dock-cta { width: 100%; min-height: 52px; font-size: var(--t-body); padding: 0 16px; box-shadow: none; }
@media (max-width: 899.98px), (max-aspect-ratio: 4/5) {
  .bar { display: none; }
  .dock { display: block; }
}
@media (max-width: 1199.98px) {
  .bar-note, .bar-link { display: none; }
  .bar-nav a { padding: 0 10px; }
}

/* ---------- 푸터: 엔딩 크레딧. 역할은 왼쪽, 내용은 오른쪽, 가운데 축을 맞춘다 ---------- */
.foot {
  position: relative; z-index: 8; background: var(--night);
  padding: 120px var(--gutter) 88px;
  display: flex; flex-direction: column; align-items: center; gap: 48px; text-align: center;
}
.foot > .logo { font-size: 48px; font-weight: 600; }
.credits { width: min(1040px, 100%); display: grid; gap: 20px; }
.credits > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 32px; text-align: left; }
.credits dt { font-size: var(--t-ui); font-weight: 500; line-height: 1.6; color: var(--paper-3); text-align: right; }
.credits dd { font-size: var(--t-ui); line-height: 1.6; color: var(--paper-2); }
.credits .foot-law { color: var(--paper); font-size: var(--t-body); font-weight: 600; }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-ui); font-weight: 600; color: var(--sun); text-underline-offset: 5px; }
@media (max-width: 899.98px), (max-aspect-ratio: 4/5) {
  .foot { padding: 72px var(--gutter) calc(var(--dock-h) + 40px); gap: 32px; }
  .credits > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .credits dt { text-align: left; font-size: var(--t-note); }
}

/* ---------- 견적 요청 창 ---------- */
.quote {
  border: 1px solid var(--hair); padding: 0; margin: auto;
  width: min(560px, calc(100vw - 32px));
  max-height: min(820px, calc(var(--vh) * 100 - 32px));
  border-radius: var(--r1);
  background: var(--night-2); color: var(--paper);
  overflow: hidden;
  overscroll-behavior: contain;
}
.quote:focus, .quote:focus-visible { outline: 0; }
.quote::backdrop { background: rgba(5, 5, 6, .9); }
.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: var(--t-h3); }
.quote-top h2:focus { outline: 0; }
.quote-step { margin-left: 12px; font-size: var(--t-ui); font-weight: 500; color: var(--paper-2); }
.quote-x { width: 48px; height: 48px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--paper); }
.quote-x[data-close] { margin-left: auto; }
.quote-back { margin-left: -12px; }
.quote-x:hover { background: var(--night-3); }
.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(--paper-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: 600; line-height: 1.5; }
.q-spaces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.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; background: var(--night-3); font-size: var(--t-ui); font-weight: 500; line-height: 1.3; transition: background-color .2s, box-shadow .3s; }
.q-spaces input:checked + span { background: var(--sun); color: var(--on-sun); font-weight: 600; box-shadow: 0 0 24px rgba(255, 217, 168, .35); }
.q-spaces input:focus-visible + span { outline: 3px solid var(--sun); 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: 1px solid var(--field); border-radius: var(--r1); background: var(--night);
  font: inherit; font-size: var(--t-body); color: var(--paper);
}
.q-field input::placeholder { color: var(--paper-3); opacity: 1; }
.q-field input:focus-visible, .q-field select:focus-visible { outline: 3px solid var(--sun); outline-offset: 1px; border-color: var(--sun); }
.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: 48px; }
.q-unit span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: var(--t-body); font-weight: 500; color: var(--paper-2); }
.q-hint { margin-top: 6px; font-size: var(--t-note); color: var(--paper-2); line-height: 1.5; }
.q-lock { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 0 0; border-top: 1px solid var(--hair); font-size: var(--t-ui); font-weight: 500; line-height: 1.5; }
.q-lock .ico { width: 20px; height: 20px; color: var(--sun); }
.q-err { font-size: var(--t-ui); font-weight: 600; color: var(--error); line-height: 1.5; }
.q-err:not(:empty) { margin-top: 6px; }
.quote-note { color: var(--paper-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(--sun); }
.done-seats b { font-size: var(--t-lead); font-weight: 600; }
.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; }
}
