/* ============================================================
   NextWork Lab — shared styles
   ============================================================ */

:root {
  --teal:       #1A4DB8;
  --coral:      #F15A5A;
  --text-dark:  #374151;
  --bg:         #ffffff;
  --text:       #0f172a;
  --muted:      #64748b;
  --border:     rgba(15,23,42,0.08);
  --soft:       rgba(15,23,42,0.03);
  --max-w:      840px;
  --header-h:   64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: var(--teal); }


/* ── Site Header ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-logo {
  text-decoration: none;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.05em;
  flex-shrink: 0;
}
.site-logo .next { color: var(--teal); }
.site-logo .work { color: var(--text-dark); }
.site-logo .lab  { color: var(--coral); }

.main-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
}
.main-nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover    { color: var(--text); background: var(--soft); }
.main-nav a.is-active { color: var(--text); background: var(--soft); }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}
.nav-toggle svg { display: block; }

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: #fff;
  z-index: 190;
  padding: 24px 20px;
  border-top: 1px solid var(--border);
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  padding: 14px 16px;
  border-radius: 8px;
  transition: background 0.15s;
}
.mobile-nav a:hover    { background: var(--soft); }
.mobile-nav a.is-active { color: var(--teal); background: var(--soft); }
.mobile-nav .nav-group-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 20px 16px 8px;
}
.mobile-nav .nav-sub {
  padding-left: 16px;
  font-size: 15px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .main-nav  { display: none; }
  .nav-toggle { display: flex; }
}


/* ── Breadcrumb (category pages only, not product detail) ── */
.breadcrumb {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 20px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb .sep { color: #cbd5e1; }
.breadcrumb .current { color: #64748b; font-weight: 500; }


/* ── Page wrapper ────────────────────────────────────────── */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 20px 120px;
}
.page--narrow { max-width: 680px; }


/* ── Typography ──────────────────────────────────────────── */
.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 16px;
}

.headline {
  font-size: clamp(34px, 5.5vw, 60px);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 32px;
}

/* index.html 첫 번째 subhead — 문맥 도입 문장 */
.subhead--lead {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}

/* index.html 두 번째 subhead — 채널 설명 */
.subhead {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.8;
  color: #475569;
  margin: 0;
  letter-spacing: 0.01em;
}

.section-desc {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.9;
  color: #475569;
  margin: 0 0 32px;
  letter-spacing: 0.01em;
}

.detail-text {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.9;
  color: #475569;
  margin: 0 0 36px;
  letter-spacing: 0.01em;
}

h2.section-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--teal);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin: 56px 0 14px;
  letter-spacing: -0.01em;
}


/* ── Spec box ────────────────────────────────────────────── */
.spec-box {
  background: var(--soft);
  padding: 24px 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 32px 0;
}
.spec-box ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.spec-box li { font-size: 15px; line-height: 1.7; letter-spacing: 0.01em; display: flex; gap: 10px; color: #334155; }
.spec-box li::before { content: "—"; color: var(--teal); flex-shrink: 0; }
.spec-box p { margin: 0; font-size: 15px; line-height: 1.85; letter-spacing: 0.01em; color: #475569; }


/* ── Buttons ─────────────────────────────────────────────── */
.cta-group { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  height: 50px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: filter 0.15s, transform 0.15s;
  border: none;
  cursor: pointer;
}
.btn--teal  { background: var(--teal);  color: #fff; }
.btn--coral { background: var(--coral); color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}
.btn:hover { filter: brightness(1.08); transform: translateY(-2px); }


/* ── Hero band (index.html) ──────────────────────────────── */
.hero-band {
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  position: relative;
}
.hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(18,79,94,0.06), transparent 40%);
  pointer-events: none;
}
.hero-page {
  padding-bottom: 56px;
}

/* ── Category band (index.html) ─────────────────────────── */
.category-band {
  background: #f7fafc;
  border-top: 1px solid var(--border);
}
.category-page {
  padding-top: 48px;
  padding-bottom: 80px;
}
.category-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}


