/* =========================================================
   캐슬렉스마사지 — style.css
   무드: 트렌디 / 모던 웰니스
   팔레트: 딥 포레스트 그린 + 라임 포인트 + 웜 페이퍼
   ========================================================= */

/* ---------- 1. 변수 ---------- */
:root {
  --ink:        #11160f;   /* near-black green */
  --green:      #1c4a38;   /* deep emerald */
  --green-deep: #0f2f24;   /* darker emerald */
  --green-2:    #0f2f24;
  --lime:       #c7f24e;   /* 포인트 라임 */
  --lime-soft:  #e4f7a8;
  --coral:      #ef6a4a;   /* 보조 포인트 */
  --paper:      #f3efe4;   /* 웜 페이퍼 배경 */
  --paper-2:    #eae4d4;
  --text:       #1c2118;
  --text-soft:  #5f6657;
  --line:       rgba(28, 33, 24, .12);
  --white:      #fffdf7;

  --font-sans:    'Noto Sans KR', sans-serif;
  --font-serif:   'Noto Serif KR', serif;
  --font-display: 'Space Grotesk', 'Noto Sans KR', sans-serif;

  --maxw: 1240px;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 24px 60px rgba(17, 22, 15, .14);
  --shadow-sm: 0 10px 30px rgba(17, 22, 15, .10);
}

/* ---------- 2. 리셋 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; line-height: 1.08; }

/* ---------- 그레인 텍스처 오버레이 (트렌디) ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ---------- 유틸 ---------- */
.container { width: min(92%, var(--maxw)); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display);
  font-size: .8rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--green);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(199,242,78,.35); }
.eyebrow.on-dark { color: var(--lime); }

.h-xl { font-size: clamp(2.6rem, 7.5vw, 6rem); }
.h-lg { font-size: clamp(2rem, 5vw, 3.6rem); }
.lead { font-size: clamp(1rem, 1.5vw, 1.18rem); color: var(--text-soft); max-width: 54ch; }

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: 1rem 1.7rem;
  border-radius: 100px;
  font-weight: 700; font-size: .98rem;
  border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper);
  cursor: pointer;
  transition: transform .3s var(--ease), background .3s, color .3s, box-shadow .3s;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.btn--lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn--lime:hover { box-shadow: 0 14px 34px rgba(199,242,78,.5); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost.on-dark { color: var(--paper); border-color: rgba(243,239,228,.4); }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* =========================================================
   3. 스크롤 진행 바
   ========================================================= */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 4px; width: 0%;
  background: var(--lime);
  z-index: 1000;
}

/* =========================================================
   4. 헤더
   ========================================================= */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 900;
  padding: 1.5rem 0;
  transition: padding .4s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease);
}
.header.scrolled {
  padding: .75rem 0;
  background: rgba(243,239,228,.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.logo__mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--green); color: var(--lime);
  font-weight: 700; font-size: 1.05rem;
  transform: rotate(-8deg);
}
.logo b { font-weight: 700; }
.logo .x { color: var(--green); }

.nav__list { display: flex; align-items: center; gap: 2rem; }
.nav__list a { font-weight: 500; font-size: .98rem; position: relative; }
.nav__list a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 0; height: 2px; background: var(--green);
  transition: width .3s var(--ease);
}
.nav__list a:not(.btn):hover::after { width: 100%; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 6px; cursor: pointer; }
.nav__toggle span { width: 26px; height: 2px; background: var(--ink); transition: .35s var(--ease); }

