/* ===========================================================
   contextBio — 디자인 시스템
   짙은 네이비 배경 · 청록(teal) 액센트 · DM Serif Display + DM Sans
   =========================================================== */
:root {
  --teal: #2dd4bf;
  --teal-light: #5eead4;
  --teal-deep: #14b8a6;
  --cyan: #22d3ee;

  --bg: #0a1124;          /* 페이지 배경 (짙은 네이비) */
  --bg-soft: #0e1730;     /* 교차 섹션 */
  --bg-elev: #141d3a;     /* 카드 (살짝 밝은 네이비) */
  --navy-deep: #070b18;   /* 풋터 */

  --ink: #eaf0fb;         /* 본문/제목 밝은 텍스트 */
  --slate: #b3bdd6;       /* 보조 텍스트 */
  --muted: #7e8aa8;       /* 흐린 텍스트 */
  --line: rgba(255, 255, 255, 0.09);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.5);
  --glow: 0 0 40px rgba(45, 212, 191, 0.28);
  --grad: linear-gradient(120deg, #14b8a6 0%, #2dd4bf 55%, #5eead4 100%);

  --font-serif: "DM Serif Display", "Nanum Myeongjo", "AppleMyungjo", Georgia, serif;
  --font-sans: "DM Sans", "Noto Sans KR", "Pretendard", -apple-system, "Apple SD Gothic Neo", sans-serif;
  --maxw: 1160px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* display:grid/flex 규칙이 hidden 속성을 덮어쓰지 않도록 */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.18; }
h1, h2 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.01em; }
h3 { font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-alt { background: var(--bg-soft); }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--teal); margin-bottom: .7rem;
}
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2::after {  /* 제목 아래 teal 그라데이션 악센트 */
  content: ""; display: block; width: 56px; height: 4px; border-radius: 999px;
  background: var(--grad); margin: 18px auto 0;
}
.section-head p { color: var(--slate); }

/* ── 버튼 ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  font-family: var(--font-sans);
  border: 1px solid transparent; cursor: pointer; transition: .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #06121f; box-shadow: 0 10px 26px rgba(45, 212, 191, .28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(45, 212, 191, .42); }
.btn-ghost { background: transparent; color: var(--teal); border-color: rgba(45, 212, 191, .45); }
.btn-ghost:hover { border-color: var(--teal); background: rgba(45, 212, 191, .1); }
.btn-lg { padding: 15px 32px; font-size: 1.05rem; }

/* ── 헤더 ─────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(10, 17, 36, .8);
  backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line);
}
.site-header::before {  /* 상단 teal 그라데이션 라인 */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.header-right { display: flex; align-items: center; gap: 22px; }
.brand-logo { height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 22px; }

