/* ==========================================================
   Project IMR — 공식 사이트
   스팀펑크 증기 도시: 그을음 바탕 · 황동 · 구리 · 리벳
   PC(웹) 화면 기준으로 짜고, 좁은 화면에서 접히는 방식(데스크톱 우선)
   ========================================================== */

:root {
  --soot:      #1D1726;
  --soot-2:    #2E2638;
  --soot-3:    #3A3047;
  --brass:     #D9A066;
  --brass-hi:  #FFD57A;
  --copper:    #8B5A34;
  --text:      #D4D6DE;
  --text-dim:  #A9A6B8;
  --line:      rgba(217, 160, 102, .28);

  --f-head: "Gowun Batang", "Nanum Myeongjo", "AppleMyungjo", Georgia, serif;
  --f-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1320px;
  --gutter: 40px;
  --radius: 4px;
  --topbar-h: 72px;
  /* 슬라이드 폭: 화면 높이 안에 그림과 제목이 다 들어오도록 */
  --slider-w: max(640px, calc((100vh - var(--topbar-h) - 200px) * 16 / 9 + 36px));

  --rivet: radial-gradient(circle at 40% 38%, var(--brass-hi) 0 1px, var(--brass) 1.6px 2.4px, var(--copper) 3px 3.4px, transparent 4px);
}

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
  -webkit-text-size-adjust: 100%;
  background: var(--soot);
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  background:
    radial-gradient(1400px 700px at 90% -10%, rgba(139, 90, 52, .22), transparent 60%),
    radial-gradient(1000px 600px at -10% 40%, rgba(46, 38, 56, .9), transparent 70%),
    var(--soot);
}

body::before { /* 그을음 결 */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }

/* 픽셀 아트는 흐려지지 않게 */
.px {
  image-rendering: crisp-edges;
  image-rendering: -moz-crisp-edges;
  image-rendering: pixelated;
}

