/* =========================================
   1) Base / Reset
   ========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  overflow: hidden;
  background: #fff; /* 원래 흰색으로 */
}

#wpadminbar {
  display: none !important;
}

body.admin-bar {
  margin-top: 0 !important;
}

/* =========================================
   2) 🎭 배경 보이게 수정
   ========================================= */
#front-hero-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.byron-hero {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: transparent; /* 배경 없음 */
}

/* 패럴렉스 레이어 - 배경 이미지 (img 태그로) */
.parallax-bg-img {
  position: absolute;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  transition: transform 0.3s ease-out;
  will-change: transform;
  pointer-events: none;
}

.byron-hero-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

/* =========================================
   3) Center Logo Hover
   ========================================= */
.logo-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: min(30vw, 420px);
  cursor: pointer;
  will-change: transform;
  transition: transform 0.3s ease-out;
}

.center-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.35));
}

.logo-base {
  position: relative;
  opacity: 1;
  transition: opacity 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  transform: translateY(6px);
  transition: 
    opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 260ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  will-change: opacity, transform;
}

.logo-wrap:hover .logo-hover {
  opacity: 1;
  transform: translateY(0);
}

.logo-wrap:hover .logo-base {
  opacity: 0.15;
}

/* 모바일 터치 호버 효과 */
.logo-wrap.touch-active .logo-hover {
  opacity: 1;
  transform: translateY(0);
}

.logo-wrap.touch-active .logo-base {
  opacity: 0.15;
}

@media (hover: none) and (pointer: coarse) {
  .logo-wrap:active .logo-hover {
    opacity: 1;
    transform: translateY(0);
  }
  
  .logo-wrap:active .logo-base {
    opacity: 0.15;
  }
}

/* =========================================
   4) 글라스모피즘 버튼
   ========================================= */
.hotspot-btn {
  position: absolute;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 14px 40px;
  border-radius: 999px;
  
  /* 글라스모피즘 - 밝고 투명하게 */
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  
  border: 2px solid rgba(255, 255, 255, 0.5);
  
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  
  color: #1a1a1a;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
  
  transition:
    transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1),
    background 320ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 320ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 320ms cubic-bezier(0.4, 0, 0.2, 1),
    color 320ms cubic-bezier(0.4, 0, 0.2, 1);
  
  will-change: transform;
  cursor: pointer;
}

.hotspot-btn:hover,
.hotspot-btn:focus-visible {
  transform: translateY(-6px) scale(1.03);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-color: rgba(255, 255, 255, 0.7);
  
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.3);
  
  color: #D92525;
  text-shadow: 
    0 1px 3px rgba(255, 255, 255, 1),
    0 0 12px rgba(255, 255, 255, 0.5);
  outline: none;
}

.hotspot-btn:focus-visible {
  outline: 2px solid #D92525;
  outline-offset: 4px;
}

.hotspot-btn:active {
  transform: translateY(-3px) scale(0.98);
  background: rgba(255, 255, 255, 0.18);
}

.gallery-pos {
  bottom: calc(60px + 8%);
  left: 15%;
}

.cafe-pos {
  bottom: calc(60px + 8%);
  right: 15%;
}

@supports not (backdrop-filter: blur(1px)) {
  .hotspot-btn {
    background: rgba(255, 255, 255, 0.35);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.15),
      inset 0 1px 1px rgba(255, 255, 255, 0.9);
  }
  
  .hotspot-btn:hover {
    background: rgba(255, 255, 255, 0.5);
  }
}

@media (hover: none) and (pointer: coarse) {
  .hotspot-btn {
    backdrop-filter: blur(25px) saturate(160%) brightness(1.08);
    -webkit-backdrop-filter: blur(25px) saturate(160%) brightness(1.08);
  }
  
  .hotspot-btn:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.25);
    color: #D92525;
  }
}

/* =========================================
   5) 🎨 파티클 캔버스
   ========================================= */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15; /* 로고(5)와 버튼(10) 사이 */
}

/* 🎨 커서 돋보기 캔버스 */
#paint-trail-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  /* backdrop-filter는 canvas에 적용 안됨 - 별도 div 필요 */
}

