/* Trip Komodo Tour — dark luxury theme
   Wraps base styles in @layer base so Tailwind utilities always win. */

/*
 * COLOR USAGE GUIDE:
 * - .text-secondary (#A8844E) — for headings 18pt+, UI buttons, focus outlines only
 * - .text-secondary-accessible (#D4A96A) — for body text, small labels, inline links on dark bg
 * - Body text on dark bg must have contrast ≥ 4.5:1 (WCAG AA)
 */

:root {
  --color-secondary: #A8844E;
  --color-secondary-accessible: #D4A96A; /* WCAG AA for body text on black */
  --color-secondary-dark: #8A6B3F; /* for hover on light bg if needed */
}

/* Opt-in accessible secondary for body/small text on dark backgrounds */
.text-secondary-accessible { color: var(--color-secondary-accessible); }
.text-secondary-sm { color: var(--color-secondary-accessible); }

/* ARIA live regions — visible to screen readers, not visually disruptive */
[aria-live="polite"], [aria-live="assertive"] {
  /* No styles required, but ensure no accidental display:none */
}
.sr-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; font-size: 16px; }

  /* Dark theme base — body bg/color set by Tailwind bg-black text-white classes */
  body {
    margin: 0;
    font-family: var(--font-family-secondary, 'Inter', ui-sans-serif, sans-serif);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.65;
  }

  /* Reset heading margins — colors controlled by Tailwind text-* classes */
  h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5em;
    line-height: 1.2;
    font-family: var(--font-family-primary, 'Cormorant Garamond', Georgia, serif);
  }
  h1 { font-size: clamp(1.75rem, 4vw, 3.5rem); line-height: 1.1; }
  h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.15; }
  h3 { font-size: clamp(1.25rem, 2.5vw, 2rem); }

  p { margin: 0 0 1em; }
  img { max-width: 100%; display: block; }
  ul, ol { padding-left: 1.25rem; margin: 0 0 1em; }
  li { margin: 0 0 0.35rem; }

  /* Anchor — no underline by default on dark theme */
  a { color: inherit; text-decoration: none; }
  a:hover { color: var(--color-secondary, #A8844E); }

  /* Focus visible */
  :focus-visible {
    outline: 2px solid var(--color-secondary, #A8844E);
    outline-offset: 2px;
    border-radius: 2px;
  }
}

/* ── Utilities ── */

/* Font families */
.font-primary { font-family: 'Cormorant Garamond', Georgia, serif !important; }
.font-secondary { font-family: 'Inter', ui-sans-serif, sans-serif !important; }

/* Scrollbar utilities */
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* Backdrop blur for header */
.backdrop-blur-header { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* Z-index custom layers */
.z-999  { z-index: 999; }
.z-1000 { z-index: 1000; }
.z-9999 { z-index: 9999; }
.z-10000 { z-index: 10000; }

/* Container — inside @layer so Tailwind responsive utilities can override */
@layer base {
  .container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }
}

/* Form stacking — no z-index needed now that inline critical CSS is scoped */

/* Accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--color-secondary, #A8844E); color: #000; padding: .5rem 1rem; z-index: 10001; font-weight: 600; }
.skip-link:focus { left: 0.5rem; top: 0; z-index: 10001; }

/* Day tab active */
.day-tab[data-active="true"],
.day-tab.active {
  color: var(--color-secondary, #A8844E);
  border-bottom: 2px solid var(--color-secondary, #A8844E);
}

/* Swiper pagination bullets — brass color */
.swiper-pagination-bullet-active { background: var(--color-secondary, #A8844E) !important; }

/* Floating stack (mascot + WA button) */
.tkt-floating-stack {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .5rem;
  pointer-events: none;
}
.tkt-floating-stack > a { pointer-events: auto; }

/* WA pulse (now scoped to green circle) */
@keyframes wa-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); } 60% { box-shadow: 0 0 0 14px rgba(37,211,102,0); } }

.tkt-wa-float {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: #22c55e;
  color: #fff;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,.35);
  transition: transform .25s ease, background .2s ease;
}
.tkt-wa-float:hover { background: #16a34a; transform: translateY(-3px) scale(1.06); color: #fff; }
.tkt-wa-float.wa-pulse { animation: wa-pulse 2.5s infinite; }

/* Smart Planner mascot (komodoexplorer.com link) */
.tkt-mascot {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 9999px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 12px 30px -6px rgba(0,0,0,.45), 0 0 0 2px rgba(168,132,78,.45);
  transition: transform .25s ease, box-shadow .25s ease;
}
.tkt-mascot:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 16px 40px -6px rgba(0,0,0,.55), 0 0 0 2px rgba(168,132,78,.9); }
.tkt-mascot__video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tkt-mascot__bubble {
  position: absolute;
  top: -10px;
  right: calc(100% + 10px);
  background: #A8844E;
  color: #000;
  font: 600 11px/1 'Inter', sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .45rem .7rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.tkt-mascot:hover .tkt-mascot__bubble { opacity: 1; transform: translateX(0); }

/* Tablet/mobile: slightly smaller mascot, keep WA size for tap target */
@media (max-width: 640px) {
  .tkt-mascot { width: 76px; height: 76px; }
  .tkt-floating-stack { right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom, 0)); }
  .tkt-mascot__bubble { display: none; }
}

/* Reduce-motion friendliness */
@media (prefers-reduced-motion: reduce) {
  .tkt-wa-float.wa-pulse { animation: none; }
  .tkt-mascot__video { display: none; }
  .tkt-mascot { background: #A8844E; }
  .tkt-mascot::before { content: '🧭'; font-size: 2rem; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
}

/* Cabin gallery */
.cabin-gallery-swiper .swiper-slide img { object-fit: cover; width: 100%; height: 100%; }

/* Responsive video embed */
.video-responsive { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.video-responsive iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* Print */
@media print {
  .no-print, header, footer { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
}


/* iPhone notch safe area support */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .safe-area-top { padding-top: env(safe-area-inset-top); }
  .safe-area-bottom { padding-bottom: env(safe-area-inset-bottom); }
}

/* Tap target minimum size 44×44px WCAG AA — in @layer base so Tailwind utilities win */
@layer base {
  button, [role="button"], input[type="submit"], input[type="button"] {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }
  a { touch-action: manipulation; }
}

/* focus-visible handled in @layer base above */

/* Reduce motion for users who prefer */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   GDPR Consent Banner (bkt-consent)
   ============================================================ */
.bkt-consent {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  animation: bkt-consent-fade 0.25s ease-out;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  /* Allow clicks through to header/burger — only the panel captures clicks */
  pointer-events: none;
}
.bkt-consent__panel {
  pointer-events: auto;
}
@media (min-width: 768px) {
  .bkt-consent { align-items: center; padding: 2rem; }
}
@keyframes bkt-consent-fade { from { opacity: 0; } to { opacity: 1; } }

.bkt-consent__panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: #0a0a0a;
  border: 1px solid rgba(168, 132, 78, 0.3);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 1.5rem 1.5rem 1.25rem;
  font-family: 'Inter', sans-serif;
  max-height: 85vh;
  overflow-y: auto;
}
@media (min-width: 768px) {
  .bkt-consent__panel { padding: 2rem 2.25rem 1.75rem; }
}

.bkt-consent__close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 2.25rem;
  height: 2.25rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
.bkt-consent__close:hover { color: #A8844E; }

.bkt-consent__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #A8844E;
  font-size: 1.5rem;
  margin: 0 0 .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 500;
  padding-right: 2rem;
}
@media (min-width: 768px) {
  .bkt-consent__title { font-size: 1.75rem; }
}

.bkt-consent__body {
  font-size: .875rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 1.25rem;
}
.bkt-consent__body a {
  color: #A8844E;
  text-decoration: underline;
  text-decoration-color: rgba(168, 132, 78, 0.4);
}
.bkt-consent__body a:hover { color: #fff; text-decoration-color: #fff; }

.bkt-consent__cats { display: flex; flex-direction: column; gap: .75rem; margin: 1rem 0 1.25rem; }
.bkt-consent__cat {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.bkt-consent__cat-body { flex: 1; font-size: .8125rem; }
.bkt-consent__cat-body strong { color: #fff; display: block; font-size: .9rem; margin-bottom: .15rem; }
.bkt-consent__cat-body p { color: rgba(255, 255, 255, 0.6); margin: .25rem 0 0; font-size: .8125rem; line-height: 1.5; }
.bkt-consent__cat-badge {
  display: inline-block;
  margin-left: .4rem;
  padding: .1rem .5rem;
  font-size: .65rem;
  color: rgba(168, 132, 78, 0.9);
  border: 1px solid rgba(168, 132, 78, 0.3);
  text-transform: uppercase;
  letter-spacing: .08em;
  vertical-align: middle;
}

.bkt-consent__switch { position: relative; width: 42px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.bkt-consent__switch input { opacity: 0; width: 0; height: 0; }
.bkt-consent__slider {
  position: absolute; inset: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: .2s;
  border-radius: 22px;
}
.bkt-consent__slider::before {
  content: "";
  position: absolute; left: 2px; bottom: 2px;
  width: 16px; height: 16px;
  background: rgba(255, 255, 255, 0.6);
  transition: .2s;
  border-radius: 50%;
}
.bkt-consent__switch input:checked + .bkt-consent__slider { background: #A8844E; border-color: #A8844E; }
.bkt-consent__switch input:checked + .bkt-consent__slider::before { transform: translateX(20px); background: #000; }
.bkt-consent__switch input:disabled + .bkt-consent__slider { opacity: .6; cursor: not-allowed; }

.bkt-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}
.bkt-consent__btn {
  min-height: 44px;
  padding: .6rem 1.25rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
  font-family: inherit;
}
.bkt-consent__btn--primary {
  background: #A8844E;
  color: #000;
  border-color: #A8844E;
}
.bkt-consent__btn--primary:hover { background: #fff; border-color: #fff; }
.bkt-consent__btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.2);
}
.bkt-consent__btn--ghost:hover { color: #fff; border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.05); }
.bkt-consent__btn[hidden] { display: none; }
