/* ═══════════════════════════════════════════════
   BASE.CSS — Shared across ALL pages
   (design tokens, reset, navbar, footer, toast,
   back-to-top, AI chat widget, PWA install banner)
═══════════════════════════════════════════════ */

:root {
  --c-forest:    #0e2a1f;
  --c-deep:      #071912;
  --c-teal:      #0d6b5a;
  --c-teal-lt:   #15937d;
  --c-gold:      #c8933a;
  --c-gold-lt:   #e5b050;
  --c-sand:      #f2e8d6;
  --c-cream:     #faf6ef;
  --c-coral:     #d4533b;
  --c-mist:      rgba(242,232,214,0.55);
  --c-border:    rgba(200,147,58,0.22);
  --c-glass:     rgba(14,42,31,0.7);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Outfit', system-ui, sans-serif;

  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --r-sm:  8px;
  --r-md:  16px;
  --r-lg:  24px;
  --r-xl:  36px;

  --nav-h: 64px;
}

/* ═══ RESET & BASE ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); overflow-x: hidden; line-height: 1.6; }
img { display: block; width: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ═══ PHOSPHOR ICONS — default sizing/behavior ═══ */
i[class^="ph-"], i[class*=" ph-"] {
  font-size: 1.15em;
  vertical-align: -0.15em;
  line-height: 1;
}
:root { --ph-duotone-secondary-opacity: 0.35; }

/* ═══ SCROLL PROGRESS ═══ */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 2.5px; z-index: 9999;
  background: linear-gradient(90deg, var(--c-gold), var(--c-coral), var(--c-gold-lt));
  width: 0%; pointer-events: none; transition: width .12s linear;
}

/* ═══ ANNOUNCEMENT BANNER ═══ */
#announce-bar {
  background: var(--c-forest);
  color: var(--c-sand);
  text-align: center;
  padding: 10px 48px 10px 16px;
  font-size: .78rem;
  letter-spacing: .05em;
  position: relative;
  border-bottom: 1px solid rgba(200,147,58,.25);
  z-index: 901;
  line-height: 1.5;
}
#announce-bar strong { color: var(--c-gold-lt); }
#announce-bar a { color: var(--c-gold-lt); text-decoration: underline; margin-left: 6px; white-space: nowrap; }
#announce-close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(242,232,214,.4); font-size: 1rem;
  cursor: pointer; padding: 6px; line-height: 1; transition: color .2s;
}
#announce-close:hover { color: var(--c-sand); }

/* ═══ NAVBAR ═══ */
.navbar {
  position: sticky; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(7,25,18,.95);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: 0 4px 32px rgba(0,0,0,.4); }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo img {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; border: 1.5px solid rgba(200,147,58,.4);
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 600;
  color: var(--c-sand); letter-spacing: .02em;
  line-height: 1.1;
}
.logo-sub {
  font-size: .6rem; letter-spacing: .15em; text-transform: uppercase;
  color: rgba(200,147,58,.7); display: block;
}

.menu { display: flex; gap: 4px; }
.menu a {
  padding: 7px 16px; border-radius: 30px;
  font-size: .82rem; font-weight: 500; letter-spacing: .03em;
  color: rgba(242,232,214,.65);
  transition: color .2s, background .2s;
}
.menu a:hover { color: var(--c-sand); background: rgba(255,255,255,.09); }
.menu a.active {
  background: var(--c-gold); color: var(--c-forest);
  font-weight: 600; cursor: not-allowed;
}

/* Language toggle */
.lang-toggle {
  display: flex; align-items: center; gap: 2px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(200,147,58,.25);
  border-radius: 20px; padding: 3px; flex-shrink: 0; margin-right: 4px;
}
.lang-opt {
  padding: 5px 11px; border-radius: 16px; border: none; background: transparent;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  color: rgba(242,232,214,.45); transition: background .2s, color .2s;
}
.lang-opt:hover { color: rgba(242,232,214,.75); }
.lang-opt.active { background: var(--c-gold); color: var(--c-forest); }

