/* Common GNB/Footer styles */

:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-card2: #161616;
  --bg-card3: #fff;
  --brand: #e0004d;
  --brand-glow: rgba(224, 0, 77, 0.25);
  --brand-dim: rgba(224, 0, 77, 0.12);
  --brand-dim2: rgba(224, 0, 77, 0.06);
  --text: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #505050;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(224, 0, 77, 0.5);
  --radius: 12px;
  --radius-sm: 8px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
img,
svg,
video,
canvas {
  max-width: 100%;
}

html {
  scrollbar-gutter: stable;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge legacy */
}

/* Webkit (Chrome/Safari/Edge) — 페이지 + 모든 내부 overflow 컨테이너 스크롤바 숨김 */
*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
* {
  scrollbar-width: none; /* Firefox: 모든 요소 */
}

body {
  word-break: keep-all;
  overflow-wrap: break-word;
}

#site-gnb,
#site-footer {
  display: contents;
}

#navbar {
  width: 100%;
  height: 72px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

#navbar .nav-logo a,
footer .footer-logo a {
  display: inline-flex;
  align-items: center;
}

#navbar .nav-logo img {
  height: 28px;
  display: block;
  transform: translateY(3px);
}

#navbar .nav-right-group,
#navbar .nav-links-right,
#navbar .nav-actions {
  display: flex;
  align-items: center;
}

#navbar .nav-right-group {
  gap: 30px;
}
#navbar .nav-links-right {
  gap: 30px;
}

#navbar .nav-hamburger {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-right: 4px;
}
#navbar .nav-hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.55);
  transition:
    transform 0.25s ease,
    opacity 0.2s ease,
    background 0.2s ease;
  transform-origin: center;
}
#navbar .nav-hamburger:hover .nav-hamburger-line,
#navbar .nav-hamburger[aria-expanded='true'] .nav-hamburger-line {
  background: rgba(255, 255, 255, 0.85);
}
#navbar .nav-hamburger[aria-expanded='true'] .nav-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#navbar .nav-hamburger[aria-expanded='true'] .nav-hamburger-line:nth-child(2) {
  opacity: 0;
}
#navbar .nav-hamburger[aria-expanded='true'] .nav-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
#navbar .nav-actions {
  gap: 12px;
}
#navbar .nav-links-right > a,
#navbar .services-toggle {
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}
#navbar .nav-links-right > a:hover,
#navbar .services-toggle:hover,
#navbar a.active,
#navbar a[aria-current='page'] {
  color: var(--text);
}
#navbar .services-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}
#navbar .services-menu {
  display: block;
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  min-width: 220px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(17, 17, 17, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}
#navbar .services-dropdown.open .services-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
#navbar .services-menu a {
  display: block;
  padding: 11px 12px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
}
#navbar .services-menu a:hover,
#navbar .services-menu a.active,
#navbar .services-menu a[aria-current='page'] {
  color: var(--text);
  background: var(--brand-dim);
}

#navbar .nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(224, 0, 77, 0.24);
}

#navbar .nav-cta:hover {
  opacity: 0.9;
}

/* ─── Mobile navbar — 햄버거 드로어 메뉴 (≤767, ≤480) ─────────────── */
@media (max-width: 767px) {
  #navbar {
    padding: 0 20px;
  }
  #navbar .nav-right-group {
    display: flex;
    align-items: center;
    gap: 0;
  }
  #navbar .nav-hamburger {
    display: flex;
  }

  /* 드롭다운 드로어: nav 하단에서 unfold (max-height 트랜지션) */
  #navbar .nav-links-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
      max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.25s ease,
      padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 90;
  }

  body.menu-open #navbar .nav-links-right {
    max-height: calc(100vh - 64px);
    padding: 16px 24px 24px;
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
  }

  #navbar .nav-links-right .services-dropdown {
    display: block;
    position: relative;
    width: 100%;
  }

  #navbar .nav-links-right > a,
  #navbar .nav-links-right .services-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 4px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.92);
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    text-align: left;
    text-decoration: none;
  }

  #navbar .nav-links-right .services-toggle .lang-arrow {
    transition: transform 0.2s ease;
  }
  #navbar .nav-links-right .services-dropdown.open .services-toggle .lang-arrow {
    transform: rotate(180deg);
  }

  #navbar .nav-links-right .services-menu {
    display: none;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-width: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    width: 100%;
  }
  #navbar .nav-links-right .services-dropdown.open .services-menu {
    display: flex;
    flex-direction: column;
    padding: 4px 0 12px 12px;
  }
  #navbar .nav-links-right .services-menu a {
    padding: 12px 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    border: 0;
  }

  #navbar .nav-links-right .nav-actions {
    display: flex;
    width: 100%;
    margin-top: 24px;
  }
  #navbar .nav-links-right .nav-cta {
    width: 100%;
    height: 52px;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 600;
    background: var(--brand);
    color: var(--text);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 0;
    border-bottom: 0;
  }

  body.menu-open {
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  #navbar {
    padding: 0 16px;
  }
  #navbar .nav-logo img {
    height: 22px;
  }
}

/* Autofill 흰색 배경 강제 덮어쓰기 (Chrome/Edge UA 대응) */
.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover,
.contact-form input:-webkit-autofill:focus,
.contact-form input:-webkit-autofill:active,
.contact-form textarea:-webkit-autofill,
#cta .contact-form input:-webkit-autofill,
#cta .contact-form input:-webkit-autofill:hover,
#cta .contact-form input:-webkit-autofill:focus,
#cta .contact-form input:-webkit-autofill:active,
#cta .contact-form textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text) !important;
  box-shadow: 0 0 0 1000px #090909 inset !important;
  caret-color: var(--text) !important;
  -webkit-transition: background-color 600000s ease-in-out 0s !important;
  transition: background-color 600000s ease-in-out 0s !important;
}

