/* Raijin Labs — 흰 바탕 + 파랑. 색은 :root 토큰만 고친다. 글꼴은 Pretendard (OFL, assets/fonts). */
:root {
  --bg: #ffffff;
  --surface: #f6f8fd;
  --surface-2: #eef3fd;
  --ink: #0a1430;
  --ink-2: #39445f;
  --muted: #6b7591;
  --line: #e4e9f3;
  --line-2: #d6deee;
  --blue: #1f4fe0;
  --blue-2: #3b6cf6;
  --blue-3: #6f96ff;
  --blue-soft: #eaf0ff;
  --on-blue: #ffffff;
  --grid: rgba(31, 79, 224, 0.06);
  --shadow: 0 1px 2px rgba(10, 20, 48, .04), 0 12px 32px -12px rgba(10, 20, 48, .16);
  --shadow-lg: 0 2px 6px rgba(10, 20, 48, .05), 0 24px 60px -20px rgba(31, 79, 224, .28);
  --radius: 16px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060b18; --surface: #0c1429; --surface-2: #111b36; --ink: #eef2ff; --ink-2: #c2cae2; --muted: #8e98b6;
    --line: #1b2644; --line-2: #26335a; --blue: #6f96ff; --blue-2: #8eadff; --blue-3: #b3c8ff; --blue-soft: #14204a; --on-blue: #050b1e;
    --grid: rgba(111, 150, 255, 0.07); --shadow: 0 12px 32px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060b18; --surface: #0c1429; --surface-2: #111b36; --ink: #eef2ff; --ink-2: #c2cae2; --muted: #8e98b6;
  --line: #1b2644; --line-2: #26335a; --blue: #6f96ff; --blue-2: #8eadff; --blue-3: #b3c8ff; --blue-soft: #14204a; --on-blue: #050b1e;
  --grid: rgba(111, 150, 255, 0.07); --shadow: 0 12px 32px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.7;
  font-feature-settings: "ss06"; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--blue); color: var(--on-blue); padding: 6px 10px; border-radius: 8px; z-index: 50; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------------------------ 머리 */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; font-size: 18px; letter-spacing: -0.025em; text-decoration: none; }
.brand svg { width: 30px; height: 30px; padding: 6px; border-radius: 9px; fill: #fff; background: linear-gradient(140deg, var(--blue-2), var(--blue)); box-shadow: 0 4px 12px -4px rgba(31, 79, 224, .55); }

.gnav { display: flex; align-items: center; gap: 8px; }
.gnav-list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.gi { position: relative; }
.gl { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 10px; color: var(--ink-2); font-size: 15px; font-weight: 550; text-decoration: none; transition: color .15s, background .15s; }
.gl .chev { width: 12px; height: 12px; transition: transform .25s cubic-bezier(.2, .7, .2, 1); opacity: .7; }
.gl[aria-current="page"] { color: var(--blue); }
.gi:hover .gl, .gi.open .gl { color: var(--ink); background: var(--surface); }
.gi:hover .chev, .gi.open .chev { transform: rotate(180deg); }
.lang { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; margin-left: 6px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--ink-2); text-decoration: none; }
.lang:hover { border-color: var(--blue); color: var(--blue); }