.mobile-nav .lang-toggle {
  margin: 8px 0 0; padding: 4px;
}
.mobile-nav .lang-opt { padding: 8px 18px; font-size: .8rem; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 42px; height: 42px;
  background: transparent; border: 1px solid rgba(200,147,58,.3);
  border-radius: 10px; cursor: pointer; padding: 10px;
  transition: background .2s; flex-shrink: 0;
}
.hamburger:hover { background: rgba(255,255,255,.07); }
.hamburger span {
  display: block; width: 100%; height: 2px;
  background: var(--c-sand); border-radius: 2px;
  transition: transform .3s var(--ease-out), opacity .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none; position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: rgba(5,16,11,.97);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  z-index: 899;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 32px 24px;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.mobile-nav.open {
  display: flex; opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 600;
  color: rgba(242,232,214,.5);
  padding: 12px 0; width: 100%; text-align: center;
  border-bottom: 1px solid rgba(200,147,58,.1);
  transition: color .2s;
}
.mobile-nav a:hover { color: var(--c-sand); }
.mobile-nav a.active { color: var(--c-gold-lt); pointer-events: none; }

@media (max-width: 680px) {
  .menu { display: none; }
  .lang-toggle-desktop { display: none; }
  .hamburger { display: flex; }
}

/* ═══ SHARED SECTION ELEMENTS (used by page-specific sections) ═══ */
.section-eyebrow {
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--c-teal); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.section-eyebrow::before {
  content: ''; display: inline-block; width: 20px; height: 1.5px;
  background: var(--c-teal);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700; color: var(--c-forest); line-height: 1.15;
}
.section-rule {
  width: 44px; height: 3px; border-radius: 2px;
  background: var(--c-gold); margin-top: 16px;
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 50px;
  background: var(--c-gold); color: var(--c-forest);
  font-size: .88rem; font-weight: 600; letter-spacing: .03em;
  border: none; transition: transform .2s var(--ease-spring), box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,147,58,.4); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 50px;
  background: transparent; color: var(--c-sand);
  font-size: .88rem; font-weight: 500;
  border: 1.5px solid rgba(242,232,214,.35);
  transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: rgba(242,232,214,.7); background: rgba(242,232,214,.07); }

/* Generic page hero eyebrow rule (centered variant, used by gallery/location) */
.page-eyebrow {
  font-size: .7rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--c-gold-lt); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}

/* ═══ BACK TO TOP ═══ */
#backTop {
  position: fixed; bottom: 28px; right: 28px; z-index: 800;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--c-forest); color: var(--c-sand);
  border: 1px solid rgba(200,147,58,.3); font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(14,42,31,.4);
  opacity: 0; transform: translateY(10px);
  transition: opacity .3s, transform .3s, background .2s;
  pointer-events: none;
}
#backTop.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#backTop:hover { background: var(--c-gold); color: var(--c-forest); }

/* ═══ TOAST ═══ */
#site-toast {
  position: fixed; top: 76px; left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: var(--c-forest); border: 1px solid rgba(200,147,58,.4);
  border-radius: var(--r-md); padding: 12px 20px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s; z-index: 9999;
  min-width: 260px; max-width: calc(100vw - 40px);
}
#site-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-icon { font-size: .9rem; flex-shrink: 0; color: var(--c-sand); }
.toast-title { font-size: .8rem; font-weight: 600; color: var(--c-sand); }
.toast-sub { font-size: .68rem; color: rgba(200,147,58,.8); margin-top: 1px; }

/* ═══ FOOTER ═══ */
footer {
  background: #071912;
  padding: clamp(32px, 5vw, 52px) clamp(20px, 6vw, 72px);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
  border-top: 1px solid rgba(200,147,58,.12);
}
.footer-brand .logo-name {
  font-family: var(--font-display); font-size: 1.3rem; color: var(--c-sand);
}
.footer-brand p { font-size: .75rem; color: rgba(242,232,214,.35); margin-top: 3px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { font-size: .78rem; color: rgba(242,232,214,.4); transition: color .2s; }
.footer-links a:hover { color: var(--c-sand); }
.footer-copy { font-size: .72rem; color: rgba(242,232,214,.2); }
@media (max-width: 540px) { footer { flex-direction: column; } }

@keyframes livePulse { 0%,100%{ opacity:1; transform:scale(1) } 50%{ opacity:.4; transform:scale(1.5) } }

/* ═══ PWA INSTALL BANNER ═══ */
#pwa-install-banner {
  position: fixed; z-index: 950;
  transition: transform .4s var(--ease-out), opacity .3s;
}

