/* =========================================================================
   INKSTONE / 잉크스톤 — AI 리브랜딩 홈페이지
   Design tokens + base + sections. Three switchable visual directions via
   [data-theme]:  blueprint · enterprise · startup
   Accent switchable via --accent on :root (set by tweaks island).
   ========================================================================= */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---- Type ---- */
:root {
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* Accent (overridable by tweaks). Default: electric cobalt. */
  --accent: oklch(0.56 0.20 256);
  --accent-soft: color-mix(in oklch, var(--accent) 12%, transparent);
  --accent-line: color-mix(in oklch, var(--accent) 30%, transparent);
  --on-accent: #fff;

  /* Ink palette */
  --ink-900: oklch(0.20 0.035 256);
  --ink-800: oklch(0.27 0.035 256);
  --ink-700: oklch(0.38 0.030 256);
  --ink-500: oklch(0.55 0.022 256);
  --ink-400: oklch(0.66 0.018 256);

  /* Theme-driven (defaults = blueprint) */
  --bg: oklch(0.975 0.006 256);
  --bg-2: oklch(0.955 0.008 256);
  --surface: #ffffff;
  --ink: var(--ink-900);
  --muted: var(--ink-500);
  --line: oklch(0.88 0.012 256);
  --line-strong: oklch(0.80 0.02 256);
  --grid: oklch(0.91 0.01 256);
  --grid-op: 1;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow: none;
  --shadow-lg: 0 1px 2px rgba(16,24,40,.04);
  --maxw: 1240px;
  --display-weight: 700;
  --display-tracking: -0.02em;
}

/* ===== THEME: ENTERPRISE — refined white, soft shadows, restrained accent ===== */
[data-theme="enterprise"] {
  --bg: #ffffff;
  --bg-2: oklch(0.985 0.004 256);
  --surface: #ffffff;
  --line: oklch(0.91 0.008 256);
  --line-strong: oklch(0.85 0.012 256);
  --grid-op: 0;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --shadow-lg: 0 24px 48px -24px rgba(16,24,40,.18), 0 2px 8px rgba(16,24,40,.04);
  --display-weight: 700;
  --display-tracking: -0.025em;
}

/* ===== THEME: STARTUP — bold type, color fills, dark hero ===== */
[data-theme="startup"] {
  --bg: oklch(0.985 0.004 256);
  --bg-2: var(--ink-900);
  --surface: #ffffff;
  --line: oklch(0.90 0.01 256);
  --line-strong: oklch(0.82 0.02 256);
  --grid-op: 0;
  --radius: 10px;
  --radius-lg: 24px;
  --shadow: 0 2px 6px rgba(16,24,40,.05);
  --shadow-lg: 0 30px 60px -30px rgba(16,24,40,.25);
  --display-weight: 850;
  --display-tracking: -0.035em;
}

/* ---- Base ---- */
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

/* Blueprint grid backdrop */
.grid-bg::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: var(--grid-op);
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 40%, transparent 100%);
}
/* Keep all real content above the grid so lines never overlap text */
.grid-bg > * { position: relative; z-index: 1; }

/* ---- Lang toggle visibility ---- */
html.lang-ko [data-lang="en"] { display: none !important; }
html.lang-en [data-lang="ko"] { display: none !important; }