/* =========================================================
   5. 히어로
   ========================================================= */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 9rem 0 4rem;
  overflow: hidden;
}
.hero__content { position: relative; z-index: 4; }
.hero__title { color: var(--ink); margin: 1.4rem 0; }
.hero__title .out {
  -webkit-text-stroke: 2px var(--ink);
  color: transparent;
}
.hero__title em { font-family: var(--font-serif); font-style: italic; font-weight: 600; color: var(--green); }
.hero__sub { margin-bottom: 2.2rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* 떠다니는 블롭 (스크롤/마우스 패럴랙스) */
.blob { position: absolute; border-radius: 50%; pointer-events: none; will-change: transform; z-index: 1; filter: blur(2px); }
.blob--1 { width: 380px; height: 380px; top: -60px; right: -40px;
  background: radial-gradient(circle at 35% 35%, rgba(199,242,78,.55), rgba(199,242,78,0) 70%); }
.blob--2 { width: 300px; height: 300px; bottom: -80px; left: -60px;
  background: radial-gradient(circle at 40% 40%, rgba(28,74,56,.30), rgba(28,74,56,0) 70%); }
.blob--3 { width: 160px; height: 160px; top: 30%; left: 42%;
  background: radial-gradient(circle at 40% 40%, rgba(239,106,74,.40), rgba(239,106,74,0) 70%); }

/* 스크롤로 회전하는 스티커 배지 */
.sticker {
  position: absolute; z-index: 5;
  top: 16%; right: 8%;
  width: clamp(110px, 14vw, 170px); aspect-ratio: 1;
  will-change: transform;
}
.sticker__disc { width: 100%; height: 100%; }
.sticker__center {
  position: absolute; inset: 0; margin: auto;
  width: 42%; height: 42%; border-radius: 50%;
  background: var(--lime); color: var(--ink);
  display: grid; place-items: center;
  font-size: 1.4rem;
}
.sticker text { font-family: var(--font-display); font-size: 11.5px; font-weight: 600; letter-spacing: 3px; fill: var(--green); }

/* 히어로 미니 메타 카드 */
.hero__meta {
  position: absolute; z-index: 5; bottom: 6%; right: 6%;
  background: var(--white); border-radius: var(--r-md);
  padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: .9rem;
  will-change: transform;
}
.hero__meta .av { display: flex; }
.hero__meta .av span {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--white); margin-left: -10px;
  background: var(--green); display: grid; place-items: center;
  color: var(--lime); font-size: .8rem; font-weight: 700;
}
.hero__meta .av span:first-child { margin-left: 0; }
.hero__meta b { display: block; font-size: 1rem; }
.hero__meta small { color: var(--text-soft); font-size: .8rem; }

/* 스크롤 인디케이터 */
.hero__scroll {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  z-index: 5; font-family: var(--font-display);
  font-size: .72rem; letter-spacing: .2em; color: var(--text-soft);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.hero__scroll .line { width: 1px; height: 36px; background: var(--ink); position: relative; overflow: hidden; }
.hero__scroll .line::after { content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--lime); animation: drop 1.8s infinite; }
@keyframes drop { 0% { top: -50%; } 100% { top: 100%; } }

/* =========================================================
   6. 마퀴 (흐르는 띠)
   ========================================================= */
.marquee {
  background: var(--ink); color: var(--paper);
  padding: 1.4rem 0; overflow: hidden; white-space: nowrap;
  border-block: 1px solid var(--ink);
}
.marquee__track { display: inline-flex; align-items: center; gap: 2.5rem; will-change: transform; animation: marq 24s linear infinite; }
.marquee--rev .marquee__track { animation-direction: reverse; }
.marquee__track span { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 2.1rem); font-weight: 600; letter-spacing: .02em; }
.marquee__track .dot { color: var(--lime); font-size: 1.4rem; }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =========================================================
   7. 진입 애니메이션
   ========================================================= */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .1s; }
.reveal[data-d="2"] { transition-delay: .2s; }
.reveal[data-d="3"] { transition-delay: .3s; }
.reveal[data-d="4"] { transition-delay: .4s; }

/* =========================================================
   8. About
   ========================================================= */
.about { padding: clamp(5rem, 10vw, 9rem) 0; }
.about__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.about__visual { position: relative; }
.about__card {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 4/5; box-shadow: var(--shadow);
  background: linear-gradient(160deg, var(--green) 0%, var(--green-deep) 100%);
  display: grid; place-items: center; color: var(--lime);
}
.about__card .big-x { font-family: var(--font-display); font-size: clamp(5rem, 16vw, 11rem); font-weight: 700; letter-spacing: -.04em; }
.about__card .big-x small { display: block; font-family: var(--font-sans); font-size: 1rem; letter-spacing: .4em; color: rgba(243,239,228,.7); text-align: center; margin-top: .5rem; }
.about__chip {
  position: absolute; background: var(--lime); color: var(--ink);
  border-radius: 100px; padding: .7rem 1.2rem; font-weight: 700; font-size: .92rem;
  box-shadow: var(--shadow-sm); will-change: transform;
}
.about__chip--a { top: 7%; left: -18px; }
.about__chip--b { bottom: 9%; right: -14px; background: var(--coral); color: var(--white); }