#pwa-install-banner.pwa-desktop {
  left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(130%);
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(7,25,18,.92); border: 1px solid rgba(200,147,58,.35);
  border-radius: 30px; padding: 10px 14px 10px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  width: max-content; max-width: calc(100vw - 32px);
}
#pwa-install-banner.pwa-desktop.show { transform: translateX(-50%) translateY(0); }
.pwa-install-text-desktop {
  font-size: .8rem; color: rgba(242,232,214,.75); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
}
.pwa-install-link {
  color: var(--c-gold-lt); text-decoration: underline;
  text-underline-offset: 2px; font-weight: 700; transition: color .2s;
}
.pwa-install-link:hover { color: var(--c-gold); }

#pwa-install-banner.pwa-mobile {
  left: 50%; top: 12px; bottom: auto;
  transform: translateX(-50%) translateY(-140%);
  width: calc(100vw - 24px); max-width: 380px;
  display: flex; align-items: center; gap: 10px;
  background: var(--c-forest); border: 1px solid rgba(200,147,58,.4);
  border-radius: 16px; padding: 12px 12px 12px 14px;
  box-shadow: 0 14px 36px rgba(0,0,0,.5);
}
#pwa-install-banner.pwa-mobile.show { transform: translateX(-50%) translateY(0); }
.pwa-mobile-icon { font-size: 1.3rem; color: var(--c-gold); flex-shrink: 0; }
.pwa-mobile-body { flex: 1; min-width: 0; }
.pwa-mobile-title { font-size: .8rem; font-weight: 700; color: var(--c-sand); line-height: 1.3; }
.pwa-mobile-sub { font-size: .68rem; color: rgba(242,232,214,.5); margin-top: 2px; line-height: 1.3; }

/* ── SHARED ── */
.pwa-install-btn {
  flex-shrink: 0; padding: 7px 16px; border-radius: 30px;
  background: var(--c-gold); color: var(--c-forest);
  font-size: .74rem; font-weight: 700; letter-spacing: .02em;
  border: none; white-space: nowrap;
  transition: transform .2s var(--ease-spring);
}
.pwa-install-btn:hover { transform: scale(1.05); }
.pwa-install-close {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: none;
  color: rgba(242,232,214,.5); font-size: .7rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.pwa-install-close:hover { background: rgba(255,255,255,.16); color: var(--c-sand); }
@media (max-width: 480px) {
  .pwa-install-text-desktop { font-size: .74rem; }
}

/* ═══════════════════════════════════════════════
   AI CHAT WIDGET (identical on every page)
═══════════════════════════════════════════════ */
#ai-chat-btn {
  position: fixed; bottom: 28px; left: 28px; z-index: 1000;
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-forest), #1a5c4a);
  border: 1.5px solid rgba(200,147,58,.4);
  cursor: grab; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  transition: transform .2s var(--ease-spring), box-shadow .2s;
  animation: chatPulse 3s ease infinite;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
#ai-chat-btn.dragging {
  cursor: grabbing;
  transition: none;
  animation: none;
}
#ai-chat-btn:hover { transform: scale(1.1); box-shadow: 0 10px 32px rgba(0,0,0,.5); }
#ai-chat-btn.open { animation: none; transform: rotate(180deg); }
#ai-chat-btn::before {
  content: 'AI Guide';
  position: absolute; left: 62px;
  background: var(--c-forest); color: var(--c-sand);
  font-family: var(--font-body); font-size: .68rem; font-weight: 600;
  letter-spacing: .05em; white-space: nowrap;
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid rgba(200,147,58,.3);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
#ai-chat-btn:hover::before { opacity: 1; }
#ai-chat-btn.open::before { display: none; }
#ai-chat-btn.dragging::before { display: none; }
@keyframes chatPulse {
  0%,100% { box-shadow: 0 6px 24px rgba(0,0,0,.4), 0 0 0 0 rgba(200,147,58,.5); }
  70%      { box-shadow: 0 6px 24px rgba(0,0,0,.4), 0 0 0 12px rgba(200,147,58,0); }
}

