/* ============================================================
   codeline-website · main.css
   ============================================================ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* ─── 변수 ─────────────────────────────────────────────────── */
:root {
  --bg: #FAFAF8;
  --white: #FFFFFF;
  --ink: #1A1A1A;
  --ink2: #3A3A3A;
  --muted: #8A8A8A;
  --light: #F0F0EC;
  --accent: #1A56E8;
  --accent-light: #EEF2FF;
  --border: #E8E8E4;
  --green: #16A34A;
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── 리셋 & 기본 ──────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── 네비게이션 ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 72px;
  height: 70px;
}

.nav__logo {
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.nav__logo span {
  color: var(--accent);
}

.nav__links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav__links a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--ink);
}

.nav__cta {
  padding: 10px 24px;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: opacity 0.2s;
  cursor: pointer;
  border: none;
}

.nav__cta:hover {
  opacity: 0.85;
}

/* ─── 히어로 ───────────────────────────────────────────────── */
.hero {
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 140px 72px 80px;
  gap: 80px;
}

.hero__company {
  font-size: 2.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 10px;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 28px;
}

.hero__tag::before {
  content: '●';
  font-size: 0.4rem;
}

.hero__h1 {
  font-family: var(--font-sans);
  font-size: clamp(2.8rem, 4.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.hero__h1 em {
  font-style: normal;
  color: var(--accent);
  font-weight: 900;
}

.hero__desc {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 40px;
  font-weight: 300;
}

.hero__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-main {
  padding: 14px 28px;
  background: var(--ink);
  color: white;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
  display: inline-block;
}

.btn-main:hover {
  background: var(--accent);
}

.btn-ghost {
  padding: 14px 28px;
  color: var(--ink2);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.btn-ghost:hover {
  color: var(--accent);
}

/* 히어로 우측 카드 */
.hero__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hero__card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: box-shadow 0.3s;
}

.hero__card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-sub {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── 구분선 ───────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0 72px;
}

/* ─── 공통 섹션 ────────────────────────────────────────────── */
.section {
  padding: 96px 72px;
}

.section--gray {
  background: var(--light);
}

.section--dark {
  background: var(--ink);
  color: white;
}

.section__kicker {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section--dark .section__kicker {
  color: #7EB5FF;
}

.section__title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 48px;
}

.section--dark .section__title {
  color: white;
}

/* ─── 프로젝트 카테고리 블록 ───────────────────────────────── */
.cat-block {
  margin-bottom: 56px;
}

.cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 2px solid var(--ink);
  padding-top: 18px;
  margin-bottom: 20px;
}

.cat-icon {
  font-size: 1.4rem;
}

.cat-name {
  font-size: 1.05rem;
  font-weight: 800;
}

.cat-count {
  margin-left: auto;
  background: white;
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--border);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.item-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  transition: all 0.2s;
}

.item-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(26, 86, 232, 0.08);
}

.item-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.item-client {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.item-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.item-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 4px;
  padding: 2px 8px;
}

.item-card--location {
  border-left: 3px solid var(--accent);
}

/* ─── 위치기반 솔루션 흐름 ──────────────────────────────────── */
.location-feature {
  margin-top: 28px;
  background: var(--light);
  border-radius: 12px;
  padding: 28px 32px;
}

.location-feature__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink2);
  margin-bottom: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.location-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.location-step {
  flex: 1;
  min-width: 130px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.location-step__icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.location-step__name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.location-step__desc {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

.location-step__arrow {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── 솔루션 (다크 섹션) ───────────────────────────────────── */
.sol-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.sol-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 32px;
}

.sol-label {
  font-size: 0.7rem;
  color: #7EB5FF;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 12px;
}

.sol-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.sol-items {
  list-style: none;
}

.sol-items li {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sol-items li:last-child {
  border-bottom: none;
}

.sol-items li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7EB5FF;
  flex-shrink: 0;
}

/* ─── 회사 소개 ─────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 80px;
  align-items: center;
}

.about-desc p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 16px;
}

.value-list {
  list-style: none;
  margin-top: 28px;
}

.value-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.val-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--accent);
  font-weight: 900;
  margin-top: 1px;
}

.val-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.val-text span {
  color: var(--muted);
  font-size: 0.82rem;
}

.info-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-key {
  font-size: 0.8rem;
  color: var(--muted);
}

.info-val {
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
}

.info-map-link {
  color: var(--ink);
  text-decoration: none;
  line-height: 1.5;
}

.info-map-link:hover {
  color: var(--accent, #2563eb);
  text-decoration: underline;
}

.info-map-link small {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ─── 푸터 ──────────────────────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__brand {
  font-weight: 900;
  font-size: 1.1rem;
}

.footer__brand span {
  color: var(--accent);
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ─── 기술 스택 배지 ────────────────────────────────────────── */
.hero__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.hero__tech-label {
  width: 100%;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.tech-badge {
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink2);
  transition: all 0.2s;
}

.tech-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ─── 납품처 띠 ─────────────────────────────────────────────── */
.client-strip {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.client-strip__label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: 24px;
  border-right: 1px solid var(--border);
}

.client-strip__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  list-style: none;
}

.client-strip__list li {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink2);
  white-space: nowrap;
}