/* ---- Layout utilities ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 32px; }
.section { position: relative; padding-block: clamp(72px, 9vw, 132px); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent);
  display: inline-block;
}
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(30px, 4vw, 50px);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.08;
  margin-top: 20px;
  text-wrap: balance;
}
.section-head p {
  margin-top: 20px; font-size: clamp(16px, 1.4vw, 19px);
  color: var(--muted); max-width: 620px; line-height: 1.6;
  text-wrap: pretty;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px var(--accent); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line-strong); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .arw { transition: transform .2s ease; }
.btn:hover .arw { transform: translateX(3px); }

/* ===================== NAV ===================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin-inline: auto; padding: 18px 32px;
  display: flex; align-items: center; gap: 36px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-logo { width: auto; display: block; }
.nav .brand-logo[data-lang="ko"] { height: 34px; }
.nav .brand-logo[data-lang="en"] { height: 26px; }
.footer .brand-logo[data-lang="ko"] { height: 50px; }
.footer .brand-logo[data-lang="en"] { height: 32px; }
/* Invert the black ink logo when it sits on a dark surface */
[data-theme="startup"] .footer .brand-logo { filter: invert(1) brightness(1.6); }
.brand .mark {
  font-weight: 800; font-size: 21px; letter-spacing: -0.03em; color: var(--ink);
}
.brand .mark .dot { color: var(--accent); }
.brand .ko { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.nav-menu { display: flex; gap: 4px; margin-left: auto; }
.nav-menu a {
  padding: 9px 13px; font-size: 15px; font-weight: 500; color: var(--ink-700);
  border-radius: 6px; transition: color .2s, background .2s; white-space: nowrap;
}
.nav-menu a:hover { color: var(--ink); background: var(--bg-2); }
.nav-tools { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  display: inline-flex; border: 1px solid var(--line-strong);
  border-radius: 999px; overflow: hidden; font-family: var(--font-mono); font-size: 12px;
}
.lang-switch button { padding: 6px 12px; font-weight: 600; color: var(--muted); transition: .2s; }
.lang-switch button.on { background: var(--ink); color: var(--bg); }
.nav-cta { padding: 10px 18px; font-size: 14px; }
.nav-burger { display: none; }

/* ===================== HERO ===================== */
.hero { position: relative; padding-top: 150px; padding-bottom: 90px; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; max-width: var(--maxw); margin-inline: auto; padding-inline: 32px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em;
  color: var(--ink-700); background: var(--surface);
  border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px;
  box-shadow: var(--shadow); white-space: nowrap;
}
.hero-tag .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%{box-shadow:0 0 0 0 var(--accent-line);} 70%{box-shadow:0 0 0 8px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }
.hero h1 {
  margin-top: 28px;
  font-size: clamp(40px, 6.6vw, 88px);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.02;
  text-wrap: balance;
}
.hero h1 .grad {
  color: var(--accent);
}
.hero h1 .line { display: block; }
.hero-sub {
  margin-top: 28px; font-size: clamp(17px, 1.6vw, 21px); color: var(--muted);
  max-width: 600px; line-height: 1.6; text-wrap: pretty;
}
.hero-cta { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  margin-top: 64px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.hero-stats .stat { background: var(--surface); padding: 26px 24px; }
.hero-stats .num {
  font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -0.04em; color: var(--ink);
  font-feature-settings: "tnum"; display: flex; align-items: baseline; gap: 3px;
}
.hero-stats .num .u { font-size: .5em; color: var(--accent); font-weight: 700; }
.hero-stats .lbl { margin-top: 8px; font-size: 13.5px; color: var(--muted); letter-spacing: -0.01em; }

/* Hero 3-pillar row */
.hero-pillars {
  margin-top: 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.hpill {
  position: relative; background: var(--surface); padding: 26px 26px 28px;
  display: flex; flex-direction: column; gap: 14px;
  transition: background .22s ease, transform .22s ease;
}
.hpill:hover { background: var(--bg-2); }
.hpill .hpill-no { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: .12em; }
.hpill .hpill-ic {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line);
  transition: background .22s ease, color .22s ease;
}
.hpill:hover .hpill-ic { background: var(--accent); color: var(--on-accent); }
.hpill .hpill-tx h3 { font-size: 19px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.2; }
.hpill .hpill-tx p { margin-top: 6px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.hpill::after {
  content: ""; position: absolute; left: 26px; bottom: 0; height: 2px; width: 0;
  background: var(--accent); transition: width .28s ease;
}
.hpill:hover::after { width: 46px; }

/* Hero visual diagram */
.hero-visual { margin-top: 8px; }

/* ===================== SOLUTIONS — SI FOUNDATION STRIP ===================== */
.biz-foundation {
  margin-top: 20px; display: flex; align-items: center; gap: 20px;
  padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-2); box-shadow: var(--shadow); transition: border-color .22s, transform .22s;
}
.biz-foundation:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.biz-foundation .bf-ic {
  flex: none; width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface); color: var(--ink-700); border: 1px solid var(--line-strong);
}
.biz-foundation .bf-tx { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.biz-foundation .bf-tx strong { font-size: 16.5px; font-weight: 750; letter-spacing: -0.02em; color: var(--ink); }
.biz-foundation .bf-tx span { font-size: 14px; color: var(--muted); line-height: 1.5; }
.biz-foundation .bf-more { flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.biz-foundation:hover .bf-more .arw { transform: translateX(3px); }

/* ===================== AX TRANSFORMATION — 4 STEPS ===================== */
.ax-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ax-step {
  position: relative; padding: 30px 26px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
}
.ax-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent-line); }
.ax-step .ax-n {
  font-family: var(--font-mono); font-size: 30px; font-weight: 600; color: var(--accent-line);
  letter-spacing: -0.02em; line-height: 1;
}
.ax-step:hover .ax-n { color: var(--accent); }
.ax-step h4 { margin-top: 16px; font-size: 20px; font-weight: 750; letter-spacing: -0.025em; }
.ax-step p { margin-top: 12px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* ===================== TRUST STRIP ===================== */
.trust { border-block: 1px solid var(--line); background: var(--bg-2); padding-block: 34px; }
.trust-inner { max-width: var(--maxw); margin-inline: auto; padding-inline: 32px; display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.trust-lab { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.trust-logos { display: flex; gap: 18px 32px; flex-wrap: wrap; align-items: center; flex: 1; }
.trust-logos img {
  height: 30px; width: auto; max-width: 130px; object-fit: contain;
  filter: grayscale(1); opacity: .55; mix-blend-mode: multiply;
  transition: filter .25s, opacity .25s;
}
.trust-logos img:hover { filter: grayscale(0); opacity: 1; }

/* ===================== BUSINESS — 3 areas ===================== */
.biz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.biz-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
  overflow: hidden; display: flex; flex-direction: column;
}
.biz-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent-line); }
.biz-card .idx { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: .1em; }
.biz-card .ic {
  width: 52px; height: 52px; border-radius: 12px; margin: 18px 0 22px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line);
}
.biz-card h3 { font-size: 23px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.2; }
.biz-card .ko-sub { font-size: 14px; color: var(--accent); font-weight: 600; margin-top: 4px; }
.biz-card p { margin-top: 14px; color: var(--muted); font-size: 15.5px; line-height: 1.6; flex: 1; }
.biz-card ul { margin-top: 18px; display: flex; flex-direction: column; gap: 9px; }
.biz-card li { font-size: 14px; color: var(--ink-700); display: flex; gap: 9px; align-items: flex-start; }
.biz-card li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 7px; background: var(--accent); border-radius: 1px; transform: rotate(45deg); }
.biz-card .more { margin-top: 24px; font-size: 14px; font-weight: 600; color: var(--accent); display: inline-flex; gap: 7px; align-items: center; }
.biz-card.feature { grid-column: span 1; }

