/* PHARM{X} — 회사 홈페이지 시안 */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: #d2d2d7;
  --accent: #0f6e56;
  --accent-hover: #0b5a46;
  --accent-bright: #1fa67c;
  --accent-soft: #e2f3ec;
  --on-dark: #f5f5f7;
  --on-dark-2: #a1a1a6;
  --accent-on-dark: #5fd3ad;
  --add: #34c759;
  --chg: #ff9500;
  --stop: #ff3b30;
  --radius-lg: 28px;
  --radius-md: 18px;
  --max: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 52px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --font-brand: "Montserrat", var(--font);
  --font-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-weight: 700; }
section { scroll-margin-top: var(--nav-h); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 10px; }
.br-lg { display: none; }
@media (min-width: 834px) { .br-lg { display: inline; } }

mark.todo { background: #fff2a8; color: #5a4600; padding: 0 .25em; border-radius: 4px; }

/* ---------- Wordmark (로고와 같은 글꼴: Montserrat ExtraBold + Roboto Mono Bold) ---------- */
.wordmark { font-family: var(--font-brand); font-weight: 800; letter-spacing: 0; white-space: nowrap; line-height: 1; }
.wordmark .br, .vw-set .br { font-family: var(--font-mono); font-weight: 700; font-size: .755em; vertical-align: .15em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px; border: 0; border-radius: 999px;
  font: 600 17px/1 var(--font); letter-spacing: -0.01em; cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-sm { height: 30px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; height: 52px; }
.link-more { display: inline-flex; align-items: center; gap: 2px; font-size: 17px; font-weight: 500; }
.link-more::after { content: "›"; font-size: 1.35em; line-height: 1; margin-left: 4px; transform: translateY(-1px); }
.cta-row { display: flex; gap: 28px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 32px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.nav.is-scrolled { border-bottom-color: rgba(0, 0, 0, .08); }
.nav-inner { max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; }
.nav-logo { color: var(--ink); font-size: 19px; display: inline-flex; align-items: center; }
.nav-logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0 auto; padding: 0; }
.nav-links a { color: var(--ink); font-size: 14px; opacity: .8; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-toggle { display: none; }

@media (max-width: 833px) {
  .nav-cta { margin-left: auto; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 40px; height: 40px; margin-right: -8px; padding: 0 9px; border: 0; background: none; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease); }
  .nav.is-open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.is-open .nav-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gutter) 28px;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, .08);
  }
  .nav.is-open { background: rgba(255, 255, 255, .97); }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a { display: block; padding: 14px 0; font-size: 22px; font-weight: 600; opacity: 1; border-bottom: 1px solid #ececf0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - var(--nav-h));
  display: flex; flex-direction: column; align-items: center;
  padding-top: clamp(48px, 9vh, 112px);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: relative; z-index: 1; text-align: center; max-width: 960px; padding: 0 var(--gutter); }
