/* ==========================================================================
   Gazzania Boutique Hotel — Global Styles (build-free / CDN Tailwind version)
   Utility classes (bg-forest, rounded-full, etc.) are compiled at runtime by
   the Tailwind Play CDN script loaded in each HTML <head>. The rules below
   are plain CSS for the handful of reusable components and effects that
   need custom behaviour Tailwind's CDN mode can't @apply on its own.
   ========================================================================== */

:root {
  --gz-beige: #FBF8F2;
  --gz-forest: #123524;
  --gz-forest-dark: #0A1D13;
  --gz-moss: #3F5D46;
  --gz-gold: #C6A15B;
  --gz-gold-light: #E4C989;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--gz-beige);
  color: var(--gz-forest);
}

/* Dark mode overrides */
html.dark body {
  background-color: #0A1D13;
  color: #F5EEE0;
}

/* ---------- Display typography (Fraunces) ----------
   Fraunces is a variable font with an optical-size axis: it reads more
   "display" and characterful at large sizes and settles down at small
   sizes, so the same font-family works for a 4rem hero headline and a
   1.1rem card title without extra rules. */
h1, h2, h3,
.font-display {
  font-family: "Fraunces", serif;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
}
h1, .text-4xl.font-display, .text-5xl.font-display, .text-6xl.font-display {
  letter-spacing: -0.02em;
}

/* ---------- Signature motif: the gazania flower ----------
   A small eight-petal line-mark echoing the hotel's namesake flower.
   Used as a bullet before section eyebrows across the whole site, and
   available as a standalone divider via .gz-flower-divider. */
.section-eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #9A7B3D;
}
.section-eyebrow::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23C6A15B' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M20 20 L20 4'/%3E%3Cpath d='M20 20 L32.8 11.2'/%3E%3Cpath d='M20 20 L36 20'/%3E%3Cpath d='M20 20 L32.8 28.8'/%3E%3Cpath d='M20 20 L20 36'/%3E%3Cpath d='M20 20 L7.2 28.8'/%3E%3Cpath d='M20 20 L4 20'/%3E%3Cpath d='M20 20 L7.2 11.2'/%3E%3C/g%3E%3Ccircle cx='20' cy='20' r='4' fill='%23C6A15B'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.gz-flower-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: rgba(18, 53, 36, 0.15);
}
.gz-flower-divider.on-dark {
  color: rgba(251, 248, 242, 0.15);
}
.gz-flower-divider::before,
.gz-flower-divider::after {
  content: "";
  height: 1px;
  width: 100%;
  max-width: 120px;
  background: currentColor;
}
.gz-flower-divider svg {
  flex-shrink: 0;
  color: var(--gz-gold);
}

/* ---------- Reusable components ---------- */
.btn-primary,
.btn-outline {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  padding: 0.8rem 1.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-primary::before,
.btn-outline::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.btn-primary {
  background-color: var(--gz-forest);
  color: #FBF8F2;
  box-shadow: 0 10px 30px -10px rgba(18, 53, 36, 0.35);
}
.btn-primary::before {
  background-color: var(--gz-gold);
}
.btn-primary:hover {
  color: #0F2A1C;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px rgba(198, 161, 91, 0.5);
}
.btn-primary:hover::before {
  transform: scaleX(1);
}

.btn-outline {
  border: 2px solid #FBF8F2;
  color: #FBF8F2;
}
.btn-outline::before {
  background-color: #FBF8F2;
}
.btn-outline:hover {
  color: var(--gz-forest);
  transform: translateY(-2px);
}
.btn-outline:hover::before {
  transform: scaleX(1);
}

.nav-link {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 1.5px;
  width: 0;
  background-color: var(--gz-gold);
  transition: width 0.3s ease;
}
.nav-link:hover {
  color: var(--gz-gold);
}
.nav-link:hover::after {
  width: 100%;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 30px -12px rgba(18, 53, 36, 0.2);
  border: 1px solid rgba(18, 53, 36, 0.06);
  backdrop-filter: blur(4px);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px -16px rgba(18, 53, 36, 0.28);
}
.card img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover img {
  transform: scale(1.06);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Sticky nav shadow on scroll ---------- */
.site-header.scrolled {
  box-shadow: 0 8px 24px -12px rgba(18, 53, 36, 0.35);
}

/* ---------- Subtle depth on deep forest sections ----------
   A faint grain texture keeps large flat green panels from looking like
   a solid-color template block. Painted first in DOM order with z-index:0
   so it sits behind normal content without having to touch every child's
   positioning (which would risk breaking absolutely-positioned hero images). */
.bg-forest,
.bg-forest-900,
.bg-forest-800 {
  position: relative;
}
/* Scoped to section/footer level so it never applies to small rounded
   UI chrome (buttons, chat panels) where a square pseudo-element would
   poke out past rounded corners. */
section.bg-forest::before,
section.bg-forest-900::before,
section.bg-forest-800::before,
footer.bg-forest::before,
footer.bg-forest-900::before,
footer.bg-forest-800::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

/* ---------- Back to top button ---------- */
#backToTop {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#backToTop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- Gallery lightbox ---------- */
#lightbox {
  transition: opacity 0.25s ease;
}

/* ---------- Lazy image fade ---------- */
img.lazy-img {
  opacity: 0;
  transition: opacity 0.5s ease;
}
img.lazy-img.loaded {
  opacity: 1;
}

/* ---------- Mobile menu ---------- */
#mobileMenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
#mobileMenu.open {
  max-height: 480px;
}

/* Accessibility: visible focus rings everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gz-gold);
  outline-offset: 2px;
}

/* ---------- AI chat widget: typing indicator ---------- */
.gz-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #C6A15B;
  display: inline-block;
  animation: gz-bounce 1.2s infinite ease-in-out;
}
.gz-dot:nth-child(2) { animation-delay: 0.15s; }
.gz-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes gz-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ---------- Star rating input (reviews page) ---------- */
.gz-star {
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}
.gz-star:hover,
.gz-star:hover ~ .gz-star {
  transform: scale(1.08);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
