@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --color-primary: #111714;
  --color-primary-dark: #0c100e;
  --color-primary-light: #1c2621;
  --color-gold: #c5a880;
  --color-gold-light: #dfcaa7;
  --color-gold-dark: #9e7f57;
  --color-parchment: #faf8f5;
  --color-cream: #f4efe6;
  --color-sand: #e6ded1;
  --color-text-dark: #222925;
  --color-text-muted: #66726b;
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-heading: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  position: relative;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--color-text-dark);
  background-color: var(--color-parchment);
}

/* Mobile Top Bar Auto Slider */
.topbar-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.topbar-slider {
  position: relative;
  width: 100%;
  height: 20px;
  overflow: hidden;
}

.topbar-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
  will-change: transform, opacity;
  white-space: nowrap;
}

.topbar-slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.topbar-slide.is-prev {
  opacity: 0;
  transform: translateX(-100%);
  pointer-events: none;
}

.topbar-slide.is-next {
  opacity: 0;
  transform: translateX(100%);
  pointer-events: none;
}

/* Mobile iOS Safari Auto-Zoom Fix on Inputs */
@media (max-width: 640px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

.font-serif {
  font-family: var(--font-serif);
}

.font-heading {
  font-family: var(--font-heading);
}

.font-sans {
  font-family: var(--font-sans);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #111714;
}
::-webkit-scrollbar-thumb {
  background: #c5a880;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #dfcaa7;
}

/* Gold Gradient Accents */
.gold-gradient-text {
  background: linear-gradient(135deg, #dfcaa7 0%, #c5a880 50%, #9e7f57 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-gradient-bg {
  background: linear-gradient(135deg, #dfcaa7 0%, #c5a880 50%, #9e7f57 100%);
}

.btn-royal-gold {
  background: #c5a880;
  color: #111714;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(197, 168, 128, 0.25);
}

.btn-royal-gold:hover {
  background: #dfcaa7;
  color: #0c100e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 168, 128, 0.4);
}

.btn-royal-outline {
  border: 1px solid #c5a880;
  color: #c5a880;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.btn-royal-outline:hover {
  background: #c5a880;
  color: #111714;
}

/* Glassmorphism & Overlays */
.glass-header {
  background: rgba(17, 23, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(197, 168, 128, 0.15);
}

.card-luxury {
  background: #ffffff;
  border: 1px solid rgba(197, 168, 128, 0.2);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-luxury:hover {
  transform: translateY(-4px);
  border-color: rgba(197, 168, 128, 0.6);
  box-shadow: 0 20px 35px -10px rgba(17, 23, 20, 0.08);
}

/* Image Zoom on Hover */
.img-zoom-container {
  overflow: hidden;
}
.img-zoom-container img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-zoom-container:hover img {
  transform: scale(1.06);
}

/* Dining page gallery motion */
.dining-reveal,
.dining-photo {
  animation: dining-rise-in 700ms cubic-bezier(.2,.7,.2,1) both;
}
.dining-photo:nth-child(2) { animation-delay: 70ms; }
.dining-photo:nth-child(3) { animation-delay: 130ms; }
.dining-photo:nth-child(4) { animation-delay: 190ms; }
.dining-photo:nth-child(5) { animation-delay: 250ms; }
.dining-photo:nth-child(6) { animation-delay: 310ms; }
.dining-photo:nth-child(7) { animation-delay: 370ms; }
.dining-photo:nth-child(8) { animation-delay: 430ms; }
.dining-photo:nth-child(9) { animation-delay: 490ms; }
.dining-photo img {
  transition: transform 800ms cubic-bezier(.2,.7,.2,1), filter 500ms ease;
}
.dining-photo:hover img { transform: scale(1.07); filter: saturate(1.08); }
@keyframes dining-rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .dining-reveal, .dining-photo { animation: none; }
  .dining-photo img { transition: none; }
}

/* Experience Cards (Matching Original Estate Experiences) */
.experience-card {
  position: relative;
  overflow: hidden;
  height: 380px;
  cursor: pointer;
  border-radius: 14px;
}

@media (min-width: 640px) {
  .experience-card {
    height: 480px;
  }
}

@media (min-width: 1024px) {
  .experience-card {
    height: 560px;
  }
}

.experience-card .exp-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.experience-card:hover .exp-bg {
  transform: scale(1.08);
}

.experience-card .exp-inner-border {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  bottom: 14px;
  border: 1px solid rgba(223, 202, 167, 0.35);
  pointer-events: none;
  transition: all 0.5s ease;
  z-index: 2;
  border-radius: 10px;
}

.experience-card:hover .exp-inner-border {
  border-color: rgba(197, 168, 128, 0.85);
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
}

.experience-card .exp-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 16, 14, 0.94) 0%, rgba(12, 16, 14, 0.45) 45%, rgba(12, 16, 14, 0.05) 100%);
  z-index: 1;
}

.experience-card .exp-content {
  position: absolute;
  bottom: 24px;
  left: 22px;
  right: 22px;
  z-index: 3;
}

@media (max-width: 640px) {
  .experience-card .exp-content {
    bottom: 18px;
    left: 18px;
    right: 18px;
  }
  .experience-card .exp-content p {
    opacity: 0.9 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Full Width Estate Carousel */
.estate-carousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.estate-carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  gap: 12px;
}

@media (min-width: 640px) {
  .estate-carousel-track {
    gap: 16px;
  }
}

.estate-carousel-slide {
  flex: 0 0 82%;
  height: 320px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

@media (min-width: 640px) {
  .estate-carousel-slide {
    flex: 0 0 55%;
    height: 400px;
  }
}

@media (min-width: 768px) {
  .estate-carousel-slide {
    flex: 0 0 45%;
    height: 460px;
  }
}

@media (min-width: 1024px) {
  .estate-carousel-slide {
    flex: 0 0 28%;
    height: 520px;
  }
}

.estate-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.estate-carousel-slide:hover img {
  transform: scale(1.05);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  color: #111714;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  background: #c5a880;
  color: #111714;
  transform: translateY(-50%) scale(1.08);
}

.carousel-btn.prev {
  left: 24px;
}

.carousel-btn.next {
  right: 24px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4cfc7;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: #9e7f57;
  width: 24px;
  border-radius: 4px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Homepage cinematic scroll reveals */
.home-motion-ready .home-section-reveal {
  opacity: 0;
  transform: translate3d(0, 30px, 0) scale(0.99);
  filter: blur(3px);
  transition:
    opacity 850ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 950ms cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 850ms ease;
  will-change: opacity, transform, filter;
}

.home-motion-ready .home-section-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  will-change: auto;
}

.home-motion-ready .home-hero-copy > * {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 800ms ease, transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.home-motion-ready .home-hero-copy.is-visible > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.home-motion-ready .home-hero-copy > :nth-child(1) { transition-delay: 120ms; }
.home-motion-ready .home-hero-copy > :nth-child(2) { transition-delay: 260ms; }
.home-motion-ready .home-hero-copy > :nth-child(3) { transition-delay: 400ms; }
.home-motion-ready .home-hero-copy > :nth-child(4) { transition-delay: 540ms; }

@media (prefers-reduced-motion: reduce) {
  .home-motion-ready .home-section-reveal,
  .home-motion-ready .home-hero-copy > * {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* Interactive Royal Story Timeline */
.timeline-container {
  position: relative;
}

.timeline-spine {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 21px;
  width: 3px;
  background: rgba(197, 168, 128, 0.2);
  border-radius: 2px;
  z-index: 1;
}

@media (min-width: 1024px) {
  .timeline-spine {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, #dfcaa7 0%, #c5a880 70%, #9e7f57 100%);
  box-shadow: 0 0 14px rgba(197, 168, 128, 0.8);
  border-radius: 2px;
  transition: height 0.15s ease-out;
}

.timeline-node {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #111714;
  border: 2px solid #c5a880;
  color: #dfcaa7;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px rgba(197, 168, 128, 0.15);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  position: relative;
}

.timeline-node.active,
.timeline-item:hover .timeline-node {
  background: #c5a880;
  color: #111714;
  transform: scale(1.15);
  box-shadow: 0 0 0 8px rgba(197, 168, 128, 0.35), 0 0 25px rgba(197, 168, 128, 0.6);
}

/* Scroll-movable card animations */
.timeline-scroll-card {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s ease, box-shadow 0.4s ease;
  will-change: transform, opacity;
}

.timeline-scroll-card.scroll-hidden-left {
  opacity: 0.4;
  transform: perspective(1000px) translateX(-35px) translateZ(-50px) rotateY(6deg);
}

.timeline-scroll-card.scroll-hidden-right {
  opacity: 0.4;
  transform: perspective(1000px) translateX(35px) translateZ(-50px) rotateY(-6deg);
}

.timeline-scroll-card.scroll-visible {
  opacity: 1;
  transform: perspective(1000px) translateX(0) translateZ(0) rotateY(0deg);
}

.era-pill {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
}

.era-pill.active {
  background: #c5a880 !important;
  color: #111714 !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(197, 168, 128, 0.3);
}

.story-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}

.story-accordion-content.open {
  max-height: 1000px;
  transition: max-height 0.6s ease-in-out;
}

/* 3D Timeline & Interactive Depth */
.timeline-3d-stage {
  perspective: 1200px;
  transform-style: preserve-3d;
}

.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.card-3d:hover {
  border-color: rgba(197, 168, 128, 0.8) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 25px rgba(197, 168, 128, 0.2);
}

.card-3d-inner {
  transform: translateZ(25px);
  transform-style: preserve-3d;
}

/* 3D Property Cylinder Gallery */
.gallery-3d-viewport {
  position: relative;
  width: 100%;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  overflow: hidden;
}

.gallery-3d-carousel {
  position: relative;
  width: 280px;
  height: 380px;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@media (min-width: 640px) {
  .gallery-3d-viewport {
    height: 560px;
  }
  .gallery-3d-carousel {
    width: 320px;
    height: 420px;
  }
}

.gallery-3d-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(197, 168, 128, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: filter 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.gallery-3d-card:hover {
  border-color: #dfcaa7;
  box-shadow: 0 25px 60px rgba(197, 168, 128, 0.35);
}

.gallery-3d-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.gallery-3d-card:hover img {
  transform: scale(1.08);
}

/* Reflection beneath 3D Carousel */
.gallery-3d-floor {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) rotateX(90deg);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(197, 168, 128, 0.15) 0%, rgba(17, 23, 20, 0) 70%);
  pointer-events: none;
}
