:root {
  --ink: #111111;
  --muted: #555555;
  --subtle: #666666;
  --accent: #eaff00;
  --accent-hover: #dcf000;
  --blue: #2f7de1;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { background: #ffffff; }
body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-anchor: none;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .75; }

@keyframes mdq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes mdsway {
  from { transform: scale(var(--s)) rotateX(var(--rx)) rotateZ(calc(var(--rz) - 9deg)); }
  to { transform: scale(var(--s)) rotateX(var(--rx)) rotateZ(calc(var(--rz) + 9deg)); }
}

.mono { font-family: var(--mono); }
.fill { position: absolute; inset: 0; }

/* 화면 밖(dom.js pauseOffscreen)의 3D 모델·구름·마퀴는 그리지도, 움직이지도 않게 */
[data-off] > * { display: none; }
[data-off] * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-play-state: paused !important; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10000;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 20px 32px; color: #1d1a18;
}
.nav-glass {
  background: rgba(240, 243, 247, .72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
}
.nav-logo {
  justify-self: start; padding: 17px 24px;
  font: 700 16px var(--mono); letter-spacing: -.02em; color: #1d1a18;
}
.nav-links { display: flex; align-items: center; gap: 4px; padding: 6px; font-size: 15px; font-weight: 500; }
.nav-links a { padding: 11px 20px; border-radius: 999px; color: #1d1a18; white-space: nowrap; }
.nav-links a:hover { background: #ffffff; opacity: 1; }
.nav-links a.active { background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.nav-cta {
  justify-self: end; background: var(--accent); border-radius: 999px; padding: 17px 24px;
  font-size: 15px; font-weight: 600; color: #1d1a18;
}
.nav-cta:hover { background: var(--accent-hover); opacity: 1; }

@media (max-width: 860px) {
  .nav { grid-template-columns: 1fr auto; gap: 10px; padding: 12px 12px; }
  .nav-links { grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: 100%; overflow-x: auto; }
  .nav-links a { padding: 9px 14px; font-size: 14px; }
  .nav-logo, .nav-cta { padding: 13px 18px; }
}

/* ---------- Buttons ---------- */
.btn-accent {
  width: fit-content; display: flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--ink);
  padding: 15px 26px; border-radius: 999px; font-weight: 600; font-size: 16px;
}
.btn-file {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding: 16px 20px; border: 1px solid var(--ink); border-radius: 999px;
  font-weight: 600; font-size: 15px;
}

/* ---------- Sub-page hero (sky + clouds) ---------- */
.frame-top { padding: 12px 12px 0; }
.sky {
  position: relative; overflow: hidden; border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #5aa6f5 0%, #7dbcfb 30%, #a9d2fd 60%, #dcecfd 84%, #ffffff 100%);
}
.sky-inner {
  position: relative; max-width: 1280px; margin: 0 auto; padding: 168px 56px 240px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 40px; align-items: start;
}
.sky-title {
  margin: 0; color: #ffffff; text-shadow: 0 2px 20px rgba(20, 70, 140, .35);
  font-size: clamp(48px, 6vw, 72px); line-height: 1.05; font-weight: 700; letter-spacing: -.045em;
}
.sky-lead {
  margin: 0; font-size: 19px; line-height: 1.65; color: #ffffff; font-weight: 500;
  text-shadow: 0 1px 10px rgba(20, 70, 140, .45);
}
/* 하늘을 아래로 늘리고(--overlap) 본문 첫 줄(앱 이미지·모델)을 구름 위에 겹쳐 올립니다. */
.sky-inner { padding-bottom: calc(140px + var(--overlap, 0px)); }
/* 구름이 잘린 선 없이 흰 배경으로 자연스럽게 녹아들도록 */
.sky::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 280px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.75) 55%, #ffffff 100%);
}
.page-main {
  position: relative; z-index: 1; max-width: 1280px; padding-top: 40px;
  margin: calc(-1 * var(--overlap, 0px)) auto 0;
}

/* ---------- Footer ---------- */
.footer {
  padding: 36px 56px; display: flex; flex-wrap: wrap; gap: 20px;
  justify-content: space-between; align-items: center; font-size: 14px; color: var(--subtle);
}
.footer-logo { font: 700 16px var(--mono); color: var(--ink); }
.footer.dark { color: #a3a3a3; }
.footer.dark .footer-logo { color: #ffffff; }

/* ---------- Home ---------- */
.home-hero {
  position: relative; height: min(calc(100vh - 12px), 900px); min-height: 680px;
  border-radius: 28px 28px 0 0; overflow: hidden;
  background: linear-gradient(180deg, #7dbcfb 0%, #9ccbff 34%, #c4e0fd 64%, #eaf4fe 84%, #ffffff 100%);
}
.home-hero-edge {
  position: absolute; inset: 0; border-radius: 28px 28px 0 0;
  border: 1px solid rgba(0, 0, 0, .07); border-bottom: none; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 50%, transparent 85%);
  mask-image: linear-gradient(#000 50%, transparent 85%);
}
.home-hero-copy {
  position: absolute; left: 0; right: 0; top: 0; padding: 130px 56px 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 32px;
  color: #ffffff; pointer-events: none;
}
.home-hero-copy h1 {
  margin: 0; font-size: clamp(48px, 6.4vw, 92px); line-height: 1.02; font-weight: 700;
  letter-spacing: -.045em; text-shadow: 0 2px 24px rgba(40, 100, 170, .25);
}
.home-hero-copy p {
  margin: 0 0 0 auto; max-width: 400px; font-size: 19px; line-height: 1.55; text-align: right;
  text-wrap: pretty; font-weight: 600; text-shadow: 0 1px 12px rgba(40, 100, 170, .35);
}

.section-title { margin: 0; font-size: clamp(40px, 4.6vw, 60px); letter-spacing: -.04em; line-height: 1.08; }
.section-body { margin: 0; font-size: 18px; line-height: 1.75; color: var(--muted); text-wrap: pretty; }

.capflow {
  margin: 110px 12px 0; height: 820px; border-radius: 28px; overflow: hidden;
  position: relative; isolation: isolate;
  background: linear-gradient(180deg, #eef1f5 0%, #e3e8ee 100%);
}
.capflow .section-title { position: absolute; left: 56px; top: 56px; z-index: 2000; pointer-events: none; }
.capflow .section-body { position: absolute; right: 56px; bottom: 56px; max-width: 440px; z-index: 2000; pointer-events: none; }

.software-teaser {
  max-width: 1560px; margin: 0 auto; padding: 140px 40px;
  display: flex; flex-wrap: wrap; gap: 56px; align-items: center;
}
.software-teaser-copy { flex: 1 1 300px; display: flex; flex-direction: column; gap: 22px; max-width: 420px; padding-left: 16px; }
.software-teaser img { flex: 3 1 640px; min-width: 0; width: 100%; height: auto; display: block; }

.dark-card { background: #000000; color: #ffffff; border-radius: 28px; overflow: hidden; }
.marquee-wrap { overflow: hidden; padding: 80px 0 40px; }
.marquee {
  display: flex; width: max-content; white-space: nowrap;
  font-size: clamp(96px, 13vw, 200px); font-weight: 700; letter-spacing: -.05em; line-height: 1;
  animation: mdq 75s linear infinite;
}
.marquee span { padding-right: .35em; }

.spec {
  max-width: 1100px; margin: 0 auto; padding: 40px 56px 120px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 72px; align-items: start;
}
.deck-outline {
  position: relative; width: 100%; max-width: 380px; aspect-ratio: 1;
  border: 2px solid #ffffff; border-radius: 34px; padding: 52px 40px 56px;
}
.deck-outline .screw { position: absolute; width: 12px; height: 12px; border: 1.5px solid #ffffff; border-radius: 50%; }
.deck-outline .port {
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); width: 44px; height: 10px;
  border: 1.5px solid #ffffff; border-bottom: none; border-radius: 6px 6px 0 0; background: #000;
}
.deck-outline .label { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font: 500 12px var(--mono); }
.deck-grid { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 10px; }
.deck-grid div { border: 1.5px solid #ffffff; border-radius: 12px; }
.spec-row { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 14px 0; font-size: 18px; line-height: 1.5; }
.spec-row dt { font-weight: 500; }
.spec-row dd { margin: 0; white-space: pre-line; }

.faq { max-width: 1100px; margin: 0 auto; padding: 0 56px 120px; display: flex; flex-direction: column; gap: 14px; }
.faq h2 { margin: 0 0 24px; font-size: clamp(36px, 4vw, 52px); letter-spacing: -.04em; }
.faq-item { border: 1px solid #3a3a3a; border-radius: 28px; padding: 22px 28px; cursor: pointer; }
.faq-item:hover { border-color: #777777; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  background: none; border: none; padding: 0; color: inherit; cursor: pointer; text-align: left;
  font: 500 19px 'Pretendard Variable', Pretendard, system-ui, sans-serif;
}
.faq-q .sign { font-size: 22px; line-height: 1; display: inline-block; transition: transform .35s cubic-bezier(.3, .7, .2, 1); }
/* 닫힘: ↑ / 열림: 왼쪽(반시계)으로 135° 회전 */
.faq-q[aria-expanded="true"] .sign { transform: rotate(-135deg); }
.faq-a { padding-top: 16px; font-size: 16px; line-height: 1.75; color: #a3a3a3; max-width: 760px; }

/* ---------- Models / Guide cards ---------- */
.card-grid { padding: 0 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.card-grid.steps { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.card { padding: 0 24px 36px; display: flex; flex-direction: column; gap: 22px; }
.card-visual { height: 340px; position: relative; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; }
.card-num { font: 700 14px var(--mono); color: var(--blue); }
.card-count { font: 500 13px var(--mono); color: var(--subtle); }
.card-name { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.card-desc { font-size: 15px; line-height: 1.6; color: var(--muted); }

.step { padding: 0 24px 48px; display: flex; flex-direction: column; gap: 14px; }
.step .card-visual { height: 320px; }
.step-num { font-size: 48px; font-weight: 700; letter-spacing: -.05em; line-height: 1; color: var(--blue); }
.step-title { font-size: 23px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; text-wrap: pretty; }
.step-body { font-size: 15px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }

.pins { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.pin-row { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: center; font: 500 13px var(--mono); }
.pin-label { display: flex; align-items: center; gap: 8px; }
.pin-label::before { content: ''; width: 14px; height: 4px; border-radius: 2px; background: currentColor; }
.pin-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pin-chips span { padding: 5px 10px; border-radius: 999px; }
.pin-row.row .pin-label { color: var(--blue); }
.pin-row.row .pin-chips span { background: #eef4fd; }
.pin-row.col .pin-label { color: #3a4450; }
.pin-row.col .pin-chips span { background: #f1f2f4; }
.pins-note { font-size: 13px; line-height: 1.6; color: var(--subtle); }

.firmware { padding: 72px 56px 40px; display: flex; flex-direction: column; gap: 24px; }
.firmware-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; }
.firmware-head h2 { margin: 0; font-size: clamp(32px, 3.6vw, 44px); letter-spacing: -.035em; }
.copy-btn {
  border: none; cursor: pointer; background: var(--accent); color: var(--ink);
  padding: 14px 24px; border-radius: 999px; font: 600 15px 'Pretendard Variable', Pretendard, system-ui, sans-serif;
}
.code-window { background: #0f1114; border-radius: 24px; overflow: hidden; }
.code-bar { display: flex; gap: 8px; align-items: center; padding: 16px 22px; font: 500 13px var(--mono); color: #8b939c; }
.code-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: #3a3f45; }
.code-bar .name { margin-left: 10px; }
.code-window pre {
  margin: 0; padding: 8px 28px 32px; max-height: 560px; overflow: auto;
  font: 400 14px/1.7 var(--mono); color: #e6e9ec; white-space: pre;
}

/* ---------- Software ---------- */
.platform-os { margin-top: auto; display: flex; flex-direction: column; gap: 18px; }
.platform-icon { width: 36px; height: 36px; fill: #9a9a9a; }
.platform.available .platform-icon { fill: var(--ink); }
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.platform { padding: 44px 40px; display: flex; flex-direction: column; gap: 20px; min-height: 300px; }
.platform-name { font-size: 32px; font-weight: 700; letter-spacing: -.025em; color: var(--subtle); }
.platform-desc { font-size: 15px; line-height: 1.6; color: var(--subtle); }
.platform.available .platform-name { color: var(--ink); }
.platform.available .platform-desc { color: var(--muted); }
.platform-dl {
  display: flex; justify-content: space-between; align-items: center; padding: 16px 22px;
  background: var(--accent); color: var(--ink); border-radius: 999px; font-weight: 600; font-size: 15px;
}
.dl-dialog {
  width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  padding: 32px 36px 36px; border: none; border-radius: 28px; background: #ffffff; color: var(--ink);
  box-shadow: 0 30px 80px rgba(20, 50, 90, .3); font-size: 15px; line-height: 1.7;
}
.dl-dialog::backdrop { background: rgba(15, 30, 55, .45); }
.dl-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 8px; }
.dl-title { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.dl-x { border: none; background: #f1f3f5; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.dl-dialog h3 { margin: 22px 0 8px; font-size: 17px; letter-spacing: -.01em; }
.dl-dialog p { margin: 0 0 8px; color: var(--muted); }
.dl-dialog ol, .dl-dialog ul { margin: 0; padding-left: 22px; color: var(--muted); }
.dl-dialog li + li { margin-top: 4px; }
.dl-dialog strong { color: var(--ink); }
.dl-steps li::marker { font-weight: 700; color: var(--blue); }
.dl-warn { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 6px; background: #fff0f0; color: #c62828; font-weight: 600; font-size: 14px; }
.dl-note { margin-top: 10px !important; padding: 12px 16px; border-radius: 14px; background: #f4f6f8; font-size: 14px; }
.dl-ok { margin-top: 26px; border: none; cursor: pointer; font-family: inherit; }
.platform-wip {
  padding: 16px 22px; border: 1px dashed #d4d4d4; border-radius: 999px;
  font-weight: 600; font-size: 15px; color: #888888; text-align: center;
}

@media (max-width: 640px) {
  .sky-inner { padding: 150px 24px calc(120px + min(var(--overlap, 0px), 180px)); grid-template-columns: 1fr; }
  .page-main { margin-top: calc(-1 * min(var(--overlap, 0px), 180px)); }
  .dl-dialog { padding: 24px 22px 26px; }
  .home-hero-copy { padding: 150px 24px 0; }
  .capflow .section-title { left: 24px; top: 32px; }
  .capflow .section-body { left: 24px; right: 24px; bottom: 32px; }
  .spec, .faq { padding-left: 24px; padding-right: 24px; }
  .spec { grid-template-columns: 1fr; }
  .spec-row { grid-template-columns: 100px 1fr; }
  .card-grid { padding: 0 8px; grid-template-columns: 1fr; }
  .firmware, .footer { padding-left: 24px; padding-right: 24px; }
}