a { color: var(--brass-hi); text-underline-offset: 3px; }
a:hover { color: #fff1c9; }
strong { color: #F0E6D6; font-weight: 700; }

h1, h2, h3, h4 {
  font-family: var(--f-head);
  font-weight: 700;
  line-height: 1.3;
  color: #F3E7D3;
  margin: 0;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
button { font: inherit; color: inherit; }
figure { margin: 0; }

:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--brass);
  color: var(--soot);
  font-weight: 700;
}
.skip:focus { top: 12px; color: var(--soot); }

/* ---------- 언어 전환 ---------- */
html[lang="en"] .ko,
html:not([lang="en"]) .en { display: none !important; }

/* ---------- 황동 판 ---------- */
.plate {
  position: relative;
  padding: 40px 44px;
  border: 2px solid var(--copper);
  border-radius: var(--radius);
  background:
    var(--rivet) left 7px top 7px / 10px 10px no-repeat,
    var(--rivet) right 7px top 7px / 10px 10px no-repeat,
    var(--rivet) left 7px bottom 7px / 10px 10px no-repeat,
    var(--rivet) right 7px bottom 7px / 10px 10px no-repeat,
    linear-gradient(180deg, rgba(255, 213, 122, .045), transparent 40%),
    var(--soot-2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 213, 122, .16),
    inset 0 0 0 6px var(--soot-2),
    inset 0 0 0 7px rgba(217, 160, 102, .22),
    0 14px 36px rgba(0, 0, 0, .38);
}

/* ---------- 스크린샷 액자 ---------- */
.frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px;
  border: 2px solid var(--copper);
  border-radius: var(--radius);
  background:
    radial-gradient(circle, var(--brass-hi) 0 1px, var(--brass) 1.6px 2.2px, var(--copper) 2.8px, transparent 3.4px) center 2px / 24px 6px repeat-x,
    radial-gradient(circle, var(--brass-hi) 0 1px, var(--brass) 1.6px 2.2px, var(--copper) 2.8px, transparent 3.4px) center calc(100% - 2px) / 24px 6px repeat-x,
    linear-gradient(180deg, #4a3423, #2a1f1b);
  box-shadow: inset 0 0 0 1px rgba(255, 213, 122, .25), 0 12px 28px rgba(0, 0, 0, .45);
}
.frame > img, .frame > video, .frame .screen {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #120e18;
  border: 1px solid rgba(0, 0, 0, .6);
}

/* 목업 표시 */
.frame[data-mock]::after {
  content: "목업";
  position: absolute;
  top: 18px; left: 18px;
  z-index: 2;
  padding: 2px 9px;
  border: 1px solid rgba(255, 213, 122, .7);
  border-radius: 2px;
  background: rgba(29, 23, 38, .82);
  color: var(--brass-hi);
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .06em;
  pointer-events: none;
}
html[lang="en"] .frame[data-mock]::after { content: "MOCKUP"; }

button.frame {
  cursor: zoom-in;
  text-align: left;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
button.frame:hover {
  border-color: var(--brass);
  box-shadow: inset 0 0 0 1px rgba(255, 213, 122, .45), 0 18px 36px rgba(0, 0, 0, .5);
}
@media (hover: hover) { button.frame:hover { transform: translateY(-3px); } }

.mock-note {
  margin-top: 12px;
  font-size: .86rem;
  color: var(--text-dim);
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 28px;
  border: 2px solid var(--brass);
  border-radius: var(--radius);
  color: var(--brass-hi);
  background: rgba(29, 23, 38, .6);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.btn:hover { background: rgba(217, 160, 102, .14); color: #fff1c9; }
.btn-brass {
  color: #24170e;
  border-color: var(--brass-hi);
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #b97f48);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-brass:hover { color: #1a0f08; background: linear-gradient(180deg, #ffe39f, var(--brass-hi) 55%, var(--brass)); }
.btn-ic { width: 20px; height: 20px; }

/* ---------- 상단 바 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: rgba(29, 23, 38, .9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--copper) 15%, var(--brass) 50%, var(--copper) 85%, transparent);
  opacity: .55;
}
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #F3E7D3;
  text-decoration: none;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.3rem;
  white-space: nowrap;
}
.brand-gear { width: 28px; height: 28px; color: var(--brass); transition: transform .4s; }
.brand:hover .brand-gear { transform: rotate(30deg); }

.site-nav { display: flex; gap: 6px; margin-left: auto; }
.site-nav a {
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--brass-hi); background: rgba(217, 160, 102, .08); }
.site-nav a[aria-current="true"] { color: var(--brass-hi); box-shadow: inset 0 -2px 0 var(--brass); }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 4px 14px;
  border: 1.5px solid var(--copper);
  border-radius: 999px;
  background: var(--soot-2);
  cursor: pointer;
  font-size: .9rem;
  white-space: nowrap;
}
.lang-btn:hover { border-color: var(--brass); }
.lang-opt { color: var(--text-dim); }
.lang-sep { color: var(--copper); }
html:not([lang="en"]) .lang-opt[data-l="ko"],
html[lang="en"] .lang-opt[data-l="en"] { color: var(--brass-hi); font-weight: 700; }

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  border: 1.5px solid var(--copper);
  border-radius: var(--radius);
  background: var(--soot-2);
  cursor: pointer;
}
.menu-btn svg { width: 100%; height: 100%; color: var(--brass-hi); }

/* ---------- 첫 화면 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--topbar-h));
  min-height: calc(100svh - var(--topbar-h));
  display: flex;
  align-items: center;
  padding: 80px 0 96px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  gap: 64px;
  align-items: center;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 26px;
  padding: 4px 14px;
  border: 1px solid var(--brass);
  border-radius: 2px;
  background: rgba(46, 38, 56, .8);
  color: var(--brass-hi);
  font-size: .9rem;
  font-weight: 500;
}
.tag-live::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brass-hi);
  box-shadow: 0 0 10px var(--brass-hi);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

.title {
  font-size: clamp(3rem, 5.4vw, 5.4rem);
  line-height: 1.02;
  background: linear-gradient(180deg, #FFE7AE 0%, var(--brass-hi) 35%, var(--brass) 70%, #a8713f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .55));
}
.title-sub {
  display: block;
  margin-top: 12px;
  font-size: .32em;
  color: var(--text-dim);
  -webkit-text-fill-color: var(--text-dim);
}
.lede {
  margin: 28px 0 38px;
  max-width: 34em;
  font-size: 1.3rem;
  line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-media { min-width: 0; }
.frame-hero { padding: 16px; }
.screen { position: relative; overflow: hidden; }
.screen > video, .screen > img { width: 100%; height: 100%; object-fit: cover; }

.vid-toggle {
  position: absolute;
  right: 12px; bottom: 12px;
  width: 42px; height: 42px;
  padding: 11px;
  border: 1.5px solid var(--brass);
  border-radius: 50%;
  background: rgba(29, 23, 38, .78);
  color: var(--brass-hi);
  cursor: pointer;
  opacity: .8;
}
.vid-toggle:hover, .vid-toggle:focus-visible { opacity: 1; }
.vid-toggle svg { width: 100%; height: 100%; }
.vid-toggle .ic-play { display: none; }
.vid-toggle.is-paused .ic-play { display: block; }
.vid-toggle.is-paused .ic-pause { display: none; }

.hero-deco { position: absolute; inset: 0; pointer-events: none; }
.deco-gear { position: absolute; color: var(--brass); opacity: .05; }
.deco-gear.g1 { width: 640px; height: 640px; right: -200px; top: -240px; animation: spin 100s linear infinite; }
.deco-gear.g2 { width: 380px; height: 380px; left: -150px; bottom: -170px; animation: spin 70s linear infinite reverse; }
.deco-gear.g3 { width: 200px; height: 200px; left: 38%; bottom: -110px; animation: spin 40s linear infinite; opacity: .04; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 섹션 공통 ---------- */
.section { padding: 128px 0; }
.section-alt {
  background: linear-gradient(180deg, rgba(46, 38, 56, .55), rgba(46, 38, 56, .25));
  border-top: 1px solid rgba(217, 160, 102, .14);
  border-bottom: 1px solid rgba(217, 160, 102, .14);
}

.sec-head { display: flex; align-items: center; gap: 20px; margin-bottom: 56px; }
.sec-head h2 { font-size: clamp(2rem, 3.2vw, 3rem); }
.sec-head::after {
  content: "";
  flex: 1;
  min-width: 24px;
  height: 6px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, var(--brass) 0 6px, transparent 6px) 0 0 / 120px 100% repeat-x,
    linear-gradient(180deg, #b47c46, var(--copper) 60%, #5b3a22);
  opacity: .55;
}
.sec-num {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  font-family: var(--f-mono);
  font-size: 1rem;
  color: var(--brass-hi);
}
.sec-num svg { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--brass); opacity: .6; }

/* ---------- 이야기 ---------- */
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 56px;
  align-items: start;
}
.story-text {
  padding: 56px 64px;
  font-family: var(--f-head);
  font-size: 1.16rem;
  line-height: 2.05;
  color: #E2DCD2;
}
.story-text p { margin-bottom: 1.3em; text-wrap: pretty; }
.story-text strong { color: var(--brass-hi); }
.story-open {
  font-size: 1.7rem;
  line-height: 1.5;
  color: #F3E7D3;
  margin-bottom: 1.1em !important;
}
.story-open::after { /* 짧은 황동 줄 */
  content: "";
  display: block;
  width: 56px; height: 3px;
  margin-top: 22px;
  background: linear-gradient(90deg, var(--brass), transparent);
}
.story-end {
  margin-top: 1.8em;
  padding-top: 1.4em;
  border-top: 1px dashed rgba(217, 160, 102, .35);
  font-size: 1.22rem;
  line-height: 1.9;
  color: var(--brass-hi);
}

.journey { position: sticky; top: calc(var(--topbar-h) + 32px); }
.journey-label {
  font-family: var(--f-mono);
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 20px;
}
.journey-line { list-style: none; margin: 0; padding: 0; position: relative; }
.journey-line::before { /* 세로 파이프 */
  content: "";
  position: absolute;
  left: 19px; top: 20px; bottom: 20px;
  width: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #5b3a22, var(--copper) 40%, #b47c46 60%, var(--copper));
}
.journey-line li {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 20px;
  padding-bottom: 40px;
}
.journey-line li:last-child { padding-bottom: 0; }
.journey-line svg {
  grid-row: span 2;
  width: 44px; height: 44px;
  color: var(--brass);
  background: var(--soot);
  border-radius: 50%;
  position: relative;
}
.journey-line li:last-child svg { color: var(--brass-hi); filter: drop-shadow(0 0 8px rgba(255, 213, 122, .45)); }
.journey-line strong { font-family: var(--f-head); font-size: 1.3rem; color: #F3E7D3; line-height: 1.4; padding-top: 6px; }
.journey-line span { color: var(--text-dim); font-size: .98rem; }

/* ---------- 특징 ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.card {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--copper);
  border-radius: var(--radius);
  background: var(--soot-2);
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .3);
}
.card .frame { border: 0; border-bottom: 2px solid var(--copper); border-radius: 0; padding: 8px; box-shadow: none; }
.card .frame[data-mock]::after { top: 14px; left: 14px; }
.card-body { padding: 26px 26px 30px; }
.card-icon { width: 40px; height: 40px; color: var(--brass); margin-bottom: 16px; }
.card h3 { font-size: 1.35rem; margin-bottom: 12px; color: var(--brass-hi); }
.card p { font-size: .98rem; color: var(--text); line-height: 1.75; }

/* ---------- 화면 ---------- */
.mock-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -24px 0 40px;
  padding: 14px 20px;
  border: 1px dashed rgba(255, 213, 122, .45);
  border-radius: var(--radius);
  background: rgba(46, 38, 56, .6);
  color: var(--text);
  font-size: .98rem;
}
.mock-badge {
  flex: none;
  padding: 2px 10px;
  border-radius: 2px;
  background: var(--brass);
  color: #24170e;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .06em;
}

/* 소제목 */
.sub-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px;
  font-size: 1.6rem;
}
.sub-head::before {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  transform: rotate(45deg);
  background: var(--brass);
  box-shadow: 0 0 0 3px var(--soot), 0 0 0 4px var(--copper);
}

/* 슬라이드 */
.slider {
  outline: none;
  /* 화면 높이 안에 슬라이드·제목이 다 들어오도록 */
  max-width: var(--slider-w);
  margin-inline: auto;
}
#gallery .sub-head { max-width: var(--slider-w); margin-inline: auto; }
.slider:focus-visible .slider-frame { outline: 2px solid var(--brass-hi); outline-offset: 4px; }
.slider-frame { padding: 16px; }
.slider-viewport { overflow: hidden; border: 1px solid rgba(0, 0, 0, .6); background: #120e18; }
.slider-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform .5s cubic-bezier(.22, .7, .2, 1);
  touch-action: pan-y;
}
.slide { flex: 0 0 100%; min-width: 0; }
.slide img, .slide video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #120e18; }
.slider + .sub-head { margin-top: 8px; }
.slider:last-child .slider-thumbs { margin-bottom: 0; }

/* 영상 썸네일: 재생 표시 */
.thumb-video { position: relative; }
.thumb-video::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  margin: -7px 0 0 -4px;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent var(--brass-hi);
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, .9));
}
.slide-cap { display: none; }

