/* ============================================================
   CoWin Company — style.css  (Light Theme)
   Design: Clean White + Royal Blue — Trust & Professional
   ============================================================ */

/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Light palette ── */
  --bg:          #f8faff;
  --bg-2:        #eef2fb;
  --bg-card:     #ffffff;
  --bg-card-2:   #f4f7fe;
  --border:      #dde3f0;
  --border-2:    #c8d1e8;

  /* ── Brand ── */
  --blue:        #1d4ed8;
  --blue-mid:    #2563eb;
  --blue-light:  #3b82f6;
  --blue-pale:   #eff6ff;
  --blue-glow:   #2563eb;
  --cyan:        #0891b2;
  --teal:        #0d9488;
  --purple:      #6d28d9;
  --green:       #059669;
  --orange:      #d97706;
  --pink:        #db2777;
  --gold:        #b45309;
  --red:         #dc2626;

  /* ── Text ── */
  --text-1:      #0f172a;
  --text-2:      #334155;
  --text-3:      #64748b;
  --text-4:      #94a3b8;
  --white:       #ffffff;

  /* ── Gradient ── */
  --gradient:    linear-gradient(135deg, #1d4ed8 0%, #0891b2 100%);
  --gradient-2:  linear-gradient(135deg, #6d28d9 0%, #1d4ed8 100%);
  --gradient-hero: linear-gradient(160deg, #dbeafe 0%, #e0f2fe 50%, #f0fdf4 100%);

  /* ── Shadows ── */
  --shadow-xs:   0 1px 3px rgba(15,23,42,.08);
  --shadow-sm:   0 2px 8px rgba(15,23,42,.10);
  --shadow-md:   0 8px 24px rgba(15,23,42,.12);
  --shadow-lg:   0 20px 60px rgba(15,23,42,.15);
  --shadow-blue: 0 8px 32px rgba(37,99,235,.25);

  /* ── Misc ── */
  --radius:      12px;
  --radius-lg:   20px;
  --transition:  .3s cubic-bezier(.4,0,.2,1);
  --font-ko:     'Noto Sans KR', sans-serif;
  --font-en:     'Inter', sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--blue-light); border-radius: 3px; }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Section commons ── */
.section { padding: 100px 0; }

.section-header { text-align: center; margin-bottom: 64px; }

.section-tag {
  display: inline-block;
  font-family: var(--font-en);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--blue-mid);
  background: var(--blue-pale);
  border: 1px solid #bfdbfe;
  padding: 6px 16px;
  border-radius: 99px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-1);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-3);
  line-height: 1.8;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(29,78,216,.4);
  filter: brightness(1.06);
}

.btn-outline {
  background: var(--white);
  color: var(--text-2);
  border: 1.5px solid var(--border-2);
  box-shadow: var(--shadow-xs);
}
.btn-outline:hover {
  border-color: var(--blue-light);
  color: var(--blue-mid);
  background: var(--blue-pale);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-full { width: 100%; justify-content: center; }

/* ════════════════════════════════════════
   HEADER / NAV
════════════════════════════════════════ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: var(--transition);
}

#header.scrolled {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(15,23,42,.08);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 38px; height: 38px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(29,78,216,.3);
}

.logo-text {
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: -.3px;
}
.logo-text strong { font-weight: 800; color: var(--text-1); }

.nav-menu { display: flex; gap: 2px; margin-left: auto; }

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-3);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--blue-mid);
  background: var(--blue-pale);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--gradient);
  color: white;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-blue);
  transition: var(--transition);
  flex-shrink: 0;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(29,78,216,.45);
  filter: brightness(1.06);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block; height: 2px;
  background: var(--text-2); border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 100px 40px 80px;
  background: var(--gradient-hero);
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }

.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(29,78,216,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29,78,216,.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,.18) 0%, transparent 70%);
  top: -150px; left: -80px;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(8,145,178,.14) 0%, transparent 70%);
  bottom: -80px; right: 8%;
  animation: orbFloat 10s ease-in-out infinite reverse;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(109,40,217,.10) 0%, transparent 70%);
  top: 40%; left: 45%;
  animation: orbFloat 12s ease-in-out infinite 2s;
}

@keyframes orbFloat {
  0%,100% { transform: translate(0,0); }
  33%      { transform: translate(30px,-30px); }
  66%      { transform: translate(-20px,20px); }
}

/* Hero inner layout: two-column → centered */
.hero-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
}