/* ===================== SECTION SHELLS (alt bg) ===================== */
.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.dark-sec { background: var(--ink-900); color: oklch(0.92 0.01 256); }
.dark-sec .eyebrow { color: color-mix(in oklch, var(--accent) 88%, white); }
.dark-sec .section-head p { color: oklch(0.72 0.015 256); }
.dark-sec .section-head h2 { color: #fff; }

/* ===================== AUTOMATION DETAIL ===================== */
.auto-layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.auto-domains { display: grid; gap: 14px; }
.dom-card {
  display: flex; gap: 18px; align-items: flex-start; padding: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, transform .2s; cursor: default;
}
.dom-card:hover { border-color: var(--accent-line); transform: translateX(4px); }
.dom-card .dic { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.dom-card h4 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.dom-card p { font-size: 14px; color: var(--muted); margin-top: 5px; line-height: 1.55; }
.auto-side h3 { font-size: 26px; font-weight: 780; letter-spacing: -0.03em; line-height: 1.15; }
.auto-side > p { margin-top: 16px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.tech-chips { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: var(--font-mono); font-size: 12.5px; padding: 8px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-700);
  background: var(--surface); transition: .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip b { color: var(--accent); font-weight: 600; }

/* ===================== ONTOLOGY — pillars ===================== */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 56px; }
.pillar { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); position: relative; }
.pillar .pic { width: 48px; height: 48px; color: var(--accent); margin-bottom: 18px; }
.pillar h4 { font-size: 19px; font-weight: 750; letter-spacing: -0.02em; }
.pillar .en { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: .02em; }
.pillar p { margin-top: 14px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* 3-tier architecture */
.tiers { display: grid; gap: 14px; margin-top: 8px; }
.tier {
  display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center;
  padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); position: relative; box-shadow: var(--shadow);
}
.tier .tlabel h4 { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.tier .tlabel span { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); letter-spacing: .05em; }
.tier-nodes { display: flex; gap: 12px; flex-wrap: wrap; }
.node {
  flex: 1; min-width: 130px; padding: 16px 18px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--bg-2); font-size: 14px; font-weight: 600; color: var(--ink-700);
}
.node .nm { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-weight: 500; display: block; margin-top: 3px; letter-spacing: 0; }
.node.accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.node.accent .nm { color: color-mix(in srgb, var(--on-accent) 80%, transparent); }
.tier-connector { text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--accent); padding: 2px; }
.readonly-tag {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px;
  color: var(--accent); background: var(--accent-soft); border: 1px dashed var(--accent-line);
  padding: 7px 12px; border-radius: 999px; margin-top: 4px;
}