/* 돋보기 내부 왜곡 레이어 */
.magnifier-glass {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
  
  /* 왜곡 필터 */
  filter: url(#glass-distortion);
  -webkit-filter: url(#glass-distortion);
  
  /* 선명하고 강한 대비 */
  backdrop-filter: saturate(160%) brightness(1.12) contrast(1.15);
  -webkit-backdrop-filter: saturate(160%) brightness(1.12) contrast(1.15);
  
  background: rgba(255, 255, 255, 0.08);
}

/* 내부 왜곡 레이어 (배경만 왜곡) */
.magnifier-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  
  /* 왜곡 필터는 여기에만 */
  filter: url(#glass-distortion);
  -webkit-filter: url(#glass-distortion);
  
  pointer-events: none;
  z-index: -1;
}

/* =========================================
   6) Header & Footer Marquee
   ========================================= */

/* 🔝 상단 헤더 바 */
.hero-header-bar {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 60px;
  background-color: #D92525;
  color: #F2C94C;
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 20;
  margin: 0;
  padding: 0;
}

/* 하단 푸터 바 */
.hero-footer-bar {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 60px;
  background-color: #D92525;
  color: #F2C94C;
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 20;
  margin: 0;
  padding: 0;
}

/* 기본 마키 (왼쪽으로) */
.marquee-track {
  white-space: nowrap;
  will-change: transform;
  animation: scroll-left 18s linear infinite;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* 반대 마키 (오른쪽으로) */
.marquee-reverse {
  animation: scroll-right 18s linear infinite;
}

.marquee-track span {
  display: inline-block;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 800;
  padding-right: 18px;
  line-height: 1;
}

/* 왼쪽으로 스크롤 (←←) */
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* 오른쪽으로 스크롤 (→→) */
@keyframes scroll-right {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
  
  .hotspot-btn,
  .parallax-bg,
  .logo-wrap {
    transition: none;
  }
}

/* =========================================
   7) Responsive
   ========================================= */

@media (max-width: 1024px) {
  .logo-wrap {
    width: min(40vw, 380px);
  }
  
  .hotspot-btn {
    padding: 12px 36px;
    font-size: 1rem;
  }
  
  .gallery-pos {
    bottom: calc(60px + 6%);
    left: 12%;
  }
  
  .cafe-pos {
    bottom: calc(60px + 6%);
    right: 12%;
  }
}

@media (max-width: 768px) {
  .logo-wrap {
    width: min(52vw, 360px);
  }
  
  .hotspot-btn {
    padding: 11px 28px;
    font-size: 0.95rem;
  }
  
  .gallery-pos {
    bottom: calc(56px + 5%);
    left: 8%;
  }
  
  .cafe-pos {
    bottom: calc(56px + 5%);
    right: 8%;
  }
  
  .hero-footer-bar {
    height: 56px;
  }
}

@media (max-width: 480px) {
  .logo-wrap {
    width: min(60vw, 280px);
  }
  
  .hotspot-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
  }
  
  .gallery-pos {
    bottom: calc(48px + 4%);
    left: 5%;
  }
  
  .cafe-pos {
    bottom: calc(48px + 4%);
    right: 5%;
  }
  
  .hero-footer-bar {
    height: 48px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .logo-wrap {
    width: min(25vw, 200px);
  }
  
  .hotspot-btn {
    padding: 8px 24px;
    font-size: 0.85rem;
  }
  
  .gallery-pos {
    bottom: calc(44px + 3%);
    left: 10%;
  }
  
  .cafe-pos {
    bottom: calc(44px + 3%);
    right: 10%;
  }
  
  .hero-footer-bar {
    height: 44px;
  }
  
  .marquee-track span {
    font-size: 1rem;
  }
}

@media print {
  .hero-footer-bar,
  .marquee-track {
    display: none;
  }
}

/* 모바일 배경 최적화 - 가로 전체 보이기 */
@media (max-width: 768px) {
  .parallax-bg-img {
    top: 0;
    left: -50%; /* 왼쪽으로 확장 */
    width: 200%; /* 가로 2배로 확장 */
    height: 100%;
    object-fit: contain; /* 가로 기준으로 맞춤 */
  }
}

/* 작은 모바일 */
@media (max-width: 480px) {
  .parallax-bg-img {
    top: 0;
    left: -60%; /* 더 넓게 */
    width: 220%;
    height: 100%;
    object-fit: contain;
  }
}

/* 커서 숨기기 (돋보기로 대체) */
body.cursor-invert {
  cursor: none !important;
}

body.cursor-invert * {
  cursor: none !important;
}

/* FlipClock 커스텀 스타일 */
.countdown-container {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
}

.countdown-label {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.7);
  margin-bottom: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.flipclock-wrapper {
  display: flex;
  justify-content: center;
}

/* FlipClock 크기 조정 */
.flip-clock-wrapper ul {
  width: 60px !important;
  height: 75px !important;
}

.flip-clock-wrapper ul li {
  line-height: 75px !important;
}

.flip-clock-wrapper ul li a div {
  font-size: 50px !important;
}

/* 레이블 스타일 */
.flip-clock-divider .flip-clock-label {
  color: rgba(0, 0, 0, 0.6) !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .countdown-container {
    top: 10%;
  }
  
  .countdown-label {
    font-size: 0.85rem;
    margin-bottom: 15px;
  }
  
  .flip-clock-wrapper ul {
    width: 45px !important;
    height: 60px !important;
  }
  
  .flip-clock-wrapper ul li {
    line-height: 60px !important;
  }
  
  .flip-clock-wrapper ul li a div {
    font-size: 38px !important;
  }
}

@media (max-width: 480px) {
  .flip-clock-wrapper ul {
    width: 35px !important;
    height: 50px !important;
  }
  
  .flip-clock-wrapper ul li {
    line-height: 50px !important;
  }
  
  .flip-clock-wrapper ul li a div {
    font-size: 30px !important;
  }
  
  .flip-clock-divider .flip-clock-label {
    font-size: 0.6rem !important;
  }
}