/* ─── TrainEye 솔루션 상세 ──────────────────────────────────── */
.te-intro {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 32px 36px;
  margin-bottom: 48px;
}

.te-intro__text {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.85;
  margin-bottom: 20px;
}

.te-intro__text strong {
  color: #7EB5FF;
  font-weight: 700;
}

.te-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.te-badge {
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid rgba(126, 181, 255, 0.4);
  color: #7EB5FF;
  font-size: 0.75rem;
  font-weight: 600;
}

.te-flow {
  margin-bottom: 48px;
}

.te-flow__title {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 20px;
}

.te-steps {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.te-step {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px 22px;
}

.te-step__arrow {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.2);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.te-step__num {
  font-size: 0.7rem;
  font-weight: 800;
  color: #7EB5FF;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.te-step__name {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: white;
}

.te-step__desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

.sol-card--main {
  display: flex;
  flex-direction: column;
}

.sol-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  margin-bottom: 20px;
}

.sol-spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
}

.sol-spec {
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.te-specs {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 32px 40px;
  margin-top: 32px;
  gap: 0;
}

.te-spec-item {
  flex: 1;
  text-align: center;
}

.te-spec-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: #7EB5FF;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 8px;
}

.te-spec-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

.te-spec-label small {
  display: block;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 2px;
}

.te-spec-divider {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* ─── 문의 폼 ───────────────────────────────────────────────── */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
}

.contact-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.85;
  margin-top: 16px;
}

.contact-form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink2);
  margin-bottom: 7px;
}

.form-req {
  color: var(--accent);
}

.form-input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 86, 232, 0.08);
}

.form-input::placeholder {
  color: #C0C0BA;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}

.form-submit:hover {
  opacity: 0.88;
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-success {
  margin-top: 14px;
  padding: 14px 16px;
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #16A34A;
  font-weight: 600;
}

.form-error {
  margin-top: 14px;
  padding: 14px 16px;
  background: #FFF5F5;
  border: 1px solid #FCA5A5;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #DC2626;
  font-weight: 600;
}

/* ─── 반응형 ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav {
    padding: 0 32px;
  }

  .hero {
    padding: 100px 32px 60px;
    gap: 40px;
  }

  .section {
    padding: 72px 32px;
  }

  .divider {
    margin: 0 32px;
  }

  .footer {
    padding: 32px 32px;
  }
}

@media (max-width: 768px) {
  .te-steps {
    flex-direction: column;
  }

  .te-step__arrow {
    transform: rotate(90deg);
    justify-content: center;
    padding: 4px 0;
  }

  .te-specs {
    flex-wrap: wrap;
    gap: 24px;
    padding: 24px 20px;
  }

  .te-spec-divider {
    display: none;
  }

  .te-spec-item {
    flex: 0 0 calc(50% - 12px);
  }

  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form-wrap {
    padding: 24px 20px;
  }

  .nav {
    padding: 0 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 100px 20px 60px;
  }

  .hero__cards {
    display: none;
  }

  .section {
    padding: 64px 20px;
  }

  .divider {
    margin: 0 20px;
  }

  .sol-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 32px 20px;
  }

  .client-strip {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .location-steps {
    flex-direction: column;
    gap: 12px;
  }

  .location-step__arrow {
    transform: rotate(90deg);
    align-self: center;
  }

  .client-strip__label {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 8px;
    width: 100%;
  }
}