/* 펼침 메뉴: 아래로 미끄러져 내려온다. 위쪽 여백(padding-top)이 마우스가 건너가는 다리 역할을 한다. */
.panel {
  position: absolute; top: 100%; left: 50%; padding-top: 12px; min-width: 300px;
  opacity: 0; visibility: hidden; transform: translate(-50%, -10px); pointer-events: none;
  transition: opacity .18s ease, transform .28s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .28s;
}
.panel.wide { min-width: 400px; }
.panel-in { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 14px; }
.gi:hover .panel, .gi.open .panel, .gi:focus-within .panel {
  opacity: 1; visibility: visible; transform: translate(-50%, 0); pointer-events: auto; transition-delay: 0s;
}
.panel-h { margin: 2px 8px 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pl { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--ink); transition: background .15s; }
.pl:hover { background: var(--surface); }
.pl-ic svg { display: block; width: 38px; height: 38px; padding: 9px; border-radius: 11px; fill: #fff; background: linear-gradient(140deg, var(--blue-2), var(--blue)); }
.pl-tx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pl-tx b { font-size: 15px; font-weight: 700; }
.pl-tx small { font-size: 13px; color: var(--muted); line-height: 1.45; }
.badge { flex: none; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); }
.badge.live { background: var(--blue); color: var(--on-blue); }
.pg { padding: 6px 10px 10px; }
.pg-h { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--ink); }
.pg a { display: block; padding: 6px 10px; margin: 0 -10px; border-radius: 9px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.pg a:hover { background: var(--surface); color: var(--blue); }
.panel-all { display: flex; justify-content: space-between; margin-top: 8px; padding: 10px 10px 4px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 650; text-decoration: none; }
.arr { display: inline-block; transition: transform .2s; }
a:hover .arr { transform: translateX(3px); }

.menu-btn { display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s, top .25s; }
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 24px; }
.menu-open .menu-btn span:first-child { top: 20px; transform: rotate(45deg); }
.menu-open .menu-btn span:last-child { top: 20px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .gnav {
    position: fixed; left: 0; right: 0; top: 68px; height: calc(100vh - 68px); height: calc(100dvh - 68px); z-index: 19; display: block; overflow-y: auto;
    background: var(--bg); padding: 12px 20px 40px; border-top: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity .2s ease, transform .3s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .3s;
  }
  .menu-open .gnav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .menu-open { overflow: hidden; }
  .gnav-list { flex-direction: column; gap: 0; }
  .gi { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .gl { padding: 0; height: 36px; font-size: 18px; font-weight: 700; color: var(--ink); background: none !important; }
  .gl .chev { display: none; }
  .panel, .gi:hover .panel { position: static; opacity: 1; visibility: visible; transform: none; pointer-events: auto; padding: 0; min-width: 0; transition: none; }
  .panel-in { border: 0; box-shadow: none; padding: 0; background: transparent; }
  .panel-h { display: none; }
  .lang { margin: 18px 0 0; }
}

/* ------------------------------------------------------------------ 공통 글 */
main.wrap { padding-top: 40px; padding-bottom: 104px; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.2; letter-spacing: -0.035em; font-weight: 800; margin: 6px 0 14px; }
h2 { font-size: clamp(21px, 2.6vw, 26px); line-height: 1.3; margin: 56px 0 14px; letter-spacing: -0.03em; font-weight: 750; }
h3 { font-size: 17px; margin: 22px 0 6px; letter-spacing: -0.015em; font-weight: 700; }
p, li { color: var(--ink-2); }
.lead { font-size: 18px; color: var(--ink-2); max-width: 700px; }
.meta { color: var(--muted); font-size: 14px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 4px 11px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }
.crumbs span { margin: 0 6px; color: var(--line-2); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 12px; font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s; }
.btn { background: linear-gradient(140deg, var(--blue-2), var(--blue)); color: #fff; box-shadow: 0 8px 20px -8px rgba(31, 79, 224, .6); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(31, 79, 224, .7); }
.btn.ghost { background: var(--bg); color: var(--ink); border-color: var(--line-2); box-shadow: none; }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ------------------------------------------------------------------ 첫 화면 */
.home main.wrap { padding-top: 0; }
.hero-home { position: relative; isolation: isolate; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; padding: clamp(56px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero-home::before {
  content: ""; position: absolute; inset: 0 -40px; z-index: -2;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(70% 80% at 60% 40%, #000 30%, transparent 80%); mask-image: radial-gradient(70% 80% at 60% 40%, #000 30%, transparent 80%);
}
.hero-home::after { content: ""; position: absolute; z-index: -1; right: -10%; top: 4%; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgba(59, 108, 246, .16), transparent 62%); filter: blur(10px); }
.wordmark { font-size: clamp(52px, 9.5vw, 112px); font-weight: 850; letter-spacing: -0.055em; line-height: .98; margin: 18px 0 22px; background: linear-gradient(180deg, var(--ink) 30%, color-mix(in srgb, var(--ink) 55%, var(--blue))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.6; color: var(--ink-2); max-width: 560px; margin: 0; }
.hero-art { position: relative; justify-self: end; width: 100%; max-width: 440px; }
.hero-art svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(31, 79, 224, .18)); }
@media (max-width: 860px) { .hero-home { grid-template-columns: 1fr; } .hero-art { justify-self: center; max-width: 360px; } }

.sec-h { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin: 72px 0 20px; }
.sec-h h2 { margin: 6px 0 0; }
.sec-h a { font-weight: 650; text-decoration: none; }

.showcase { display: grid; grid-template-columns: 1fr 260px; gap: 32px; align-items: center; padding: 36px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(160deg, var(--surface), var(--bg) 60%); box-shadow: var(--shadow); overflow: hidden; }
.showcase h3 { font-size: 26px; letter-spacing: -0.03em; margin: 10px 0 8px; }
.showcase p { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.chips li { font-size: 13px; font-weight: 650; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.phone { justify-self: center; width: 230px; padding: 10px; border-radius: 34px; background: var(--ink); box-shadow: var(--shadow-lg); transform: rotate(3deg); }
.phone img { display: block; width: 100%; height: 330px; object-fit: cover; object-position: top; border-radius: 26px; }
@media (max-width: 760px) { .showcase { grid-template-columns: 1fr; padding: 24px; } .phone { width: 200px; transform: none; } .phone img { height: 300px; } }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pillar { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--bg); transition: border-color .2s, box-shadow .2s, transform .2s; }
.pillar:hover { border-color: var(--blue-3); box-shadow: var(--shadow); transform: translateY(-2px); }
.pillar .num { font-family: var(--mono); font-size: 13px; color: var(--blue); }
.pillar .p-h { display: flex; justify-content: space-between; align-items: center; font-size: 21px; font-weight: 750; color: var(--ink); letter-spacing: -0.03em; }
.pillar .p-t { font-size: 15px; color: var(--muted); }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }

.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pr { display: flex; gap: 16px; padding: 26px 24px; border-radius: var(--radius); background: var(--surface); }
.pr-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--blue); }
.pr-ic svg { width: 22px; height: 22px; }
.pr h3 { margin: 2px 0 6px; }
.pr p { margin: 0; font-size: 15px; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ 쪽 머리 */
.page-h { padding: 24px 0 8px; }
.page-h h1 { margin-top: 12px; }

/* 앱 목록 */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 28px; }
.app { display: flex; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; background: var(--bg); transition: border-color .2s, box-shadow .2s, transform .2s; }
.app:hover { border-color: var(--blue-3); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.app-icon svg { width: 60px; height: 60px; padding: 14px; border-radius: 17px; fill: #fff; background: linear-gradient(140deg, var(--blue-2), var(--blue)); box-shadow: 0 10px 20px -10px rgba(31, 79, 224, .7); }
.app-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.app-name { font-size: 20px; font-weight: 750; color: var(--ink); letter-spacing: -0.03em; }
.app-sum { color: var(--ink-2); font-size: 15px; }
.app .more { color: var(--blue); font-size: 14px; font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.tag.soon { background: var(--blue-soft); color: var(--blue); }
.tag.live { background: var(--blue); color: var(--on-blue); }

/* 목록 (정책·회사 정보) */
.list { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--bg); }
.row { display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: 8px 24px; padding: 20px 24px; border-bottom: 1px solid var(--line); align-items: center; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface); }
.row-h { font-weight: 700; color: var(--ink); }
.row-h span { display: block; font-weight: 500; font-size: 13px; color: var(--muted); }
.row-l { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.row-l span { color: var(--ink-2); }
.row-l a { font-weight: 650; text-decoration: none; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

/* 앱 상세 */
.hero { padding: 8px 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card h3 { margin-top: 0; }
.card p { margin: 6px 0 0; font-size: 15px; }
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 12px 2px 18px; scroll-snap-type: x mandatory; }
.shots figure { margin: 0; flex: 0 0 210px; scroll-snap-align: start; }
.shots img { border-radius: 22px; border: 1px solid var(--line); display: block; box-shadow: var(--shadow); }
.shots figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 12px; padding: 16px 20px; margin: 16px 0; }
.note p { margin: 4px 0; }

/* 문서 (정책) */
.doc { max-width: 800px; }
.doc h2 { font-size: 20px; margin-top: 44px; }
table { border-collapse: collapse; width: 100%; margin: 10px 0 16px; font-size: 15px; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: var(--surface); color: var(--ink); white-space: nowrap; }

/* ------------------------------------------------------------------ 바닥 */
.foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; padding: 48px 0 36px; }
.foot p { color: var(--muted); margin: 10px 0 0; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--blue); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1fr; gap: 32px; }
.foot-brand .brand { font-size: 17px; }
.foot-info { font-size: 13px; line-height: 1.8; }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col p { margin: 4px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.foot .copy { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* 오른쪽 끝 메뉴는 화면 밖으로 나가지 않게 오른쪽에 맞춘다 */
@media (min-width: 861px) {
  .gi:last-child .panel { left: auto; right: 0; transform: translate(0, -10px); }
  .gi:last-child:hover .panel, .gi:last-child.open .panel, .gi:last-child:focus-within .panel { transform: translate(0, 0); }
}
