/* ===================================================================
   pages.css — WellyWorks 다중 페이지(서비스·포트폴리오·문의) 전용 스타일
   site.css의 색상/타이포/글래스 언어를 상속하고, 홈의 스크롤 애니메이션에
   묶이지 않은 정적 레이아웃만 정의한다.
   =================================================================== */

body.subpage {
  position: relative;
  min-height: 100%;
  word-break: keep-all;
  overflow-wrap: normal;
  /* W마크 등 장식 요소가 뷰포트보다 넓어도 모바일에서 가로 스크롤·좌측 여백이
     생기지 않도록 가로 오버플로를 차단한다. (clip 미지원 브라우저는 hidden 폴백) */
  overflow-x: hidden;
  overflow-x: clip;
  background:
    radial-gradient(circle at 50% -8%, rgba(47, 102, 233, 0.2), transparent 46rem),
    radial-gradient(circle at 82% 30%, rgba(84, 123, 221, 0.1), transparent 34rem),
    radial-gradient(circle at 12% 68%, rgba(84, 190, 203, 0.07), transparent 30rem),
    linear-gradient(160deg, #071129 0%, #050b22 46%, #10102e 100%);
}

.page-main {
  position: relative;
  z-index: 1;
}

/* ---- 페이지 헤더 ---- */
.page-header {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(8.5rem, 15vw, 11.5rem) clamp(1.5rem, 6vw, 5.25rem) clamp(2.5rem, 5vw, 3.75rem);
  text-align: center;
  animation: page-enter 900ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(1.4rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-kicker {
  /* site.css의 광역 p { max-width: 34rem } 규칙이 키커를 왼쪽으로 밀어붙이는 것을 해제 */
  max-width: none;
  margin: 0 auto 1.2rem;
  color: rgba(218, 232, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-size: clamp(1.9rem, 4.6vw, 2.85rem);
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #f4f8ff;
  text-shadow: 0 0 3.5rem rgba(94, 152, 255, 0.28);
}

.page-subtitle {
  max-width: 42rem;
  margin: 1.5rem auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.85;
}

.page-header-compact {
  padding-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}

/* ---- 공통 섹션 래퍼 ---- */
.page-section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 6vw, 5.25rem) clamp(3.5rem, 8vw, 6rem);
}

.section-head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-kicker {
  margin: 0 0 0.8rem;
  color: rgba(218, 232, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 780;
  line-height: 1.4;
  color: #f4f8ff;
}

.section-lead {
  max-width: 40rem;
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.3vw, 1.12rem);
  line-height: 1.85;
}

/* ---- 서비스 카드: 홈 work-item의 글래스 레시피를 계승 ---- */
.service-list {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.85rem, 3vw, 2.6rem);
  border: 1px solid rgba(184, 225, 255, 0.24);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.015) 40%),
    radial-gradient(circle at 50% 0%, rgba(82, 166, 255, 0.16), transparent 62%),
    rgba(6, 15, 36, 0.82);
  box-shadow:
    0 1.4rem 2.4rem rgba(0, 0, 0, 0.32),
    0 0.2rem 0 rgba(255, 255, 255, 0.05) inset,
    0 -0.7rem 1.6rem rgba(0, 0, 0, 0.2) inset,
    0 0 2.6rem rgba(58, 138, 255, 0.12);
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.service-card:hover {
  border-color: rgba(184, 225, 255, 0.5);
  transform: translateY(-4px);
  box-shadow:
    0 1.8rem 3rem rgba(0, 0, 0, 0.38),
    0 0.2rem 0 rgba(255, 255, 255, 0.07) inset,
    0 -0.7rem 1.6rem rgba(0, 0, 0, 0.2) inset,
    0 0 3.4rem rgba(58, 138, 255, 0.24);
}

.service-card .service-num {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.85rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(143, 184, 255, 0.36);
  border-radius: 999px;
  color: #8fb8ff;
  background: rgba(47, 102, 233, 0.1);
  font-size: 0.8rem;
  font-weight: 780;
  letter-spacing: 0.1em;
}

.service-card h3 {
  margin: 1rem 0 0.8rem;
  color: transparent;
  background: linear-gradient(115deg, #4d8dff 0%, #55c8ff 48%, #9a7bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(1.28rem, 1.9vw, 1.52rem);
  font-weight: 650;
  line-height: 1.25;
}

.service-card > p {
  margin: 0;
  color: rgba(244, 248, 255, 0.76);
  line-height: 1.85;
}

.service-card ul {
  margin: 1.25rem 0 0;
  padding: 1.15rem 0 0;
  border-top: 1px solid rgba(213, 226, 255, 0.14);
  list-style: none;
}

.service-card li {
  position: relative;
  padding-left: 1.15rem;
  color: rgba(244, 248, 255, 0.82);
  line-height: 2;
  font-size: 0.96rem;
}

.service-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9em;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #55c8ff, #4d8dff);
  box-shadow: 0 0 0.55rem rgba(85, 200, 255, 0.55);
}