.hero-eyebrow { margin: 0 0 14px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; color: var(--ink-2); }
.hero-title { margin: 0; font-size: clamp(40px, 8vw, 100px); line-height: 1.06; letter-spacing: -0.04em; }
.grad {
  background: linear-gradient(100deg, #0f6e56 5%, #179470 45%, #2bb685 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin: 24px auto 0; max-width: 660px; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; font-weight: 500; color: var(--ink-2); }
.hero-stage { flex: 1 0 auto; width: 100%; min-height: clamp(250px, 40vh, 520px); }
.hero-caption {
  position: relative; z-index: 1; margin: 0 0 clamp(24px, 5vh, 48px); padding: 0 var(--gutter);
  color: var(--ink-3); font-size: 14px; text-align: center;
  opacity: 0; transform: translateY(6px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.hero-caption.is-in { opacity: 1; transform: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(96px, 12vw, 168px) 0; }
.alt { background: var(--bg-alt); }
.eyebrow { margin: 0 0 12px; font-size: clamp(17px, 1.5vw, 21px); font-weight: 600; color: var(--accent); }
.section-title { margin: 0; font-size: clamp(36px, 5.6vw, 72px); line-height: 1.1; letter-spacing: -0.04em; }
.lead { margin: 24px 0 0; max-width: 700px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; font-weight: 500; color: var(--ink-2); }
.center .lead { margin-left: auto; margin-right: auto; }
.fine { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); }

/* ---------- Product ---------- */
.product-name { margin: 0; font-family: var(--font-brand); font-weight: 800; font-size: clamp(56px, 11vw, 136px); line-height: 1; letter-spacing: -0.035em; }
.product-tagline { margin: 18px 0 0; font-size: clamp(26px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.2; }
.devices { position: relative; max-width: 1000px; margin: clamp(56px, 8vw, 96px) auto 0; padding: 0 var(--gutter); display: flex; justify-content: center; align-items: flex-end; }
/* ---------- 기기 프레임: 실제 치수 비율 (iPhone 16 Pro 71.5×149.6mm · iPad Pro 13" 215.5×281.6mm) ----------
   cqw = 기기 너비의 1%. 금속 테두리 → 검은 베젤 → 화면 순서로 모서리가 같은 중심을 갖게 맞춤 */
.device { position: relative; flex: none; margin: 0; container-type: inline-size; }
.device img { display: block; width: 100%; height: auto; }
.device .frame {
  position: relative; z-index: 1;
  background: linear-gradient(145deg, #77777c 0%, #2c2c2f 14%, #1a1a1c 50%, #333336 86%, #6e6e73 100%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 40px 80px -30px rgba(0, 0, 0, .45);
}
.device .bezel { position: relative; background: #050506; box-shadow: inset 0 0 0 .15cqw rgba(255, 255, 255, .06); }
.device .hw { position: absolute; z-index: 0; background: linear-gradient(90deg, #3a3a3d, #8a8a90 45%, #3a3a3d); }

.iphone { width: min(250px, 30%); }
.iphone .frame { padding: .9cqw; border-radius: 17.5cqw; }
.iphone .bezel { padding: 1.9cqw; border-radius: 16.6cqw; }
.iphone .bezel img { border-radius: 14.7cqw; }
.iphone .hw { width: .8cqw; }
.iphone .hw-l { left: -.55cqw; border-radius: .5cqw 0 0 .5cqw; }
.iphone .hw-r { right: -.55cqw; border-radius: 0 .5cqw .5cqw 0; }
.iphone .hw-action { top: 34cqw; height: 9cqw; }
.iphone .hw-volup { top: 50cqw; height: 15cqw; }
.iphone .hw-voldn { top: 69cqw; height: 15cqw; }
.iphone .hw-side { top: 56cqw; height: 23cqw; }
.iphone .hw-cc { top: 124cqw; height: 13cqw; right: -.35cqw; background: linear-gradient(90deg, #1c1c1e, #4a4a4e 50%, #1c1c1e); }

.ipad { width: min(700px, 76%); isolation: isolate; } /* 전면 카메라 점이 앞의 iPhone 위로 올라오지 않게 */
.ipad .frame { padding: .55cqw; border-radius: 6cqw; }
.ipad .bezel { padding: 3cqw; border-radius: 5.45cqw; }
.ipad .bezel img { border-radius: 2.45cqw; }
.ipad .cam {
  position: absolute; z-index: 2; right: 2.05cqw; top: 50%; width: .95cqw; height: .95cqw; border-radius: 50%;
  transform: translate(50%, -50%);
  background: radial-gradient(circle at 38% 35%, #3b4a66 0, #141824 45%, #050508 70%);
  box-shadow: 0 0 0 .12cqw #111114;
}
.ipad .hw-top { top: -.4cqw; right: 11cqw; width: 8cqw; height: .6cqw; border-radius: .4cqw .4cqw 0 0; background: linear-gradient(180deg, #3a3a3d, #8a8a90 45%, #3a3a3d); }
.ipad .hw-vol1, .ipad .hw-vol2 { right: -.4cqw; width: .6cqw; height: 6cqw; border-radius: 0 .4cqw .4cqw 0; }
.ipad .hw-vol1 { top: 9cqw; }
.ipad .hw-vol2 { top: 16.5cqw; }
.devices .iphone { position: relative; z-index: 1; margin-left: -10%; margin-bottom: -28px; }
.platforms { margin: 64px 0 0; font-size: 19px; font-weight: 600; letter-spacing: .02em; }

/* ---------- Why / Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(48px, 6vw, 80px); }
.pillar { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 36px 32px 40px; display: flex; flex-direction: column; }
.pillar-visual { height: 168px; margin: 0 -8px 28px; display: grid; place-items: center; }
.pillar-visual svg { width: 100%; max-width: 260px; height: 100%; overflow: visible; }
.pillar-kicker { margin: 0 0 10px; font-family: var(--font-brand); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.pillar h3 { margin: 0 0 14px; font-size: clamp(24px, 2.3vw, 30px); line-height: 1.25; letter-spacing: -0.035em; }
.pillar p { margin: 0; color: var(--ink-2); }

.viz-nodes .links path { fill: none; stroke: #c4d9d1; stroke-width: 1.5; stroke-dasharray: 3 5; }
.viz-nodes .ring { fill: #fff; stroke: #cfe6dd; stroke-width: 1.5; }
.viz-nodes .halo { fill: none; stroke: var(--accent-bright); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; animation: halo 3.5s var(--ease) infinite; animation-delay: var(--d); }
.viz-nodes .db { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@keyframes halo { 0% { opacity: .9; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.7); } }

.viz-grid { display: grid; gap: 9px; width: 100%; max-width: 250px; -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent); mask-image: linear-gradient(90deg, #000 55%, transparent); }
.viz-grid i { aspect-ratio: 1; border-radius: 5px; background: var(--accent); opacity: .12; animation: grow 5s var(--ease) infinite; animation-delay: var(--d); }
@keyframes grow { 0% { opacity: .12; transform: scale(.6); } 18% { opacity: 1; transform: scale(1); } 60% { opacity: 1; transform: scale(1); } 100% { opacity: .12; transform: scale(.6); } }

.viz-p2p .person circle, .viz-p2p .person path { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.viz-p2p .person .cross { stroke: var(--accent-bright); stroke-width: 3; }
.viz-p2p .talk { fill: none; stroke: var(--accent-bright); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 9; animation: flow 1.6s linear infinite; }
.viz-p2p .talk-back { stroke: #9fd8c3; animation-direction: normal; }
@keyframes flow { to { stroke-dashoffset: -22; } }

/* ---------- Features / Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; margin-top: clamp(48px, 6vw, 80px); }
.tile { position: relative; overflow: hidden; grid-column: span 6; min-height: 440px; display: flex; flex-direction: column; padding: 40px 40px 0; background: #fff; border-radius: var(--radius-lg); }
.span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
.span-4 { padding-bottom: 40px; min-height: 0; }
.span-5 { padding-bottom: 40px; }
.tile-kicker { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--accent); }
.tile h3 { margin: 0 0 12px; font-size: clamp(26px, 2.4vw, 32px); line-height: 1.2; letter-spacing: -0.035em; }
.tile p { margin: 0; max-width: 440px; color: var(--ink-2); }
.tile-media { display: flex; justify-content: center; align-items: flex-start; gap: 20px; height: 330px; margin-top: auto; padding-top: 36px; overflow: hidden; }
.tile-media .iphone.sm { width: 230px; }
.tile-media .iphone.sm .frame { box-shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 20px 50px -20px rgba(0, 0, 0, .35); }
.tile-media.two .iphone.sm { width: min(230px, calc(50% - 10px)); }
.tile-media.two .iphone.sm:last-child { margin-top: 40px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: auto 0; padding-top: 28px; }
.stat { background: var(--bg-alt); border-radius: var(--radius-md); padding: 16px 18px 18px; }
.stat span { display: block; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.stat strong { display: block; margin-top: 4px; font-size: clamp(22px, 2.1vw, 28px); line-height: 1.2; color: var(--accent); letter-spacing: -0.03em; }

.timeline { margin: auto 0; padding-top: 28px; }
.tl-row { display: grid; grid-template-columns: 40px 1fr 52px; align-items: center; gap: 12px; height: 40px; }
.tl-label { font-size: 13px; color: var(--ink-3); }
.tl-track { position: relative; height: 14px; }
.tl-track i { position: absolute; top: 0; height: 100%; border-radius: 7px; }
.tl-bar { background: #2f7f68; }
.tl-gap { top: 6px !important; height: 2px !important; background: #c7c7cc; }
.tl-mark { display: flex; gap: 4px; padding-left: 10px; border-left: 1px solid #e5e5ea; min-height: 28px; align-items: center; }
.tl-mark b, .tl-legend b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 12px; line-height: 1; font-weight: 800; }
.m-add { background: var(--add); } .m-chg { background: var(--chg); } .m-stop { background: var(--stop); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-gap-key { display: inline-block; width: 16px; height: 2px; background: #c7c7cc; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; margin: auto 0; padding-top: 28px; box-sizing: content-box; }
.bars i { flex: 1; display: flex; flex-direction: column-reverse; height: 100%;
  /* 보이는 막대(세 구간 합) 높이만큼만 남기고 네 모서리를 둥글게 */
  clip-path: inset(calc(100% - var(--a) - var(--b) - var(--c)) 0 0 0 round 7px);
  background: linear-gradient(to top, #0a84ff 0 var(--a), #ff9f0a var(--a) calc(var(--a) + var(--b)), #30b0c7 calc(var(--a) + var(--b)) calc(var(--a) + var(--b) + var(--c)), transparent 0); }

.flow { display: flex; align-items: center; gap: 10px; margin: auto 0; padding-top: 28px; flex-wrap: wrap; }
.flow-box { padding: 12px 16px; border-radius: 14px; background: var(--bg-alt); font-weight: 600; font-size: 15px; }
.flow-box.accent { background: var(--accent-soft); color: var(--accent); }
.tile { container-type: inline-size; }
/* 화살표 선은 상자 가운데 높이에, 글자는 선 바로 위 가운데에 */
.flow-arrow { position: relative; flex: 1; min-width: 80px; height: 1.5px; margin-right: 8px; background: var(--ink-3); border-radius: 1px; }
.flow-arrow span { position: absolute; left: 50%; bottom: 9px; transform: translateX(-50%); white-space: nowrap; font-size: 12px; line-height: 1; color: var(--ink-3); }
.flow-arrow::after { content: ""; position: absolute; right: -8px; top: 50%; transform: translateY(-50%); border: 5px solid transparent; border-left: 8px solid var(--ink-3); border-right: 0; }
/* 칸이 좁으면(넓은 화면의 3열·폰) 위→아래 흐름으로 */
@container (max-width: 340px) {
  .flow { flex-direction: column; align-items: flex-start; gap: 0; }
  .flow-arrow { flex: none; width: 1.5px; min-width: 0; height: 40px; margin: 10px 0 18px 54px; }
  .flow-arrow span { left: 14px; bottom: auto; top: 50%; transform: translateY(-50%); }
  .flow-arrow::after { right: auto; left: 50%; top: auto; bottom: -8px; transform: translateX(-50%); border: 5px solid transparent; border-top: 8px solid var(--ink-3); border-bottom: 0; }
}

.device-line { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 !important; padding-top: 28px; }
.device-line span { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--ink); }

/* ---------- Process ---------- */
.steps { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { border-top: 1px solid var(--line); padding-top: 24px; }
.step-no { display: block; font-family: var(--font-brand); font-weight: 800; font-size: 15px; color: var(--accent); letter-spacing: .04em; }
.step h3 { margin: 14px 0 10px; font-size: 22px; letter-spacing: -0.03em; line-height: 1.3; }
.step p { margin: 0; color: var(--ink-2); font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: clamp(64px, 8vw, 112px) 0 0; }
.stats div { display: flex; flex-direction: column-reverse; padding: 28px 24px; border-radius: var(--radius-lg); background: var(--bg-alt); }
.stats dd { margin: 0; font-family: var(--font-brand); font-weight: 800; font-size: clamp(44px, 5vw, 64px); line-height: 1; letter-spacing: -0.03em; }
.stats dd small { font-family: var(--font); font-size: .42em; font-weight: 700; margin-left: 4px; letter-spacing: 0; }
.stats dt { margin-top: 12px; font-size: 15px; color: var(--ink-2); font-weight: 500; }

/* ---------- Cases ---------- */
.case-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-top: clamp(48px, 6vw, 80px); }
.case { background: #fff; border-radius: var(--radius-lg); padding: clamp(32px, 4vw, 48px); }
.case-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.case-head h3 { margin: 0; font-size: clamp(30px, 3vw, 40px); letter-spacing: -0.035em; }
.case-quote { margin: 28px 0 0; padding: 0; }
.case-quote p { margin: 0; font-size: clamp(20px, 2vw, 26px); font-weight: 600; line-height: 1.45; letter-spacing: -0.03em; }
.case-quote cite { display: block; margin-top: 12px; font-style: normal; color: var(--ink-2); font-size: 15px; }
.case-facts { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.case-facts li { border-top: 1px solid #e5e5ea; padding-top: 16px; }
.case-facts strong { display: block; font-size: 22px; letter-spacing: -0.03em; color: var(--accent); }
.case-facts span { display: block; margin-top: 6px; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.case-next { display: flex; flex-direction: column; background: var(--ink); color: var(--on-dark); }
.case-next .eyebrow { color: var(--accent-on-dark); }
.case-next h3 { margin: 0 0 14px; font-size: clamp(26px, 2.4vw, 32px); line-height: 1.25; letter-spacing: -0.035em; }
.case-next p { margin: 0 0 24px; color: var(--on-dark-2); }
.case-next .link-more { margin-top: auto; color: var(--accent-on-dark); }

/* ---------- Security (dark) ---------- */
.dark { background: #000; color: var(--on-dark); }
.dark .eyebrow { color: var(--accent-on-dark); }
.dark .lead { color: var(--on-dark-2); }
.dark .fine { color: #6e6e73; margin-top: 48px; }
.sec-grid { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sec-grid li { background: #161617; border-radius: var(--radius-lg); padding: 32px 30px 34px; }
.sec-grid svg { width: 36px; height: 36px; fill: none; stroke: var(--accent-on-dark); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sec-grid h3 { margin: 22px 0 10px; font-size: 21px; line-height: 1.35; letter-spacing: -0.03em; }
.sec-grid p { margin: 0; color: var(--on-dark-2); font-size: 16px; }

/* ---------- Vision ---------- */
.vision-word { margin: 8px 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .25em; font-size: clamp(56px, 11vw, 144px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.05; }
.vw-set { font-family: var(--font-brand); font-weight: 800; white-space: nowrap; letter-spacing: 0; }
.vw-set .br { color: var(--ink); }
.vw-cycle {
  display: inline-block; min-width: .8em; text-align: center; font-family: var(--font); font-weight: 800; letter-spacing: -0.04em;
  background: linear-gradient(100deg, #0f6e56 5%, #2bb685 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: opacity .35s var(--ease), transform .35s var(--ease), filter .35s var(--ease);
}
.vw-cycle.is-x { font-family: var(--font-brand); letter-spacing: 0; }
.vw-cycle.out { opacity: 0; transform: translateY(.18em); filter: blur(6px); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 12px; }
.contact-steps li { display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 600; }
.contact-steps span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--font-brand); font-weight: 800; font-size: 13px; }
.contact-direct { margin: 36px 0 0; display: grid; gap: 8px; }
.contact-direct div { display: flex; gap: 16px; }
.contact-direct dt { width: 48px; color: var(--ink-3); font-size: 15px; }
.contact-direct dd { margin: 0; font-size: 15px; }

.form-card { background: #fff; border-radius: var(--radius-lg); padding: clamp(24px, 3.5vw, 40px); box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .25); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 28px; padding: 4px; border: 0; border-radius: 14px; background: var(--bg-alt); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 11px 8px; border-radius: 10px; text-align: center; font-size: 15px; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s, box-shadow .2s; }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 14px; font-weight: 600; }
.field em { color: var(--accent); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  font: 500 16px/1.4 var(--font); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(15, 110, 86, .14); }
.field.invalid input { border-color: var(--stop); }
.contact.is-biz .demo-only { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 24px; font-size: 15px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.consent.invalid span { color: var(--stop); }
.consent-detail { margin: 8px 0 24px 28px; font-size: 14px; color: var(--ink-2); }
.consent-detail summary { cursor: pointer; color: var(--accent); width: fit-content; }
.consent-detail p { margin: 8px 0 0; line-height: 1.7; }
.form-note { margin: 14px 0 0; min-height: 1.5em; font-size: 15px; text-align: center; color: var(--ink-2); }
.form-note.ok { color: var(--accent); font-weight: 600; }
.form-note.err { color: var(--stop); }

/* ---------- Footer ---------- */
.footer { background: var(--bg-alt); color: var(--ink-2); font-size: 12px; line-height: 1.5; letter-spacing: -0.01em; padding: 0 0 24px; }
.footer a { color: #424245; }
.footer-notes { padding: 20px 0 12px; border-bottom: 1px solid var(--line); }
.footer-notes p { margin: 0 0 8px; }
.footer-crumbs { display: flex; align-items: center; gap: 10px; padding: 18px 0 4px; color: var(--ink); }
.footer-crumbs .wordmark { font-size: 14px; color: var(--ink); }
.footer-crumbs .wordmark:hover { text-decoration: none; opacity: .75; }
.footer-crumb-sep { color: var(--ink-3); font-size: 14px; }
.footer-dir { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 16px 0 28px; border-bottom: 1px solid var(--line); }
.footer-dir h3 { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.footer-dir ul { list-style: none; margin: 0; padding: 0; }
.footer-dir li { margin: 0 0 8px; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 28px; row-gap: 6px; padding-top: 16px; }
.footer-legal p { margin: 0; }
.footer-legal-links { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-legal-links li + li::before { content: "|"; margin: 0 10px; color: var(--line); }
.footer-locale { margin-left: auto !important; color: #424245; }
.footer-biz { flex-basis: 100%; margin-top: 6px !important; }
.footer-biz span { white-space: nowrap; }
.footer-biz span + span::before { content: "|"; margin: 0 8px 0 5px; color: var(--line); }
@media (max-width: 833px) {
  .footer-dir { grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .footer-legal { flex-direction: column; }
  .footer-locale { margin-left: 0 !important; }
  .footer-biz span { display: block; white-space: normal; }
  .footer-biz span + span::before { content: none; }
}

/* ---------- Legal (개인정보 처리방침) ---------- */
.nav-cta-push { margin-left: auto; }
.legal { padding: clamp(48px, 8vw, 96px) 0 clamp(96px, 10vw, 140px); }
.legal .container { max-width: 820px; }
.legal h1 { margin: 0; font-size: clamp(36px, 5.4vw, 60px); line-height: 1.1; letter-spacing: -0.04em; }
.legal-meta { margin: 14px 0 36px; color: var(--ink-2); font-size: 15px; }
.legal h2 { margin: 64px 0 16px; font-size: clamp(22px, 2.2vw, 26px); letter-spacing: -0.03em; scroll-margin-top: calc(var(--nav-h) + 20px); }
.legal p, .legal li { color: #333336; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal-note { font-size: 15px; color: var(--ink-2) !important; }
.legal-summary { margin: 32px 0; padding: 28px 32px; border-radius: var(--radius-md); background: var(--bg-alt); }
.legal-summary-title { margin: 0 0 12px !important; font-size: 19px !important; }
.legal-summary ul { margin: 0; }
.legal-toc ol { margin: 0; padding: 24px 0 0 22px; columns: 2; column-gap: 32px; font-size: 15px; border-top: 1px solid #e5e5ea; }
.legal-toc li { margin: 4px 0; break-inside: avoid; }
.table-wrap { margin: 8px 0 18px; border: 1px solid #e5e5ea; border-radius: var(--radius-md); overflow: hidden; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table-wrap th, .table-wrap td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid #e5e5ea; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap th { background: var(--bg-alt); font-weight: 600; white-space: nowrap; }
.table-wrap td:first-child { font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) {
  .legal-toc ol { columns: 1; }
  .legal-summary { padding: 24px 22px; }
  .table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap tr:first-child { display: none; }
  .table-wrap tr { margin-bottom: 10px; padding: 6px 0; border: 1px solid #e5e5ea; border-radius: 14px; }
  .table-wrap td { padding: 4px 16px; border: 0; white-space: normal !important; }
  .table-wrap td:first-child { padding-top: 10px; }
  .table-wrap td:last-child { padding-bottom: 10px; }
}

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1068px) {
  .span-7, .span-5 { grid-column: span 6; }
  .span-4 { grid-column: span 6; }
  .span-4:last-child { grid-column: span 12; min-height: 0; }
  .span-4:last-child .device-line { padding-top: 24px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .sec-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 833px) {
  .pillars { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .span-7, .span-5, .span-4, .span-4:last-child { grid-column: auto; }
  .tile { min-height: 0; }
  .case-grid { grid-template-columns: 1fr; }
  .case-facts { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tile { padding: 32px 24px 0; }
  .span-5, .span-4 { padding-bottom: 32px; }
  .tile-media { height: 300px; }
  .tile-media .iphone.sm { width: 200px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stats div { padding: 22px 18px; }
  .sec-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .devices .iphone { margin-bottom: -16px; }
  .cta-row { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .viz-nodes .halo, .viz-grid i, .viz-p2p .talk { animation: none; }
  .viz-grid i { opacity: .7; }
  .hero-caption { transition: none; }
}
