/* Velvet & Arch - Glassmorphic styles, booking wizard & scroll animations */

:root {
  --color-primary: #311908;
  --color-primary-container: #4a2e1b;
  --color-secondary: #78583d;
  --color-secondary-container: #fed2af;
  --color-surface: #fef8f4;
  --color-surface-container: #f3ede9;
  --color-surface-container-low: #f8f2ee;
  --color-surface-tint: #795741;
  --color-tertiary: #d4a373;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scrollbar */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: #f8f2ee; }
::-webkit-scrollbar-thumb { background: #d4c3bb; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #82746d; }

/* =========================================================
   SCROLL ANIMATIONS
   Elements are only hidden when JS is running (html.js-anim),
   so content is never lost if scripts fail to load.
   ========================================================= */
html.js-anim .reveal-on-scroll:not(.revealed) {
  opacity: 0;
  transform: translate3d(0, 64px, 0) scale(0.97);
  filter: blur(8px);
}
html.js-anim .reveal-on-scroll.reveal-left:not(.revealed) { transform: translate3d(-80px, 0, 0); }
html.js-anim .reveal-on-scroll.reveal-right:not(.revealed) { transform: translate3d(80px, 0, 0) rotate(1.5deg); }
html.js-anim .reveal-on-scroll.reveal-zoom:not(.revealed) { transform: scale(0.88); }

html.js-anim .reveal-on-scroll:not(.reveal-done) {
  transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out), filter 0.9s var(--ease-out);
  will-change: opacity, transform, filter;
}
html.js-anim .reveal-on-scroll:not(.reveal-done).stagger-1 { transition-delay: 0.08s; }
html.js-anim .reveal-on-scroll:not(.reveal-done).stagger-2 { transition-delay: 0.18s; }
html.js-anim .reveal-on-scroll:not(.reveal-done).stagger-3 { transition-delay: 0.28s; }
html.js-anim .reveal-on-scroll:not(.reveal-done).stagger-4 { transition-delay: 0.38s; }

/* Scroll progress bar + condensing header */
#site-header { transition: box-shadow 0.35s ease, background-color 0.35s ease; }
#site-header.scrolled { box-shadow: 0 10px 30px -12px rgba(74, 46, 27, 0.2); }
.header-inner { transition: height 0.35s var(--ease-out); }
#site-header.scrolled .header-inner { height: 4rem; }
#scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, #d4a373, #78583d, #311908);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* Glass surfaces */
.glass-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s ease;
}
.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px -10px rgba(74, 46, 27, 0.14);
  border-color: rgba(212, 163, 115, 0.6);
}

/* Hero 3D viewport */
#hero-3d-canvas-container {
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(49, 25, 8, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.85) inset;
  background: radial-gradient(circle at 50% 40%, #fef8f4 0%, #ede7e3 65%, #dfd9d5 100%);
}
#hero-3d-canvas { width: 100%; height: 100%; cursor: grab; outline: none; }
#hero-3d-canvas:active { cursor: grabbing; }

.hotspot-badge {
  position: absolute;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(120, 88, 61, 0.2);
  box-shadow: 0 6px 18px rgba(74, 46, 27, 0.1);
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #311908;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}
.hotspot-badge:hover { background: #311908; color: #fff; border-color: #311908; transform: scale(1.05); }
.hotspot-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4a373;
  animation: pulse-ring 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(212, 163, 115, 0.8); }
  70% { box-shadow: 0 0 0 8px rgba(212, 163, 115, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 163, 115, 0); }
}

/* =========================================================
   RESERVATION MATRIX: dates & slots (generated in booking.js)
   ========================================================= */