.sl-btn {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  margin-top: -30px;
  padding: 15px;
  border: 2px solid var(--brass);
  border-radius: 50%;
  background: rgba(29, 23, 38, .85);
  color: var(--brass-hi);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(29, 23, 38, .5), 0 8px 20px rgba(0, 0, 0, .5);
  transition: background .2s, transform .2s;
}
.sl-btn:hover { background: var(--soot-3); transform: scale(1.06); }
.sl-btn svg { width: 100%; height: 100%; }
.sl-prev { left: 32px; }
.sl-next { right: 32px; }

.slider-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 22px 2px 18px;
}
.slider-cap { margin: 0; font-family: var(--f-head); font-size: 1.6rem; font-weight: 700; color: var(--brass-hi); }
.slider-count { font-family: var(--f-mono); color: var(--text-dim); font-size: 1rem; white-space: nowrap; }
.slider-count b { color: var(--brass-hi); font-weight: 500; }

.slider-thumbs {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 72px;
  padding: 0;
  list-style: none;
}
.thumb {
  display: block;
  width: 100%;
  padding: 3px;
  border: 2px solid rgba(139, 90, 52, .6);
  border-radius: 3px;
  background: var(--soot-2);
  cursor: pointer;
  opacity: .55;
  transition: opacity .2s, border-color .2s;
}
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.thumb:hover { opacity: .9; }
.thumb[aria-current="true"] { opacity: 1; border-color: var(--brass-hi); box-shadow: 0 0 12px rgba(255, 213, 122, .3); }
.fig figcaption { margin-top: 12px; font-size: .95rem; color: var(--text-dim); }