.hero-content {
  flex: 1;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--blue-mid);
  background: var(--blue-pale);
  border: 1px solid #bfdbfe;
  padding: 7px 16px;
  border-radius: 99px;
  margin-bottom: 28px;
  animation: fadeUp .8s ease both;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--text-1);
  margin-bottom: 24px;
  animation: fadeUp .8s ease .1s both;
}

.hero-title .highlight {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-3);
  line-height: 1.8;
  margin-bottom: 40px;
  animation: fadeUp .8s ease .2s both;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 56px;
  animation: fadeUp .8s ease .3s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  animation: fadeUp .8s ease .4s both;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  box-shadow: var(--shadow-sm);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}
.stat-item:first-child { padding-left: 0; }

.stat-num {
  font-family: var(--font-en);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1;
}
.stat-unit {
  font-size: .8rem; font-weight: 700;
  color: var(--blue-mid);
  vertical-align: super;
  margin-left: 2px;
}
.stat-label {
  font-size: .72rem;
  color: var(--text-4);
  margin-top: 4px;
  font-weight: 500;
}

.stat-divider {
  width: 1px; height: 40px;
  background: var(--border);
}

/* Code window */
.hero-visual {
  flex: 0 0 420px;
  position: relative; z-index: 2;
  animation: fadeLeft 1s ease .5s both;
}

.code-window {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 420px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(29,78,216,.12);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid #334155;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.window-title {
  font-family: var(--font-en);
  font-size: .8rem;
  color: #64748b;
  margin-left: auto;
}

.code-content {
  padding: 24px;
  font-family: 'Courier New', monospace;
  font-size: .82rem;
  line-height: 1.8;
  overflow-x: auto;
  color: #e2e8f0;
}

.code-content .kw  { color: #c678dd; }
.code-content .fn  { color: #61afef; }
.code-content .str { color: #98c379; }
.code-content .key { color: #e06c75; }
.code-content .num { color: #d19a66; }

.scroll-down {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: var(--text-4);
  font-size: 1.1rem;
  animation: bounce 2s ease-in-out infinite;
  transition: color var(--transition);
}
.scroll-down:hover { color: var(--blue-mid); }

@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ════════════════════════════════════════
   ABOUT
════════════════════════════════════════ */
.about-section {
  background: var(--white);
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  align-items: stretch;
}

/* about-info stretches to match about-values */
.about-info {
  display: flex;
  flex-direction: column;
}

.company-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.company-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient);
}

.company-logo-big {
  width: 76px; height: 76px;
  background: var(--gradient);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem;
  color: white;
  margin: 0 auto 18px;
  box-shadow: var(--shadow-blue);
}

.company-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 4px;
}

.company-slogan {
  font-family: var(--font-en);
  font-size: .83rem;
  color: var(--blue-mid);
  margin-bottom: 24px;
  letter-spacing: .06em;
  font-weight: 600;
}

.company-details { text-align: left; flex: 1; }

.detail-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }

.detail-icon {
  width: 30px; height: 30px;
  background: var(--blue-pale);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-mid);
  font-size: .82rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.detail-label {
  font-size: .76rem;
  color: var(--text-4);
  width: 52px;
  flex-shrink: 0;
  padding-top: 2px;
  font-weight: 600;
}

.detail-value {
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.5;
}
.detail-value a { color: var(--blue-mid); font-weight: 600; }
.detail-value a:hover { text-decoration: underline; }

/* about-values: 2×2 grid, same height */
.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.value-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}
.value-card:hover {
  border-color: #bfdbfe;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.value-card:hover::after { transform: scaleX(1); }

.value-icon {
  width: 46px; height: 46px;
  background: var(--blue-pale);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-mid);
  font-size: 1.25rem;
  margin-bottom: 14px;
  transition: var(--transition);
}
.value-card:hover .value-icon {
  background: var(--blue-mid);
  color: white;
}