/* 제출 후 안내 블록 */
.form-submitted {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px;
  gap: 10px;
}
.form-success-icon {
  color: #22c55e;
  flex-shrink: 0;
}
.form-submitted-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 6px 0 0;
}
.form-submitted-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}
.form-resubmit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  margin-top: 14px;
  padding: 0 24px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition:
    opacity 0.2s,
    box-shadow 0.2s;
}
.form-resubmit:hover {
  opacity: 0.92;
  box-shadow: 0 0 24px rgba(224, 0, 77, 0.22);
}

footer {
  padding: 40px 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #050505;
  box-sizing: border-box;
}

footer .footer-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

footer .footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

footer .footer-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.footer-logo img {
  height: 32px;
  opacity: 0.8;
  margin-bottom: 18px;
}

.footer-logo img:hover {
  opacity: 1;
}

footer .footer-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 13px;
}

@media (min-width: 1024px) {
  #clients .section-header,
  #clients .logo-marquee-wrap,
  #clients .clients-track-wrap {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ─── Clients showcase (서비스 페이지 공통)
   다크 bg + border는 ::before로 full-bleed (100vw 트릭) ─── */
.clients-showcase {
  position: relative;
  isolation: isolate;
}
.clients-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  background: var(--bg-card);
  border-top: 1px solid rgba(224, 0, 77, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: -1;
  pointer-events: none;
}
.clients-showcase__dots {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: -1;
}
.clients-showcase__glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 200px;
  background: radial-gradient(
    ellipse 60% 100% at 50% 0%,
    rgba(224, 0, 77, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}
.clients-showcase > .section-header {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto 40px;
}
.clients-showcase > .logo-marquee-wrap,
.clients-showcase > .clients-track-wrap {
  position: relative;
  z-index: 1;
}
/* ≥1024: marquee를 1200 컨테이너 안에 정렬 (≤1023은 full-bleed) */
@media (min-width: 1024px) {
  .clients-showcase > .logo-marquee-wrap,
  .clients-showcase > .clients-track-wrap {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 767px) {
  /* mobile padding은 mobile-fixes의 section 룰이 처리 */
  .clients-showcase > .section-header {
    margin-bottom: 28px;
  }
}

/* Service clients logo marquee */
.logo-marquee-wrap {
  overflow: hidden;
  margin-top: 48px;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  mask-image: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
}

.logo-marquee {
  display: flex;
  gap: 0;
  width: -moz-max-content;
  width: max-content;
  will-change: transform;
}

@media (max-width: 1023px) {
  .logo-marquee-wrap,
  .clients-track-wrap {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
  }
}

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 155px;
  height: 80px;
  padding: 20px 28px;
  flex-shrink: 0;
  background: var(--bg-card3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  margin: 0 8px;
  opacity: 1;
  transition:
    border-color 0.3s,
    transform 0.2s,
    box-shadow 0.2s;
}

.logo-item:hover {
  transform: translateY(-1px);
  border-color: var(--brand-glow);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.logo-item img {
  max-width: 130px;
  max-height: 42px;
  width: auto;
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
}

@media (max-width: 767px) {
  #navbar {
    height: 64px;
  }
  #navbar .nav-logo img {
    height: 24px;
  }
  footer {
    padding: 32px 24px;
  }
  footer .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  footer .footer-right {
    align-items: flex-start;
  }
}

/* ─── 공용 CTA 섹션 (서비스 페이지 #cta) ─── */
section:has(.cta-bg) {
  padding: 120px 48px;
  position: relative;
}
section:has(.cta-bg) .section-label {
  margin: 0 auto 24px;
}
section:has(.cta-bg) .btn-primary {
  font-size: 16px;
  padding: 16px 32px;
}
.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Gradient text (inline-block으로 atomic wrap) ─── */
.gradient-text {
  display: inline-block;
  background: linear-gradient(135deg, #ff3366 0%, var(--brand) 50%, #cc0044 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── 섹션 타이포그래피 ─── */
.section-heading {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
  width: 100%;
  margin-bottom: 40px;
}
.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.85;
  text-wrap: pretty;
  max-width: 700px;
  margin-bottom: 0;
}
@media (max-width: 767px) {
  .section-heading {
    font-size: clamp(22px, 6vw, 30px);
    margin-bottom: 28px;
  }
  .section-desc {
    font-size: 15px;
    line-height: 1.7;
  }
}

/* ─── Custom select ─── */
.custom-select {
  position: relative;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  font-weight: 400;
  padding-right: 40px;
  position: relative;
}
.custom-select-trigger::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 12px;
  height: 8px;
  margin-top: -4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23A0A0A0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform 0.2s ease;
  pointer-events: none;
}
.custom-select.open .custom-select-trigger::after {
  transform: rotate(180deg);
}
.custom-select-label {
  color: rgba(255, 255, 255, 0.28);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-select.has-value .custom-select-label {
  color: var(--text);
}
.custom-select-options {
  list-style: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  max-height: 280px;
  overflow-y: auto;
  z-index: 20;
}
.custom-select-options li {
  padding: 10px 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.custom-select-options li:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.custom-select-options li[aria-selected='true'] {
  background: var(--brand-dim);
  color: var(--brand);
}
.custom-select.invalid .custom-select-trigger {
  border-color: rgba(224, 0, 77, 0.6);
}

/* ─── Floating to-top button ─────────────────────── */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
  z-index: 100;
}
.to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.to-top:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(28, 28, 28, 0.92);
}
