﻿/* ============================================================
   2MEGABOLT — 공통 스타일
   ============================================================ */

:root {
  --bg:          #070A12;
  --bg-2:        #0C111E;
  --surface:     #111828;
  --surface-2:   #18203352;
  --line:        #1E2839;
  --line-soft:   #172032;

  --text:        #E8EDF7;
  --text-dim:    #9BA8BF;
  --text-faint:  #64718A;

  --blue:        #55A8FF;
  --blue-deep:   #2B5FC4;
  --blue-glow:   #55a8ff26;

  --radius:      14px;
  --radius-lg:   20px;
  --maxw:        1180px;

  --ease:        cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard', 'Pretendard Variable', -apple-system, BlinkMacSystemFont,
               'Segoe UI', 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--blue); color: #05080F; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 헤더 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: #070a12d9;
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  font-size: 16px;
  margin-right: auto;
}
.brand img { width: 32px; height: 32px; }
.brand span b { color: var(--blue); font-weight: 800; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 14.5px;
  color: var(--text-dim);
  font-weight: 500;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--blue); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s, background .2s, border-color .2s;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #04070E;
  box-shadow: 0 6px 24px -8px #55a8ff9e;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -8px #55a8ffb8; }
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
}

/* ---------- 히어로 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 12vw, 132px) 0 clamp(64px, 9vw, 104px);
}
.hero::before {
  content: '';
  position: absolute;
  top: -320px; left: 50%;
  width: 1100px; height: 760px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, #2b5fc44d 0%, transparent 66%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 0%, transparent 75%);
  opacity: .55;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--text-dim);
  font-weight: 600;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-glow);
}

.hero h1 {
  margin: 26px 0 0;
  font-size: clamp(34px, 6.2vw, 62px);
  line-height: 1.22;
  letter-spacing: -.025em;
  font-weight: 800;
  max-width: 16em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--blue) 10%, #A9D2FF 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  margin: 22px 0 0;
  max-width: 40em;
  font-size: clamp(15.5px, 1.9vw, 18px);
  color: var(--text-dim);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* ---------- 섹션 ---------- */

section { padding: clamp(64px, 9vw, 104px) 0; }
section.alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }

.sec-head { max-width: 46em; margin-bottom: 46px; }
.sec-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--blue);
  text-transform: uppercase;
}
.sec-head h2 {
  margin: 12px 0 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -.02em;
  font-weight: 800;
  line-height: 1.3;
}
.sec-head p {
  margin: 14px 0 0;
  color: var(--text-dim);
  font-size: 15.5px;
}

/* ---------- 서비스 ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.svc {
  padding: 26px 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, #0d1322 100%);
  transition: border-color .25s, transform .25s var(--ease);
}
.svc:hover { border-color: #315a9e; transform: translateY(-3px); }
.svc .ico {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--blue-glow);
  border: 1px solid #55a8ff33;
  margin-bottom: 16px;
}
.svc .ico svg { width: 21px; height: 21px; stroke: var(--blue); fill: none; stroke-width: 1.7; }
.svc h3 { margin: 0 0 8px; font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.svc p { margin: 0; font-size: 14px; color: var(--text-dim); line-height: 1.65; }

/* ---------- 갤러리 ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: .2s;
}
.chip:hover { color: var(--text); border-color: #2c3b53; }
.chip.on {
  background: var(--blue);
  border-color: var(--blue);
  color: #05080F;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  padding: 0;
  font-family: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color .25s, transform .3s var(--ease), box-shadow .3s;
  animation: rise .45s var(--ease) both;
}
.card:hover {
  border-color: #3c6cb4;
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px #000, 0 0 0 1px #3c6cb433;
}
.card:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* 썸네일은 원본 비율을 유지한 채 전체가 보이도록 합니다(crop 없음).
   16:10보다 넓거나 좁은 이미지는 위아래 / 좌우에 여백이 생깁니다. */
.card .thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  padding: 10px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, #16203358 0%, transparent 70%),
    #0A0F1B;
  border-bottom: 1px solid var(--line-soft);
}
.card .thumb img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .5s var(--ease);
}
.card:hover .thumb img { transform: scale(1.04); }
.card .year {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: #070a12b8;
  backdrop-filter: blur(6px);
  border: 1px solid #ffffff1f;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
}
.card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .client { font-size: 12px; color: var(--blue); font-weight: 700; letter-spacing: .01em; }
.card h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.4; }
.card p { margin: 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; }
.card .tags span {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-faint);
}

