/* SIMBA 홈페이지. 색은 SIMBA 앱(simba_ui SimbaTokens, 브랜드 자산)과 같은 값입니다. */
:root {
  --navy: #0B1220;      /* 앱 아이콘 배경 */
  --night: #0E1013;     /* 앱 어두운 배경 */
  --panel: #14171C;
  --line-d: #2A2F38;
  --text-d: #D5D9E0;
  --ink: #15181C;
  --ink-soft: #3C4250;
  --surface: #F6F7F9;
  --line: #DDE1E7;
  --blue: #0698FB;      /* 워드마크의 점 */
  --action: #2F6FED;    /* 앱 기본 강조색 */
  --ok: #1E8E3E;
  --warn: #B26A00;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--night); word-break: keep-all; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4.3vw, 3.3rem); line-height: 1.16; font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.22; font-weight: 720; letter-spacing: -0.03em; }
h3 { font-size: 1.16rem; line-height: 1.35; font-weight: 700; letter-spacing: -0.015em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }

section { padding: clamp(64px, 9vw, 120px) 0; scroll-margin-top: 64px; }
.dark { background: var(--night); color: #fff; }
.light { background: #fff; }
.light.alt { background: var(--surface); }
.section-lead { margin-top: 16px; max-width: 40em; color: var(--ink-soft); font-size: 1.08rem; }
.dark .section-lead, .dark p { color: var(--text-d); }
.fine { margin-top: 28px; font-size: 0.92rem; color: #9AA1AD; }
.fine.ink { color: var(--ink-soft); }
.fine a { color: #fff; }

/* 상단 */
.top { position: sticky; top: 0; z-index: 20; background: rgba(14, 16, 19, 0.94); border-bottom: 1px solid var(--line-d); color: #fff; }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 20px; }
.brand img { width: 132px; }
#nav { display: flex; align-items: center; gap: 4px; }
#nav a { text-decoration: none; padding: 10px 14px; border-radius: 8px; font-size: 0.97rem; color: var(--text-d); }
#nav a:hover { color: #fff; background: var(--panel); }
#nav .nav-cta { color: #fff; background: var(--action); margin-left: 8px; font-weight: 650; }
#nav .nav-cta:hover { background: #2a62d4; }
.menu-button { display: none; font: inherit; color: #fff; background: none; border: 1px solid var(--line-d); border-radius: 8px; padding: 9px 14px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border-radius: 10px; font: inherit; font-weight: 650; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background-color .15s; }
.btn.primary { background: var(--action); color: #fff; }
.btn.primary:hover { background: #2a62d4; }
.btn.ghost { border-color: #4A5261; color: #fff; }
.btn.ghost:hover { background: var(--panel); }

/* Hero */
.hero { background: var(--navy); padding-top: clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.lead { margin-top: 24px; font-size: 1.14rem; max-width: 32em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* 구조도 */
.map { background: var(--night); border: 1px solid var(--line-d); border-radius: 20px; padding: 22px; }
.tier { border: 1px solid var(--line-d); border-radius: 14px; padding: 14px 16px 16px; background: var(--panel); }
.tier-name { display: block; font-size: 0.86rem; color: #9AA1AD; margin-bottom: 10px; }
.tier-name em { font-style: normal; color: #6FD08C; margin-left: 8px; }
.tier.store { border-color: #2c5d3b; }
.nodes { display: flex; flex-wrap: wrap; gap: 8px; }
.node { font-size: 0.92rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: #20242B; color: #fff; }
.node.main { background: #fff; color: var(--ink); }
.link { display: flex; flex-direction: column; align-items: center; }
.wire { width: 2px; height: 22px; background: var(--blue); transition: background-color .3s; }
.central { display: grid; justify-items: center; gap: 2px; padding: 12px 20px; border-radius: 14px; border: 1px solid var(--blue); min-width: 230px; text-align: center; transition: border-color .3s; }
.central b { font-weight: 700; }
.central span { font-size: 0.9rem; color: var(--text-d); }
.central i { font-style: normal; font-weight: 700; color: #6FD08C; }
.central .queue { color: #9AA1AD; font-variant-numeric: tabular-nums; }
.map.offline .wire { background: repeating-linear-gradient(to bottom, #5F6368 0 4px, transparent 4px 8px); }
.map.offline .central { border-color: #5F6368; border-style: dashed; }
.map.offline .central i { color: #F0B34A; }
.map.offline .central .queue { color: #F0B34A; }
.map.offline .tier:not(.store) { opacity: .5; }
.map-note { margin-top: 16px; font-size: 0.95rem; min-height: 3.3em; }
.switch { width: 100%; margin-top: 8px; background: #20242B; color: #fff; border-color: #4A5261; }
.switch:hover { background: #2A2F38; }
.switch[aria-pressed="true"] { background: #fff; color: var(--ink); }

.plain { display: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* 소개 */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 56px; border-top: 2px solid var(--ink); }
.pillars > div { padding: 28px 28px 0 0; }
.pillars > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.pillars p { margin-top: 10px; color: var(--ink-soft); }

/* 제품 카드. 화면 캡처는 assets/shots/<이름>.png 를 넣고 config.js 에 적으면 카드 위에 나타납니다. */
.products { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.products article { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; overflow: hidden; }
.products .shot { margin: -26px -26px 22px; aspect-ratio: 16 / 10; background: var(--navy); border-bottom: 1px solid var(--line); }
.products .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.products h3 { font-size: 1.3rem; letter-spacing: 0.02em; }
.products h3 span { font-weight: 500; color: var(--ink-soft); }
.products .who { color: var(--action); font-weight: 650; font-size: 0.94rem; margin: 2px 0 12px; }
.products p { color: var(--ink-soft); }
.products .next { background: transparent; border-style: dashed; }
.products .next h3, .products .next .who { color: #7A8291; }

/* 구조 흐름 */
.flow { list-style: none; counter-reset: step; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.flow li { counter-increment: step; position: relative; padding: 34px 24px 0 0; border-top: 2px solid var(--line-d); }
.flow li::before { content: counter(step); position: absolute; top: -17px; left: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: var(--navy); font-weight: 750; display: grid; place-items: center; font-size: 0.95rem; }
.flow p { margin-top: 10px; font-size: 0.98rem; }

/* 적용 분야 */
.fields { margin-top: 48px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.fields > div { border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.fields p { margin-top: 10px; color: var(--ink-soft); }
.fields .uses { margin-top: 18px; font-weight: 650; color: var(--ink); font-size: 0.95rem; }
.fields .next { border-style: dashed; background: var(--surface); }
.fields .next .uses { color: #7A8291; }

/* 다운로드 */
.downloads { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.downloads > div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; }
.downloads p { color: var(--ink-soft); font-size: 0.95rem; margin: 4px 0 22px; }
.downloads .btn { margin-top: auto; padding: 0 12px; }
.btn.pending { background: #E7EAEF; color: #5F6368; cursor: default; }

/* 문의 */
.contact { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 80px); }
form { display: grid; gap: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: grid; gap: 6px; font-size: 0.93rem; color: var(--text-d); }
input, select, textarea { font: inherit; font-size: 1rem; color: #fff; background: var(--panel); border: 1px solid #4A5261; border-radius: 10px; padding: 12px 14px; width: 100%; }
input::placeholder { color: #7A8291; }
textarea { resize: vertical; }
form .btn { justify-self: start; }
form .fine { margin-top: 0; min-height: 1.5em; }

/* Footer */
.foot { border-top: 1px solid var(--line-d); padding: 56px 0 40px; }
.foot-line { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.95rem; }
.foot-line a { color: var(--text-d); text-decoration: none; }
.foot-line a:hover { color: #fff; text-decoration: underline; }
.foot .fine { margin-top: 10px; }
#site-links { display: contents; }
#site-links:empty { display: none; }

.notfound { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; color: #fff; text-align: center; padding: 24px; }
.notfound p { color: var(--text-d); }

@media (max-width: 980px) {
  .hero-grid, .contact { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .pillars > div, .pillars > div + div { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .products { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 1fr; row-gap: 44px; }
  .downloads { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .menu-button { display: block; }
  #nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; background: var(--night); border-bottom: 1px solid var(--line-d); padding: 8px 20px 20px; }
  #nav.open { display: flex; }
  #nav a { padding: 14px 4px; }
  #nav .nav-cta { margin: 8px 0 0; text-align: center; }
  .fields, .two, .products { grid-template-columns: 1fr; }
  .tech { display: none; }
  .plain { display: inline; }
  .flow { grid-template-columns: 1fr; }
  .actions .btn, form .btn { width: 100%; }
  .map { padding: 16px; }
}
@media (max-width: 460px) { .downloads { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
