/* ============================================================
   Tanzania Heritage Tours — style.css
   Warm editorial luxury: ivory #F9F6F0, terracotta #9C4633,
   gold #C8A97E, ink #1A1A1A. Fonts: Playfair Display + Manrope.
   ============================================================ */

:root {
  --ivory: #F9F6F0;
  --clay: #9C4633;
  --sand: #C8A97E;
  --ink: #1A1A1A;
  --ash: #5E5A54;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  background: var(--ivory);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--clay); color: var(--ivory); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Fixed Tanzania background ---------- */
.fixed-bg { position: fixed; inset: 0; z-index: -1; }
.fixed-bg img { width: 100%; height: 100%; object-fit: cover; }
.fixed-bg::after { content: ""; position: absolute; inset: 0; background: rgba(249, 246, 240, 0.72); }

/* ---------- Typography helpers ---------- */
.serif { font-family: "Playfair Display", Georgia, serif; }
.overline {
  font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--clay); display: block; margin-bottom: 24px;
}
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  border-radius: 999px; padding: 16px 32px;
  font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase;
  cursor: pointer; transition: transform 0.3s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover { transform: scale(1.04); }
.btn-solid { background: var(--ivory); color: var(--ink); border: none; }
.btn-ghost { background: transparent; color: var(--ivory); border: 1px solid rgba(249,246,240,0.4); }
.btn-ghost:hover { background: rgba(249,246,240,0.1); }
.btn-clay { background: var(--clay); color: var(--ivory); border: none; }
.btn-ink { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-ink:hover { background: var(--ink); color: var(--ivory); }
.btn:disabled { opacity: 0.5; cursor: wait; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.1s; } .d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; } .d4 { transition-delay: 0.4s; }

