/* ==========================================================
   Kawa Elite Safaris — enhancements
   Loaded AFTER custom-styles.css so it layers on top safely.
   ========================================================== */

:root {
  --kes-gold: #c08a2e;
  --kes-gold-soft: #e7c47a;
  --kes-acacia: #2c4733;
  --kes-night: #17130d;
  --kes-whatsapp: #25d366;
  --kes-whatsapp-dark: #128c4a;
}

/* ---------- Small theme details ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; overflow-x: clip; }
body { overflow-x: clip; }
::selection { background: var(--kes-gold-soft); color: var(--kes-night); }
:focus-visible { outline: 3px solid var(--kes-gold); outline-offset: 3px; border-radius: 4px; }
* { scrollbar-color: var(--kes-gold) transparent; scrollbar-width: thin; }

.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--kes-acacia), var(--kes-gold));
  transform-origin: left center; transform: scaleX(0);
  pointer-events: none;
}

/* ---------- Logo (logo.png) ---------- */
.brand img { height: clamp(38px, 5vw, 54px); width: auto; max-width: 62vw; object-fit: contain; display: block; }
.footer-brand img { height: clamp(52px, 7vw, 72px); }

/* ---------- Top contact bar ---------- */
.topbar {
  position: relative; z-index: 60;
  background: var(--kes-acacia);
  color: #f3ecd9;
  font-size: .8125rem;
  line-height: 1.2;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem clamp(1rem, 4vw, 3rem);
  max-width: 1600px; margin: 0 auto;
}
.topbar-note { opacity: .85; }
.topbar-links { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.topbar-links a {
  display: inline-flex; align-items: center; gap: .45rem;
  color: inherit; text-decoration: none; white-space: nowrap;
  transition: color .2s ease;
}
.topbar-links a:hover { color: var(--kes-gold-soft); }
.topbar-links svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.topbar-links .short { display: none; }

/* ---------- Hero: everything visible on first screen ---------- */
.hero {
  --scene-h: clamp(190px, 32vh, 340px);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  height: auto;
  min-height: calc(100vh - var(--chrome-h, 7rem));
  min-height: calc(100svh - var(--chrome-h, 7rem));
  padding: clamp(2.25rem, 6vh, 4.5rem) clamp(1.25rem, 5vw, 4.5rem) calc(var(--scene-h) + .5rem);
  box-sizing: border-box;
}
.hero > .hero-content {
  position: relative; inset: auto; transform: none; margin: 0;
  width: auto; max-width: 46rem;
}
.hero-image {
  z-index: -2;
  transform-origin: 62% 70%;
  animation: kes-kenburns 28s ease-in-out infinite alternate;
}
@keyframes kes-kenburns { from { scale: 1.02; } to { scale: 1.12; } }

/* Headline sequence on page load */
.hero .eyebrow,
.hero h1,
.hero .hero-copy,
.hero .hero-actions,
.hero .hero-caption,
.hero .hero-note {
  animation: kes-rise 1s cubic-bezier(.2,.7,.2,1) both;
}
.hero .eyebrow      { animation-delay: .1s; }
.hero h1            { animation-delay: .3s; }
.hero .hero-copy    { animation-delay: .5s; }
.hero .hero-actions { animation-delay: .7s; }
.hero .hero-caption { animation-delay: 1s; }
.hero .hero-note    { animation-delay: 1.15s; }
@keyframes kes-rise { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }

.hero-actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.hero-whatsapp {
  display: inline-flex; align-items: center; gap: .5rem;
  color: #fff; font-weight: 600; text-decoration: none;
  padding: .85rem 1.3rem; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.65);
  backdrop-filter: blur(4px);
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.hero-whatsapp::before {
  content: ""; width: .6rem; height: .6rem; border-radius: 50%;
  background: var(--kes-whatsapp); box-shadow: 0 0 0 0 rgba(37,211,102,.7);
  animation: kes-ping 2s infinite;
}
.hero-whatsapp:hover { background: var(--kes-whatsapp); border-color: var(--kes-whatsapp); color: #08240f; }
.hero-whatsapp:hover::before { background: #08240f; }
@keyframes kes-ping { 70% { box-shadow: 0 0 0 .6rem rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }

/* ---------- The safari scene ---------- */
.safari-scene {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--scene-h);
  z-index: -1; pointer-events: none; overflow: hidden;
  color: var(--kes-night);
}
.safari-scene::before { /* warm horizon light behind the silhouettes */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(255,160,50,.5), rgba(255,160,50,.14) 55%, transparent);
}
.sun-glow {
  position: absolute; left: 68%; bottom: -12%;
  width: min(46vw, 560px); aspect-ratio: 1; border-radius: 50%;
  translate: -50% 0;
  background: radial-gradient(circle, rgba(255,214,130,.85), rgba(255,170,60,.35) 45%, transparent 70%);
  animation: kes-sunrise 4s ease-out both, kes-breathe 7s ease-in-out 4s infinite alternate;
}
@keyframes kes-sunrise { from { translate: -50% 60%; opacity: 0; } to { translate: -50% 0; opacity: 1; } }
@keyframes kes-breathe { from { scale: 1; opacity: .9; } to { scale: 1.08; opacity: 1; } }

.bird { position: absolute; width: 26px; fill: var(--kes-night); opacity: .75; animation: kes-fly linear infinite; }
.bird-1 { top: 6%;  animation-duration: 26s; animation-delay: -8s; }
.bird-2 { top: 18%; width: 20px; animation-duration: 32s; animation-delay: -18s; }
.bird-3 { top: 2%;  width: 16px; animation-duration: 38s; animation-delay: -26s; }
@keyframes kes-fly { from { translate: -10vw 0; } 50% { translate: 50vw -18px; } to { translate: 110vw 6px; } }

.acacia { position: absolute; bottom: 24px; fill: currentColor; color: var(--kes-night); }
.acacia-1 { left: 3%;  width: clamp(80px, 11vw, 160px); }
.acacia-2 { left: 46%; width: clamp(48px, 6vw, 88px); opacity: .85; bottom: 26px; }
.acacia-3 { right: 3%; width: clamp(100px, 14vw, 200px); }

.savanna-ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background: var(--kes-night);
  clip-path: polygon(0 45%, 6% 30%, 14% 42%, 24% 22%, 36% 38%, 48% 26%, 60% 40%, 72% 24%, 84% 38%, 93% 28%, 100% 40%, 100% 100%, 0 100%);
}

/* Elephants: slow walk, alternating legs */
.elephants-track {
  position: absolute; left: 0; bottom: 20px;
  display: flex; align-items: flex-end; gap: clamp(8px, 1.6vw, 24px);
  color: #271f13; opacity: .92;
  animation: kes-walk 90s linear infinite; animation-delay: -34s;
}
@keyframes kes-walk { from { translate: -620px 0; } to { translate: calc(100vw + 100px) 0; } }
.elephant { width: clamp(100px, 14vw, 205px); fill: currentColor; overflow: visible; animation: kes-sway 1.6s ease-in-out infinite alternate; }
.elephant.calf { width: clamp(60px, 8vw, 118px); animation-delay: -.7s; }
@keyframes kes-sway { from { translate: 0 0; } to { translate: 0 -2px; } }
.elephant .leg { transform-box: view-box; animation-duration: 1.6s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.elephant .leg-a { animation-name: kes-step; animation-direction: alternate; }
.elephant .leg-b { animation-name: kes-step; animation-direction: alternate-reverse; }
@keyframes kes-step { from { rotate: -9deg; } to { rotate: 9deg; } }
.elephant .ear { fill: #34291a; }
.elephant .tusk { stroke: #eadfc4; }
.elephant .e-tail { transform-box: view-box; transform-origin: 24px 58px; animation: kes-tail 1.2s ease-in-out infinite alternate; }
@keyframes kes-tail { from { rotate: -8deg; } to { rotate: 10deg; } }

/* Lions chasing an impala */
.chase-track {
  position: absolute; left: 0; bottom: 20px;
  display: flex; align-items: flex-end; gap: clamp(2px, .6vw, 10px);
  animation: kes-chase 17s linear infinite; animation-delay: -6.5s;
}
@keyframes kes-chase { from { translate: -620px 0; } to { translate: calc(100vw + 60px) 0; } }
.lion { width: clamp(72px, 9.5vw, 132px); color: #33230f; fill: currentColor; overflow: visible; animation: kes-gallop .34s ease-in-out infinite alternate; }
.lion.lion-2 { width: clamp(64px, 8.4vw, 116px); animation-delay: -.14s; }
@keyframes kes-gallop { from { translate: 0 0; rotate: -2deg; } to { translate: 0 -7px; rotate: 2.5deg; } }
.lion .lleg { transform-box: view-box; animation-duration: .34s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: alternate; }
.lion .lleg path { fill: none; stroke: currentColor; stroke-width: 10; stroke-linecap: round; }
.lion .lf { animation-name: kes-stride; }
.lion .lb { animation-name: kes-stride-rev; }
.lion .lf2, .lion .lb2 { animation-delay: -.07s; }
@keyframes kes-stride     { from { rotate: -40deg; } to { rotate: 40deg; } }
@keyframes kes-stride-rev { from { rotate: 40deg; }  to { rotate: -40deg; } }
.lion .l-tail { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; }

.gazelle {
  width: clamp(56px, 7.2vw, 96px); margin-left: clamp(46px, 8vw, 120px);
  color: #46331b; fill: currentColor; overflow: visible;
  animation: kes-pronk .68s ease-in-out infinite alternate;
}
@keyframes kes-pronk { from { translate: 0 0; rotate: 3deg; } to { translate: 0 -24px; rotate: -5deg; } }
.gazelle .gleg { transform-box: view-box; animation-duration: .34s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: alternate; }
.gazelle .gleg path { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; }
.gazelle .gf { animation-name: kes-stride; }
.gazelle .gb { animation-name: kes-stride-rev; }
.gazelle .gf2, .gazelle .gb2 { animation-delay: -.08s; }
.gazelle .g-tail { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; }
.gazelle .horn { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }

/* The jeep */
.jeep-track {
  position: absolute; left: 0; bottom: 20px;
  width: clamp(100px, 11vw, 150px);
  animation: kes-drive 26s linear infinite; animation-delay: -15s;
}
@keyframes kes-drive { from { translate: -240px 0; } to { translate: calc(100vw + 60px) 0; } }
.jeep { display: block; width: 100%; fill: var(--kes-night); overflow: visible; animation: kes-bump .45s ease-in-out infinite alternate; }
@keyframes kes-bump { from { translate: 0 0; } to { translate: 0 -1.5px; } }
.jeep .hub { fill: var(--kes-gold-soft); }
.jeep .spoke { stroke: var(--kes-gold-soft); stroke-width: 2; fill: none; }
.jeep .headlight { fill: #ffd98a; }
.jeep .wheel { transform-box: view-box; animation: kes-spin .6s linear infinite; }
@keyframes kes-spin { to { rotate: 360deg; } }
.dust { position: absolute; bottom: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(214,170,100,.55); animation: kes-dust 1.8s ease-out infinite; }
.dust-2 { animation-delay: .6s; }
.dust-3 { animation-delay: 1.2s; }
@keyframes kes-dust { from { opacity: .7; translate: 0 0; scale: .5; } to { opacity: 0; translate: -60px -22px; scale: 2.4; } }

/* ---------- Book now (trip cards) ---------- */
.book-now {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  width: calc(100% - 2rem); margin: .25rem 1rem 1rem; box-sizing: border-box;
  padding: .85rem 1.1rem;
  font: inherit; font-weight: 600; font-size: .95rem;
  color: #fff; background: var(--kes-whatsapp-dark);
  border: 0; border-radius: 999px; cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.book-now svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.book-now:hover { background: var(--kes-acacia); transform: translateY(-2px); }
.book-now:active { transform: translateY(0); }

/* ---------- Contact section ---------- */
.contact {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: start;
}
.contact-intro h2 { margin: 0 0 1rem; }
.contact-intro p { margin: 0; max-width: 34ch; opacity: .8; line-height: 1.6; }
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(23,19,13,.18); }
.contact-list li { border-bottom: 1px solid rgba(23,19,13,.18); }
.contact-list a {
  display: grid; grid-template-columns: 7rem minmax(0, 1fr) auto; align-items: center; gap: 1rem;
  padding: 1.5rem .25rem; color: inherit; text-decoration: none;
  transition: padding .3s ease, background .3s ease;
}
.contact-label { font-size: .9rem; opacity: .65; }
.contact-value { font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.1rem, 2.4vw, 1.75rem); overflow-wrap: anywhere; }
.contact-go {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid currentColor; transition: background .25s ease, color .25s ease, rotate .25s ease;
}
.contact-list a:hover { padding-left: 1rem; background: rgba(192,138,46,.1); }
.contact-list a:hover .contact-go { background: var(--kes-gold); border-color: var(--kes-gold); color: #fff; rotate: 45deg; }

/* ---------- Footer contacts ---------- */
.footer-tagline {
  margin: 1.5rem 0 0; font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-style: italic; color: var(--kes-gold-soft);
}
.footer-contacts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem;
  padding: 2rem 0; margin: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,.18);
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.footer-contacts span { display: block; font-size: .8rem; opacity: .6; margin-bottom: .35rem; }
.footer-contacts a { color: inherit; text-decoration: none; font-size: 1.1rem; overflow-wrap: anywhere; border-bottom: 1px solid transparent; transition: border-color .2s ease, color .2s ease; }
.footer-contacts a:hover { color: var(--kes-gold-soft); border-color: var(--kes-gold-soft); }

/* ---------- Floating contact buttons ---------- */
.float-contact {
  position: fixed; right: clamp(.9rem, 2.5vw, 1.6rem); bottom: clamp(.9rem, 2.5vw, 1.6rem);
  z-index: 150; display: flex; flex-direction: column; gap: .7rem; align-items: flex-end;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.float-btn {
  position: relative; display: grid; place-items: center;
  width: 3.3rem; height: 3.3rem; border-radius: 50%;
  color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.float-btn svg { width: 1.45rem; height: 1.45rem; fill: currentColor; }
.float-btn:hover { transform: scale(1.1); box-shadow: 0 10px 24px rgba(0,0,0,.34); }
.float-btn::after {
  content: attr(data-label);
  position: absolute; right: calc(100% + .7rem); top: 50%;
  translate: 8px -50%; opacity: 0; pointer-events: none;
  background: var(--kes-night); color: #fff; font-size: .8rem; font-weight: 600;
  padding: .35rem .7rem; border-radius: 6px; white-space: nowrap;
  transition: opacity .2s ease, translate .2s ease;
}
.float-btn:hover::after, .float-btn:focus-visible::after { opacity: 1; translate: 0 -50%; }
.float-email    { background: var(--kes-gold); }
.float-call     { background: var(--kes-acacia); }
.float-whatsapp { background: var(--kes-whatsapp); width: 3.7rem; height: 3.7rem; }
.float-whatsapp svg { width: 1.9rem; height: 1.9rem; }
.float-whatsapp::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--kes-whatsapp); animation: kes-ring 2.4s ease-out infinite;
}
@keyframes kes-ring { from { scale: 1; opacity: .8; } to { scale: 1.7; opacity: 0; } }

/* ==========================================================
   Tablet and small screens
   ========================================================== */
@media (max-width: 900px) {
  .topbar-links .full { display: none; }
  .topbar-links .short { display: inline; }
  .contact { grid-template-columns: 1fr; gap: 1.75rem; }
  .contact-intro p { max-width: 46ch; }
}

@media (max-width: 760px) {
  .topbar-note { display: none; }
  .topbar-inner { justify-content: center; padding: .55rem 1rem; }
  .topbar-links { width: 100%; justify-content: space-between; gap: .75rem; flex-wrap: nowrap; }
}

@media (max-width: 640px) {
  /* Hero stays complete on the first screen */
  .hero {
    --scene-h: clamp(180px, 30vh, 250px);
    justify-content: flex-start;
    padding-top: clamp(1.75rem, 5vh, 3rem);
    padding-bottom: calc(var(--scene-h) * .6); /* animals only use the bottom of the scene */
  }
  .hero h1 { font-size: clamp(2.3rem, 11.5vw, 3.3rem); line-height: 1.04; }
  .hero .hero-copy { font-size: .98rem; line-height: 1.5; max-width: 34ch; }
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; gap: .75rem; }
  .hero-actions .button, .hero-whatsapp { justify-content: center; text-align: center; width: 100%; box-sizing: border-box; }
  .hero .hero-caption, .hero .hero-note { display: none; }
  .acacia-2, .bird-3 { display: none; }
  .elephants-track { animation-duration: 70s; }

  /* Contact section */
  .contact-list a { grid-template-columns: minmax(0, 1fr) auto; padding: 1.15rem .25rem; gap: .35rem 1rem; }
  .contact-label { grid-column: 1 / -1; }
  .contact-value { font-size: clamp(1.05rem, 5.4vw, 1.4rem); }
  .contact-go { width: 2.1rem; height: 2.1rem; }
  .contact-list a:hover { padding-left: .25rem; }

  /* Footer */
  .footer-top { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .footer-contacts { grid-template-columns: 1fr; gap: 1.1rem; padding: 1.5rem 0; }
  .footer-bottom { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; }

  /* Floating buttons */
  .float-contact { gap: .55rem; }
  .float-btn { width: 2.9rem; height: 2.9rem; }
  .float-btn svg { width: 1.25rem; height: 1.25rem; }
  .float-whatsapp { width: 3.3rem; height: 3.3rem; }
  .float-whatsapp svg { width: 1.7rem; height: 1.7rem; }
  .float-btn::after { display: none; }
}

@media (max-width: 380px) {
  .topbar { font-size: .75rem; }
  .topbar-links svg { width: 12px; height: 12px; }
}

/* Short landscape phones: keep the scene from squeezing the headline */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { --scene-h: 140px; padding-top: 2rem; }
  .elephants-track, .jeep-track { display: none; }
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-image, .hero .eyebrow, .hero h1, .hero .hero-copy, .hero .hero-actions,
  .hero .hero-caption, .hero .hero-note, .sun-glow, .bird, .jeep-track, .jeep,
  .jeep .wheel, .dust, .hero-whatsapp::before, .float-whatsapp::before,
  .elephants-track, .elephant, .elephant .leg, .elephant .e-tail,
  .chase-track, .lion, .lion .lleg, .gazelle, .gazelle .gleg { animation: none !important; }
  .elephants-track { translate: 6vw 0; }
  .chase-track { translate: 30vw 0; }
  .jeep-track { translate: 62vw 0; }
}