#ai-chat-window {
  position: fixed; bottom: 96px; left: 28px;
  width: min(360px, calc(100vw - 40px));
  max-height: min(540px, calc(100svh - 120px));
  background: #0a1a11;
  border: 1px solid rgba(200,147,58,.22);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.65);
  display: flex; flex-direction: column; overflow: hidden;
  z-index: 999; opacity: 0;
  transform: translateY(14px) scale(.97);
  pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
#ai-chat-window.open {
  opacity: 1; transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, #112318 0%, #0d1e14 100%);
  border-bottom: 1px solid rgba(200,147,58,.18);
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-gold), var(--c-gold-lt));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.chat-header-info h4 {
  font-family: var(--font-display); font-size: .9rem;
  color: var(--c-sand); font-weight: 700; margin-bottom: 1px;
}
.chat-header-info p {
  font-size: .6rem; color: rgba(200,147,58,.8);
  letter-spacing: .08em; text-transform: uppercase; line-height: 1;
}
.chat-status {
  margin-left: auto; display: flex; align-items: center;
  gap: 5px; font-size: .62rem; color: rgba(242,232,214,.35);
}
.chat-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ccc88; animation: livePulse 2s infinite;
}

#chat-messages {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: rgba(200,147,58,.18) transparent;
}
#chat-messages::-webkit-scrollbar { width: 4px; }
#chat-messages::-webkit-scrollbar-thumb { background: rgba(200,147,58,.22); border-radius: 4px; }

.msg { display: flex; gap: 7px; align-items: flex-end; }
.msg.user { flex-direction: row-reverse; }
.msg-bubble {
  max-width: 84%; padding: 9px 13px; border-radius: 14px;
  font-size: .8rem; line-height: 1.55;
}
.msg.bot .msg-bubble {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.07);
  color: rgba(242,232,214,.85);
  border-bottom-left-radius: 4px;
}
.msg.user .msg-bubble {
  background: linear-gradient(135deg, #112318, #163224);
  border: 1px solid rgba(200,147,58,.28);
  color: var(--c-sand); border-bottom-right-radius: 4px;
}
.msg-icon {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .7rem;
}
.msg.bot .msg-icon { background: rgba(200,147,58,.12); border: 1px solid rgba(200,147,58,.28); }
.msg.user .msg-icon { background: rgba(242,232,214,.08); border: 1px solid rgba(242,232,214,.12); }

.typing-indicator { display: flex; gap: 4px; padding: 12px 14px; align-items: center; }
.typing-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(200,147,58,.6);
  animation: typeBounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typeBounce { 0%,60%,100%{ transform:translateY(0); opacity:.5; } 30%{ transform:translateY(-5px); opacity:1; } }

.suggestions {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 0 13px 10px; flex-shrink: 0;
}
.suggestion-btn {
  font-family: var(--font-body); font-size: .68rem; font-weight: 500;
  padding: 5px 11px; border-radius: 20px;
  border: 1px solid rgba(200,147,58,.28);
  background: rgba(200,147,58,.06);
  color: rgba(242,232,214,.6); cursor: pointer;
  transition: all .2s; white-space: nowrap;
}
.suggestion-btn:hover { border-color: rgba(200,147,58,.65); color: #e0c890; background: rgba(200,147,58,.11); }

.chat-input-row {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 12px;
  border-top: 1px solid rgba(200,147,58,.14);
  background: rgba(10,26,17,.8); flex-shrink: 0;
}
#chat-input {
  flex: 1; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09); border-radius: 22px;
  padding: 8px 14px; font-family: var(--font-body);
  font-size: .8rem; color: var(--c-sand); outline: none;
  transition: border-color .2s;
}
#chat-input::placeholder { color: rgba(242,232,214,.28); }
#chat-input:focus { border-color: rgba(200,147,58,.5); }
#chat-send {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--c-gold); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; flex-shrink: 0;
  transition: background .2s, transform .2s var(--ease-spring);
}
#chat-send:hover { background: var(--c-gold-lt); transform: scale(1.1); }
#chat-send:disabled { background: rgba(200,147,58,.28); cursor: default; transform: none; }

@media (max-width: 480px) {
  #ai-chat-btn { left: 16px; bottom: 16px; width: 50px; height: 50px; }
  #ai-chat-window { left: 10px; bottom: 80px; }
}