/* 한/영 전환 토글 */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.lang-switch a { padding: 5px 12px; font-size: .78rem; font-weight: 600; letter-spacing: .03em; color: var(--muted); line-height: 1.4; }
.lang-switch a:hover { color: var(--teal); }
.lang-switch a.active { background: var(--grad); color: #06121f; }
.site-nav a { color: var(--slate); font-weight: 500; font-size: .96rem; }
.site-nav a:hover { color: var(--teal); }
.nav-cta {
  background: var(--grad); color: #06121f !important; padding: 9px 18px; border-radius: 999px;
  font-weight: 700 !important;
}
.nav-cta:hover { filter: brightness(1.06); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ── 히어로 ───────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 120% at 82% -10%, rgba(20, 184, 166, .22) 0%, transparent 46%),
    radial-gradient(90% 90% at 0% 110%, rgba(34, 211, 238, .1) 0%, transparent 50%),
    var(--bg);
}
.hero::before {  /* "context" 데이터 노드 텍스처 (오른쪽이 진하고 왼쪽은 페이드) */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Ccircle cx='6' cy='6' r='1.6' fill='%232dd4bf'/%3E%3Ccircle cx='28' cy='22' r='1.6' fill='%235eead4'/%3E%3Ccircle cx='38' cy='40' r='1.4' fill='%2322d3ee'/%3E%3C/svg%3E");
  background-size: 44px 44px; opacity: .5;
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 95%);
  mask-image: linear-gradient(100deg, transparent 30%, #000 95%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; padding-top: 84px; padding-bottom: 94px; }  /* 좌우 패딩은 .container(24/32px)에 위임 */
.hero-sub { font-size: 1.15rem; color: var(--slate); max-width: 540px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 30px 0 38px; }
.hero-stats { display: flex; gap: 38px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat strong {
  font-family: var(--font-serif); font-size: 2rem; font-weight: 400;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--muted); font-size: .9rem; }

/* ── 회사 소개 카드 ───────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.about-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.about-card h2 { font-size: 1.55rem; }
.prose { color: var(--slate); }
.prose strong { color: var(--ink); }
.prose em { color: var(--teal); font-style: normal; font-weight: 600; }

/* ── 서비스 ───────────────────────────────────────────────── */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.service-card {
  position: relative; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: .2s ease; overflow: hidden;
}
.service-card::before {  /* 상단 teal 그라데이션 바: hover 시 나타남 */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(45, 212, 191, .35); }
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover .service-icon { background: var(--grad); }
.service-icon {
  width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.6rem;
  background: rgba(255, 255, 255, .05); border-radius: 14px; margin-bottom: 18px;
}
.service-card h3 { font-size: 1.18rem; color: var(--ink); }
.service-card p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ── 제품(서비스 플랫폼) 카드 ─────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.product-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: .2s ease; overflow: hidden;
}
.product-card::before {  /* 상단 teal 그라데이션 바: hover 시 나타남 */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(45, 212, 191, .35); }
.product-card:hover::before { transform: scaleX(1); }
.product-figure {
  width: 60px; height: 60px; display: grid; place-items: center; padding: 10px;
  background: rgba(255, 255, 255, .05); border-radius: 16px; margin-bottom: 18px;
}
.product-figure svg { display: block; width: 100%; height: auto; }
.product-name { font-size: 1.32rem; color: var(--ink); margin-bottom: .25em; letter-spacing: -.01em; }
.product-tagline { color: var(--teal); font-size: .92rem; font-weight: 600; margin: 0 0 .8em; }
.product-desc { color: var(--muted); font-size: .96rem; line-height: 1.65; margin: 0; }
.product-features { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.product-features li {
  position: relative; padding-left: 20px; color: var(--slate); font-size: .9rem; line-height: 1.5;
}
.product-features li::before {  /* teal 체크 마커 */
  content: ""; position: absolute; left: 0; top: .45em; width: 8px; height: 8px;
  border-radius: 999px; background: var(--grad);
}
.product-cta { align-self: flex-start; margin-top: 22px; }
.product-cta.is-disabled { opacity: .45; cursor: default; pointer-events: none; }

/* ── CTA 밴드 ─────────────────────────────────────────────── */
.cta-band { background: var(--grad); color: #06121f; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { color: #06121f; }
.cta-band p { color: rgba(6, 18, 31, .82); margin: 0; }
.cta-band .btn-primary { background: var(--navy-deep); color: var(--teal-light); box-shadow: none; }
.cta-band .btn-primary:hover { background: #0b1224; }

/* ── 연락처 ───────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.contact-grid p { color: var(--slate); }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li {
  display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 16px 20px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.contact-list span { color: var(--muted); font-weight: 600; }
.addr { white-space: pre-line; line-height: 1.55; }
.contact-list span.addr { font-size: .8rem; font-weight: 400; color: inherit; }

/* ── 풋터 (흑백 로고 + 최암 네이비) ───────────────────────── */
.site-footer { position: relative; background: var(--navy-deep); color: #97a2bd; padding: 58px 0 24px; }
.site-footer::before {  /* 상단 teal 그라데이션 라인 */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad);
}
.footer-inner { display: grid; grid-template-columns: 1.3fr .9fr 1.6fr; gap: 36px; }
.footer-logo { height: 32px; width: auto; opacity: .9; margin-bottom: 14px; }
.footer-tagline { color: #7e8aa8; font-size: .94rem; max-width: 260px; }
.footer-social { display: flex; gap: 12px; margin-top: 14px; }
.footer-social a { display: inline-flex; color: #7e8aa8; transition: color .2s ease; }  /* 무채색 */
.footer-social a:hover { color: #cdd5e6; }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }
.footer-by { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: .9rem; color: #97a2bd; }
.footer-by img { height: 16px; width: auto; opacity: .85; vertical-align: middle; transition: opacity .2s ease; }
.footer-by a:hover img { opacity: 1; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-contact a { color: #b3bdd6; }
.footer-links a:hover, .footer-contact a:hover { color: var(--teal); }
.footer-contact p { margin: 0 0 10px; font-size: .92rem; }
.footer-contact p.addr { font-size: .78rem; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; font-size: .86rem; color: #5f6a85; }

/* ===========================================================
   분석 솔루션 페이지
   =========================================================== */
.solution-hero { padding-bottom: 0; }
.solution-hero .lead { color: var(--slate); font-size: 1.12rem; max-width: 680px; }
.lead { font-size: 1.1rem; }

/* 지원 플랫폼 카드 */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.platform-card {
  position: relative; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px 28px; transition: .2s ease; overflow: hidden;
}
.platform-card::before {  /* 상단 teal 그라데이션 바: hover 시 나타남 */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.platform-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(45, 212, 191, .35); }
.platform-card:hover::before { transform: scaleX(1); }
.platform-figure {
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px; margin-bottom: 18px;
}
.platform-figure svg { display: block; width: 100%; height: auto; }
.platform-card h3 { font-size: 1.18rem; color: var(--ink); margin-bottom: .4em; }
.platform-card p { color: var(--muted); margin: 0; font-size: .96rem; line-height: 1.6; }

.upload-card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); max-width: 720px; margin: 0 auto;
}
.upload-card .hint { color: var(--muted); font-size: .94rem; }
.upload-card code { background: rgba(45, 212, 191, .12); padding: 2px 7px; border-radius: 6px; font-size: .88em; color: var(--teal-light); }
.upload-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.file-label { cursor: pointer; }
.file-name { color: var(--slate); font-size: .92rem; margin: 14px 0 0; }
.error-msg { color: #fb7185; font-weight: 500; margin: 12px 0 0; min-height: 1px; }

.results { margin-top: 44px; display: grid; gap: 28px; }
.result-block { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.result-block h2 { font-size: 1.45rem; }
.result-block .hint { color: var(--muted); font-size: .94rem; margin-top: -.3em; }
.source-note { color: var(--muted); font-size: .88rem; font-style: italic; }

.qc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 6px 0 10px; }
.qc-card { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; }
.qc-card .v { font-family: var(--font-serif); font-size: 1.9rem; font-weight: 400; color: var(--teal); }
.qc-card .l { color: var(--muted); font-size: .86rem; }

.chart-wrap { position: relative; height: 360px; margin-top: 10px; }

.loading { text-align: center; color: var(--slate); padding: 30px; font-weight: 500; }
.spinner {
  display: inline-block; width: 18px; height: 18px; border: 3px solid var(--line);
  border-top-color: var(--teal); border-radius: 50%; vertical-align: -3px; margin-right: 8px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 반응형 ───────────────────────────────────────────────── */
@media (max-width: 860px) {
  .container { padding: 0 32px; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0; background: rgba(10, 17, 36, .98);
    flex-direction: column; align-items: stretch; gap: 0;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .25s ease; padding: 0;
    backdrop-filter: blur(14px);
  }
  .site-nav.open { max-height: 420px; padding: 8px 0; }
  .site-nav a { padding: 12px 24px; }
  .nav-cta { margin: 8px 24px; text-align: center; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 64px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 64px 0; }
}