/* ---- 진행 방식(프로세스) ---- */
.process-list {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.process-step {
  position: relative;
  padding: clamp(1.6rem, 2.6vw, 2.1rem);
  border: 1px solid rgba(184, 225, 255, 0.18);
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01) 46%),
    rgba(6, 15, 36, 0.72);
  box-shadow:
    0 1rem 1.9rem rgba(0, 0, 0, 0.26),
    0 0.15rem 0 rgba(255, 255, 255, 0.04) inset;
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.process-step:hover {
  border-color: rgba(184, 225, 255, 0.42);
  transform: translateY(-3px);
  box-shadow:
    0 1.4rem 2.4rem rgba(0, 0, 0, 0.32),
    0 0.15rem 0 rgba(255, 255, 255, 0.06) inset,
    0 0 2.4rem rgba(58, 138, 255, 0.16);
}

.process-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(143, 184, 255, 0.42);
  color: #dcebff;
  background:
    radial-gradient(circle at 32% 26%, rgba(120, 190, 255, 0.4), transparent 60%),
    rgba(47, 102, 233, 0.18);
  box-shadow: 0 0 1.4rem rgba(70, 150, 255, 0.32);
  font-weight: 780;
  font-size: 1.05rem;
}

.process-step h4 {
  margin: 1.05rem 0 0.55rem;
  font-size: 1.14rem;
  font-weight: 750;
  color: #f4f8ff;
}

.process-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ---- 포트폴리오 페이지: 스크롤 리빌 해제 + 정적 그리드 ---- */
.pf-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
}

.pf-page .portfolio-card {
  opacity: 1;
  transform: none;
}

.pf-page .portfolio-card p {
  color: rgba(7, 17, 38, 0.66);
}

.pf-detail {
  margin: 0.85rem 0 0;
  color: rgba(7, 17, 38, 0.6);
  font-size: 0.92rem;
  line-height: 1.75;
}

@media (max-width: 720px) {
  .pf-page {
    grid-template-columns: 1fr;
  }
}

/* ---- 스크롤 순차 등장(스태거 리빌) ----
   site.js가 <html>에 js-reveal 클래스를 붙인 뒤 IntersectionObserver로
   [data-reveal]에 is-revealed를 부여한다. JS 미동작 시에는 항상 보인다. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 720ms cubic-bezier(0.19, 1, 0.22, 1), transform 720ms cubic-bezier(0.19, 1, 0.22, 1);
}

.js-reveal [data-reveal]:nth-child(2) { transition-delay: 150ms; }
.js-reveal [data-reveal]:nth-child(3) { transition-delay: 300ms; }
.js-reveal [data-reveal]:nth-child(4) { transition-delay: 450ms; }
.js-reveal [data-reveal]:nth-child(5) { transition-delay: 600ms; }
.js-reveal [data-reveal]:nth-child(6) { transition-delay: 750ms; }

.js-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .page-header {
    animation: none;
  }

  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- 자체 시스템 페이지: 대시보드 스크린샷 피처 블록 ---- */
.system-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 3.5vw, 3.25rem);
  align-items: center;
  padding: clamp(1.85rem, 3vw, 2.75rem);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid rgba(184, 225, 255, 0.22);
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01) 46%),
    radial-gradient(circle at 20% 0%, rgba(82, 166, 255, 0.12), transparent 46%),
    rgba(6, 15, 36, 0.8);
  box-shadow:
    0 1.6rem 2.8rem rgba(0, 0, 0, 0.34),
    0 0.2rem 0 rgba(255, 255, 255, 0.05) inset,
    0 0 3rem rgba(58, 138, 255, 0.12);
}

.system-block.reverse .system-shot { order: 2; }
.system-block.reverse .system-meta { order: 1; }

/* 라이트 대시보드 캡처를 다크 배경 위에 브라우저 프레임으로 감싼다 */
.system-shot {
  border: 1px solid rgba(184, 225, 255, 0.3);
  border-radius: 12px;
  overflow: hidden;
  background: #0b1230;
  box-shadow:
    0 1.4rem 2.8rem rgba(0, 0, 0, 0.45),
    0 0 2.6rem rgba(70, 150, 255, 0.22);
}