.about__body h2 { color: var(--ink); margin-bottom: 1.4rem; }
.about__body .lead { margin-bottom: 1.6rem; }
.feature-list { display: grid; gap: 1rem; margin-top: 2rem; }
.feature-list li { display: flex; gap: 1rem; align-items: flex-start; }
.feature-list .ck {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px;
  background: rgba(28,74,56,.1); color: var(--green);
  display: grid; place-items: center; font-weight: 700; margin-top: 2px;
}
.feature-list b { display: block; }
.feature-list p { color: var(--text-soft); font-size: .95rem; }

.stats { display: flex; gap: 2.6rem; margin-top: 2.4rem; flex-wrap: wrap; }
.stat b { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--green); display: block; line-height: 1; }
.stat b .u { color: var(--coral); }
.stat small { color: var(--text-soft); font-size: .85rem; }

/* =========================================================
   9. 서비스 (벤토 그리드)
   ========================================================= */
.services { padding: clamp(5rem, 10vw, 9rem) 0; background: var(--paper-2); }
.services__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.services__head h2 { color: var(--ink); }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.1rem; grid-auto-rows: minmax(180px, auto); }
.tile {
  position: relative; overflow: hidden;
  border-radius: var(--r-md); padding: 1.8rem;
  background: var(--white); border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-sm); }
.tile__num { font-family: var(--font-display); font-size: .8rem; color: var(--text-soft); letter-spacing: .1em; }
.tile h3 { font-size: 1.4rem; color: var(--ink); margin-bottom: .4rem; }
.tile p { color: var(--text-soft); font-size: .94rem; }
.tile .price { font-family: var(--font-display); font-weight: 600; color: var(--green); margin-top: 1rem; font-size: 1.05rem; }
.tile .emoji { font-size: 1.8rem; }
/* 벤토 배치 */
.tile--wide { grid-column: span 4; }
.tile--tall { grid-column: span 2; grid-row: span 2; }
.tile--reg  { grid-column: span 2; }
.tile--green { background: var(--green); color: var(--paper); border-color: var(--green); }
.tile--green h3 { color: var(--white); }
.tile--green p { color: rgba(243,239,228,.8); }
.tile--green .tile__num, .tile--green .price { color: var(--lime); }
.tile--lime { background: var(--lime); border-color: var(--lime); }
.tile--lime h3, .tile--lime .price { color: var(--ink); }
.tile--lime .tile__num { color: var(--green); }

/* =========================================================
   10. 왜 캐슬렉스 (가로 스크롤 느낌 / 패럴랙스 행)
   ========================================================= */
.why { padding: clamp(5rem, 10vw, 9rem) 0; overflow: hidden; }
.why__head { text-align: center; max-width: 620px; margin: 0 auto 3.4rem; }
.why__head h2 { color: var(--ink); }
.why__head .lead { margin-inline: auto; }
.why__row { display: flex; gap: 1.4rem; will-change: transform; }
.why-card {
  flex: 0 0 300px; background: var(--white);
  border-radius: var(--r-md); padding: 2rem; border: 1px solid var(--line);
}
.why-card .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--paper-2); margin-bottom: 1.2rem; }
.why-card h4 { font-size: 1.2rem; color: var(--ink); margin-bottom: .5rem; }
.why-card p { color: var(--text-soft); font-size: .94rem; }

/* =========================================================
   11. CTA 배너
   ========================================================= */
.cta-band { padding: clamp(4rem, 8vw, 7rem) 0; }
.cta-card {
  position: relative; overflow: hidden;
  background: var(--green); color: var(--paper);
  border-radius: var(--r-lg); padding: clamp(2.5rem, 6vw, 5rem);
  text-align: center;
}
.cta-card::before, .cta-card::after {
  content: ""; position: absolute; border-radius: 50%; will-change: transform;
}
.cta-card::before { width: 320px; height: 320px; top: -120px; right: -80px; background: radial-gradient(circle, rgba(199,242,78,.3), transparent 70%); }
.cta-card::after { width: 260px; height: 260px; bottom: -120px; left: -60px; background: radial-gradient(circle, rgba(239,106,74,.3), transparent 70%); }
.cta-card h2 { color: var(--white); margin-bottom: 1rem; position: relative; }
.cta-card .lead { color: rgba(243,239,228,.85); margin: 0 auto 2rem; position: relative; }
.cta-card .hero__actions { justify-content: center; position: relative; }
.cta-phone { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--lime); font-weight: 600; letter-spacing: .02em; display: inline-block; margin-top: 1.4rem; position: relative; }

/* =========================================================
   12. 연락처 / 오시는 길
   ========================================================= */