/* ---------- 연락처 ---------- */
.contact { padding: 96px 0; }
.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  overflow: hidden;
  padding: 48px 56px;
}
.contact-text { position: relative; z-index: 1; }
.contact-card h2 { font-size: 2.2rem; margin-bottom: 8px; }
.contact-card p { color: var(--text-dim); margin-bottom: 10px; }
.mail { font-family: var(--f-mono); font-size: 1.5rem; word-break: break-all; }
.contact-card .btn { position: relative; z-index: 1; flex: none; }
.contact-gear {
  position: absolute;
  right: 220px; top: -90px;
  width: 260px; height: 260px;
  color: var(--brass);
  opacity: .06;
}

/* ---------- 바닥글 ---------- */
.footer { padding: 32px 0 40px; border-top: 1px solid var(--line); color: var(--text-dim); font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center; }
.footer-note { flex: 1; text-align: center; }
.footer a { color: var(--brass); text-decoration: none; }

/* ---------- 라이트박스 ---------- */
.lightbox {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(14, 10, 18, .93); }
.lightbox[open] { display: flex; }
.lb-inner {
  width: 100%;
  max-width: 1600px;
  margin: auto;
  padding: 16px var(--gutter) 20px;
  display: grid;
  gap: 12px;
  max-height: 100%;
}
.lb-top { display: flex; align-items: center; justify-content: space-between; }
.lb-count { font-family: var(--f-mono); color: var(--brass); }
.lb-stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.lb-frame { padding: 10px; }
.lb-frame img {
  width: 100%;
  max-height: calc(100vh - 200px);
  max-height: calc(100dvh - 200px);
  object-fit: contain;
  aspect-ratio: auto;
}
.lb-btn {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  padding: 12px;
  border: 1.5px solid var(--brass);
  border-radius: 50%;
  background: var(--soot-2);
  color: var(--brass-hi);
  cursor: pointer;
}
.lb-btn:hover { background: var(--soot-3); }
.lb-btn svg { width: 100%; height: 100%; }
.lb-btn[hidden] { display: none; }
.lb-caption { text-align: center; margin: 0; font-family: var(--f-head); font-size: 1.15rem; color: var(--brass-hi); }
.lb-hint { text-align: center; font-size: .82rem; color: var(--text-dim); margin: 0; }