.system-shot .shot-bar {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.62rem 0.85rem;
  background: rgba(10, 17, 40, 0.96);
  border-bottom: 1px solid rgba(184, 225, 255, 0.14);
}

.system-shot .shot-bar span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(143, 184, 255, 0.32);
}

.system-shot .shot-bar span:first-child { background: rgba(255, 122, 122, 0.55); }
.system-shot .shot-bar span:nth-child(2) { background: rgba(255, 205, 122, 0.55); }
.system-shot .shot-bar span:nth-child(3) { background: rgba(126, 224, 158, 0.55); }

.system-shot-viewport {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #f5f6f8;
}

.system-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.system-meta .system-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.85rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(143, 184, 255, 0.36);
  border-radius: 999px;
  color: #8fb8ff;
  background: rgba(47, 102, 233, 0.1);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-meta h2 {
  margin: 1rem 0 0.8rem;
  color: transparent;
  background: linear-gradient(115deg, #4d8dff 0%, #55c8ff 48%, #9a7bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(1.38rem, 2.3vw, 1.78rem);
  font-weight: 650;
  line-height: 1.3;
}

.system-meta > p {
  margin: 0;
  color: rgba(244, 248, 255, 0.78);
  line-height: 1.85;
}

.system-meta ul {
  margin: 1.2rem 0 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid rgba(213, 226, 255, 0.14);
  list-style: none;
}

.system-meta li {
  position: relative;
  padding-left: 1.15rem;
  color: rgba(244, 248, 255, 0.82);
  line-height: 2;
  font-size: 0.96rem;
}

.system-meta li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9em;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #55c8ff, #4d8dff);
  box-shadow: 0 0 0.55rem rgba(85, 200, 255, 0.55);
}

@media (max-width: 900px) {
  .system-block {
    grid-template-columns: 1fr;
  }

  .system-block.reverse .system-shot { order: 1; }
  .system-block.reverse .system-meta { order: 2; }
}

/* ---- CTA 밴드: 홈 final-cta의 W 마크 무드를 압축 재현 ---- */
.cta-band {
  position: relative;
  max-width: 72rem;
  margin: 0 auto clamp(4rem, 8vw, 6rem);
  padding: clamp(3rem, 6vw, 4.75rem) clamp(1.75rem, 5vw, 4rem);
  border: 1px solid rgba(184, 225, 255, 0.22);
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  background:
    radial-gradient(circle at 74% 18%, rgba(84, 123, 221, 0.26), transparent 24rem),
    radial-gradient(circle at 14% 88%, rgba(84, 190, 203, 0.12), transparent 22rem),
    linear-gradient(140deg, #060d20 0%, #081130 54%, #17103a 100%);
  box-shadow:
    0 1.8rem 3.2rem rgba(0, 0, 0, 0.36),
    0 0.2rem 0 rgba(255, 255, 255, 0.05) inset,
    0 0 3.2rem rgba(58, 138, 255, 0.14);
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: -30% -18% -34% -10%;
  z-index: 0;
  background-image: url("../welly-mark.png");
  background-repeat: no-repeat;
  background-position: 54% 46%;
  background-size: min(64rem, 96vw) auto;
  opacity: 0.22;
  transform: rotate(-0.8deg);
  filter: brightness(0.88) saturate(1.05) drop-shadow(0 0 2.6rem rgba(110, 170, 255, 0.2));
  pointer-events: none;
}

.cta-band > * {
  position: relative;
  z-index: 1;
}

.cta-band h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 780;
  color: #f4f8ff;
  text-shadow: 0 0 2.8rem rgba(94, 152, 255, 0.4);
}

.cta-band p {
  max-width: 34rem;
  margin: 1rem auto 1.9rem;
  color: var(--muted);
  line-height: 1.8;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  min-width: 11.5rem;
  padding: 0 1.7rem;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 720;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.cta-button.primary {
  color: #061024;
  background: #eef5ff;
  border: 1px solid #eef5ff;
  box-shadow: 0 0.9rem 2rem rgba(8, 20, 46, 0.4);
}

.cta-button.primary:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 1.2rem 2.6rem rgba(8, 20, 46, 0.5), 0 0 2rem rgba(148, 196, 255, 0.35);
}

.cta-button.ghost {
  color: #eef5ff;
  border: 1px solid rgba(232, 242, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.cta-button.ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 242, 255, 0.6);
  background: rgba(255, 255, 255, 0.13);
}