.date-nav {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3ede9;
  color: #311908;
  transition: all 0.2s ease;
}
.date-nav:hover:not(:disabled) { background: #311908; color: #fff; }
.date-nav:disabled { opacity: 0.3; cursor: not-allowed; }

.date-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.7rem 0.25rem;
  border-radius: 1rem;
  background: #f8f2ee;
  color: #311908;
  transition: background-color 0.25s ease, transform 0.25s var(--ease-out), box-shadow 0.25s ease;
  animation: tile-in 0.45s var(--ease-out) backwards;
}
.date-tile:nth-child(2) { animation-delay: 0.04s; }
.date-tile:nth-child(3) { animation-delay: 0.08s; }
.date-tile:nth-child(4) { animation-delay: 0.12s; }
.date-tile:nth-child(5) { animation-delay: 0.16s; }
.date-tile:hover:not(:disabled) { background: #f3ede9; transform: translateY(-3px); }
.date-dow { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: #50443e; }
.date-num { font-family: 'Bodoni Moda', serif; font-size: 1.3rem; font-weight: 700; line-height: 1.1; }
.date-mon { font-size: 10px; font-weight: 600; color: #78583d; }
.date-dot { width: 6px; height: 6px; border-radius: 50%; background: #795741; margin-top: 3px; }
.date-tile.is-selected { background: #311908; color: #fff; box-shadow: 0 12px 24px -10px rgba(49, 25, 8, 0.55); }
.date-tile.is-selected .date-dow,
.date-tile.is-selected .date-mon { color: #ffdbc7; }
.date-tile.is-selected .date-dot { background: #fed2af; }
.date-tile.is-full { opacity: 0.4; cursor: not-allowed; }
.date-tile.is-full .date-dot { background: transparent; }

.slot-tile {
  padding: 0.75rem 0.25rem;
  border-radius: 0.75rem;
  background: #f8f2ee;
  color: #311908;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.2s var(--ease-out), box-shadow 0.2s ease;
  animation: tile-in 0.4s var(--ease-out) backwards;
}
.slot-tile:hover:not(:disabled) { background: rgba(254, 210, 175, 0.55); transform: translateY(-2px); }
.slot-tile.is-selected { background: #311908; color: #fff; box-shadow: 0 10px 20px -10px rgba(49, 25, 8, 0.6); }
.slot-tile.is-booked { background: rgba(237, 231, 227, 0.5); color: rgba(80, 68, 62, 0.45); cursor: not-allowed; }

@keyframes tile-in {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: none; }
}

/* =========================================================
   BOOKING WIZARD (Details -> Q1 -> Q2 -> Q3 -> Review)
   ========================================================= */
.modal-overlay { transition: opacity 0.35s ease; }
.modal-content-box { transition: transform 0.4s var(--ease-out), opacity 0.35s ease; }

.wizard-stepper { display: flex; justify-content: space-between; gap: 0.25rem; margin: 0 0 0.6rem; padding: 0; list-style: none; }
.wizard-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  cursor: default;
  color: #82746d;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wizard-dot .dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3ede9;
  color: #82746d;
  font-size: 11px;
  transition: all 0.3s var(--ease-out);
}
.wizard-dot.is-active { color: #311908; }
.wizard-dot.is-active .dot { background: #311908; color: #fff; box-shadow: 0 0 0 4px rgba(254, 210, 175, 0.75); }
.wizard-dot.is-done { color: #78583d; cursor: pointer; }
.wizard-dot.is-done .dot { background: #fed2af; color: #311908; }
.wizard-track { height: 3px; background: #f3ede9; border-radius: 9999px; overflow: hidden; }
.wizard-progress { height: 100%; width: 0; background: linear-gradient(90deg, #d4a373, #311908); transition: width 0.5s var(--ease-out); }
@media (max-width: 480px) { .wizard-dot .label { display: none; } }

.wizard-step.step-enter { animation: step-in 0.45s var(--ease-out) backwards; }
.wizard-step.step-enter.dir-back { animation-name: step-in-back; }
.wizard-step.step-exit { animation: step-out 0.28s ease forwards; }
.wizard-step.step-exit.dir-back { animation-name: step-out-back; }
@keyframes step-in { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@keyframes step-in-back { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
@keyframes step-out { to { opacity: 0; transform: translateX(-48px) scale(0.97); filter: blur(4px); } }
@keyframes step-out-back { to { opacity: 0; transform: translateX(48px) scale(0.97); filter: blur(4px); } }

.wizard-kicker { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #78583d; }
.wizard-heading { font-family: 'Bodoni Moda', serif; font-size: 1.35rem; font-weight: 700; color: #311908; }
.wizard-sub { font-size: 0.78rem; color: #50443e; margin: 0.25rem 0 1rem; }
.wizard-hint { font-size: 0.7rem; color: #82746d; margin-top: 0.75rem; }
.wizard-error { min-height: 1rem; font-size: 0.72rem; font-weight: 600; color: #ba1a1a; margin-top: 0.5rem; }
.wizard-label { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #78583d; margin-bottom: 0.3rem; }
.wizard-input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 0.75rem;
  background: #f8f2ee;
  border: 1px solid rgba(168, 131, 101, 0.3);
  color: #311908;
  font-size: 0.8rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.wizard-input:focus { outline: none; border-color: #311908; box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.25); }
.wizard-input[aria-invalid='true'] { border-color: #ba1a1a; }

.wizard-actions { display: flex; justify-content: space-between; align-items: center; padding-top: 1.25rem; }
.wizard-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.6rem;
  border-radius: 9999px;
  background: #311908;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 22px -10px rgba(49, 25, 8, 0.6);
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.wizard-btn-primary:hover:not(:disabled) { background: #4a2e1b; transform: translateY(-1px); }
.wizard-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.wizard-btn-ghost {
  padding: 0.85rem 1.2rem;
  border-radius: 9999px;
  color: #78583d;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background-color 0.2s ease;
}
.wizard-btn-ghost:hover { background: #f3ede9; }

.choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  background: #f8f2ee;
  border: 1px solid rgba(212, 195, 187, 0.6);
  color: #311908;
  font-size: 0.78rem;
  font-weight: 600;
  transition: transform 0.22s var(--ease-out), border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.choice:hover { border-color: #795741; transform: translateY(-2px); }
.choice .material-symbols-outlined { font-size: 18px; color: #795741; }
.choice .choice-check { margin-left: auto; opacity: 0; transform: scale(0.5); transition: all 0.25s var(--ease-out); }
.choice.is-selected { background: rgba(254, 210, 175, 0.55); border-color: #311908; box-shadow: 0 6px 16px rgba(74, 46, 27, 0.1); }
.choice.is-selected .choice-check { opacity: 1; transform: scale(1); color: #311908; }
.choice-col { flex-direction: column; align-items: flex-start; }
.choice-text { display: flex; flex-direction: column; gap: 2px; }
.choice-text small { font-size: 0.7rem; font-weight: 500; color: #50443e; }
.choice.just-picked { animation: pick 0.42s ease; }
@keyframes pick { 50% { transform: scale(1.03); } }

.review-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 0.7rem 0.85rem; border-radius: 0.8rem; background: #f8f2ee; margin-bottom: 0.45rem; }
.review-row dt { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #82746d; }
.review-row dd { margin: 0; font-size: 0.8rem; font-weight: 600; color: #311908; }
.review-edit { flex-shrink: 0; font-size: 0.7rem; font-weight: 700; color: #78583d; text-decoration: underline; }

/* =========================================================
   3D CHARACTER GUIDE
   ========================================================= */
#mascot-companion {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}
#mascot-speech-bubble {
  pointer-events: auto;
  max-width: 320px;
  padding: 14px 18px;
  background: rgba(254, 248, 244, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 1.5rem 1.5rem 0.3rem 1.5rem;
  box-shadow: 0 16px 36px -6px rgba(74, 46, 27, 0.16);
  margin-bottom: 12px;
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  position: relative;
}
#mascot-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 24px;
  width: 16px;
  height: 16px;
  background: rgba(254, 248, 244, 0.96);
  border-right: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  transform: rotate(45deg);
}
#mascot-canvas-wrapper {
  pointer-events: auto;
  position: relative;
  width: 130px;
  height: 130px;
  cursor: pointer;
  filter: drop-shadow(0 14px 24px rgba(74, 46, 27, 0.22));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#mascot-canvas-wrapper:hover { transform: scale(1.08) translateY(-4px); }
#mascot-canvas { width: 100%; height: 100%; }
.mascot-btn {
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(120, 88, 61, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #311908;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 11px;
}
.mascot-btn:hover { background: #311908; color: #fff; }

/* Ambient glow */
@keyframes ambient-glow {
  0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.35; }
  50% { transform: scale(1.08) translate(15px, -15px); opacity: 0.55; }
}
.animate-ambient-glow { animation: ambient-glow 9s ease-in-out infinite; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html.js-anim .reveal-on-scroll:not(.revealed) { opacity: 1; transform: none; filter: none; }
  .wizard-step.step-enter,
  .wizard-step.step-exit,
  .date-tile,
  .slot-tile { animation-duration: 1ms !important; }
}