.value-card h4 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}

.value-card p {
  font-size: .82rem;
  color: var(--text-3);
  line-height: 1.7;
}

/* Partners */
.partners { margin-top: 56px; text-align: center; }
.partners-label {
  font-size: .75rem;
  color: var(--text-4);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 600;
}

.partner-list {
  display: flex; flex-wrap: wrap;
  gap: 10px; justify-content: center;
}

.partner-item {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: .83rem;
  color: var(--text-3);
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}
.partner-item:hover {
  border-color: #bfdbfe;
  color: var(--blue-mid);
  background: var(--blue-pale);
  box-shadow: var(--shadow-sm);
}
.partner-item i { color: var(--blue-mid); font-size: .85rem; }

/* ════════════════════════════════════════
   SERVICES
════════════════════════════════════════ */
.services-section { background: var(--bg); }

/* ── 서비스 그리드 (3열 균일) ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* ── AI 하네스 카드 — 첫 번째 카드 강조 (다른 카드와 동일 크기, 색상만 차별화) ── */
.service-card.service-ai {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  border-color: #93c5fd;
  position: relative;
}
.service-card.service-ai::before {
  transform: scaleX(1);
  background: linear-gradient(135deg, #2563eb, #0891b2);
}
.service-card.service-ai .service-icon {
  background: linear-gradient(135deg, #2563eb, #0891b2);
}
.service-card.service-ai .service-num {
  color: rgba(29,78,216,.1);
}

/* AI 뱃지 */
.service-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-mid);
  background: var(--blue-pale);
  border: 1px solid #bfdbfe;
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}
.service-card:hover {
  border-color: #bfdbfe;
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.service-card:hover::before { transform: scaleX(1); }

/* .featured 클래스는 더 이상 사용하지 않음 — service-ai로 대체 */

.service-num {
  font-family: var(--font-en);
  font-size: 2.8rem;
  font-weight: 900;
  color: rgba(29,78,216,.07);
  line-height: 1;
  margin-bottom: -6px;
  user-select: none;
}

.service-icon {
  width: 52px; height: 52px;
  background: var(--gradient);
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: white;
  margin-bottom: 18px;
  box-shadow: var(--shadow-blue);
  transition: var(--transition);
}
.service-card:hover .service-icon { transform: scale(1.1) rotate(-5deg); }

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 10px;
}

.service-card p {
  font-size: .85rem;
  color: var(--text-3);
  line-height: 1.7;
  margin-bottom: 18px;
}

.service-list { display: flex; flex-direction: column; gap: 7px; }
.service-list li {
  display: flex; align-items: center; gap: 9px;
  font-size: .82rem; color: var(--text-3);
}
.service-list li i { color: var(--green); font-size: .72rem; flex-shrink: 0; }

/* ════════════════════════════════════════
   PORTFOLIO
════════════════════════════════════════ */
.portfolio-section { background: var(--bg-2); }

.portfolio-filter {
  display: flex; gap: 8px;
  justify-content: center; flex-wrap: wrap;
  margin-bottom: 44px;
}

.filter-btn {
  padding: 9px 20px;
  border-radius: 99px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-3);
  background: var(--white);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}
.filter-btn:hover { color: var(--blue-mid); border-color: #bfdbfe; }
.filter-btn.active {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-blue);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.portfolio-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
}
.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: #bfdbfe;
}
.portfolio-card.hidden { display: none; }

