/* styles.css — 아라 법률사무소 (V3) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: #070605; font-family: 'Inter', 'Noto Sans KR', sans-serif; }
::selection { background: #B8935F; color: #070605; }
section[id] { scroll-margin-top: 90px; }

/* Animations */
@keyframes ns-spin     { to { transform: rotate(360deg); } }
@keyframes ns-spin-rev { to { transform: rotate(-360deg); } }
@keyframes ns-rise     { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes ns-fade     { from { opacity: 0; } to { opacity: 1; } }
@keyframes ns-draw     { to { stroke-dashoffset: 0; } }

/* Scroll reveal */
[data-reveal] { opacity: 0; }
[data-reveal-group] > * { opacity: 0; }
[data-reveal][data-inview],
[data-reveal-group] > *[data-inview] {
  animation: ns-rise .85s cubic-bezier(.16,1,.3,1) var(--rd, 0ms) both;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-group] > * { opacity: 1 !important; animation: none !important; }
  [style*="ns-spin"] { animation: none !important; }
  [style*="ns-draw"] { animation: none !important; stroke-dashoffset: 0 !important; }
  html { scroll-behavior: auto; }
  #cases [data-reveal-group] h3::after { transition: none; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* Hover states */
.nav-link  { transition: color 0.3s ease; }
.nav-link:hover  { color: #F4F1EA !important; }
.nav-cta   { transition: background-color 0.3s ease, border-color 0.3s ease; }
.nav-cta:hover   { background: rgba(184,147,95,.1) !important; border-color: #B8935F !important; }
.hero-cta  { transition: background-color 0.3s ease, border-color 0.3s ease; }
.hero-cta:hover  { border-color: #B8935F !important; background: rgba(184,147,95,.09) !important; }
.hero-tl   { transition: color 0.3s ease; }
.hero-tl:hover   { color: #97928A !important; }
.case-card { transition: background-color 0.3s ease; }
.case-card:hover { background: #0C0A08 !important; }
.career-row { transition: background-color 0.3s ease; }
.career-row:hover { background: rgba(184,147,95,0.03); }
.footer-link { transition: color 0.3s ease; }
.footer-link:hover { color: #C9C4BA !important; }

/* 케이스 카드 호버 — 기록에 밑줄을 긋는 검토 행위 + 고스트 번호 점등 */
#cases [data-reveal-group] h3 { position: relative; }
#cases [data-reveal-group] h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1px;
  background: rgba(184,147,95,0.65);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.16,1,.3,1);
}
#cases [data-reveal-group] > div:hover h3::after { transform: scaleX(1); }
#cases [data-reveal-group] > div > div:first-child > span:first-child { transition: color .45s ease; }
#cases [data-reveal-group] > div:hover > div:first-child > span:first-child { color: rgba(184,147,95,0.9) !important; }

/* 예약 달력 — 선택 가능한 날짜·시간에 커서 호버 시 앰버 점등 (선택된 셀 제외) */
#booking div[style*="cursor:pointer"]:not([style*="background:#B8935F"]):hover {
  border-color: #B8935F !important;
  color: #F4F1EA !important;
  background: rgba(184,147,95,0.08) !important;
}
/* 캘린더 날짜 hover — 커서가 위치한 날짜에 색이 들어옴 */
#booking div[style*="repeat(7, 1fr)"] div[style*="cursor:pointer"]:hover {
  background: #B8935F !important;
  color: #070605 !important;
  border-color: #B8935F !important;
  font-weight: 700;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #B8935F;
  outline-offset: 3px;
}

/* Calendar inputs */
.cal-input, .cal-textarea {
  width: 100%;
  padding: 13px 16px;
  background: #0A0908;
  border: 1px solid #232019;
  border-radius: 4px;
  color: #F4F1EA;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.cal-input:focus, .cal-textarea:focus { border-color: rgba(184,147,95,0.5); }
.cal-input::placeholder, .cal-textarea::placeholder { color: #6A655D; }
.cal-textarea { resize: vertical; }

/* Responsive */
@media (max-width: 900px) {
  section[data-screen-label]:not(#hero) { padding-top: 96px !important; padding-bottom: 96px !important; }
  section[data-screen-label="Hook"] div[style*="1fr 0.92fr"],
  #profile div[style*="0.82fr 1.18fr"],
  #booking div[style*="1fr 1.05fr"],
  footer div[style*="1fr 1.3fr"] { grid-template-columns: 1fr !important; gap: 56px !important; }
  #cases div[style*="repeat(3, 1fr)"],
  #methods div[style*="repeat(3, 1fr)"] { grid-template-columns: 1fr !important; }
}
@media (max-width: 720px) {
  nav div > a:not([href="#booking"]) { display: none !important; }
  [data-hud] { display: none !important; }
  footer div[style*="1fr 1fr"] { grid-template-columns: 1fr !important; gap: 32px !important; }
}