/* ===================== PIPELINE (5 steps) ===================== */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 8px; }
.pstep { position: relative; padding: 28px 22px; border: 1px solid var(--line); background: var(--surface); }
.pstep:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.pstep:last-child { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.pstep:not(:first-child) { border-left: none; }
.pstep .pn { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent); }
.pstep h4 { margin-top: 14px; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.pstep .en2 { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
.pstep p { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.pstep .arrow { position: absolute; right: -11px; top: 50%; transform: translateY(-50%); z-index: 3; width: 22px; height: 22px; background: var(--accent); color: var(--on-accent); border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.pstep:last-child .arrow { display: none; }
.pipeline-foot {
  margin-top: 22px; text-align: center; padding: 20px; border-radius: var(--radius-lg);
  background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 16px; font-weight: 600; color: var(--ink);
}
.pipeline-foot b { color: var(--accent); }

/* ===================== CONNEXA CHATBOT DEMO ===================== */
.connexa { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.connexa-copy h3 { font-size: clamp(26px,3vw,38px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: #fff; }
.connexa-copy p { margin-top: 18px; color: oklch(0.74 0.015 256); font-size: 16px; line-height: 1.65; max-width: 460px; }
.connexa-feats { margin-top: 26px; display: grid; gap: 14px; }
.connexa-feats li { display: flex; gap: 12px; align-items: flex-start; color: oklch(0.86 0.01 256); font-size: 15px; }
.connexa-feats .ci { flex: none; color: var(--accent); margin-top: 1px; }

.chat {
  background: oklch(0.24 0.025 256); border: 1px solid oklch(0.34 0.03 256);
  border-radius: 18px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0,0,0,.6);
}
.chat-bar { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid oklch(0.32 0.03 256); }
.chat-bar .dots { display: flex; gap: 6px; }
.chat-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: oklch(0.42 0.02 256); display: block; }
.chat-bar .ctitle { font-family: var(--font-mono); font-size: 12.5px; color: oklch(0.72 0.02 256); letter-spacing: .02em; margin-left: 4px; }
.chat-bar .live { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.chat-bar .live::before { content:""; width:7px;height:7px;border-radius:50%;background:var(--accent); }
.chat-body { padding: 22px; height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: oklch(0.4 0.02 256); border-radius: 3px; }
.msg { max-width: 86%; font-size: 14.5px; line-height: 1.55; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); padding: 12px 16px; border-radius: 16px 16px 4px 16px; }
.msg.bot { align-self: flex-start; background: oklch(0.30 0.025 256); color: oklch(0.94 0.008 256); padding: 14px 16px; border-radius: 16px 16px 16px 4px; border: 1px solid oklch(0.36 0.03 256); }
.msg.bot .steps { margin: 0 0 12px; display: flex; flex-direction: column; gap: 7px; }
.msg.bot .steps .st { font-family: var(--font-mono); font-size: 11.5px; color: oklch(0.66 0.02 256); display: flex; align-items: center; gap: 8px; opacity: 0; transform: translateY(4px); transition: .35s; }
.msg.bot .steps .st.show { opacity: 1; transform: none; }
.msg.bot .steps .st .tick { color: var(--accent); }
.msg.bot .answer { opacity: 0; transition: opacity .4s; }
.msg.bot .answer.show { opacity: 1; }
.msg.bot .kpi { margin-top: 12px; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.msg.bot .kpi .k { background: oklch(0.25 0.025 256); border: 1px solid oklch(0.36 0.03 256); border-radius: 8px; padding: 10px; }
.msg.bot .kpi .kv { font-size: 18px; font-weight: 800; color: #fff; font-feature-settings:"tnum"; }
.msg.bot .kpi .kl { font-size: 10.5px; color: oklch(0.66 0.02 256); margin-top: 2px; }
.msg.bot .bar { margin-top: 10px; height: 7px; border-radius: 4px; background: oklch(0.34 0.02 256); overflow: hidden; }
.msg.bot .bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 1s ease; border-radius: 4px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: oklch(0.6 0.02 256); animation: typ 1.2s infinite; }
.typing i:nth-child(2){animation-delay:.2s;} .typing i:nth-child(3){animation-delay:.4s;}
@keyframes typ { 0%,60%,100%{opacity:.3;transform:translateY(0);} 30%{opacity:1;transform:translateY(-4px);} }
.chat-input { display: flex; gap: 10px; padding: 16px; border-top: 1px solid oklch(0.32 0.03 256); }
.chat-suggest { display: flex; gap: 8px; padding: 0 16px 14px; flex-wrap: wrap; }
.chat-suggest button { font-size: 12.5px; color: oklch(0.78 0.02 256); border: 1px solid oklch(0.38 0.03 256); border-radius: 999px; padding: 7px 13px; transition: .2s; }
.chat-suggest button:hover { border-color: var(--accent); color: #fff; background: var(--accent-soft); }
.chat-input input { flex: 1; background: oklch(0.20 0.02 256); border: 1px solid oklch(0.36 0.03 256); border-radius: 10px; padding: 12px 14px; color: #fff; font-size: 14px; outline: none; }
.chat-input input::placeholder { color: oklch(0.55 0.02 256); }
.chat-input input:focus { border-color: var(--accent); }
.chat-input .send { width: 44px; border-radius: 10px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; transition: .2s; }
.chat-input .send:hover { filter: brightness(1.1); }

/* ===================== AI ROUTER ===================== */
.router { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; }
.router-node {
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 26px; background: var(--surface);
  box-shadow: var(--shadow);
}
.router-node.diamond { text-align: center; border-style: dashed; border-color: var(--accent-line); }
.router-branches { display: grid; gap: 16px; }
.branch { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; background: var(--surface); box-shadow: var(--shadow); }
.branch.primary { border-color: var(--accent-line); }
.branch .bhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.branch h4 { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.branch .pct { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.branch ul { margin-top: 14px; display: grid; gap: 7px; }
.branch li { font-size: 14px; color: var(--ink-700); display: flex; gap: 8px; }
.branch li::before { content: "›"; color: var(--accent); font-weight: 700; }
.branch .sec-note { margin-top: 14px; font-size: 13px; padding: 10px 13px; border-radius: 8px; background: var(--ink-900); color: oklch(0.88 0.01 256); display: flex; gap: 9px; }
.branch .sec-note .lk { color: var(--accent); flex: none; }

/* ===================== SECURITY ===================== */
.sec-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.sec-step { padding: 28px; border: 1px solid oklch(0.32 0.025 256); border-radius: var(--radius-lg); background: oklch(0.25 0.022 256); position: relative; }
.sec-step .sn { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: .08em; }
.sec-step h4 { margin-top: 12px; font-size: 19px; font-weight: 750; color: #fff; letter-spacing: -0.02em; }
.sec-step .en3 { font-family: var(--font-mono); font-size: 11.5px; color: oklch(0.6 0.02 256); margin-top: 3px; }
.sec-step p { margin-top: 14px; font-size: 14px; color: oklch(0.78 0.015 256); line-height: 1.6; }
.sec-step .demo { margin-top: 16px; font-family: var(--font-mono); font-size: 12px; padding: 10px 12px; border-radius: 8px; background: oklch(0.20 0.02 256); border: 1px solid oklch(0.32 0.025 256); color: oklch(0.7 0.02 256); }
.sec-step .demo b { color: var(--accent); }
.sec-foot { margin-top: 22px; display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; padding: 20px; border: 1px solid oklch(0.32 0.025 256); border-radius: var(--radius-lg); background: oklch(0.22 0.02 256); }
.sec-foot span { font-family: var(--font-mono); font-size: 13px; color: oklch(0.82 0.015 256); display: flex; align-items: center; gap: 9px; }
.sec-foot .lk { color: var(--accent); }

/* ===================== TECH STACK ===================== */
.stack-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
.stack-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; background: var(--surface); box-shadow: var(--shadow); }
.stack-card .shead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.stack-card h4 { font-size: 19px; font-weight: 750; letter-spacing: -0.02em; }
.stack-card .seng { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.stack-card .sic { width: 40px; height: 40px; color: var(--accent); }
.stack-card ul { display: grid; gap: 12px; }
.stack-card li { font-size: 14.5px; color: var(--ink-700); line-height: 1.5; }
.stack-card li b { color: var(--ink); font-weight: 700; }
.stack-card li .mono { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }

/* ===================== PORTFOLIO ===================== */
/* Filterable work grid (real client data) */
.work-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.work-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.wf { padding: 9px 18px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-700); background: var(--surface); transition: .2s; }
.wf:hover { border-color: var(--accent); color: var(--accent); }
.wf.on { background: var(--ink-900); color: var(--bg); border-color: var(--ink-900); }
.work-count { font-family: var(--font-mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.work-count #workCount { color: var(--accent); font-weight: 600; }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.work-card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent-line); }
.work-card .wtop { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; min-height: 26px; }
.work-card .wlogo { height: 22px; width: auto; max-width: 122px; object-fit: contain; object-position: left center; mix-blend-mode: multiply; }
.work-card .wclient { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-card .wyear { flex: none; margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.work-card h4 { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.2; }
.work-card > p { margin-top: 9px; font-size: 14px; color: var(--muted); line-height: 1.55; flex: 1; text-wrap: pretty; }
.work-card .wtags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.work-card .wtags span { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-700); background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; letter-spacing: 0; }
.work-card.ai .wtags span.aitag { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.work-card.hide { display: none; }

/* legacy placeholder grid (unused, kept for safety) */
.pf-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.pf-card { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; }
.pf-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pf-card .ph { aspect-ratio: 16/10; position: relative; background: var(--bg-2); border-bottom: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.pf-ph-stripe { position:absolute; inset:0; background-image: repeating-linear-gradient(45deg, var(--bg-2), var(--bg-2) 12px, var(--bg) 12px, var(--bg) 24px); opacity:.6; }
.pf-card .ph .cli { position: relative; font-weight: 800; font-size: clamp(20px,2.4vw,30px); letter-spacing: -0.03em; color: var(--ink-700); }
.pf-card .pmeta { padding: 20px 22px; }
.pf-card .ptag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: .06em; }
.pf-card h4 { margin-top: 8px; font-size: 16.5px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.pf-card p { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.pf-card.lg { grid-column: span 6; } .pf-card.md { grid-column: span 4; } .pf-card.sm { grid-column: span 3; }

/* ===================== COMPANY / STATS ===================== */
.company { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.company-copy h3 { font-size: clamp(26px,3vw,38px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.company-copy p { margin-top: 18px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.company-vals { margin-top: 26px; display: grid; gap: 14px; }
.cval { display: flex; gap: 14px; align-items: flex-start; }
.cval .cvic { flex: none; width: 38px; height: 38px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.cval h5 { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.cval p { margin-top: 3px; font-size: 14px; color: var(--muted); }
.company-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.company-stats .cs { background: var(--surface); padding: 32px 28px; }
.company-stats .csn { font-size: clamp(32px,3.6vw,46px); font-weight: 800; letter-spacing: -0.04em; color: var(--ink); }
.company-stats .csn .u { color: var(--accent); font-size: .6em; }
.company-stats .csl { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ===================== CONTACT / CTA ===================== */
.cta-band { position: relative; overflow: hidden; background: var(--ink-900); color: #fff; border-radius: 0; }
.cta-inner { max-width: var(--maxw); margin-inline: auto; padding: clamp(64px,8vw,110px) 32px; position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.cta-l h2 { font-size: clamp(30px,4vw,52px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.06; text-wrap: balance; }
.cta-l p { margin-top: 20px; color: oklch(0.76 0.015 256); font-size: 17px; line-height: 1.6; max-width: 420px; }
.cta-contacts { margin-top: 32px; display: grid; gap: 14px; font-size: 15px; }
.cta-contacts a { display: flex; align-items: center; gap: 12px; color: oklch(0.86 0.01 256); }
.cta-contacts a .ci { color: var(--accent); }
.cta-contacts a:hover { color: #fff; }
.form { background: oklch(0.26 0.022 256); border: 1px solid oklch(0.34 0.03 256); border-radius: var(--radius-lg); padding: 30px; }
.form .row { display: grid; gap: 8px; margin-bottom: 16px; }
.form .row.two { grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { font-size: 13px; color: oklch(0.74 0.02 256); font-weight: 500; }
.form input, .form textarea, .form select { background: oklch(0.21 0.02 256); border: 1px solid oklch(0.36 0.03 256); border-radius: 9px; padding: 12px 14px; color: #fff; font-size: 14.5px; outline: none; transition: border-color .2s; width: 100%; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--accent); }
.form textarea { resize: vertical; min-height: 90px; }
.form .submit { width: 100%; margin-top: 6px; justify-content: center; }
.form .ok { margin-top: 14px; padding: 14px; border-radius: 9px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: #fff; font-size: 14px; text-align: center; display: none; }
.form .ok.show { display: block; }

/* ===================== FOOTER ===================== */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding-block: 56px 32px; }
.footer-inner { max-width: var(--maxw); margin-inline: auto; padding-inline: 32px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer .brand { margin-bottom: 14px; }
.footer .fdesc { font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 280px; }
.footer h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14.5px; color: var(--ink-700); padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bot { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; flex-wrap: wrap; gap: 16px; }
.footer-bot p { font-size: 13px; color: var(--muted); }
.footer-bot .mono { font-family: var(--font-mono); font-size: 12px; color: var(--ink-400); }
.footer-bot-right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.family-site { display: flex; align-items: center; gap: 10px; }
.family-label { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; letter-spacing: -0.01em; }
.family-wrap { position: relative; display: inline-flex; align-items: center; }
.family-wrap select {
  appearance: none; -webkit-appearance: none;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--ink-700);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 9px 36px 9px 14px; cursor: pointer; min-width: 188px;
  transition: border-color .2s, color .2s;
}
.family-wrap select:hover { border-color: var(--accent); color: var(--accent); }
.family-wrap select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.family-caret { position: absolute; right: 12px; color: var(--muted); pointer-events: none; }

/* ===================== SCROLL REVEAL ===================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.16,.84,.44,1), transform .7s cubic-bezier(.16,.84,.44,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1080px) {
  .auto-layout, .connexa, .router, .company, .cta-inner { grid-template-columns: 1fr; gap: 36px; }
  .pillars, .biz-grid, .stack-grid, .sec-steps { grid-template-columns: 1fr 1fr; }
  .hero-pillars, .ax-steps { grid-template-columns: 1fr 1fr; }
  .biz-foundation { flex-wrap: wrap; }
  .biz-foundation .bf-more { margin-left: auto; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .pstep, .pstep:first-child, .pstep:last-child { border-radius: var(--radius); border-left: 1px solid var(--line); }
  .pstep .arrow { display: none; }
  .tier { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 720px) {
  .wrap, .nav-inner, .hero-inner, .footer-inner, .trust-inner, .cta-inner { padding-inline: 20px; }
  .nav-menu { display: none; }
  .nav-burger { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 8px; margin-left: auto; }
  .nav-tools .nav-cta { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-pillars, .ax-steps { grid-template-columns: 1fr; }
  .biz-grid, .pillars, .stack-grid, .sec-steps, .pipeline, .company-stats { grid-template-columns: 1fr; }
  .pf-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .pf-card.lg, .pf-card.md, .pf-card.sm { grid-column: span 1; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .form .row.two { grid-template-columns: 1fr; }
}