/* ── 스크린샷 헤더 (실제 이미지 + 오버레이) ── */
.pf-header {
  height: 160px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* 이미지가 있을 때 */
.pf-header img.pf-screenshot {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .5s ease;
}
.portfolio-card:hover .pf-header img.pf-screenshot {
  transform: scale(1.05);
}

/* 이미지 위에 반투명 컬러 오버레이 */
.pf-img-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  justify-content: flex-start;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,.05) 60%, transparent 100%);
  z-index: 2;
}

/* 기존 pf-overlay (이미지 없는 카드용 아이콘 중앙 배치) */
.pf-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}

/* 이미지 없을 때 — 아이콘 중앙 배치 fallback */
.pf-header.no-img {
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-header.no-img .pf-img-overlay {
  display: none; /* 이미지 없으면 오버레이 숨김 */
}
.pf-header.no-img .pf-icon {
  font-size: 3rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.3));
}
.pf-header.no-img .pf-icon-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  background: rgba(255,255,255,.15);
  border-radius: 16px;
  backdrop-filter: blur(4px);
}

.pf-blue   { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.pf-purple { background: linear-gradient(135deg, #6d28d9, #a855f7); }
.pf-orange { background: linear-gradient(135deg, #c2410c, #f97316); }
.pf-green  { background: linear-gradient(135deg, #059669, #34d399); }
.pf-teal   { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.pf-yellow { background: linear-gradient(135deg, #b45309, #fbbf24); }
.pf-gold   { background: linear-gradient(135deg, #92400e, #f59e0b); }
.pf-pink   { background: linear-gradient(135deg, #be185d, #f472b6); }
.pf-navy   { background: linear-gradient(135deg, #1e3a5f, #2563eb); }
.pf-road   { background: linear-gradient(135deg, #065f46, #059669); }

.pf-icon {
  font-size: 2.4rem;
  color: rgba(255,255,255,.95);
  position: relative; z-index: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}

/* 연도 뱃지 */
.pf-year {
  position: absolute; top: 10px; right: 12px;
  font-family: var(--font-en);
  font-size: .72rem; font-weight: 700;
  color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.35);
  padding: 3px 9px;
  z-index: 3;
  border-radius: 99px;
}

.pf-body { padding: 20px; }

.pf-tag {
  display: inline-block;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .04em;
  color: var(--blue-mid);
  background: var(--blue-pale);
  border: 1px solid #bfdbfe;
  padding: 3px 9px;
  border-radius: 99px;
  margin-bottom: 8px;
}

.pf-body h4 {
  font-size: .95rem; font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px; line-height: 1.4;
}

.pf-body p {
  font-size: .81rem; color: var(--text-3);
  line-height: 1.65; margin-bottom: 12px;
}

.pf-stats {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.pf-stats span {
  display: flex; align-items: center; gap: 4px;
  font-size: .76rem;
  color: var(--orange); font-weight: 600;
}

.pf-tags-row { display: flex; gap: 5px; flex-wrap: wrap; }

.tech-tag {
  font-size: .7rem; font-weight: 600;
  color: var(--text-4);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 6px;
}

/* ════════════════════════════════════════
   HISTORY / TIMELINE
════════════════════════════════════════ */
.history-section { background: var(--white); }

.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%; transform: translateX(-50%);
  top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg,
    transparent 0%, var(--blue-mid) 5%,
    var(--blue-mid) 95%, transparent 100%
  );
}

.timeline-item {
  display: flex;
  gap: 32px;
  margin-bottom: 36px;
  align-items: flex-start;
  position: relative;
  opacity: 0;
  transition: opacity .6s ease, transform .6s ease;
}
.timeline-item.visible { opacity: 1; transform: none !important; }
.timeline-item[data-aos="right"] { transform: translateX(-40px); }
.timeline-item[data-aos="left"]  { transform: translateX(40px); }

.timeline-item:nth-child(odd)  { flex-direction: row; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }

.timeline-year {
  flex: 0 0 calc(50% - 32px);
  font-family: var(--font-en);
  font-size: 1.9rem; font-weight: 900;
  color: var(--blue-mid);
  text-align: right;
  padding-top: 12px;
  position: relative;
  text-shadow: none;
  -webkit-text-stroke: 0;
}
.timeline-item:nth-child(even) .timeline-year { text-align: left; }

.timeline-year::after {
  content: '';
  position: absolute; top: 20px;
  width: 14px; height: 14px;
  background: var(--blue-mid);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(37,99,235,.2);
  right: -39px;
}
.timeline-item:nth-child(even) .timeline-year::after {
  right: auto; left: -39px;
}

/* 최신 연혁 강조 */
.timeline-item.current .timeline-year { color: var(--blue-mid); }
.timeline-item.current .timeline-content {
  border-color: #bfdbfe;
  background: var(--blue-pale);
  box-shadow: 0 4px 16px rgba(37,99,235,.1);
}
.timeline-item.current .timeline-year::after {
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(217,119,6,.2);
}

.timeline-content {
  flex: 0 0 calc(50% - 32px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.timeline-content:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-md);
}

.timeline-content ul { display: flex; flex-direction: column; gap: 9px; }
.timeline-content li {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: .875rem; color: var(--text-2); line-height: 1.5;
}
.timeline-content li i {
  color: var(--blue-mid);
  font-size: .82rem; margin-top: 3px; flex-shrink: 0;
}

/* ════════════════════════════════════════
   TECH STACK
════════════════════════════════════════ */
.tech-section { background: var(--bg); padding: 80px 0; }

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tech-category {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}
.tech-category:hover {
  border-color: #bfdbfe;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.tech-category h4 {
  display: flex; align-items: center; gap: 9px;
  font-size: .9rem; font-weight: 700;
  color: var(--text-1); margin-bottom: 14px;
}
.tech-category h4 i { color: var(--blue-mid); font-size: .95rem; }

.tech-items { display: flex; flex-wrap: wrap; gap: 7px; }

.tech-chip {
  font-size: .74rem; font-weight: 600;
  color: var(--text-3);
  background: var(--blue-pale);
  border: 1px solid #bfdbfe;
  padding: 4px 11px;
  border-radius: 6px;
  transition: var(--transition);
}
.tech-chip:hover {
  background: var(--blue-mid);
  color: white;
  border-color: var(--blue-mid);
}

/* ════════════════════════════════════════
   CONTACT
════════════════════════════════════════ */
.contact-section { background: var(--bg-2); }

.contact-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.25rem; font-weight: 700;
  color: var(--text-1); margin-bottom: 28px;
}

.contact-items { display: flex; flex-direction: column; gap: 18px; margin-bottom: 28px; }

.contact-item { display: flex; gap: 14px; align-items: flex-start; }

.contact-icon {
  width: 42px; height: 42px;
  background: var(--blue-pale);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-mid); font-size: .95rem;
  flex-shrink: 0;
}

.contact-item strong {
  display: block; font-size: .83rem; font-weight: 700;
  color: var(--text-4); margin-bottom: 3px;
}
.contact-item p { font-size: .875rem; color: var(--text-2); line-height: 1.6; }
.contact-item a { color: var(--blue-mid); font-weight: 600; }
.contact-item a:hover { text-decoration: underline; }

.contact-badge {
  display: flex; gap: 14px; align-items: center;
  background: linear-gradient(135deg, var(--blue-pale), #e0f2fe);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius); padding: 18px 22px;
}
.contact-badge > i { font-size: 1.7rem; color: var(--blue-mid); flex-shrink: 0; }
.contact-badge strong { display: block; font-size: .88rem; font-weight: 700; color: var(--text-1); margin-bottom: 3px; }
.contact-badge p { font-size: .78rem; color: var(--text-3); }

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

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

.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.form-group:last-of-type { margin-bottom: 0; }

.form-group label { font-size: .83rem; font-weight: 600; color: var(--text-3); }
.form-group label span { color: var(--red); margin-left: 2px; }

.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 15px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  font-size: .9rem; outline: none;
  transition: var(--transition);
  -webkit-appearance: none; appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  background-color: var(--bg);
  padding-right: 38px;
  cursor: pointer;
}
.form-group select option { background: white; color: var(--text-1); }

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-4); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
  background: white;
}

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

.form-note { font-size: .76rem; color: var(--text-4); text-align: center; margin-top: 10px; }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
#footer {
  background: var(--text-1);
  border-top: 1px solid #1e293b;
  padding: 60px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 240px 120px 1fr 220px;
  gap: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid #1e293b;
}

.footer-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-en); font-size: 1rem;
  color: #e2e8f0;
}
.footer-logo i {
  width: 30px; height: 30px;
  background: var(--gradient);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: .82rem;
}
.footer-logo strong { font-weight: 800; }

.footer-brand p { font-size: .84rem; color: #64748b; line-height: 1.7; margin-bottom: 12px; }
.footer-copy { font-size: .76rem !important; color: #475569 !important; }

.footer-links h5,
.footer-services h5,
.footer-contact h5 {
  font-size: .8rem; font-weight: 700;
  color: #94a3b8;
  margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: .1em;
}

.footer-links ul, .footer-services ul, .footer-contact ul {
  display: flex; flex-direction: column; gap: 9px;
}

.footer-links li a, .footer-services li, .footer-contact li {
  font-size: .84rem; color: #64748b;
  transition: var(--transition); line-height: 1.5;
}
.footer-links li a:hover { color: var(--blue-light); }
.footer-contact li { display: flex; align-items: flex-start; gap: 7px; }
.footer-contact li i { color: var(--blue-light); margin-top: 3px; font-size: .82rem; flex-shrink: 0; }
.footer-contact li a { color: #64748b; transition: var(--transition); }
.footer-contact li a:hover { color: var(--blue-light); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--white);
  border: 1px solid #bfdbfe;
  color: var(--text-1);
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: .9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 9999; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Scroll top ── */
.scroll-top {
  position: fixed; bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  background: var(--gradient);
  color: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer;
  box-shadow: var(--shadow-blue);
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: var(--transition); z-index: 999;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(29,78,216,.5); }

/* ════════════════════════════════════════
   ANIMATIONS
════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }

  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-values { grid-template-rows: auto; }
  .tech-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 900px) {
  .nav-menu, .nav-cta { display: none; }
  .hamburger { display: flex; }

  .nav-menu.open {
    display: flex; flex-direction: column;
    position: fixed; top: 72px; left: 0; right: 0;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(20px);
    padding: 16px 20px 28px;
    border-bottom: 1px solid var(--border);
    gap: 2px; z-index: 999;
    animation: slideDown .25s ease;
    box-shadow: var(--shadow-md);
  }
  .nav-menu.open .nav-link {
    padding: 12px 16px; font-size: .95rem;
    border-radius: 10px; color: var(--text-2);
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hero-section { padding: 90px 24px 60px; }
  .hero-inner { flex-direction: column; align-items: center; text-align: center; gap: 40px; }
  .hero-content { align-items: center; }
  .hero-actions { justify-content: center; }
  .hero-stats { flex-wrap: wrap; justify-content: center; }
  .hero-visual { width: 100%; flex: none; }
  .code-window { width: 100%; max-width: 420px; }

  .about-values { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  .timeline::before { left: 20px; }
  .timeline-item,
  .timeline-item:nth-child(even) { flex-direction: column; padding-left: 48px; }
  .timeline-year {
    flex: none; font-size: 1.4rem;
    text-align: left !important; padding-top: 0;
  }
  .timeline-year::after {
    left: -38px !important; right: auto !important; top: 3px;
  }
  .timeline-content { flex: none; width: 100%; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .section { padding: 70px 0; }
  .services-grid { grid-template-columns: 1fr; }

  .portfolio-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 22px; }
  .stat-item { padding: 0 14px; }
  .stat-num { font-size: 1.5rem; }
}
