:root {
  --bg: #F1F1EF;
  --surface: #FFFFFF;
  --ink: #111111;
  --body: #3D3D3D;
  --muted: #5C5C5C;
  --line: #DAD9D5;
  --accent: #FF5B1F;
  --link-hover: #B8400E;
  --todo-bg: #FFE066;
  --todo-text: #3A2E00;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  overflow-x: clip;
  word-break: keep-all;
}

a { color: var(--ink); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; margin: 0; }
.muted { color: var(--muted); }
.body-text { margin: 0; font-size: 15px; line-height: 1.7; color: var(--body); }

.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 28px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  padding: 8px 12px; background: var(--ink); color: #FFFFFF;
}
.skip-link:focus { top: 12px; }

mark.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  padding: 0 .2em;
  border-radius: 3px;
  outline: 1px dashed currentColor;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  padding-block: 16px;
  display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between;
}
.brand { text-decoration: none; display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand-mark { width: 14px; height: 14px; background: var(--accent); display: inline-block; transform: rotate(45deg); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: center; font-size: 15px; }
.nav a { text-decoration: none; padding: 12px 0; }
.nav .nav-cta { background: var(--ink); color: #FFFFFF; padding: 12px 18px; border-radius: 6px; font-weight: 600; }

/* Hero */
.hero { padding-top: 56px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; }
.hero-copy { flex: 1 1 440px; display: flex; flex-direction: column; gap: 28px; }
.status { font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
h1 { margin: 0; font-weight: 600; font-size: clamp(40px, 5.4vw, 76px); line-height: 1.12; letter-spacing: -0.035em; }
.lead { margin: 0; font-size: 18px; line-height: 1.75; color: var(--body); max-width: 30em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { text-decoration: none; padding: 16px 26px; border-radius: 6px; font-size: 16px; }
.btn-dark { background: var(--ink); color: #FFFFFF; font-weight: 600; }
.btn-dark:hover { color: #FFFFFF; background: #2A2A2A; }
.btn-line { border: 1px solid var(--ink); font-weight: 500; }

/* 3D 공통 */
.stage { position: relative; }
.boxes, .scene-root, .sway, .spin, .cap-root {
  position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d;
}
.face { position: absolute; left: 0; top: 0; }

.hero-figure { flex: 1 1 440px; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hero-stage { height: 600px; perspective: 1400px; perspective-origin: 50% 40%; }
.floor-shadow {
  position: absolute; left: 50%; top: 545px; width: 420px; height: 46px; margin-left: -210px;
  border-radius: 50%; background: rgba(17, 17, 17, 0.16); filter: blur(22px);
}
.scene-root {
  left: 50%; top: 46%;
  transform: rotateX(var(--rx, -10deg)) rotateY(var(--ry, -26deg));
  transition: transform .25s ease-out;
}
.sway { animation: fwSway 7s ease-in-out infinite alternate; }
@keyframes fwSway {
  from { transform: rotateY(-7deg) translateY(0); }
  to { transform: rotateY(7deg) translateY(-10px); }
}

.phone {
  position: absolute; left: 0; top: 0; width: 230px; height: 470px; margin-left: -115px; margin-top: -235px;
  transform: translateZ(11px); background: #0C0C0E; border-radius: 26px; padding: 10px;
}
.screen {
  display: block; width: 100%; height: 100%; border-radius: 18px;
  background: #FAFAF8; object-fit: cover; object-position: top;
}

.caption { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }

/* Summary */
.summary { padding-top: 24px; padding-bottom: 88px; }
.summary dl {
  margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line);
}
.summary dl div { padding: 20px 20px 20px 0; display: flex; flex-direction: column; gap: 6px; }
.summary dd { margin: 0; font-size: 17px; font-weight: 600; }

/* Sections */
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 40px; }
h2 { margin: 0; font-size: 40px; font-weight: 600; letter-spacing: -0.03em; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }

.case { display: flex; flex-wrap: wrap; gap: 40px; align-items: stretch; }
.case-visual {
  flex: 3 1 520px; min-height: 380px; background: var(--bg); border-radius: 4px;
  display: flex; align-items: center; justify-content: center; gap: 4%; padding: 32px 5%;
}
.case-visual img {
  width: 30%; max-width: 200px; height: auto; border-radius: 16px;
  border: 1px solid var(--line); box-shadow: 0 18px 36px -18px rgba(17, 17, 17, 0.35);
}
.case-visual img:nth-child(2) { transform: translateY(-16px); }
.case-tagline { margin: -8px 0 0; font-size: 18px; font-weight: 500; line-height: 1.6; }
.case-body { flex: 2 1 320px; display: flex; flex-direction: column; gap: 20px; }
.case-body h3 { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.case-body .body-text { font-size: 16px; line-height: 1.75; }
.case-meta { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.case-meta div { padding: 12px 8px 12px 0; border-bottom: 1px solid var(--line); }
.case-meta .wide { grid-column: 1 / -1; }
.case-meta dt { font-size: 12px; color: var(--muted); }
.case-meta dd { margin: 4px 0 0; font-size: 15px; font-weight: 500; }
.text-link { font-weight: 600; font-size: 15px; padding: 12px 0; }

.caps { display: flex; flex-wrap: wrap; gap: 20px; }
.cap {
  flex: 1 1 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
}
.cap h3 { margin: 0; font-size: 22px; font-weight: 600; }
.cap-stage { height: 150px; perspective: 900px; }
.cap-root { left: 50%; top: 50%; transform: rotateX(-30deg) rotateY(-40deg); }

.steps {
  margin: 0; padding: 0; list-style: none; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--ink);
}
.steps li { padding: 24px 24px 24px 0; display: flex; flex-direction: column; gap: 10px; }
.steps strong { font-size: 19px; font-weight: 600; }
.after-note { margin-top: -16px; }

/* Contact */
.contact { background: var(--ink); color: #F1F1EF; }
.contact a { color: #FFFFFF; }
.contact-inner { padding-top: 104px; padding-bottom: 104px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.contact-copy { flex: 2 1 520px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.contact-copy .mono { color: #A8A8A4; }
.contact h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.15; }
.contact-sub { margin: 0; font-size: 17px; line-height: 1.7; color: #C9C9C5; }
.contact-mail { font-size: clamp(22px, 2.6vw, 32px); font-weight: 600; padding: 8px 0; text-underline-offset: 6px; }
.contact .contact-tel { margin-top: -14px; font-size: clamp(18px, 2vw, 22px); font-weight: 500; padding: 8px 0; text-underline-offset: 5px; color: #C9C9C5; }
.footer a { color: inherit; }
.contact-stage { flex: 1 1 260px; height: 280px; perspective: 1000px; }
.spin { left: 50%; top: 50%; transform: rotateX(-22deg) rotateY(-35deg); animation: fwSpin 22s linear infinite; }
@keyframes fwSpin {
  from { transform: rotateX(-22deg) rotateY(0deg); }
  to { transform: rotateX(-22deg) rotateY(360deg); }
}

/* Footer */
.footer { padding-top: 28px; padding-bottom: 44px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--muted); }

/* 터치 기기: 기울기 안내 숨김 */
@media (hover: none) { .hover-hint { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion { animation: none !important; }
  .scene-root { transition: none; }
}

/* 좁은 화면: 3D 장면을 통째로 축소해 가로 넘침 방지 */
@media (max-width: 640px) {
  .wrap { padding-inline: 20px; }
  .hero { padding-top: 40px; }
  .hero-copy, .hero-figure, .case-visual, .case-body, .cap, .contact-copy, .contact-stage { flex-basis: 100%; }
  .hero-stage { transform: scale(.55); transform-origin: 50% 0; margin-bottom: -270px; }
  .case-visual { min-height: 0; padding: 28px 16px 20px; }
  .case-visual img { border-radius: 10px; }
  h2 { font-size: 32px; }
  .section { padding-top: 72px; padding-bottom: 72px; }
  .contact-inner { padding-top: 80px; padding-bottom: 64px; }
  .contact-stage { height: 220px; }
}