/* ── Category cards (About page) ────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 0;
}

.category-card {
  display: block;
  text-decoration: none;
  background: #fafbfc;
  border: 1px solid rgba(15,23,42,0.1);
  border-radius: 10px;
  padding: 28px 24px;
  transition: border-color 0.2s;
  color: var(--text);
}
.category-card:hover {
  border-color: rgba(18,79,94,0.35);
}
.category-card__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.category-card__name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 10px;
}
.category-card__desc {
  font-size: 14px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: #475569;
  margin: 0 0 14px;
}
.category-card__featured {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}
.category-card__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ── Product list cards (category pages) ─────────────────── */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
}

.product-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s;
}
.product-card:hover {
  border-color: #94a3b8;
}
.product-card__body { flex: 1; }
.product-card__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.product-card__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.product-card__desc {
  font-size: 14px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: #475569;
  margin: 0;
}
.product-card__arrow {
  font-size: 16px;
  color: #cbd5e1;
  margin-top: 4px;
  flex-shrink: 0;
}

/* Placeholder / coming-soon card */
.product-card--soon {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}
.product-card--soon:hover { transform: none; box-shadow: none; border-color: var(--border); }
.soon-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--muted);
  margin-left: 8px;
  vertical-align: middle;
}


/* ── Product sub-navigation (sticky within product pages) ── */
.subnav-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.subnav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 12px 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.subnav a:hover    { color: var(--text); }
.subnav a.is-active { color: var(--text); border-bottom-color: var(--coral); }

/* 서브네비 내 상위 카테고리 백링크 */
.subnav-back {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  padding: 12px 4px 12px 0;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.15s;
}
.subnav-back:hover { color: var(--teal); }
.subnav-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  align-self: center;
  flex-shrink: 0;
  margin: 0 6px;
}


/* ── Product page sections ───────────────────────────────── */
.product-section {
  padding-top: 72px;
  margin-top: -8px;
}
.product-section + .product-section {
  border-top: 1px solid var(--border);
}


/* ── Application image cards ─────────────────────────────── */
.application-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 40px 0;
}
.application-card {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.application-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.application-card__body { padding: 18px 20px 22px; }
.application-card__title {
  font-size: 16px;
  font-weight: 800;
  color: var(--teal);
  margin: 0 0 8px;
}
.application-card__desc {
  font-size: 14px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: #475569;
  margin: 0;
}


/* ── Evidence cards ──────────────────────────────────────── */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 32px 0;
}
.evidence-card {
  display: block;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.15s, transform 0.15s;
}
.evidence-card:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 14px rgba(18,79,94,0.08);
  transform: translateY(-2px);
}
.evidence-card__label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 5px;
}
.evidence-card__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 6px;
  line-height: 1.4;
}
.evidence-card__desc {
  display: block;
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: #475569;
}


/* ── Contact grid ────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.contact-card {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px 28px;
}
.contact-card__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 10px;
}
.contact-card__value {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.contact-card__value a { color: var(--teal); text-decoration: none; }
.contact-card__value a:hover { text-decoration: underline; }
.contact-card__note { font-size: 13px; color: var(--muted); margin: 0; }


/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  background: #fff;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.copyright { font-size: 13px; color: var(--muted); margin: 0; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--teal); }


/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .page { padding: 40px 16px 80px; }
  .hero-page { padding-bottom: 40px; }
  .category-page { padding-top: 36px; padding-bottom: 60px; }
  .subhead--lead { font-size: 18px; }
  .subhead { font-size: 16px; }
  .category-grid { grid-template-columns: 1fr; }
  .application-grid { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr; }
  .product-card { flex-direction: column; gap: 12px; }
  .product-card__arrow { display: none; }
  .cta-group { flex-direction: column; }
  .btn { width: 100%; }
  .application-card img { height: 180px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