/* ---------- Navbar ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.5s, color 0.5s, box-shadow 0.5s;
  color: var(--ivory);
}
nav.scrolled {
  background: rgba(249,246,240,0.85); color: var(--ink);
  backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(26,26,26,0.06);
}
.nav-inner {
  max-width: 1400px; margin: 0 auto; padding: 20px 48px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-family: "Playfair Display", serif; font-size: 18px; letter-spacing: 0.03em; }
.nav-links { display: flex; align-items: center; gap: 40px; }
.nav-links a { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; opacity: 0.8; transition: opacity 0.3s; }
.nav-links a:hover { opacity: 1; }
.nav-cta { border: 1px solid rgba(249,246,240,0.4); border-radius: 999px; padding: 8px 20px; }
nav.scrolled .nav-cta { border-color: rgba(26,26,26,0.3); }
.nav-cta:hover { background: var(--ink); color: var(--ivory); opacity: 1; }
@media (max-width: 768px) {
  .nav-inner { padding: 16px 24px; }
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: sepia(0.22) saturate(1.2) hue-rotate(-8deg) brightness(0.95); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(26,26,26,0.5), rgba(26,26,26,0.25), rgba(26,26,26,0.6)); }
.hero-content { position: relative; z-index: 2; text-align: center; color: var(--ivory); padding: 0 24px; }
.hero-overline { font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase; color: rgba(249,246,240,0.85); margin-bottom: 32px; animation: fadeUp 0.9s var(--ease) 0.25s both; }
.hero h1 { font-family: "Playfair Display", serif; font-size: clamp(2.75rem, 7.5vw, 5.75rem); line-height: 1.04; letter-spacing: -0.02em; font-weight: 500; }
.line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.line > span { display: block; transform: translateY(115%); animation: riseIn 1.1s var(--ease) forwards; }
.line:nth-child(1) > span { animation-delay: 0.35s; }
.line:nth-child(2) > span { animation-delay: 0.47s; }
.line:nth-child(3) > span { animation-delay: 0.59s; }
.line em { font-style: italic; color: var(--sand); }
.hero-sub { max-width: 560px; margin: 32px auto 0; font-size: 15px; line-height: 1.7; color: rgba(249,246,240,0.85); animation: fadeUp 0.9s var(--ease) 0.85s both; }
.hero-ctas { margin-top: 48px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; animation: fadeUp 0.9s var(--ease) 1s both; }
.scroll-cue { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; color: rgba(249,246,240,0.7); font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; animation: fadeUp 1s var(--ease) 1.6s both; }
.scroll-cue::after { content: ""; width: 1px; height: 40px; background: rgba(249,246,240,0.7); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes riseIn { to { transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cue { 0%, 100% { transform: scaleY(0.3); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; background: var(--ivory); border-top: 1px solid rgba(26,26,26,0.1); border-bottom: 1px solid rgba(26,26,26,0.1); padding: 28px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; }
.marquee-word { padding: 0 40px; font-family: "Playfair Display", serif; font-size: 22px; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(26,26,26,0.7); white-space: nowrap; }
.marquee-dot { font-size: 10px; color: var(--clay); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections shared ---------- */
section { padding: 120px 48px; }
.wrap { max-width: 1400px; margin: 0 auto; }
.solid { background: var(--ivory); }
.white { background: #fff; }
.transparent { background: transparent; }
h2 { font-family: "Playfair Display", serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; letter-spacing: -0.02em; font-weight: 500; }
h2 em { font-style: italic; color: var(--clay); }
.body-text { color: var(--ash); line-height: 1.75; font-size: 16px; }
@media (max-width: 768px) { section { padding: 80px 24px; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; }
.about-left img, .frame { box-shadow: 0 24px 70px -32px rgba(26,26,26,0.4); }
.photo-frame { background: #fff; padding: 12px; margin-top: 48px; box-shadow: 0 24px 70px -32px rgba(26,26,26,0.4); }
.photo-frame .clip { overflow: hidden; aspect-ratio: 3/4; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.photo-frame:hover img { transform: scale(1.05); }
.photo-frame figcaption { padding-top: 12px; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ash); }
.chapters { display: flex; flex-direction: column; justify-content: center; gap: 56px; padding-left: 48px; }
.chapter { display: grid; grid-template-columns: auto 1fr; gap: 40px; border-bottom: 1px solid rgba(26,26,26,0.1); padding-bottom: 48px; }
.chapter-num { font-family: "Playfair Display", serif; font-style: italic; font-size: 56px; color: rgba(156,70,51,0.7); line-height: 1; }
.chapter h3 { font-family: "Playfair Display", serif; font-size: 28px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 16px; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .chapters { padding-left: 0; }
}

/* ---------- Quote band ---------- */
.quote-band { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.quote-band blockquote { font-family: "Playfair Display", serif; font-style: italic; font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1.3; letter-spacing: -0.01em; max-width: 900px; }

/* ---------- Destinations ---------- */
.dest-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 96px; flex-wrap: wrap; }
.dest-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 40px; }
.dest-card { background: var(--ivory); padding: 12px; box-shadow: 0 24px 70px -32px rgba(26,26,26,0.4); }
.dest-card .clip { overflow: hidden; }
.dest-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.dest-card:hover img { transform: scale(1.05); }
.dest-meta { display: flex; align-items: flex-end; justify-content: space-between; padding: 20px 8px 8px; }
.dest-tag { font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--clay); }
.dest-name { font-family: "Playfair Display", serif; font-size: 30px; font-weight: 500; margin-top: 4px; }
.dest-sub { font-size: 14px; color: var(--ash); margin-top: 8px; }
.dest-idx { font-family: "Playfair Display", serif; font-style: italic; font-size: 24px; color: rgba(26,26,26,0.25); }
.c7 { grid-column: span 7; } .c5 { grid-column: span 5; }
.ar43 { aspect-ratio: 4/3; } .ar34 { aspect-ratio: 3/4; }
.mt-a { margin-top: 96px; } .mt-b { margin-top: -40px; } .mt-c { margin-top: 64px; }
@media (max-width: 900px) {
  .c7, .c5 { grid-column: span 12; }
  .mt-a, .mt-b, .mt-c { margin-top: 0; }
}

/* ---------- Journeys ---------- */
.journey { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; margin-top: 128px; }
.journey:first-of-type { margin-top: 96px; }
.journey .photo-frame { margin-top: 0; background: var(--ivory); }
.journey .photo-frame .clip { aspect-ratio: 5/6; }
.journey.flip .photo-frame { order: 2; }
.journey-kicker { font-size: 11px; letter-spacing: 0.35em; text-transform: uppercase; color: var(--clay); }
.journey h3 { font-family: "Playfair Display", serif; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 500; letter-spacing: -0.01em; margin: 20px 0 24px; line-height: 1.15; }
.journey ul { list-style: none; margin-top: 32px; }
.journey li { font-size: 14px; color: rgba(26,26,26,0.8); padding: 6px 0; }
.journey li::before { content: "◆"; color: var(--clay); font-size: 8px; margin-right: 12px; vertical-align: 3px; }
.text-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 40px; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; }
.text-link span:first-child { border-bottom: 1px solid rgba(26,26,26,0.3); padding-bottom: 4px; transition: color 0.3s, border-color 0.3s; }
.text-link:hover span:first-child { color: var(--clay); border-color: var(--clay); }
.text-link span:last-child { transition: transform 0.3s var(--ease); }
.text-link:hover span:last-child { transform: translateX(4px); }
@media (max-width: 900px) {
  .journey { grid-template-columns: 1fr; gap: 40px; }
  .journey.flip .photo-frame { order: 0; }
}