/* ---------- 모달 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #04070ee0;
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-box {
  width: min(760px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transform: translateY(16px) scale(.985);
  transition: transform .3s var(--ease);
}
.modal.open .modal-box { transform: none; }
/* 원본 비율 그대로 축소해서 보여줍니다(crop 없음). */
.modal-box .hero-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 54vh;
  object-fit: contain;
  padding: 14px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, #16203358 0%, transparent 70%),
    #0A0F1B;
  border-bottom: 1px solid var(--line);
}
.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #070a12cc;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.modal-body { padding: 26px 30px 32px; }
.modal-body h3 { margin: 8px 0 0; font-size: clamp(20px, 3vw, 26px); letter-spacing: -.02em; }
.modal-body .client { color: var(--blue); font-size: 13px; font-weight: 700; }
.modal-body .desc { color: var(--text-dim); font-size: 15px; margin: 16px 0 0; }
.meta { display: grid; gap: 14px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.meta dl { display: grid; grid-template-columns: 88px 1fr; gap: 10px 16px; margin: 0; align-items: start; }
.meta dt { font-size: 12.5px; color: var(--text-faint); font-weight: 700; letter-spacing: .04em; padding-top: 3px; }
.meta dd { margin: 0; font-size: 14.5px; }
.meta .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.meta .tags span {
  font-size: 12px; padding: 4px 10px; border-radius: 7px;
  background: var(--blue-glow); border: 1px solid #55a8ff2e; color: #9ccbff;
}

/* ---------- CTA ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(38px, 6vw, 62px);
  background: linear-gradient(135deg, #10192E 0%, #0A0F1C 60%);
  text-align: center;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -180px; left: 50%;
  width: 620px; height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, #2b5fc459 0%, transparent 70%);
}
.cta-band > * { position: relative; }
.cta-band h2 { margin: 0; font-size: clamp(24px, 3.6vw, 34px); letter-spacing: -.02em; }
.cta-band p { color: var(--text-dim); margin: 14px 0 28px; }

/* ---------- 푸터 ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 52px 0 40px;
  background: var(--bg-2);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}
.foot-grid h4 {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--text-faint);
  text-transform: uppercase;
  font-weight: 800;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14px; }
.foot-grid a { color: var(--text-dim); }
.foot-grid a:hover { color: var(--blue); }
.foot-grid p { margin: 0; font-size: 14px; color: var(--text-dim); }
.foot-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- CONTACT ---------- */

.page-head {
  padding: clamp(56px, 8vw, 88px) 0 clamp(34px, 5vw, 52px);
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: '';
  position: absolute;
  top: -260px; left: 20%;
  width: 760px; height: 560px;
  background: radial-gradient(ellipse at center, #2b5fc440 0%, transparent 68%);
  pointer-events: none;
}
.page-head .wrap { position: relative; }
.page-head h1 {
  margin: 18px 0 0;
  font-size: clamp(32px, 5.4vw, 52px);
  letter-spacing: -.025em;
  font-weight: 800;
}
.page-head p { margin: 16px 0 0; color: var(--text-dim); max-width: 34em; font-size: 16px; }

.contact-single {
  display: grid;
  gap: 20px;
  max-width: 720px;
  padding-bottom: clamp(64px, 9vw, 104px);
}

/* 이메일 카드 */
.mail-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #121B30 0%, #0A0F1C 65%);
  padding: clamp(32px, 5vw, 46px) clamp(26px, 4vw, 40px);
  text-align: center;
}
.mail-card::before {
  content: '';
  position: absolute;
  top: -190px; left: 50%;
  width: 560px; height: 380px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, #2b5fc44d 0%, transparent 70%);
  pointer-events: none;
}
.mail-card > * { position: relative; }
.mail-card .ico {
  width: 52px; height: 52px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--blue-glow);
  border: 1px solid #55a8ff3d;
}
.mail-card .ico svg { width: 24px; height: 24px; stroke: var(--blue); fill: none; stroke-width: 1.7; }
.mail-card h4 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 800;
}
.mail-link {
  display: inline-block;
  font-size: clamp(20px, 3.6vw, 30px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  word-break: break-all;
}
.mail-link:hover { color: var(--blue); border-bottom-color: var(--blue); }
.mail-note {
  margin: 20px auto 24px;
  max-width: 30em;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.75;
}
.mail-note strong { color: var(--text); font-weight: 600; }
.copy-done {
  display: inline-block;
  margin-left: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .25s, transform .25s;
}
.copy-done.show { opacity: 1; transform: none; }

.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 30px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 26px 22px;
}
.info-row { display: flex; gap: 15px; align-items: flex-start; }
.info-row .ico {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--blue-glow);
  border: 1px solid #55a8ff33;
}
.info-row .ico svg { width: 19px; height: 19px; stroke: var(--blue); fill: none; stroke-width: 1.7; }
.info-row h4 { margin: 0 0 3px; font-size: 12px; letter-spacing: .1em; color: var(--text-faint); text-transform: uppercase; font-weight: 800; }
.info-row p, .info-row a { margin: 0; font-size: 15px; color: var(--text); }
.info-row a:hover { color: var(--blue); }

/* ---------- 진입 애니메이션 ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 반응형 ---------- */

@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 18px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 15px; }
  .nav .btn { display: none; }
  .gallery { grid-template-columns: 1fr; }
  .meta dl { grid-template-columns: 1fr; gap: 4px; }
  .modal { padding: 0; }
  .modal-box { max-height: 100vh; height: 100%; border-radius: 0; border: none; }
}

@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; }
  .wrap { padding: 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
