/* ===========================================================
   Kiwi Tour — Phuket day tours demo
   Mobile-first (base = 390px). Desktop enhancements below.
   =========================================================== */

:root {
  --kiwi: #6BBF3A;
  --kiwi-dark: #57a02e;
  --kiwi-light: #8fd45f;
  --kiwi-soft: #eef7e6;

  --navy: #0e1a24;
  --navy-2: #13212e;
  --navy-3: #1b2c3a;

  --ink: #16232e;
  --muted: #64757f;
  --line: rgba(16, 35, 46, .10);

  --paper: #ffffff;
  --paper-2: #f5f9f4;

  --wa: #25D366;
  --wa-dark: #1da851;

  --shadow-sm: 0 2px 10px rgba(16, 35, 46, .06);
  --shadow-md: 0 12px 30px rgba(16, 35, 46, .12);
  --shadow-lg: 0 24px 60px rgba(16, 35, 46, .22);

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1160px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 72px; /* space for sticky mobile CTA */
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; }
.brand__mark { font-size: 1.5rem; line-height: 1; transform: translateY(1px); }
.brand__name { font-size: 1.15rem; letter-spacing: .06em; color: var(--navy); }
.brand__name span { color: var(--kiwi); }
.brand--light .brand__name { color: #fff; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  padding: 12px 0;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), padding .3s var(--ease);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; }
.topbar .brand__name { color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.topbar.scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 8px 0;
}
.topbar.scrolled .brand__name { color: var(--navy); text-shadow: none; }

/* ---------- Language toggle ---------- */
.lang {
  display: inline-flex; gap: 2px; padding: 3px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px; backdrop-filter: blur(6px);
}
.topbar.scrolled .lang { background: var(--paper-2); border-color: var(--line); }
.lang__btn {
  border: 0; cursor: pointer; font-family: inherit; font-weight: 600; font-size: .78rem;
  padding: 5px 12px; border-radius: 999px; color: #fff; background: transparent;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.topbar.scrolled .lang__btn { color: var(--muted); }
.lang__btn.active { background: var(--kiwi); color: #fff; box-shadow: 0 2px 8px rgba(107,191,58,.4); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; min-height: 100vh;
  display: flex; align-items: flex-end;
  padding: 0 0 clamp(48px, 12vh, 120px);
  overflow: hidden; color: #fff;
}
.hero__media {
  position: absolute; inset: 0; z-index: 0;
  /* Layer order: top overlay → user photo → brand gradient (always visible).
     A missing photo is silently skipped by CSS (no console error). */
  background-image:
    linear-gradient(180deg, rgba(14,26,36,.25) 0%, rgba(14,26,36,.10) 40%, rgba(14,26,36,.78) 100%),
    url('assets/hero.jpg'),
    radial-gradient(120% 90% at 75% 10%, rgba(107,191,58,.35), transparent 55%),
    linear-gradient(160deg, #0e1a24 0%, #13293b 55%, #0a5b57 100%);
  background-size: cover, cover, cover, cover;
  background-position: center, center, center, center;
}
.hero__media .hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero__scrim { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 45%, rgba(10,18,25,.55) 100%); }
.hero__inner { position: relative; z-index: 2; }
.hero__eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .28em; margin-bottom: 14px;
  color: var(--kiwi-light); text-transform: uppercase;
}
.hero__title {
  font-size: clamp(2.1rem, 8.5vw, 4.2rem); font-weight: 700;
  max-width: 14ch; text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.hero__sub {
  margin-top: 16px; max-width: 44ch; font-size: clamp(1rem, 3.6vw, 1.2rem);
  color: rgba(255,255,255,.9); font-weight: 400;
}
.hero__scroll {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 30px;
  font-weight: 600; font-size: .95rem; color: #fff;
}
.hero__arrow {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--kiwi); box-shadow: 0 8px 20px rgba(107,191,58,.5);
  animation: bob 1.8s var(--ease) infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 10vw, 104px) 0; }
