/* ==========================================================================
   GUARDLAB Landing — style.css
   Reference: imweb.me (레이아웃/인터랙션 패턴) — 배색·타이포는 GUARDLAB 브랜드 기준
   ========================================================================== */

:root {
  --black: #0a0a0b;
  --black-soft: #141416;
  --ink: #1c1c1f;
  --gray-900: #232326;
  --gray-700: #4a4a52;
  --gray-500: #82828c;
  --gray-300: #c7c7cf;
  --gray-100: #f1f1f3;
  --white: #ffffff;
  --accent: #ff5a1f;
  --accent-dark: #e2440c;
  --accent-soft: #fff1ea;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --shadow-soft: 0 20px 60px rgba(10, 10, 11, 0.08);
  --shadow-hard: 0 30px 80px rgba(10, 10, 11, 0.35);
  --container: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* apply-theme.js 가 theme.config.js 값으로 이 변수를 덮어씀 */
  --font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

/* ---------- Logo (실제 브랜드 파일: assets/guardlab-logo.jpg — 블랙 배지형이라 명암 배경 어디서든 그대로 사용) ---------- */
.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.logo-mark .logo-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(10,10,11,0.06);
}
.logo-mark .logo-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-mark .logo-text {
  font-size: 17px;
  font-weight: 800;
  color: var(--black);
  line-height: 1;
  letter-spacing: -0.01em;
}
.logo-mark.on-dark .logo-text { color: var(--white); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(10,10,11,0.06);
  padding: 12px 0;
}
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-700);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--black); }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 100px;
  border: none;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-2px); }

.nav-burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  align-items: center;
  justify-content: center;
}
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  content: "";
  display: block;
  width: 18px; height: 2px;
  background: var(--black);
  position: relative;
  transition: all 0.25s;
}
.nav-burger span::before { position: absolute; top: -6px; }
.nav-burger span::after { position: absolute; top: 6px; }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
  gap: 28px;
  transform: translateY(-100%);
  transition: transform 0.4s var(--ease);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { font-size: 28px; font-weight: 800; }
.mobile-menu .mm-close {
  position: absolute; top: 24px; right: 32px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 168px 0 120px;
  background:
    radial-gradient(80% 60% at 85% -10%, rgba(255,90,31,0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
  overflow: hidden;
}
.hero-stripe {
  position: absolute;
  top: 0; right: -10%;
  width: 55%; height: 100%;
  background: repeating-linear-gradient(135deg, var(--black) 0 26px, var(--accent) 26px 52px);
  opacity: 0.035;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { max-width: 720px; }
.hero h1 {
  font-size: clamp(38px, 5.6vw, 68px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  color: var(--black);
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero p.lead {
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.7;
  color: var(--gray-700);
  max-width: 560px;
  margin: 0 0 40px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 64px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.btn-primary { background: var(--black); color: var(--white); }
.btn-primary:hover { background: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.btn-ghost { background: transparent; color: var(--black); border: 1.5px solid var(--gray-300); }
.btn-ghost:hover { border-color: var(--black); transform: translateY(-3px); }
.btn-light { background: var(--white); color: var(--black); }
.btn-light:hover { background: var(--accent); color: var(--white); transform: translateY(-3px); }

.hero-floaters {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.floater {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-soft);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  animation: floaty 5s ease-in-out infinite;
}
.floater:nth-child(2) { animation-delay: 0.6s; }
.floater:nth-child(3) { animation-delay: 1.2s; }
.floater .fdot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- Section shared ---------- */
section { padding: 120px 0; }
.section-head { max-width: 640px; margin: 0 0 64px; }
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 16px;
  color: var(--black);
}
.section-head p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-700);
  margin: 0;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* JS 미실행 환경(정적 스냅샷 등)에서도 콘텐츠가 항상 보이도록, 애니메이션은 .js 클래스가 붙었을 때만 적용 */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Business / feature cards ---------- */
.biz { background: var(--white); }
.biz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.biz-card {
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}
.biz-card:hover {
  background: var(--black);
  transform: translateY(-8px);
  box-shadow: var(--shadow-hard);
}
.biz-card:hover .biz-tag { background: var(--accent); color: var(--white); }
.biz-card:hover h3,
.biz-card:hover p,
.biz-card:hover .biz-icon svg { color: var(--white); }
.biz-card:hover .biz-icon svg path,
.biz-card:hover .biz-icon svg rect,
.biz-card:hover .biz-icon svg circle { stroke: var(--white); }
.biz-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
  transition: all 0.35s var(--ease);
}
.biz-icon { margin-bottom: 20px; }
.biz-icon svg { width: 44px; height: 44px; }
.biz-icon svg path, .biz-icon svg rect, .biz-icon svg circle {
  stroke: var(--black);
  transition: stroke 0.35s var(--ease);
}
.biz-card h3 {
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--black);
  transition: color 0.35s var(--ease);
}
.biz-card p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--gray-700);
  margin: 0;
  transition: color 0.35s var(--ease);
}

/* ---------- Why (3-column, imweb "쉬워요" pattern) ---------- */
.why { background: var(--gray-100); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.why-item { text-align: left; }
.why-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  display: block;
}
.why-item h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--black);
}
.why-item p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--gray-700);
  margin: 0;
}

