/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #0f172a;
  --navy2: #0c4a6e;
  --blue: #0ea5e9;
  --blue2: #38bdf8;
  --light: #7dd3fc;
  --slate: #64748b;
  --gray1: #f8fafc;
  --gray2: #f1f5f9;
  --border: #e2e8f0;
  --white: #ffffff;
  --radius: 14px;
  --container: 1200px;
  --nav-h: 70px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray1);
  color: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-nav { position: absolute; top: -999px; left: 0; background: var(--blue); color: #fff; padding: 8px 16px; font-size: 13px; z-index: 9999; }
.skip-nav:focus { top: 0; }

h1, h2, h3 { font-weight: 900; letter-spacing: -0.02em; line-height: 1.3; color: var(--navy); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.1rem; }

.eyebrow, .chip {
  display: inline-block;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.chip {
  background: rgba(14,165,233,.12);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(14,165,233,.3);
  color: var(--light);
}

.gradient-text {
  background: linear-gradient(90deg, var(--blue2), var(--light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(14,165,233,.55);
}
.btn-primary:hover { background: var(--navy2); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--navy);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost-light { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.btn-lg { padding: 15px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ===== Header ===== */
#header { position: sticky; top: 0; z-index: 1000; background: var(--white); border-bottom: 1px solid var(--border); box-shadow: 0 1px 12px rgba(0,0,0,.05); }
.header-accent { height: 3px; background: linear-gradient(90deg, var(--navy), var(--blue)); }

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
}

.logo-link { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 44px; width: auto; display: block; }
.logo-texts { display: flex; flex-direction: column; line-height: 1.25; }
.logo-texts .ko { font-size: 16px; font-weight: 900; color: var(--navy); letter-spacing: -0.5px; }
.logo-texts .en { font-size: 9px; color: var(--slate); letter-spacing: 2px; }

#gnb { display: flex; align-items: center; gap: 2px; margin-left: auto; }
#gnb > li > a { display: block; padding: 9px 16px; font-size: 14px; font-weight: 700; color: var(--slate); border-radius: 6px; transition: all .18s; white-space: nowrap; }
#gnb > li > a:hover { color: var(--navy); background: var(--gray2); }
#gnb > li.active > a { color: var(--blue); background: #e0f2fe; }

.nav-cta { flex-shrink: 0; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: all .3s; }

/* ===== Page Banner (inner pages) ===== */
.page-banner { background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%); color: #fff; padding: 64px 24px; position: relative; overflow: hidden; }
.page-banner::before { content: ''; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px; border-radius: 50%; background: rgba(14,165,233,.14); }
.page-banner::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--blue), transparent); }
.page-banner-inner { max-width: var(--container); margin: 0 auto; position: relative; z-index: 1; }
.page-banner h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page-banner p { margin-top: 12px; font-size: 15px; color: rgba(255,255,255,.65); font-weight: 300; max-width: 560px; }

/* ===== Hero (home) ===== */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%); padding: 130px 0 110px; }
.hero::before { content: ''; position: absolute; right: -120px; top: -120px; width: 480px; height: 480px; border-radius: 50%; background: rgba(14,165,233,.16); filter: blur(20px); }
.hero::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--blue), transparent); }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%); }
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 780px; margin: 0 auto; }
.hero-title { color: #fff; font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 18px 0 22px; }
.hero-desc { color: rgba(255,255,255,.7); font-size: 1.1rem; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== Stats ===== */
.stats { border-bottom: 1px solid var(--border); background: var(--white); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); padding: 48px 24px; }
.stat-item { text-align: center; display: flex; flex-direction: column; gap: 6px; position: relative; }
.stat-item + .stat-item::before { content: ''; position: absolute; left: 0; top: 10%; bottom: 10%; width: 1px; background: var(--border); }
.stat-num { font-size: 2.2rem; font-weight: 900; color: var(--blue); }
.stat-num small { font-size: 1.05rem; font-weight: 700; margin-left: 2px; }
.stat-label { color: var(--slate); font-size: 0.88rem; }

/* ===== Section ===== */
.section { padding: 96px 0; }
.section-alt { background: var(--gray2); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.section-sub { color: var(--slate); margin-top: 12px; }
.section-more { text-align: center; margin-top: 44px; }
.link-arrow { color: var(--blue); font-weight: 700; }

/* ===== Cards ===== */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 26px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-6px); border-color: rgba(14,165,233,.35); box-shadow: 0 16px 32px -18px rgba(15,23,42,.25); }
.card-icon { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, rgba(14,165,233,.14), rgba(15,23,42,.08)); color: var(--blue); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--slate); font-size: 0.92rem; }
.card-desc { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 0.88rem; }

