/* =========================================================
   WeMAXSoft — style.css
   ========================================================= */

/* ---------- Font: 페이퍼로지 (Paperlogy, SIL OFL) ---------- */
@font-face {
  font-family: "Paperlogy";
  src: url("../fonts/Paperlogy-4Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Paperlogy";
  src: url("../fonts/Paperlogy-5Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Paperlogy";
  src: url("../fonts/Paperlogy-6SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Paperlogy";
  src: url("../fonts/Paperlogy-7Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Paperlogy";
  src: url("../fonts/Paperlogy-8ExtraBold.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --c-primary: #2563eb;
  --c-primary-2: #06b6d4;
  --c-ink: #0b1220;
  --c-ink-2: #1e293b;
  --c-text: #334155;
  --c-muted: #64748b;
  --c-line: #e2e8f0;
  --c-bg: #ffffff;
  --c-bg-alt: #f6f8fc;
  --c-dark: #0a0f1c;
  --grad: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-2) 100%);
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --header-h: 72px;
  --font: "Paperlogy", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth; scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  letter-spacing: 0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--c-ink); margin: 0; line-height: 1.3; letter-spacing: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: min(1200px, 100% - 48px); margin-inline: auto; }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  font-family: inherit;
  -webkit-appearance: none; appearance: none;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .6); }
