/* MAXWAY 공통 커스텀 스타일 — Tailwind 유틸리티로 표현하기 어려운 상태전환/애니메이션만 정의 */

html {
  scroll-behavior: smooth;
}

body.is-home {
  padding-top: 0;
}

body:not(.is-home) {
  padding-top: 72px;
}

/* ---------- Header ---------- */
.mw-header {
  height: 72px;
  transition: background-color 200ms ease, box-shadow 200ms ease, color 200ms ease, border-color 200ms ease;
  border-bottom: 1px solid transparent;
}

.mw-header-transparent {
  background-color: rgba(16, 24, 32, 0.22);
  color: #ffffff;
}

.mw-header-transparent .mw-nav-link {
  color: rgba(255, 255, 255, 0.86);
}

.mw-header-transparent .mw-nav-link:hover,
.mw-header-transparent .mw-nav-link.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.mw-header-transparent .mw-nav-toggle {
  color: #ffffff;
}

.mw-header-solid,
.mw-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.97);
  color: #101820;
  box-shadow: 0 8px 30px rgba(24, 34, 43, 0.08);
  backdrop-filter: blur(14px);
  border-bottom-color: #dbe5ec;
}

.mw-header-solid .mw-nav-link,
.mw-header.is-scrolled .mw-nav-link {
  color: #34404c;
}

.mw-header-solid .mw-nav-link:hover,
.mw-header-solid .mw-nav-link.is-active,
.mw-header.is-scrolled .mw-nav-link:hover,
.mw-header.is-scrolled .mw-nav-link.is-active {
  background: #eaf3f8;
  color: #0e6ba8;
}

.mw-header-solid .mw-nav-toggle,
.mw-header.is-scrolled .mw-nav-toggle {
  color: #101820;
}

.mw-header.mw-menu-open {
  background-color: #ffffff;
  color: #101820;
  box-shadow: 0 8px 30px rgba(24, 34, 43, 0.08);
}

.mw-header.mw-menu-open .mw-nav-toggle {
  color: #101820;
}

.mw-mobile-nav.is-open {
  display: block;
}

/* ---------- Hero ---------- */
.mw-hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  display: grid;
  align-items: center;
}

.mw-hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  animation: mwHeroBreath 14s ease-in-out infinite alternate;
}

.mw-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 18, 28, 0.92), rgba(8, 18, 28, 0.62) 46%, rgba(8, 18, 28, 0.28)),
    linear-gradient(180deg, rgba(8, 18, 28, 0.2), rgba(8, 18, 28, 0.82));
}

.mw-hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 78%);
}

@keyframes mwHeroBreath {
  from { transform: scale(1.04); }
  to { transform: scale(1.09); }
}

.mw-signal {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 10px solid rgba(125, 225, 208, 0.25);
  background: #7de1d0;
  animation: mwPulse 1.8s ease-in-out infinite;
}

@keyframes mwPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(125, 225, 208, 0.35); }
  50% { box-shadow: 0 0 0 14px rgba(125, 225, 208, 0); }
}

/* ---------- Inner page header band ---------- */
.mw-page-header {
  position: relative;
  padding-top: 168px;
  padding-bottom: 72px;
  background: linear-gradient(120deg, #101820 0%, #16324a 100%);
  overflow: hidden;
}

.mw-page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, #000, transparent 92%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 92%);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Marquee ---------- */
.mw-marquee {
  overflow: hidden;
  white-space: nowrap;
}

.mw-marquee-track {
  display: inline-flex;
  gap: 3rem;
  animation: mwMarquee 22s linear infinite;
}

@keyframes mwMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Accordion ---------- */
.mw-accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 320ms ease;
}

.mw-accordion-item.is-open .mw-accordion-panel {
  max-height: 480px;
}

.mw-accordion-item.is-open .mw-accordion-icon {
  transform: rotate(45deg);
}

.mw-accordion-icon {
  transition: transform 220ms ease;
}

/* ---------- Business tab image ---------- */
.mw-business-item.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid #f0a72f;
  border-radius: 0.75rem;
  pointer-events: none;
}

/* ---------- Client logo ---------- */
.mw-client-logo {
  filter: grayscale(1);
  transition: filter 200ms ease, transform 200ms ease;
}

.mw-client-logo:hover {
  filter: grayscale(0);
  transform: scale(1.03);
}

/* ---------- Modal ---------- */
.mw-modal.is-open {
  display: flex;
}

body.mw-modal-open {
  overflow: hidden;
}

/* ---------- Scroll-to-top button ---------- */
.mw-scrolltop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Resource type dot ---------- */
.mw-dot-drawing { background: #0e6ba8; }
.mw-dot-manual  { background: #2f7d4b; }
.mw-dot-program { background: #d94635; }
.mw-dot-catalog { background: #f0a72f; }
.mw-dot-notice  { background: #101820; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
