/* OpenCheck 홍보 사이트
   토큰은 api.opencheck.co.kr/public 대시보드의 :root 값을 그대로 가져왔다 (브랜드 일관성). */

:root {
  --bg:          #0b0e14;
  --bg-raised:   #171c26;
  --bg-raised-2: #1c222e;
  --line:        #232a37;
  --line-soft:   #1a202b;

  --fg:          #e8eef6;
  --fg-mid:      #9aa7b8;
  --fg-dim:      #6b7889;

  --accent:      #38bdf8;
  --accent-deep: #0ea5e9;
  --accent-ink:  #04141f;
  --accent-wash: rgba(56, 189, 248, .10);
  --accent-line: rgba(56, 189, 248, .32);

  --r-ui: 8px;
  --r-lg: 16px;
  --max: 1240px;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.02em; }
p { margin: 0; }

/* ── 버튼: 대시보드 로그인 화면과 동일한 촉각 피드백(translateY) ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-ui);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--fg);
  font-family: inherit; font-size: 15px; font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:hover { background: var(--bg-raised-2); border-color: #35404f; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

/* ── 내비게이션: 데스크톱 1줄, 64px ── */
.nav {
  position: sticky; top: 0; z-index: 40;
  height: 64px;
  display: flex; align-items: center;
  background: rgba(11, 14, 20, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 24px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 14.5px; color: var(--fg-mid); text-decoration: none;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--fg); }
.nav-cta { display: flex; align-items: center; }
.nav-burger { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links.is-open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line-soft);
    padding: 8px 24px 16px;
  }
  .nav-links.is-open a { padding: 12px 0; border-top: 1px solid var(--line-soft); }
  .nav-links.is-open a:first-child { border-top: none; }
  .nav-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--r-ui);
    background: transparent; border: 1px solid var(--line); color: var(--fg);
  }
}

/* ── 언어 선택 ── */
.nav-lang-item { display: flex; align-items: center; }
.langpick {
  display: inline-flex; gap: 2px;
  border: 1px solid var(--line); border-radius: var(--r-ui);
  padding: 3px;
}
.langpick button {
  min-width: 28px;
  padding: 4px 7px;
  border: none; border-radius: 6px;
  background: transparent; color: var(--fg-dim);
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.langpick button:hover { color: var(--fg); }
.langpick button[aria-current="true"] { background: var(--accent-wash); color: var(--accent); }

@media (max-width: 860px) {
  .nav-lang-item { padding: 14px 0; border-top: 1px solid var(--line-soft); }
}

/* ── Hero: 비대칭 스플릿 ── */
.hero {
  padding: 56px 0 72px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero-tagline {
  margin: 0 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--fg-dim);
}
.hero-tagline em { font-style: normal; color: var(--accent); }
.hero-copy h1 {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.18;
}
.hero-copy .lead {
  margin-top: 20px;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-mid);
}
.hero-cta { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11,14,20,.72) 100%);
  pointer-events: none;
}
.hero-visual .tag {
  position: absolute; left: 16px; bottom: 16px;
  font-size: 13px; color: var(--fg-mid);
  z-index: 1;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 40px 0 48px; }
}

/* ── 섹션 공통 ── */
section { padding: 88px 0; }
section.tight { padding: 64px 0; }
.section-head { max-width: 62ch; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); }
.section-head p { margin-top: 14px; color: var(--fg-mid); font-size: 15.5px; line-height: 1.65; }

@media (max-width: 640px) {
  section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
}

/* ── 작동 방식: 3단계 흐름 ── */
.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.flow-step {
  padding: 32px 28px;
  border-left: 1px solid var(--line);
  background: var(--bg-raised);
}
.flow-step:first-child { border-left: none; }
.flow-step .ico {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-ui);
  background: var(--accent-wash);
  color: var(--accent);
  margin-bottom: 18px;
}
.flow-step .ico svg { width: 22px; height: 22px; }
.flow-step h3 { font-size: 18px; }
.flow-step p { margin-top: 8px; color: var(--fg-mid); font-size: 14.5px; line-height: 1.6; }

@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; }
  .flow-step { border-left: none; border-top: 1px solid var(--line); }
  .flow-step:first-child { border-top: none; }
}

/* ── 사용 장비: 사양 카드 그리드 (2열, 항목당 카드 — 줄마다 border 긋는 표 금지) ── */
.device-intro {
  max-width: 68ch;
  color: var(--fg-mid);
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 40px;
}
.device-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.device-card {
  border: 1px solid var(--line);
  border-radius: var(--r-ui);
  padding: 22px 24px;
  display: flex; gap: 16px; align-items: flex-start;
}
.device-card .ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-ui); background: var(--bg-raised); color: var(--accent); }
.device-card .ico svg { width: 19px; height: 19px; }
.device-card h3 { font-size: 15.5px; }
.device-card p { margin-top: 6px; color: var(--fg-mid); font-size: 14px; line-height: 1.6; }
.device-note { margin-top: 20px; font-size: 12.5px; color: var(--fg-dim); }