.contact { padding: clamp(5rem, 10vw, 9rem) 0; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: stretch; }
.contact__info h2 { color: var(--ink); margin-bottom: 1.4rem; }
.info-list { margin-top: 2rem; display: grid; gap: 1.4rem; }
.info-item { display: flex; gap: 1.1rem; align-items: flex-start; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.info-item:last-child { border-bottom: 0; }
.info-item .ic { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 13px; background: var(--green); color: var(--lime); display: grid; place-items: center; font-size: 1.2rem; }
.info-item h4 { font-family: var(--font-display); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); margin-bottom: .3rem; font-weight: 600; }
.info-item p, .info-item a { font-size: 1.08rem; color: var(--text); }
.info-item a { font-weight: 700; }
.info-item a:hover { color: var(--green); }

.contact__map {
  border-radius: var(--r-lg); overflow: hidden; min-height: 380px;
  position: relative; background: linear-gradient(160deg, var(--green), var(--green-deep)); color: var(--paper);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 2rem;
}
.contact__map .pin { position: absolute; top: 42%; left: 50%; transform: translate(-50%,-50%); font-size: 2.4rem; will-change: transform; }
.contact__map .grid-lines { position: absolute; inset: 0; opacity: .14;
  background-image: linear-gradient(rgba(243,239,228,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(243,239,228,.6) 1px, transparent 1px);
  background-size: 44px 44px; }
.contact__map b { position: relative; font-size: 1.15rem; }
.contact__map p { position: relative; color: rgba(243,239,228,.82); font-size: .95rem; }

/* =========================================================
   13. 푸터
   ========================================================= */
.footer { background: var(--ink); color: rgba(243,239,228,.72); padding: 4.5rem 0 2.2rem; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.6rem; border-bottom: 1px solid rgba(243,239,228,.14); }
.footer .logo { color: var(--paper); margin-bottom: 1.1rem; }
.footer .logo .x { color: var(--lime); }
.footer__brand p { max-width: 32ch; font-size: .92rem; }
.footer__sns { display: flex; gap: .7rem; margin-top: 1.4rem; }
.footer__sns a { width: 42px; height: 42px; border-radius: 50%; background: rgba(243,239,228,.08); color: var(--paper); display: grid; place-items: center; font-size: .8rem; font-weight: 700; transition: background .3s, color .3s, transform .3s; }
.footer__sns a:hover { background: var(--lime); color: var(--ink); transform: translateY(-3px); }
.footer__col h5 { font-family: var(--font-display); color: var(--lime); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.1rem; font-weight: 600; }
.footer__col a, .footer__col p { display: block; font-size: .92rem; margin-bottom: .6rem; color: rgba(243,239,228,.7); }
.footer__col a:hover { color: var(--lime); }
.footer__biz { margin-top: 2rem; font-size: .84rem; line-height: 1.9; color: rgba(243,239,228,.55); }
.footer__biz strong { color: rgba(243,239,228,.8); font-weight: 600; }
.footer__bottom { margin-top: 1.4rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: rgba(243,239,228,.45); }

/* =========================================================
   14. 반응형
   ========================================================= */
@media (max-width: 980px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__visual { max-width: 460px; margin-inline: auto; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .bento { grid-template-columns: repeat(4, 1fr); }
  .tile--wide { grid-column: span 4; }
  .tile--tall { grid-column: span 2; grid-row: span 2; }
  .tile--reg  { grid-column: span 2; }
}
@media (max-width: 768px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(80%, 320px);
    background: var(--green-deep); color: var(--paper);
    transform: translateX(100%); transition: transform .45s var(--ease);
    padding: 6rem 2rem 2rem; box-shadow: -20px 0 60px rgba(0,0,0,.3);
  }
  .nav.open { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: flex-start; gap: 1.6rem; }
  .nav__list a { color: var(--paper); font-size: 1.15rem; }
  .nav__toggle { display: flex; z-index: 950; }
  .nav__toggle.active span { background: var(--paper); }
  .nav__toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.active span:nth-child(2) { opacity: 0; }
  .nav__toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .sticker, .hero__meta { display: none; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile--wide, .tile--tall, .tile--reg { grid-column: span 2; grid-row: auto; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; justify-content: center; }
  .footer__top { grid-template-columns: 1fr; }
  .stats { gap: 1.6rem; }
}

/* 모션 최소화 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .sticker, .about__chip, .hero__meta, .why__row { transform: none !important; }
}