.tours { background: var(--paper-2); }
.section__head { max-width: 640px; margin: 0 auto clamp(30px, 6vw, 54px); text-align: center; }
.section__head h2 { font-size: clamp(1.7rem, 6vw, 2.6rem); }
.section__head h2::after {
  content: ""; display: block; width: 54px; height: 4px; border-radius: 4px;
  background: var(--kiwi); margin: 16px auto 0;
}
.section__head p { margin-top: 14px; color: var(--muted); font-size: 1.05rem; }

/* ---------- Tour grid ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 22px; }

.tour-card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.tour-card:hover, .tour-card:focus-within { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.tour-card:active { transform: translateY(-2px); }

.tour-card__media {
  position: relative; aspect-ratio: 4 / 3;
  background-size: cover; background-position: center;
  display: flex; align-items: flex-start; justify-content: space-between; padding: 14px;
}
.tour-card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.28));
}
.tour-card__emoji {
  position: relative; z-index: 1; font-size: 1.7rem;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.4));
}
.tour-card__price {
  position: relative; z-index: 1; margin-left: auto;
}
.badge {
  display: inline-flex; align-items: baseline; gap: 5px;
  background: var(--kiwi); color: #fff; font-weight: 700;
  padding: 7px 12px; border-radius: 999px; box-shadow: 0 6px 16px rgba(107,191,58,.45);
  font-size: 1.05rem; white-space: nowrap;
}
.badge small { font-size: .62rem; font-weight: 500; opacity: .92; }

.tour-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tour-card__title { font-size: 1.2rem; }
.tour-card__tag { color: var(--muted); font-size: .92rem; flex: 1; }
.tour-card__meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--kiwi-soft); color: var(--kiwi-dark);
  font-size: .78rem; font-weight: 600; padding: 5px 11px; border-radius: 999px;
}
.tour-card__btn {
  margin-top: 12px; width: 100%; border: 0; cursor: pointer; font-family: inherit;
  font-weight: 600; font-size: 1rem; padding: 12px; border-radius: var(--radius-sm);
  color: var(--navy); background: transparent; border: 1.5px solid var(--kiwi);
  transition: background .2s var(--ease), color .2s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.tour-card__btn:hover { background: var(--kiwi); color: #fff; }

/* ---------- Why ---------- */
.why { background: var(--navy); color: #fff; }
.why .section__head h2 { color: #fff; }
.why .section__head p { color: rgba(255,255,255,.7); }
.why__grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.why__card {
  background: linear-gradient(180deg, var(--navy-2), var(--navy-3));
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius);
  padding: 26px 22px; text-align: center;
}
.why__icon {
  display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 14px;
  font-size: 1.7rem; border-radius: 16px;
  background: rgba(107,191,58,.16); border: 1px solid rgba(107,191,58,.35);
}
.why__card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.why__card p { color: rgba(255,255,255,.72); font-size: .95rem; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-2); color: rgba(255,255,255,.78); padding-top: clamp(48px, 8vw, 72px); }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 32px; padding-bottom: 40px; }
.footer__tagline { margin-top: 12px; color: rgba(255,255,255,.6); max-width: 30ch; }
.footer__col h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .95rem; }
.footer__list a:hover { color: var(--kiwi-light); }
.social { display: flex; gap: 10px; }
.social__btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.social__btn:hover { background: var(--kiwi); transform: translateY(-3px); }
.social__btn svg { width: 20px; height: 20px; fill: #fff; }
.footer__bar { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: .85rem; color: rgba(255,255,255,.55); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-weight: 600; font-size: 1.02rem; cursor: pointer;
  border: 0; border-radius: 999px; padding: 14px 22px; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn--wa { background: var(--wa); color: #fff; box-shadow: 0 10px 24px rgba(37,211,102,.4); }
.btn--wa:hover { background: var(--wa-dark); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37,211,102,.5); }
.btn__wa { width: 20px; height: 20px; fill: #fff; }

/* ---------- Sticky mobile CTA ---------- */
.mcta {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 55;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--wa); color: #fff; font-weight: 700; font-size: 1.05rem;
  padding: 15px; border-radius: 16px; box-shadow: 0 12px 28px rgba(37,211,102,.5);
  padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px));
}
.mcta:active { transform: scale(.98); }
.mcta__wa { width: 22px; height: 22px; fill: #fff; }
body.no-scroll .mcta { display: none; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal__overlay {
  position: absolute; inset: 0; background: rgba(8,15,21,.6); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.modal.open .modal__overlay { opacity: 1; }
.modal__panel {
  position: absolute; inset: auto 0 0 0; max-height: 94svh; max-height: 94vh;
  background: var(--paper); border-radius: 22px 22px 0 0; overflow-y: auto;
  transform: translateY(100%); transition: transform .38s var(--ease);
  display: flex; flex-direction: column; -webkit-overflow-scrolling: touch;
}
.modal.open .modal__panel { transform: translateY(0); }
.modal__close {
  position: sticky; top: 12px; margin: 12px 12px -44px auto; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.9); color: var(--ink); font-size: 1rem;
  box-shadow: var(--shadow-sm); backdrop-filter: blur(6px);
}
.modal__media {
  position: relative; aspect-ratio: 16 / 10; background-size: cover; background-position: center;
}
.modal__media .modal__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.modal__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.35)); }
.modal__price { position: absolute; left: 16px; bottom: 16px; z-index: 1; flex-direction: column; align-items: flex-start; gap: 0; padding: 9px 15px; font-size: 1.35rem; }
.modal__price small { opacity: .9; }
.modal__body { padding: 22px 20px 12px; }
.modal__chips { margin-bottom: 10px; }
.modal__title { font-size: 1.6rem; }
.modal__tagline { color: var(--muted); margin-top: 8px; }
.modal__h3 { font-size: 1.1rem; margin: 26px 0 14px; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; }
.timeline li { position: relative; padding: 0 0 18px 26px; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 7px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--kiwi); box-shadow: 0 0 0 4px var(--kiwi-soft);
}
.timeline li::after {
  content: ""; position: absolute; left: 9px; top: 16px; bottom: -2px; width: 2px; background: var(--line);
}
.timeline li:last-child::after { display: none; }
.timeline time { display: inline-block; font-weight: 700; color: var(--kiwi-dark); font-variant-numeric: tabular-nums; margin-right: 6px; }
.timeline span { color: var(--ink); }