/* ---------- Let's Chat ---------- */
.chat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 96px; max-width: 1200px; margin: 0 auto; }
.chat-note { font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--ash); margin-top: 24px; }
.field { margin-bottom: 32px; }
.field label { display: block; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ash); margin-bottom: 4px; }
.field input, .field textarea {
  width: 100%; border: none; border-bottom: 1px solid rgba(26,26,26,0.2);
  background: transparent; padding: 12px 0; font-size: 16px; color: var(--ink);
  font-family: inherit; outline: none; transition: border-color 0.3s; resize: none;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(94,90,84,0.6); }
.field input:focus, .field textarea:focus { border-color: var(--clay); }
.chat-success h3 { font-family: "Playfair Display", serif; font-style: italic; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 500; }
.chat-success p { margin-top: 24px; max-width: 380px; }
@media (max-width: 900px) { .chat-grid { grid-template-columns: 1fr; gap: 64px; } }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: var(--ivory); padding: 64px 48px; }
.foot-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.foot-logo { font-family: "Playfair Display", serif; font-size: 24px; }
.foot-logo em { color: var(--sand); }
.foot-tag { margin-top: 16px; max-width: 320px; font-size: 14px; line-height: 1.7; color: rgba(249,246,240,0.6); }
.foot-links { display: flex; gap: 40px; flex-wrap: wrap; }
.foot-links a { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(249,246,240,0.7); transition: color 0.3s; }
.foot-links a:hover { color: var(--sand); }
.foot-base { max-width: 1400px; margin: 56px auto 0; padding-top: 32px; border-top: 1px solid rgba(249,246,240,0.1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(249,246,240,0.4); }
@media (max-width: 768px) { footer { padding: 56px 24px; } }

/* ---------- AI Concierge ---------- */
.concierge { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.concierge-toggle {
  display: inline-flex; align-items: center; gap: 10px; border: none; cursor: pointer;
  background: var(--ink); color: var(--ivory); border-radius: 999px; padding: 16px 22px;
  font-family: "Manrope", sans-serif; font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; font-weight: 600;
  box-shadow: 0 16px 40px -12px rgba(26,26,26,0.5); transition: transform 0.3s var(--ease);
}
.concierge-toggle:hover { transform: scale(1.05); }
.concierge-toggle #conciergeToggleIcon { color: var(--sand); }
.concierge-panel {
  width: min(92vw, 400px); max-height: 70vh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--ivory); border: 1px solid rgba(26,26,26,0.1); border-radius: 24px;
  box-shadow: 0 30px 80px -20px rgba(26,26,26,0.45);
  opacity: 0; transform: translateY(24px) scale(0.96); pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.concierge-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.concierge-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid rgba(26,26,26,0.1); }
.concierge-title { font-family: "Playfair Display", serif; font-size: 18px; color: var(--ink); }
.concierge-title em { color: var(--clay); }
.concierge-sub { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ash); margin-top: 4px; }
.concierge-close { background: none; border: none; color: var(--ash); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 50%; transition: color 0.3s, background 0.3s; }
.concierge-close:hover { color: var(--ink); background: rgba(26,26,26,0.05); }
.concierge-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-height: 200px; }
.msg { max-width: 85%; padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.msg-bot { align-self: flex-start; background: #fff; border: 1px solid rgba(26,26,26,0.1); color: var(--ink); }
.msg-user { align-self: flex-end; background: var(--ink); color: var(--ivory); }
.msg-typing { color: var(--ash); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.concierge-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 14px; }
.concierge-chip { background: none; border: 1px solid rgba(26,26,26,0.15); color: var(--ash); border-radius: 999px; padding: 7px 14px; font-size: 11px; font-family: inherit; cursor: pointer; transition: border-color 0.3s, color 0.3s; }
.concierge-chip:hover { border-color: var(--clay); color: var(--clay); }
.concierge-form { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-top: 1px solid rgba(26,26,26,0.1); }
.concierge-form input { flex: 1; background: none; border: none; outline: none; color: var(--ink); font-family: inherit; font-size: 14px; }
.concierge-form input::placeholder { color: rgba(94,90,84,0.6); }
.concierge-send { background: var(--clay); border: none; color: var(--ivory); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 15px; transition: transform 0.3s var(--ease); flex-shrink: 0; }
.concierge-send:hover { transform: scale(1.1); }
.concierge-send:disabled { opacity: 0.4; cursor: default; transform: none; }
@media (max-width: 768px) { .concierge { right: 16px; bottom: 16px; } }

/* ---------- Language switcher + CJK fonts ---------- */
.lang-switch {
  position: fixed; bottom: 24px; left: 24px; z-index: 70;
  display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: rgba(249,246,240,0.9); border: 1px solid rgba(26,26,26,0.12);
  backdrop-filter: blur(10px); box-shadow: 0 12px 32px -12px rgba(26,26,26,0.35);
}
.lang-switch button {
  background: none; border: none; cursor: pointer; font-family: "Manrope", sans-serif;
  font-size: 11px; letter-spacing: 0.05em; padding: 7px 12px; border-radius: 999px;
  color: var(--ash); transition: background 0.3s, color 0.3s;
}
.lang-switch button.active { background: var(--clay); color: var(--ivory); font-weight: 600; }
.lang-switch button:hover:not(.active) { color: var(--ink); }
@media (max-width: 768px) { .lang-switch { bottom: 16px; left: 16px; } }

html[lang="zh"] body, html[lang="ja"] body {
  font-family: "Manrope", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Yu Gothic", sans-serif;
}
html[lang="zh"] h1, html[lang="zh"] h2, html[lang="zh"] .dest-name, html[lang="zh"] .nav-logo,
html[lang="zh"] .concierge-title, html[lang="zh"] .sketch-output, html[lang="zh"] .foot-logo,
html[lang="zh"] .chapter h3, html[lang="zh"] .journey h3, html[lang="zh"] .marquee-word {
  font-family: "Songti SC", "Noto Serif SC", "SimSun", serif;
}
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] .dest-name, html[lang="ja"] .nav-logo,
html[lang="ja"] .concierge-title, html[lang="ja"] .sketch-output, html[lang="ja"] .foot-logo,
html[lang="ja"] .chapter h3, html[lang="ja"] .journey h3, html[lang="ja"] .marquee-word {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
}

/* ---------- AI Trip Sketcher ---------- */
.sketcher { background: transparent; padding: 140px 48px; text-align: center; }
.sketch-inner { max-width: 760px; margin: 0 auto; }
.sketch-form { margin-top: 48px; display: flex; flex-direction: column; gap: 28px; align-items: center; }
.sketch-form textarea {
  width: 100%; background: rgba(255,255,255,0.75); border: 1px solid rgba(26,26,26,0.12);
  border-radius: 16px; padding: 20px 22px; color: var(--ink); font-family: inherit;
  font-size: 15px; line-height: 1.6; outline: none; resize: none; transition: border-color 0.3s;
}
.sketch-form textarea:focus { border-color: var(--clay); }
.sketch-form textarea::placeholder { color: rgba(94,90,84,0.6); }
.sketch-paper {
  margin-top: 48px; background: var(--ivory); border: 1px solid rgba(26,26,26,0.1);
  border-radius: 20px; padding: 36px; text-align: left;
  box-shadow: 0 24px 70px -32px rgba(26,26,26,0.4);
}
.sketch-paper-label { font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--clay); margin-bottom: 20px; }
.sketch-output { font-family: "Playfair Display", serif; font-style: italic; font-size: 19px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; }
.sketch-send { border: none; background: none; cursor: pointer; font-family: inherit; padding: 0; letter-spacing: 0.3em; }
@media (max-width: 768px) { .sketcher { padding: 96px 24px; } }