/* ==========================================================
   좁은 화면 — 웹 레이아웃을 단계적으로 접음
   ========================================================== */

/* 작은 노트북 */
@media (max-width: 1200px) {
  :root { --gutter: 32px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { gap: 48px; }
  .site-nav a { padding: 8px 11px; }
}

/* 태블릿 */
@media (max-width: 1024px) {
  :root { --topbar-h: 64px; }
  body { font-size: 16px; }
  .section { padding: 96px 0; }

  .menu-btn { display: inline-block; }
  .site-nav {
    position: absolute;
    top: calc(var(--topbar-h) + 3px);
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 16px;
    background: rgba(29, 23, 38, .97);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .45);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 6px; border-bottom: 1px solid rgba(217, 160, 102, .12); }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a[aria-current="true"] { box-shadow: inset 3px 0 0 var(--brass); padding-left: 14px; }
  .lang-btn { margin-left: auto; }

  .hero { min-height: 0; padding: 64px 0 80px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-text { max-width: 720px; }

  .story-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .journey { position: static; }
  .journey-line { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .journey-line::before { left: 22px; right: 22px; top: 19px; bottom: auto; width: auto; height: 6px; }
  .journey-line li { grid-template-columns: 1fr; padding-bottom: 0; row-gap: 6px; }
  .journey-line svg { grid-row: auto; margin-bottom: 8px; }

  .slider-frame { padding: 10px; }
  .sl-btn { width: 50px; height: 50px; margin-top: -25px; padding: 12px; }
  .sl-prev { left: 20px; } .sl-next { right: 20px; }
  .slider-thumbs { display: flex; overflow-x: auto; overscroll-behavior-x: contain; max-width: 100%; contain: paint; gap: 10px; padding-bottom: 6px; margin-bottom: 56px; }
  .slider-thumbs li { flex: 0 0 120px; }


  .contact-card { flex-direction: column; align-items: flex-start; }
}

/* 휴대폰 */
@media (max-width: 640px) {
  :root { --gutter: 16px; --topbar-h: 58px; }
  .section { padding: 72px 0; }
  .contact { padding: 64px 0; }
  .brand { font-size: 1.1rem; }
  .brand-gear { width: 24px; height: 24px; }
  .topbar-inner { gap: 10px; }

  .hero { padding: 44px 0 56px; }
  .title { font-size: 2.8rem; }
  .lede { font-size: 1.1rem; margin: 20px 0 28px; }
  .btn { min-height: 48px; padding: 10px 20px; }
  .frame-hero { padding: 10px; }

  .sec-head { gap: 14px; margin-bottom: 36px; }
  .sec-head h2 { font-size: 1.7rem; }
  .sec-head::after { display: none; }
  .sec-num { width: 46px; height: 46px; font-size: .85rem; }

  .plate { padding: 28px 22px; }
  .story-text { padding: 34px 24px; font-size: 1.06rem; line-height: 1.95; }
  .story-open { font-size: 1.4rem; }
  .journey-line { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .journey-line::before { left: 19px; right: auto; top: 20px; bottom: 20px; width: 6px; height: auto; }
  .journey-line li { grid-template-columns: 44px 1fr; column-gap: 16px; padding-bottom: 28px; }
  .journey-line li:last-child { padding-bottom: 0; }
  .journey-line svg { grid-row: span 2; margin: 0; }

  .features { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .mock-banner { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: -12px; }
  .slider-frame { padding: 6px; }
  .sl-btn { width: 40px; height: 40px; margin-top: -20px; padding: 9px; }
  .sl-prev { left: 12px; } .sl-next { right: 12px; }
  .slider-cap { font-size: 1.25rem; }
  .slider-thumbs li { flex-basis: 96px; }
  .frame[data-mock]::after { font-size: 11px; top: 14px; left: 14px; }


  .contact-card { padding: 32px 24px; }
  .contact-card h2 { font-size: 1.8rem; }
  .mail { font-size: 1.15rem; }
  .contact-gear { right: -60px; }

  .footer-note { flex-basis: 100%; order: 3; text-align: left; }

  .lb-stage { grid-template-columns: 1fr 1fr; }
  .lb-frame { grid-column: 1 / -1; order: -1; padding: 6px; }
  .lb-prev { justify-self: end; }
  .lb-next { justify-self: start; }
  .lb-hint { display: none; }
}

/* ---------- 움직임 줄이기 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .deco-gear, .tag-live::before { animation: none; }
  .slider-track { transition: none; }
  button.frame, .brand-gear { transition: none; }
  button.frame:hover { transform: none; }
}
