html {
  scroll-behavior: smooth;
}

body {
  -webkit-tap-highlight-color: transparent;
}

/* ── Header ─────────────────────────────────────────── */
#site-header {
  background: transparent;
}
#site-header.scrolled {
  background: rgba(255, 253, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(35, 26, 22, 0.05);
}

.nav-link {
  position: relative;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #5f4f47;
  border-radius: 9999px;
  transition: color 0.2s, background-color 0.2s;
}
.nav-link:hover {
  color: #cb4739;
  background-color: rgba(245, 119, 107, 0.08);
}

.mobile-nav-link {
  padding: 0.85rem 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: #332822;
  border-bottom: 1px solid #f1ebe5;
}
.mobile-nav-link:last-of-type {
  border-bottom: none;
}

/* ── Scroll-linked fade (Apple 스타일: 스크롤 위치에 따라 계속 나타났다 사라졌다 함) ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px) scale(0.96);
  transition: opacity 0.09s linear, transform 0.09s linear;
  will-change: opacity, transform;
}

/* ── Features 핀 고정 카드 스택 (데스크톱/태블릿 전용, 애플 제품소개 페이지 스타일) ──
   각 카드 블록에 스크롤 여유 높이(150vh)를 주고, 내부 sticky 레이어를 헤더 아래에 고정시켜
   그 구간 동안 화면에 머물게 한 뒤, 다음 카드가 스크롤에 따라 위로 슬라이드하며
   이전 카드를 덮도록 만들어 "제품을 하나씩 소개하는" 느낌을 냅니다. */
.stack-wrapper {
  position: relative;
}
.stack-card-sticky {
  display: flex;
  align-items: center;
  justify-content: center;
}
.stack-card-inner {
  width: 100%;
  will-change: opacity, transform;
}
@media (min-width: 768px) {
  .stack-card {
    position: relative;
    height: 125vh;
  }
  .stack-card-sticky {
    position: sticky;
    top: 6rem; /* 고정 헤더(md:h-24) 아래에 붙도록 */
    height: calc(100vh - 6rem);
    height: calc(100dvh - 6rem);
    overflow: visible;
  }
}

/* ── FAQ accordion ──────────────────────────────────── */
.faq-item.open .faq-panel {
  grid-template-rows: 1fr;
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: #f5776b;
}
.faq-trigger {
  cursor: pointer;
  background: none;
  border: none;
}

/* Scrollbar (subtle, desktop) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #EADFC2; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #F7AB9E; }

/* Hide scrollbar but keep scrollability (logos bar / feature carousel) */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ── 신청 폼 완료 모달 등장 애니메이션 ──────────────────── */
@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.85) translateY(10px); }
  60% { opacity: 1; transform: scale(1.03) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
#beta-success-modal.is-open {
  display: flex;
}
#beta-apply-form input.field-invalid,
#beta-apply-form select.field-invalid,
#beta-apply-form textarea.field-invalid {
  border-color: #cb4739;
  box-shadow: 0 0 0 2px rgba(203, 71, 57, 0.15);
}

/* ── Spring hover (버튼/카드 등 인터랙션 강조) ──────────────
   마우스 오버 시 확실한 "액션감"을 주기 위해 스프링(overshoot) 이징을 사용합니다.
   그 외 시각 요소는 기존 스타일을 그대로 유지해 절제된 느낌을 지킵니다. */
.hover-spring {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.hover-spring:hover {
  transform: translateY(-3px) scale(1.045);
}
.hover-spring:active {
  transform: translateY(-1px) scale(0.97);
  transition-duration: 0.15s;
}

.hover-spring-card {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}
.hover-spring-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px -16px rgba(35, 26, 22, 0.18);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
  .animate-floaty, .animate-scanline { animation: none !important; }
  .hover-spring, .hover-spring-card { transition: none !important; }
  .hover-spring:hover, .hover-spring-card:hover { transform: none !important; box-shadow: none !important; }
}