/* ---------- Stats ---------- */
.stats {
  background: var(--black);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.stats::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0 40px, rgba(255,90,31,0.06) 40px 42px);
}
.stats .container { position: relative; z-index: 1; }
.stats .section-head h2, .stats .section-head p { color: var(--white); }
.stats .section-head p { color: var(--gray-300); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat-card {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  background: rgba(255,255,255,0.03);
}
.stat-num {
  font-size: clamp(32px, 3.2vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--white);
  margin-bottom: 10px;
}
.stat-num .unit { font-size: 20px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 14px; color: var(--gray-300); line-height: 1.6; }

/* ---------- Gallery / 시공사례 ---------- */
.gallery { background: var(--white); }
.gallery-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.gtab {
  padding: 10px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--gray-300);
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  background: transparent;
  transition: all 0.2s;
}
.gtab.active, .gtab:hover { border-color: var(--black); background: var(--black); color: var(--white); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.gcard {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--gray-100);
  aspect-ratio: 4 / 5;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.gcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.gcard .gcard-visual {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--gray-100), #e7e7ea);
}
.gcard .gcard-visual svg { width: 46%; height: 46%; opacity: 0.9; }
.gcard .gcard-visual img { width: 100%; height: 100%; object-fit: cover; }
.gcard .gcard-visual svg path, .gcard .gcard-visual svg rect, .gcard .gcard-visual svg circle, .gcard .gcard-visual svg polyline {
  stroke: var(--gray-700);
}
.gcard-body {
  position: relative;
  z-index: 1;
  background: linear-gradient(0deg, rgba(10,10,11,0.82), rgba(10,10,11,0));
  padding: 20px 16px 16px;
}
.gcard-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 6px;
}
.gcard-title { font-size: 14px; font-weight: 700; color: var(--white); line-height: 1.4; }

/* 카드는 이제 눌러서 상세로 들어가는 링크다 (전에는 그냥 그림이었다) */
.gcard { text-decoration: none; color: inherit; }
.gcard-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: rgba(10,10,11,0.75); color: var(--white);
  font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 100px;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.gcard-badge svg { width: 12px; height: 12px; flex-shrink: 0; }

/* 목록을 불러오는 동안, 또는 비어 있을 때 자리를 지키는 글 */
.grid-loading {
  grid-column: 1 / -1;
  padding: 56px 0;
  text-align: center;
  color: var(--gray-500);
  font-size: 15px;
}
.gallery-more { text-align: center; margin-top: 32px; }

/* ---------- CTA ---------- */
.cta {
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-lg);
  margin: 0 32px;
  padding: 80px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-wrap { max-width: var(--container); margin: 0 auto; padding: 60px 0; }
.cta::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 100% at 50% 0%, rgba(255,90,31,0.18), transparent 70%);
}
.cta > * { position: relative; z-index: 1; }
.cta h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.cta p { font-size: 16px; color: var(--gray-300); margin: 0 0 36px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-contact {
  margin-top: 32px;
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--gray-300);
}
.cta-contact strong { color: var(--white); }

/* ---------- Footer ---------- */
footer { background: var(--white); border-top: 1px solid var(--gray-100); padding: 56px 0 40px; }
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; font-weight: 700; color: var(--gray-700); }
.footer-links a:hover { color: var(--black); }
.footer-info {
  font-size: 13px;
  line-height: 2;
  color: var(--gray-500);
}
.footer-info b { color: var(--gray-700); font-weight: 600; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-100);
  font-size: 12.5px;
  color: var(--gray-500);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .biz-grid, .why-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .cta { margin: 0 16px; padding: 56px 24px; }
}
@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .hero { padding: 132px 0 80px; }
  .biz-grid, .why-grid, .stats-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 80px 0; }
  .footer-top { flex-direction: column; }
}