.btn--primary:hover { box-shadow: 0 12px 28px -8px rgba(37, 99, 235, .7); }
.btn--ghost { border-color: rgba(255,255,255,.25); color: #fff; background: rgba(255,255,255,.05); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--light { background: #fff; color: var(--c-primary); }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-top: env(safe-area-inset-top);
  height: calc(var(--header-h) + env(safe-area-inset-top));
  transition: background .3s ease, box-shadow .3s ease;
}
.header.is-scrolled {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--c-line);
}
.header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; transition: color .3s; }
.logo__text { font-size: 21px; font-weight: 500; letter-spacing: 0; }
.logo__text strong { font-weight: 800; }
.header.is-scrolled .logo { color: var(--c-ink); }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) {
  font-size: 15px; font-weight: 500; color: rgba(255,255,255,.85);
  position: relative; transition: color .2s;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--grad); transition: width .25s ease;
}
.nav a:not(.btn):hover::after, .nav a.is-current::after { width: 100%; }
.nav a:not(.btn):hover { color: #fff; }
.header.is-scrolled .nav a:not(.btn) { color: var(--c-ink-2); }
.header.is-scrolled .nav a:not(.btn):hover { color: var(--c-primary); }

.nav-toggle {
  -webkit-appearance: none; appearance: none;
  display: none; width: 40px; height: 40px; background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px; padding: 8px;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s; }
.header.is-scrolled .nav-toggle span { background: var(--c-ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: -webkit-fill-available; min-height: 100svh;
  display: flex; align-items: center;
  background: var(--c-dark); color: #cbd5e1;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 60px) 0 80px;
}
.hero__bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; overflow: hidden; }
.hero__grid {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background-image:
    linear-gradient(rgba(148,163,184,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
}
.hero__glow { position: absolute; border-radius: 50%; filter: blur(90px); -webkit-filter: blur(90px); opacity: .55; will-change: transform; -webkit-transform: translateZ(0); transform: translateZ(0); }
.hero__glow--1 { width: 520px; height: 520px; background: #2563eb; top: -140px; left: -120px; animation: float 14s ease-in-out infinite; }
.hero__glow--2 { width: 460px; height: 460px; background: #06b6d4; bottom: -160px; right: -80px; animation: float 18s ease-in-out infinite reverse; }
@keyframes float { 0%, 100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(60px, 40px, 0); } }

.hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; grid-template-areas: "eyebrow code" "title code" "desc code" "actions code"; column-gap: 56px; align-items: center; }
.hero .eyebrow { grid-area: eyebrow; color: #67e8f9; }
.hero__title { grid-area: title; color: #fff; font-size: clamp(36px, 5.4vw, 66px); font-weight: 800; letter-spacing: 0.01em; line-height: 1.28; }
.hero__desc { grid-area: desc; margin-top: 24px; font-size: clamp(16px, 1.5vw, 19px); color: #94a3b8; max-width: 600px; }
.hero__actions { grid-area: actions; margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__code { grid-area: code; min-width: 0; max-width: 100%; }
.hero__inner > * { min-width: 0; }
.code-window pre { max-width: 100%; }

.code-window {
  background: rgba(15, 23, 42, .75);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
}
.code-window__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(148,163,184,.12); }
.code-window__bar i { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; }
.code-window__bar i:nth-child(2) { background: #f59e0b; }
.code-window__bar i:nth-child(3) { background: #22c55e; }
.code-window__bar span { margin-left: 10px; font-size: 12px; color: #64748b; }
.code-window pre { margin: 0; padding: 22px 24px; font: 14px/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #e2e8f0; overflow-x: auto; }
.c-k { color: #c084fc; } .c-v { color: #7dd3fc; } .c-t { color: #fbbf24; } .c-p { color: #93c5fd; }
.c-s { color: #86efac; } .c-n { color: #fca5a5; } .c-f { color: #67e8f9; } .c-c { color: #64748b; }

/* ---------- Section ---------- */
.section { padding: 120px 0; }
.section--alt { background: var(--c-bg-alt); }
.section--dark { background: var(--c-dark); color: #94a3b8; }
.section__head { max-width: 720px; margin-bottom: 60px; }
.section__title { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; }
.section__desc { margin-top: 18px; font-size: 17px; color: var(--c-muted); }
.section__head--light .section__title { color: #fff; }
.section__head--light .section__desc { color: #94a3b8; }
.section__head--light .eyebrow { color: #67e8f9; }

/* ---------- Values ---------- */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.value-card {
  padding: 32px 28px; border: 1px solid var(--c-line); border-radius: var(--radius);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.value-card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 24px; background: linear-gradient(135deg, #eff6ff, #ecfeff); margin-bottom: 22px;
}
.value-card h3 { font-size: 19px; margin-bottom: 10px; }
.value-card p { font-size: 15px; color: var(--c-muted); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  position: relative; background: #fff; padding: 36px 32px; border-radius: var(--radius);
  border: 1px solid var(--c-line); overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.service-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform .4s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.service-card:hover::before { transform: scaleX(1); }
.service-card__num { font-size: 15px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; margin-bottom: 18px; }
.service-card h3 { font-size: 21px; margin-bottom: 12px; }
.service-card p { font-size: 15px; color: var(--c-muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.tags li { font-size: 13px; font-weight: 500; padding: 4px 11px; border-radius: 999px; background: var(--c-bg-alt); color: var(--c-ink-2); }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; border-top: 1px solid var(--c-line); border-left: 1px solid var(--c-line); }
.process__step { padding: 40px 32px; border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); transition: background .3s; }
.process__step:hover { background: var(--c-bg-alt); }
.process__no { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--c-primary); margin-bottom: 14px; }
.process__step h3 { font-size: 21px; margin-bottom: 10px; }
.process__step p { font-size: 15px; color: var(--c-muted); }

/* ---------- Tech ---------- */
.tech { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.tech__group {
  padding: 28px 24px; border-radius: var(--radius);
  background: rgba(255,255,255,.03); border: 1px solid rgba(148,163,184,.14);
  transition: border-color .3s, background .3s;
}
.tech__group:hover { border-color: rgba(103,232,249,.5); background: rgba(255,255,255,.05); }
.tech__group h3 { color: #fff; font-size: 17px; margin-bottom: 18px; }
.tech__group li { font-size: 15px; padding: 7px 0; border-bottom: 1px dashed rgba(148,163,184,.15); }
.tech__group li:last-child { border-bottom: 0; }

/* ---------- Portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter {
  -webkit-appearance: none; appearance: none;
  font-family: inherit; font-size: 15px; font-weight: 600; padding: 9px 20px; border-radius: 999px;
  border: 1px solid var(--c-line); background: #fff; color: var(--c-ink-2); cursor: pointer; transition: all .2s;
}
.filter:hover { border-color: var(--c-primary); color: var(--c-primary); }
.filter.is-active { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }

.portfolio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.work { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--c-line); transition: transform .3s, box-shadow .3s; }
.work:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.work.is-hidden { display: none; }
.work__thumb { aspect-ratio: 16 / 10; display: grid; place-items: center; position: relative; overflow: hidden; }
.work__thumb span { color: rgba(255,255,255,.95); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; transition: transform .5s; }
.work:hover .work__thumb span { transform: scale(1.08); }
.work__thumb--1 { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.work__thumb--2 { background: linear-gradient(135deg, #0e7490, #22d3ee); }
.work__thumb--3 { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.work__thumb--4 { background: linear-gradient(135deg, #0f172a, #2563eb 70%, #06b6d4); }
.work__thumb--5 { background: linear-gradient(135deg, #047857, #34d399); }
.work__thumb--6 { background: linear-gradient(135deg, #334155, #64748b); }
.work__body { padding: 24px 26px 28px; }
.work__cat { font-size: 13px; font-weight: 600; color: var(--c-primary); margin-bottom: 8px; }
.work__body h3 { font-size: 19px; margin-bottom: 8px; }
.work__body p:last-child { font-size: 15px; color: var(--c-muted); }

/* ---------- CTA ---------- */
.cta { padding: 0 0 0; }
.cta__inner {
  background: var(--grad); border-radius: 24px; -webkit-mask-image: -webkit-radial-gradient(white, black); isolation: isolate; padding: 72px 48px; text-align: center; color: #e0f2fe;
  position: relative; overflow: hidden;
}
.cta__inner::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .5; pointer-events: none;
}
.cta h2 { color: #fff; font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; position: relative; }
.cta p { margin: 14px 0 32px; font-size: 17px; position: relative; }
.cta .btn { position: relative; z-index: 1; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.contact__list { margin: 40px 0 0; display: grid; gap: 20px; }
.contact__list div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--c-line); }
.contact__list dt { font-weight: 700; color: var(--c-ink); }
.contact__list dd { margin: 0; color: var(--c-muted); }
.contact__list a:hover { color: var(--c-primary); }

.form { background: var(--c-bg-alt); border-radius: 24px; padding: 40px; display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field span { font-size: 14px; font-weight: 600; color: var(--c-ink-2); }
.field em { color: #ef4444; font-style: normal; }
.field input, .field select, .field textarea {
  -webkit-appearance: none; appearance: none;
  font-family: inherit; font-size: 16px; line-height: 1.5; color: var(--c-ink);
  -webkit-text-fill-color: var(--c-ink); opacity: 1;
  padding: 13px 15px; border-radius: 12px; border: 1px solid var(--c-line); background: #fff;
  transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 12px 8px;
}
.field input::placeholder, .field textarea::placeholder { color: #94a3b8; -webkit-text-fill-color: #94a3b8; opacity: 1; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
.field.is-invalid input, .field.is-invalid textarea { border-color: #ef4444; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--c-muted); cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--c-primary); width: 16px; height: 16px; flex-shrink: 0; }
.form__msg { font-size: 14px; text-align: center; min-height: 1.4em; }
.form__msg.is-error { color: #ef4444; }
.form__msg.is-ok { color: #16a34a; }

/* ---------- Footer ---------- */
.footer { background: var(--c-dark); color: #64748b; padding: 56px 0 calc(56px + env(safe-area-inset-bottom)); margin-top: 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.logo--light { color: #fff; }
.footer__info { margin-top: 16px; font-size: 14px; line-height: 1.8; }
.footer__copy { font-size: 13px; }

.to-top {
  position: fixed; right: calc(24px + env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 90;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-ink); color: #fff; font-size: 20px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--c-primary); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__glow { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- Portfolio page ---------- */
.btn--outline { border-color: var(--c-line); color: var(--c-ink); background: #fff; }
.btn--outline:hover { border-color: var(--c-primary); color: var(--c-primary); }
.more { margin-top: 48px; text-align: center; }
.cta--page { padding-bottom: 120px; }
@media (max-width: 860px) { .cta--page { padding-bottom: 88px; } }

.page-hero {
  position: relative; overflow: hidden; background: var(--c-dark); color: #94a3b8;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 88px) 0 88px;
}
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; }
.page-hero p { margin-top: 18px; font-size: clamp(16px, 1.4vw, 18px); max-width: 640px; }
.page-hero .eyebrow { color: #67e8f9; }
.breadcrumb { display: flex; gap: 8px; font-size: 14px; color: #64748b; margin-bottom: 22px; }
.breadcrumb a:hover { color: #fff; }

.portfolio--page .work { cursor: pointer; text-align: left; }
.portfolio--page .work:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; }
.work__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--c-primary); }
.work__detail { display: none; }
.work__stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.work__stack li { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--c-bg-alt); color: var(--c-ink-2); }
.work__thumb--7 { background: linear-gradient(135deg, #c2410c, #fb923c); }
.work__thumb--8 { background: linear-gradient(135deg, #1e40af, #7c3aed); }
.work__thumb--9 { background: linear-gradient(135deg, #0f766e, #2563eb); }

/* Modal */
html.modal-open, html.modal-open body { overflow: hidden; }
.modal {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background: rgba(10, 15, 28, .6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease;
}
.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; }
.modal__dialog {
  position: relative; width: min(720px, 100%); max-height: 100%;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: #fff; border-radius: 24px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
  transform: translateY(16px) scale(.98); transition: transform .25s ease;
}
.modal.is-open .modal__dialog { transform: none; }
.modal__close {
  -webkit-appearance: none; appearance: none;
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.9); color: var(--c-ink); font-size: 22px; line-height: 1;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.modal__close:hover { background: #fff; color: var(--c-primary); }
.modal__thumb { aspect-ratio: 16 / 7; }
.modal__head { padding: 28px 32px 0; }
.modal__head h3 { font-size: 24px; }
.modal__section { padding: 20px 32px 0; }
.modal__section:last-child { padding-bottom: 32px; }
.modal__section h4 { margin: 0 0 10px; font-size: 15px; color: var(--c-ink); }
.modal__section p, .modal__section li { font-size: 15px; color: var(--c-text); }
.modal__section ul.dots li { position: relative; padding-left: 16px; margin-bottom: 6px; }
.modal__section ul.dots li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--c-primary); }
.meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.meta div { background: var(--c-bg-alt); border-radius: 12px; padding: 12px 14px; }
.meta dt { font-size: 12px; color: var(--c-muted); }
.meta dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; color: var(--c-ink); }

@media (max-width: 600px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal__dialog { border-radius: 20px 20px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
  .modal__head, .modal__section { padding-left: 22px; padding-right: 22px; }
  .meta { grid-template-columns: 1fr 1fr; }
  .meta div:last-child { grid-column: 1 / -1; }
  .modal__thumb { aspect-ratio: 16 / 6; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; grid-template-areas: "eyebrow" "title" "desc" "actions" "code"; }
  .hero__code { margin-top: 56px; max-width: 560px; }
  .code-window { transform: none; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .services, .portfolio { grid-template-columns: repeat(2, 1fr); }
  .tech { grid-template-columns: repeat(3, 1fr); }
  .contact { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; top: calc(var(--header-h) + env(safe-area-inset-top)); left: 0; right: 0;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto; -webkit-overflow-scrolling: touch;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 12px 24px 28px;
    box-shadow: 0 20px 30px -20px rgba(15,23,42,.25);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .3s ease;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { color: var(--c-ink-2) !important; padding: 14px 0; border-bottom: 1px solid var(--c-line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 18px; }
  .header.menu-open { background: #fff; }
  .hero__glow { filter: blur(60px); -webkit-filter: blur(60px); animation: none; }
  .hero__glow--1 { width: 320px; height: 320px; }
  .hero__glow--2 { width: 300px; height: 300px; }
  .header.menu-open .logo { color: var(--c-ink); }
  .header.menu-open .nav-toggle span { background: var(--c-ink); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .process { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 88px 0; }
}

@media (max-width: 600px) {
  .container { width: calc(100% - 40px); }
  .hide-mobile { display: none; }
  .values, .services, .portfolio, .process, .form__row { grid-template-columns: 1fr; }
  .tech { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tech__group { padding: 22px 18px; min-width: 0; }
  .tech__group li { overflow-wrap: anywhere; }
  .hero__actions .btn { flex: 1 1 100%; }
  .cta__inner { padding: 56px 24px; border-radius: 20px; }
  .form { padding: 28px 22px; }
  .contact__list div { grid-template-columns: 1fr; gap: 4px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   Chatbot
   ========================================================= */
.to-top { bottom: calc(96px + env(safe-area-inset-bottom)); width: 44px; height: 44px; right: calc(30px + env(safe-area-inset-right)); }

.chatbot { position: fixed; z-index: 150; right: calc(24px + env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom)); font-family: var(--font); }
.chatbot__launcher {
  -webkit-appearance: none; appearance: none; border: 0; cursor: pointer;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff;
  box-shadow: 0 12px 28px -8px rgba(37, 99, 235, .65);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
}
.chatbot__launcher:hover { transform: scale(1.06); }
.chatbot__launcher:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
.chatbot__launcher svg { position: absolute; transition: transform .25s ease, opacity .2s ease; }
.chatbot__launcher .i-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.chatbot.is-open .chatbot__launcher .i-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.chatbot.is-open .chatbot__launcher .i-close { opacity: 1; transform: none; }

.chatbot__teaser {
  position: absolute; right: 0; bottom: 74px; width: max-content; max-width: 240px;
  background: #fff; color: var(--c-ink); border-radius: 16px 16px 4px 16px;
  padding: 12px 34px 12px 16px; font-size: 14px; line-height: 1.5;
  box-shadow: 0 12px 30px -10px rgba(15,23,42,.3); cursor: pointer;
  opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease;
}
.chatbot__teaser.is-visible { opacity: 1; transform: none; }
.chatbot__teaser p { margin: 0; }
.chatbot__teaser-close {
  -webkit-appearance: none; appearance: none; border: 0; background: none; cursor: pointer;
  position: absolute; top: 4px; right: 6px; width: 26px; height: 26px; font-size: 18px; color: var(--c-muted); line-height: 1;
}

.chatbot__panel {
  position: absolute; right: 0; bottom: 76px;
  width: 380px; height: min(620px, calc(100vh - 140px));
  display: flex; flex-direction: column;
  background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(15,23,42,.45), 0 0 0 1px rgba(15,23,42,.05);
  opacity: 0; transform: translateY(14px) scale(.98); transform-origin: bottom right;
  transition: opacity .22s ease, transform .22s ease;
}
.chatbot__panel[hidden] { display: none; }
.chatbot.is-open .chatbot__panel { opacity: 1; transform: none; }

.chatbot__head {
  display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px;
  background: var(--c-dark); color: #fff; flex-shrink: 0;
}
.chatbot__avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; flex-shrink: 0; }
.chatbot__title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chatbot__title strong { font-size: 16px; font-weight: 700; }
.chatbot__title span { font-size: 12px; color: #94a3b8; display: flex; align-items: center; gap: 6px; }
.chatbot__title span i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }
.chatbot__icon-btn {
  -webkit-appearance: none; appearance: none; border: 0; cursor: pointer;
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: transparent; color: #cbd5e1; transition: background .2s, color .2s;
}
.chatbot__icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

.chatbot__log {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 18px 16px 8px; background: var(--c-bg-alt);
  display: flex; flex-direction: column; gap: 10px;
}
.cb-msg { display: flex; animation: cbIn .25s ease; }
.cb-msg--user { justify-content: flex-end; }
@keyframes cbIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cb-bubble {
  max-width: 86%; padding: 11px 14px; font-size: 15px; line-height: 1.6;
  border-radius: 16px 16px 16px 4px; background: #fff; color: var(--c-ink-2);
  box-shadow: 0 1px 2px rgba(15,23,42,.06); overflow-wrap: anywhere;
}
.cb-bubble a { color: var(--c-primary); text-decoration: underline; }
.cb-msg--user .cb-bubble { background: var(--c-primary); color: #fff; border-radius: 16px 16px 4px 16px; }
.cb-step { display: inline-block; font-size: 11px; font-weight: 700; color: var(--c-primary); background: #eff6ff; border-radius: 999px; padding: 1px 8px; margin-right: 6px; vertical-align: 1px; }
.cb-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.cb-typing i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: cbDot 1s infinite ease-in-out; }
.cb-typing i:nth-child(2) { animation-delay: .15s; } .cb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes cbDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.cb-choices { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 6px; animation: cbIn .25s ease; }
.cb-chip {
  -webkit-appearance: none; appearance: none; font-family: inherit; cursor: pointer;
  font-size: 14px; font-weight: 600; line-height: 1.3; padding: 9px 14px; border-radius: 999px;
  background: #fff; color: var(--c-primary); border: 1px solid #bfdbfe;
  transition: background .15s, color .15s, border-color .15s;
}
.cb-chip:hover { background: #eff6ff; border-color: var(--c-primary); }
.cb-chip--primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.cb-chip--primary:hover { background: #1d4ed8; }
.cb-chip--ghost { color: var(--c-muted); border-color: var(--c-line); }

.cb-summary { margin: 10px 0 0; display: grid; gap: 6px; }
.cb-summary div { display: grid; grid-template-columns: 82px 1fr; gap: 8px; font-size: 14px; padding: 6px 0; border-top: 1px solid var(--c-line); }
.cb-summary dt { color: var(--c-muted); }
.cb-summary dd { margin: 0; color: var(--c-ink); font-weight: 600; }

.chatbot__input {
  display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; flex-shrink: 0;
  border-top: 1px solid var(--c-line); background: #fff;
}
.chatbot__input textarea {
  -webkit-appearance: none; appearance: none; flex: 1; resize: none;
  font-family: inherit; font-size: 16px; line-height: 1.5; color: var(--c-ink); -webkit-text-fill-color: var(--c-ink);
  padding: 10px 14px; border-radius: 14px; border: 1px solid var(--c-line); background: var(--c-bg-alt);
  max-height: 120px;
}
.chatbot__input textarea:focus { outline: none; border-color: var(--c-primary); background: #fff; }
.chatbot__input textarea:disabled { opacity: .7; }
.chatbot__input textarea::placeholder { color: #94a3b8; -webkit-text-fill-color: #94a3b8; }
.chatbot__send {
  -webkit-appearance: none; appearance: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--grad); color: #fff;
}
.chatbot__send:disabled { background: var(--c-line); color: #94a3b8; cursor: default; }

@media (max-width: 600px) {
  .chatbot { right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); }
  .chatbot__launcher { width: 56px; height: 56px; }
  .to-top { bottom: calc(22px + env(safe-area-inset-bottom)); right: calc(84px + env(safe-area-inset-right)); }
  .chatbot__panel {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0;
    width: 100%; height: 100%; height: 100dvh; border-radius: 0;
    padding-top: env(safe-area-inset-top);
    transform: translateY(24px);
  }
  .chatbot__input { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  html.chat-open, html.chat-open body { overflow: hidden; }
  .chatbot.is-open .chatbot__launcher, .chatbot.is-open .chatbot__teaser { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cb-msg, .cb-choices { animation: none; }
}

/* =========================================================
   Top tools: 검색 · 화면 설정 (보장설계 매니저 상단 도구 참고)
   ========================================================= */
.top-tools { display: flex; align-items: center; gap: 2px; margin-left: 14px; }
.tool-btn {
  -webkit-appearance: none; appearance: none; border: 0; background: none; cursor: pointer;
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  color: rgba(255,255,255,.82); transition: background .2s, color .2s;
}
.tool-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tool-btn:hover, .tool-btn.on { background: rgba(255,255,255,.14); color: #fff; }
.tool-btn:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.header.is-scrolled .tool-btn, .header.menu-open .tool-btn { color: var(--c-ink-2); }
.header.is-scrolled .tool-btn:hover, .header.is-scrolled .tool-btn.on,
.header.menu-open .tool-btn:hover, .header.menu-open .tool-btn.on { background: var(--c-bg-alt); color: var(--c-primary); }

.set-wrap { position: relative; }
.set-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 120; width: 316px;
  background: var(--c-bg); color: var(--c-text); border: 1px solid var(--c-line); border-radius: 16px;
  box-shadow: 0 20px 50px -16px rgba(15,23,42,.35); padding: 16px;
  animation: popIn .16s ease;
}
.set-pop[hidden] { display: none; }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sp-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.sp-head strong { color: var(--c-ink); font-size: 15px; }
.sp-head span { font-size: 12px; color: var(--c-muted); }
.sp-sec { padding: 10px 0; border-top: 1px solid var(--c-line); }
.sp-k { display: block; font-size: 13px; font-weight: 600; color: var(--c-ink-2); margin-bottom: 8px; }
.seg { display: flex; background: var(--c-bg-alt); border-radius: 10px; padding: 3px; gap: 2px; }
.seg-btn {
  -webkit-appearance: none; appearance: none; flex: 1; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--c-muted);
  padding: 8px 4px; border-radius: 8px; white-space: nowrap; transition: background .15s, color .15s;
}
.seg-btn:hover { color: var(--c-ink); }
.seg-btn.on { background: var(--c-bg); color: var(--c-primary); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.seg-btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 1px; }
.sp-foot { border-top: 1px solid var(--c-line); padding-top: 10px; text-align: right; }
.sp-link { -webkit-appearance: none; appearance: none; border: 0; background: none; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--c-muted); padding: 4px 2px; }
.sp-link:hover { color: var(--c-primary); }

/* Search modal */
html.search-open, html.search-open body { overflow: hidden; }
.search-modal {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 210;
  display: flex; justify-content: center; align-items: flex-start;
  padding: calc(12vh + env(safe-area-inset-top)) 20px 20px;
  background: rgba(10,15,28,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.search-modal[hidden] { display: none; }
.sr-dialog {
  width: min(620px, 100%); max-height: 72vh; display: flex; flex-direction: column;
  background: var(--c-bg); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); animation: popIn .18s ease;
}
.sr-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--c-line); }
.sr-bar > svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--c-muted); stroke-width: 1.8; stroke-linecap: round; }
.sr-input {
  -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; border: 0; outline: none; background: none;
  font-family: inherit; font-size: 17px; color: var(--c-ink); -webkit-text-fill-color: var(--c-ink); padding: 6px 0;
}
.sr-input::placeholder { color: var(--c-muted); -webkit-text-fill-color: var(--c-muted); }
.sr-input::-webkit-search-cancel-button { display: none; }
.sr-close {
  -webkit-appearance: none; appearance: none; cursor: pointer; font-family: inherit; font-size: 11px; font-weight: 700;
  color: var(--c-muted); background: var(--c-bg-alt); border: 1px solid var(--c-line); border-radius: 6px; padding: 4px 7px;
}
.sr-list { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 8px; }
.sr-g { font-size: 12px; font-weight: 700; color: var(--c-muted); padding: 10px 10px 6px; }
.sr-item {
  -webkit-appearance: none; appearance: none; width: 100%; display: grid; grid-template-columns: 1fr auto; column-gap: 12px;
  text-align: left; border: 0; background: none; cursor: pointer; font-family: inherit;
  padding: 10px 12px; border-radius: 10px; color: var(--c-ink);
}
.sr-item.on { background: var(--c-bg-alt); }
.sr-item.on .sr-go { opacity: 1; }
.sr-t { font-size: 15px; font-weight: 600; grid-column: 1; }
.sr-d { font-size: 13px; color: var(--c-muted); grid-column: 1; margin-top: 2px; }
.sr-go { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 14px; color: var(--c-primary); opacity: 0; }
.sr-item mark { background: none; color: var(--c-primary); font-weight: 800; }
.sr-empty { padding: 32px 16px; text-align: center; color: var(--c-muted); font-size: 15px; line-height: 1.8; }
.sr-empty strong { color: var(--c-ink); }
.sr-chat { -webkit-appearance: none; appearance: none; margin-top: 10px; border: 0; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: #fff; background: var(--c-primary); border-radius: 999px; padding: 9px 18px; }
.sr-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--c-line); font-size: 12px; color: var(--c-muted); }
.sr-foot kbd { font-family: inherit; font-size: 11px; background: var(--c-bg-alt); border: 1px solid var(--c-line); border-radius: 4px; padding: 1px 5px; margin-right: 3px; }

@media (max-width: 860px) {
  .top-tools { margin-left: auto; margin-right: 4px; }
}
@media (max-width: 600px) {
  .tool-btn { width: 36px; height: 36px; }
  .set-pop { position: fixed; top: calc(var(--header-h) + env(safe-area-inset-top) + 6px); left: 12px; right: 12px; width: auto; max-height: calc(100vh - var(--header-h) - env(safe-area-inset-top) - 18px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .search-modal { padding: env(safe-area-inset-top) 0 0; align-items: stretch; }
  .sr-dialog { max-height: none; height: 100%; border-radius: 0; width: 100%; }
  .sr-foot { display: none; }
  .sr-close { font-size: 13px; padding: 6px 10px; }
}

/* =========================================================
   Reduce motion (설정에서 켬)
   ========================================================= */
html.reduce-motion { scroll-behavior: auto; }
html.reduce-motion .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
html.reduce-motion .hero__glow { animation: none !important; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }

/* =========================================================
   Dark theme (설정에서 다크 선택)
   ========================================================= */
html[data-theme="dark"] {
  color-scheme: dark;
  --c-bg: #0f1524;
  --c-bg-alt: #151d30;
  --c-ink: #eef2f8;
  --c-ink-2: #cbd5e1;
  --c-text: #b4bfd0;
  --c-muted: #8a96ab;
  --c-line: #253049;
  --shadow: 0 10px 30px -12px rgba(0,0,0,.6);
}
html[data-theme="dark"] body { background: var(--c-bg); }
html[data-theme="dark"] .header.is-scrolled { background: rgba(15,21,36,.88); box-shadow: 0 1px 0 var(--c-line); }
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .work,
html[data-theme="dark"] .filter,
html[data-theme="dark"] .btn--outline,
html[data-theme="dark"] .modal__dialog,
html[data-theme="dark"] .field input, html[data-theme="dark"] .field select, html[data-theme="dark"] .field textarea { background: var(--c-bg-alt); }
html[data-theme="dark"] .section--alt .service-card { background: var(--c-bg); }
html[data-theme="dark"] .value-card { border-color: var(--c-line); }
html[data-theme="dark"] .value-card__icon { background: linear-gradient(135deg, #1e2a4a, #123040); }
html[data-theme="dark"] .filter.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
html[data-theme="dark"] .modal__close { background: rgba(15,21,36,.85); color: var(--c-ink); }
html[data-theme="dark"] .to-top { background: var(--c-bg-alt); border: 1px solid var(--c-line); }
html[data-theme="dark"] .cta__inner { box-shadow: 0 0 0 1px rgba(255,255,255,.04); }
html[data-theme="dark"] .field input:focus, html[data-theme="dark"] .field select:focus, html[data-theme="dark"] .field textarea:focus { background: var(--c-bg); }
@media (max-width: 860px) {
  html[data-theme="dark"] .nav, html[data-theme="dark"] .header.menu-open { background: var(--c-bg); }
}
/* chatbot in dark */
html[data-theme="dark"] .chatbot__panel, html[data-theme="dark"] .chatbot__input { background: var(--c-bg); }
html[data-theme="dark"] .chatbot__panel { box-shadow: 0 30px 70px -20px rgba(0,0,0,.7), 0 0 0 1px var(--c-line); }
html[data-theme="dark"] .cb-bubble { background: #1b2540; color: var(--c-ink-2); box-shadow: none; }
html[data-theme="dark"] .cb-msg--user .cb-bubble { background: var(--c-primary); color: #fff; }
html[data-theme="dark"] .cb-chip { background: transparent; border-color: #2f4a80; color: #93c5fd; }
html[data-theme="dark"] .cb-chip:hover { background: #1b2540; }
html[data-theme="dark"] .cb-chip--primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
html[data-theme="dark"] .cb-chip--ghost { color: var(--c-muted); border-color: var(--c-line); }
html[data-theme="dark"] .cb-step { background: #1e2f55; color: #93c5fd; }
html[data-theme="dark"] .cb-bubble a { color: #93c5fd; }
html[data-theme="dark"] .chatbot__teaser { background: var(--c-bg-alt); color: var(--c-ink); }
html[data-theme="dark"] .chatbot__send:disabled { background: var(--c-line); }

/* =========================================================
   글꼴 끔 (설정에서 페이퍼로지 끔 → 기기 기본 글꼴)
   ========================================================= */
html.font-system {
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
}
html.font-system body { letter-spacing: -0.005em; }
html.font-system .hero__title { letter-spacing: -0.03em; }
html.font-system h1, html.font-system h2, html.font-system h3 { letter-spacing: -0.02em; }

/* =========================================================
   Footer (크로비아 하단 구성 참고)
   ========================================================= */
.footer { padding: 40px 0 calc(88px + env(safe-area-inset-bottom)); font-size: 13px; color: #8391a7; }
.footer__top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 32px; flex-wrap: wrap;
  padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.footer__top .logo__text { font-size: 19px; }
.footer__nav { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 13px; }
.footer__nav a { color: #8391a7; transition: color .2s; }
.footer__nav a:hover { color: #fff; }
.footer__nav .footer__privacy { color: #e2e8f0; font-weight: 700; }
.footer__info { display: flex; justify-content: space-between; gap: 14px 48px; flex-wrap: wrap; line-height: 1.75; }
.footer__col p { margin: 0; }
.footer__col--right { text-align: right; }
.footer__co { color: #cbd5e1; font-weight: 600; }
.footer__tag { color: #cbd5e1; font-weight: 600; }
.footer__link { color: #8391a7; transition: color .2s; }
.footer__link:hover { color: #fff; }
/* 휴대폰(740px 이하): 메뉴는 상단 ☰와 겹치므로 개인정보처리방침만 남기고, 6줄을 좌측 정렬로 촘촘하게 */
@media (max-width: 740px) {
  .footer { padding: 28px 0 calc(150px + env(safe-area-inset-bottom)); }
  .footer__top { flex-wrap: nowrap; padding-bottom: 14px; margin-bottom: 14px; }
  .footer__top .logo__text { font-size: 17px; }
  .footer__nav a:not(.footer__privacy) { display: none; }
  .footer__nav { flex-shrink: 0; font-size: 12px; }
  .footer__info { font-size: 12px; line-height: 1.7; gap: 10px; }
  .footer__col--right { text-align: left; }
  .footer__col p { white-space: nowrap; }
}
@media (max-width: 600px) { .footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); } }
@media (max-width: 370px) { .footer__info { font-size: 11px; letter-spacing: -0.005em; } }
@media (max-width: 340px) { .footer__info { font-size: 9.8px; } }
@media (min-width: 741px) {
  .footer__info { flex-wrap: nowrap; }
  .footer__col--right { text-align: right; margin-left: auto; padding-right: max(0px, calc(96px - max(24px, (100vw - 1200px) / 2))); }
}
@media (min-width: 741px) and (max-width: 1024px) {
  .footer__info { gap: 24px 28px; font-size: 12.5px; }
  .footer__nav { gap: 6px 16px; font-size: 12.5px; }
}
@media (min-width: 741px) and (max-width: 900px) {
  .footer__info { gap: 20px; font-size: 12px; }
  .footer { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .footer__col--right { padding-right: 0; }
}

/* =========================================================
   개인정보 동의 안내 · 개인정보처리방침 · 404
   ========================================================= */
.consent { background: var(--c-bg); border: 1px solid var(--c-line); border-radius: 12px; padding: 14px 16px; font-size: 13px; color: var(--c-muted); line-height: 1.7; }
.consent__title { font-weight: 700; color: var(--c-ink-2); margin-bottom: 6px; font-size: 14px; }
.consent__list li { padding-left: 2px; }
.consent__list b { display: inline-block; min-width: 64px; color: var(--c-ink-2); font-weight: 600; }
.consent__note { margin-top: 6px; }
.consent__note a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }

.legal { padding: calc(var(--header-h) + env(safe-area-inset-top) + 56px) 0 96px; }
.legal__inner { max-width: 820px; }
.legal h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; }
.legal__meta { margin-top: 10px; color: var(--c-muted); font-size: 14px; }
.legal__intro { margin-top: 24px; padding: 18px 20px; background: var(--c-bg-alt); border-radius: 14px; }
.legal h2 { font-size: 19px; margin: 40px 0 12px; padding-top: 4px; }
.legal p, .legal li, .legal td, .legal th { font-size: 15px; line-height: 1.8; }
.legal ul.dots li { position: relative; padding-left: 16px; margin: 4px 0; }
.legal ul.dots li::before { content: ""; position: absolute; left: 3px; top: .8em; width: 5px; height: 5px; border-radius: 50%; background: var(--c-primary); }
.legal table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.legal th, .legal td { border: 1px solid var(--c-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal th { background: var(--c-bg-alt); color: var(--c-ink-2); white-space: nowrap; }
.legal a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
.legal .toc { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; font-size: 14px; }
.legal .toc a { text-decoration: none; color: var(--c-ink-2); }
.legal .toc a:hover { color: var(--c-primary); }
@media (max-width: 600px) {
  .legal .toc { grid-template-columns: 1fr; }
  .legal th { white-space: normal; }
  .legal th, .legal td { word-break: normal; overflow-wrap: anywhere; padding: 9px 10px; }
  .legal table { table-layout: fixed; }
  .legal th { width: 34%; }
}

.notfound { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; position: relative; overflow: hidden; background: var(--c-dark); color: #94a3b8; padding: calc(var(--header-h) + 40px) 0 80px; }
.notfound .container { position: relative; text-align: center; }
.notfound__code { font-size: clamp(88px, 18vw, 160px); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.notfound h1 { color: #fff; font-size: clamp(24px, 3vw, 32px); margin-top: 12px; }
.notfound p { margin-top: 14px; }
.notfound__actions { margin-top: 32px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* 설정 창이 열려 있는 동안 챗봇 안내 말풍선이 가리지 않도록 */
html.settings-open .chatbot__teaser { display: none !important; }
@media (max-width: 600px) {
  html.settings-open .chatbot, html.settings-open .to-top { visibility: hidden; }
}
@media (max-width: 370px) { .chatbot__title span { font-size: 11.5px; white-space: nowrap; letter-spacing: -0.01em; } }

/* =========================================================
   UI·UX 보완 (2026-11-14)
   ========================================================= */
/* 연락처의 이메일·전화는 누를 수 있다는 표시 */
.contact__list dd a { color: var(--c-ink-2, var(--c-ink)); border-bottom: 1px dashed currentColor; }
.contact__list dd a:hover { color: var(--c-primary); }
html[data-theme="dark"] .contact__list dd a { color: #e2e8f0; }
/* 메인 포트폴리오 카드: 누르면 상세로 이동 */
.work--link { cursor: pointer; }
.work--link .work__more { margin-top: 14px; }
.work--link .work__more:hover { text-decoration: underline; }
/* 동의 체크 누락 표시 */
.check.is-invalid { color: #ef4444; }
.check.is-invalid input { outline: 2px solid #ef4444; outline-offset: 2px; }
/* 문의 내용 복사 버튼 */
.form__msg { line-height: 1.6; }
.form__copy {
  display: inline-block; margin: 2px 2px; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor;
  background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer;
}
.form__copy:hover { background: rgba(22,163,74,.08); }
/* 키보드로 이동할 때 위치가 잘 보이게 */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #2563eb; outline-offset: 2px;
}

/* ---- 휴대폰: 길게 늘어지던 화면을 촘촘하게 ---- */
@media (max-width: 600px) {
  .section { padding: 72px 0; }
  .section__head { margin-bottom: 36px; }
  .section__desc { font-size: 15.5px; }
  /* 첫 화면 버튼: 주요 버튼 1줄 + 보조 버튼 2개 나란히 */
  .hero__actions { gap: 10px; }
  .hero__actions .btn { flex: 1 1 calc(50% - 5px); padding-left: 12px; padding-right: 12px; }
  .hero__actions .btn--primary { flex-basis: 100%; }
  /* 핵심가치: 아이콘을 제목 옆으로 */
  .values { gap: 12px; }
  .value-card { padding: 20px; display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; }
  .value-card__icon { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; margin: 0; grid-row: span 1; }
  .value-card h3 { margin: 0; font-size: 17px; }
  .value-card p { grid-column: 1 / -1; margin-top: 10px; font-size: 14.5px; }
  /* 사업분야 카드 */
  .services { gap: 12px; }
  .service-card { padding: 24px 22px; }
  /* 개발 프로세스: 단계 번호와 제목을 한 줄로 */
  .process__step { padding: 20px 22px; }
  .process__no { margin: 0 10px 0 0; font-size: 12px; vertical-align: 2px; }
  .process__step h3 { display: inline; font-size: 18px; }
  .process__step p { margin-top: 6px; font-size: 14.5px; }
  /* 기술스택: 목록을 칩 형태로 */
  .tech__group { padding: 18px 16px; }
  .tech__group h3 { margin-bottom: 10px; font-size: 16px; }
  .tech__group ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .tech__group li { padding: 3px 9px; border: 1px solid rgba(148,163,184,.22); border-radius: 999px; font-size: 12.5px; white-space: nowrap; overflow-wrap: normal; max-width: 100%; }
  .tech__group li:last-child { border-bottom: 1px solid rgba(148,163,184,.22); }
  /* 포트폴리오: 필터는 한 줄 가로 스크롤, 썸네일은 낮게 */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 24px; padding: 2px 20px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; }
  .portfolio { gap: 14px; }
  .work__thumb { aspect-ratio: 16 / 7; }
  .work__thumb span { font-size: 24px; }
  .cta__inner { padding: 44px 22px; }
  .contact__list { margin-top: 28px; gap: 14px; }
  .contact__list div { padding-bottom: 14px; }
}
@media (max-width: 340px) { .tech__group { padding: 16px 12px; } .tech__group li { font-size: 12px; padding: 3px 7px; white-space: normal; } }