/* ===== Portfolio ===== */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.portfolio-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--white); transition: transform .2s ease, box-shadow .2s ease; display: block; }
.portfolio-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px -18px rgba(15,23,42,.25); }
.portfolio-thumb { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--navy), var(--navy2)); display: flex; align-items: flex-end; }
.portfolio-thumb img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-thumb.ph-1 { background: linear-gradient(135deg, #0f172a, #0ea5e9); }
.portfolio-thumb.ph-2 { background: linear-gradient(135deg, #0c4a6e, #38bdf8); }
.portfolio-thumb.ph-3 { background: linear-gradient(135deg, #1e293b, #7dd3fc); }
.portfolio-category { margin: 14px; padding: 6px 12px; background: rgba(15,23,42,.55); backdrop-filter: blur(6px); border-radius: 999px; font-size: 0.75rem; font-weight: 700; color: #fff; }
.portfolio-body { padding: 22px 24px 26px; }
.portfolio-body h3 { margin-bottom: 6px; }
.portfolio-body p { color: var(--slate); font-size: 0.9rem; }
.portfolio-client { color: var(--blue) !important; font-weight: 700; font-size: 0.82rem !important; margin-bottom: 4px; }

/* ===== CTA Banner ===== */
.cta-banner { padding: 90px 0; background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%); position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; left: -100px; bottom: -100px; width: 360px; height: 360px; border-radius: 50%; background: rgba(14,165,233,.14); }
.cta-inner { position: relative; z-index: 1; text-align: center; max-width: 560px; margin: 0 auto; }
.cta-inner h2 { color: #fff; margin-bottom: 12px; }
.cta-inner p { color: rgba(255,255,255,.65); margin-bottom: 30px; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: start; }
.about-text h2 { margin-bottom: 20px; }
.about-text p { color: var(--slate); margin-bottom: 16px; }
.about-values { display: flex; flex-direction: column; gap: 18px; }
.value-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.value-item h3 { color: var(--blue); margin-bottom: 8px; }
.value-item p { color: var(--slate); font-size: 0.92rem; }

.timeline { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; }
.timeline li { display: flex; gap: 28px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: none; }
.timeline-year { color: var(--blue); font-weight: 800; width: 70px; flex-shrink: 0; }
.timeline-text { color: var(--slate); }

.location-box { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: stretch; }
.map-embed { background: var(--gray2); border: 1px solid var(--border); border-radius: var(--radius); min-height: 280px; overflow: hidden; }
.map-embed.small { margin-top: 24px; min-height: 200px; }
.map-iframe { width: 100%; height: 100%; min-height: 280px; border: 0; display: block; }
.map-embed.small .map-iframe { min-height: 200px; }
.location-info { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.location-info strong { display: block; color: var(--navy); margin-bottom: 4px; }
.location-info p { color: var(--slate); font-size: 0.92rem; }

/* ===== Process ===== */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.process-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; }
.process-num { color: var(--blue); font-weight: 900; font-size: 1.4rem; }
.process-item h3 { margin: 10px 0 6px; }
.process-item p { color: var(--slate); font-size: 0.88rem; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.contact-info h2 { margin-bottom: 24px; }
.info-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 8px; }
.info-list li { display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.info-list strong { color: var(--blue); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.info-list span { color: var(--navy); }

.contact-form-wrap { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; box-shadow: 0 4px 24px -12px rgba(15,23,42,.12); }
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-size: 0.86rem; font-weight: 700; color: var(--slate); }
.form-row input, .form-row textarea {
  background: var(--gray1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--navy);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(14,165,233,.15); }
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 0.9rem; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }

/* ===== Footer ===== */
#footer { background: var(--navy); color: rgba(255,255,255,.6); border-top: 3px solid var(--blue); margin-top: auto; }
.footer-top { max-width: var(--container); margin: 0 auto; padding: 52px 24px 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.ft-brand .logo-texts .ko { color: #fff; font-size: 20px; }
.ft-brand .logo-texts .en { color: rgba(255,255,255,.35); letter-spacing: 2px; font-size: 9px; }
.ft-brand .ft-desc { margin-top: 14px; font-size: 13px; color: rgba(255,255,255,.5); }
.ft-brand .ft-info { margin-top: 18px; font-size: 12px; line-height: 2; }
.ft-brand .ft-info strong { display: block; font-size: 10px; font-weight: 700; letter-spacing: 2px; color: var(--blue); margin-bottom: 4px; }
.ft-col h4 { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.ft-col p { font-size: 12px; line-height: 2.1; }
.ft-col ul li { font-size: 12px; line-height: 2.4; }
.ft-col ul li a:hover { color: var(--blue); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); max-width: var(--container); margin: 0 auto; padding: 18px 24px; font-size: 11px; opacity: .4; }

.top-btn { position: fixed; right: 24px; bottom: 32px; width: 44px; height: 44px; background: var(--blue); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .3s; border: none; z-index: 900; box-shadow: 0 4px 20px rgba(14,165,233,.4); }
.top-btn.show { opacity: 1; pointer-events: all; }
.top-btn:hover { background: var(--navy2); }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid, .location-box { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .stat-item:nth-child(3)::before { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  #gnb { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; background: var(--white); border-top: 1px solid var(--border); padding: 8px 0 16px; gap: 0; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
  #gnb.open { display: flex; }
  #gnb > li > a { border-radius: 0; padding: 13px 24px; font-size: 15px; }
  .nav-cta { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; padding: 40px 24px 28px; }
  .stat-item:nth-child(2)::before { display: none; }
}