@media (max-width: 760px) { .device-grid { grid-template-columns: 1fr; } }

/* ── 대시보드 기능: 비대칭 벤토 ── */
.bento {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.bento-card {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.bento-card.a { grid-column: 1; grid-row: 1 / 3; background: linear-gradient(160deg, var(--bg-raised) 0%, var(--bg-raised-2) 100%); }
.bento-card.b { grid-column: 2; grid-row: 1; background: var(--accent-wash); border-color: var(--accent-line); }
.bento-card.c { grid-column: 2; grid-row: 2; background: var(--bg-raised); }
.bento-card .ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-ui); background: rgba(255,255,255,.06); color: var(--accent); }
.bento-card.b .ico { background: rgba(255,255,255,.14); color: var(--accent-ink); }
.bento-card .ico svg { width: 20px; height: 20px; }
.bento-card h3 { font-size: 18px; }
.bento-card p { color: var(--fg-mid); font-size: 14.5px; line-height: 1.6; }
.bento-card .fine { margin-top: auto; font-size: 12.5px; color: var(--fg-dim); border-top: 1px solid var(--line-soft); padding-top: 12px; }
.bento-card.b .fine { border-top-color: rgba(4,20,31,.18); color: rgba(4,20,31,.7); }
.bento-card.b h3, .bento-card.b p { color: var(--accent-ink); }

/* 라이브 지도 카드 안의 미니 미리보기: 진짜 pin 2개, 실데이터/데모 구분 재현 (가짜 스크린샷 아님, 실제 규칙 그대로) */
.mini-map { position: relative; height: 130px; border-radius: var(--r-ui); background: var(--bg); border: 1px solid var(--line-soft); overflow: hidden; }
.mini-map .grid-line { position: absolute; background: var(--line-soft); }
.mini-pin { position: absolute; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 4px currentColor; opacity: .22; }
.mini-pin::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; }
.mini-pin.live { top: 38%; left: 28%; color: var(--accent); }
.mini-pin.demo { top: 62%; left: 66%; color: #fbbf24; }
.mini-legend { display: flex; gap: 16px; font-size: 12px; color: var(--fg-dim); }
.mini-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mini-legend i { width: 8px; height: 8px; border-radius: 50%; }
.mini-legend .l-live { background: var(--accent); }
.mini-legend .l-demo { background: #fbbf24; }

@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr; }
  .bento-card.a, .bento-card.b, .bento-card.c { grid-column: 1; grid-row: auto; }
}

/* ── 도입 현장: 사진 그리드 ── */
.cases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.case-card {
  position: relative;
  border-radius: var(--r-ui);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
}
.case-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.16,1,.3,1); }
.case-card:hover img { transform: scale(1.05); }
.case-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(11,14,20,.86) 100%);
}
.case-card figcaption {
  position: absolute; left: 12px; bottom: 10px; z-index: 1;
  font-size: 13.5px; font-weight: 600; color: var(--fg);
}
figure.case-card { margin: 0; }

@media (max-width: 960px) { .cases { grid-template-columns: repeat(2, 1fr); } }

/* ── Why: 아이콘 리스트 (2x2, 카드 아님) ── */
.why-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 40px;
}
.why-item { display: flex; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.why-item .ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-ui); background: var(--accent-wash); color: var(--accent); }
.why-item .ico svg { width: 19px; height: 19px; }
.why-item h3 { font-size: 16.5px; }
.why-item p { margin-top: 6px; color: var(--fg-mid); font-size: 14.5px; line-height: 1.6; }

@media (max-width: 700px) { .why-list { grid-template-columns: 1fr; } }

/* ── CTA 밴드 ── */
.cta-band {
  background: linear-gradient(135deg, var(--bg-raised) 0%, var(--bg) 70%);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.cta-band .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(22px, 3vw, 28px); max-width: 32ch; }
.cta-band-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Footer ── */
footer { padding: 56px 0 40px; }
.foot-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid var(--line-soft); }
.foot-brand img { height: 22px; }
.foot-brand p { margin-top: 12px; color: var(--fg-dim); font-size: 13.5px; max-width: 34ch; line-height: 1.6; }
.foot-cols { display: flex; gap: 56px; }
.foot-col h4 { margin: 0 0 12px; font-size: 13px; color: var(--fg-dim); font-weight: 600; }
.foot-col a, .foot-col span { display: block; font-size: 14px; color: var(--fg-mid); text-decoration: none; margin-bottom: 8px; }
.foot-col a:hover { color: var(--fg); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: 12.5px; color: var(--fg-dim); }

@media (max-width: 640px) {
  .foot-cols { gap: 32px; flex-wrap: wrap; }
}

/* ── 스크롤 등장: IntersectionObserver 가 .reveal-in 을 붙인다 ── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
}
.reveal-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