.lists { display: grid; grid-template-columns: 1fr; gap: 4px; }
.ticks, .crosses { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li, .crosses li { position: relative; padding-left: 28px; font-size: .96rem; }
.ticks li::before, .crosses li::before {
  position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center; font-size: .72rem; font-weight: 700;
}
.ticks li::before { content: "✓"; background: var(--kiwi-soft); color: var(--kiwi-dark); }
.crosses li { color: var(--muted); }
.crosses li::before { content: "✕"; background: #f1f1f1; color: #9aa4ab; }

.modal__foot {
  position: sticky; bottom: 0; margin-top: 10px;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
}
.modal__foot-price { display: flex; flex-direction: column; line-height: 1.1; }
.modal__foot-price small { color: var(--muted); font-size: .72rem; }
.modal__foot-price b { font-size: 1.3rem; }
.modal__foot .btn--wa { flex: 1; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ===========================================================
   DESKTOP / TABLET
   =========================================================== */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .lists { grid-template-columns: 1fr 1fr; gap: 18px 36px; }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .mcta { display: none; }
  .modal__panel {
    inset: 50% auto auto 50%; transform: translate(-50%, -46%) scale(.98);
    width: min(760px, 92vw); max-height: 90vh; border-radius: 22px;
    opacity: 0; transition: transform .38s var(--ease), opacity .3s var(--ease);
  }
  .modal.open .modal__panel { transform: translate(-50%, -50%); opacity: 1; }
  .modal__close { margin-right: 14px; }
}

@media (min-width: 980px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .why__grid { grid-template-columns: repeat(4, 1fr); }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
  .hero { align-items: center; }
  .hero__inner { padding-bottom: 4vh; }
}

/* ---------- Motion / a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

:focus-visible { outline: 3px solid var(--kiwi); outline-offset: 2px; border-radius: 6px; }
