/* ============================================================================
 * site.css — shared design system for host.travel404.com
 * Covers: tokens, buttons, nav + Products mega-dropdown, footer, demo modal,
 * the full-viewport fade-scroll section engine, and generic layout helpers.
 * ==========================================================================*/

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --indigo: #6366f1;
  --purple: #8b5cf6;
  --magenta: #d946ef;
  --grad: linear-gradient(135deg, #6366f1, #8b5cf6, #d946ef);
  --grad-soft: linear-gradient(135deg, #6366f1, #8b5cf6);
  --ink: #1a1a2e;
  --ink-2: #475569;
  --muted: #64748b;
  --line: #e7e8ef;
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --bg-dark: #0e0e1a;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(20, 20, 50, 0.06);
  --shadow: 0 12px 40px rgba(20, 20, 50, 0.12);
  --shadow-lg: 0 30px 70px rgba(20, 20, 50, 0.20);
  --nav-h: 70px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
/* height:auto is essential — without it, width/height attributes on <img>
   keep the height fixed while max-width shrinks the width → vertical stretch. */
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Helpers ────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--indigo);
  margin-bottom: 14px;
}
.eyebrow.on-dark { color: #a5b4fc; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 650; border-radius: 11px; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn:not(.btn-sm):not(.btn-lg) { padding: 12px 22px; font-size: .96rem; }
.btn-primary { background: var(--grad-soft); color: #fff; box-shadow: 0 6px 18px rgba(99,102,241,.38); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(99,102,241,.5); }
.btn-outline { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-white { background: #fff; color: var(--indigo); box-shadow: var(--shadow-sm); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--indigo); }
.btn-block { width: 100%; }

/* ── Navigation ─────────────────────────────────────────────────────────── */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  background: rgba(255,255,255,.82); backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-nav.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.site-nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: var(--grad-soft); color: #fff; border-radius: 9px;
  font-size: .82rem; font-weight: 900; letter-spacing: -.02em;
}
.nav-center { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 14px; border-radius: 9px; font-weight: 550; font-size: .96rem;
  color: var(--ink-2); transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--indigo); background: var(--bg-soft); }
.nav-caret { width: 15px; height: 15px; transition: transform .2s; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; gap: 2px; background: var(--bg-soft); border-radius: 8px; padding: 3px; }
.lang-switch a { padding: 4px 9px; border-radius: 6px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.lang-switch a.on { background: #fff; color: var(--indigo); box-shadow: var(--shadow-sm); }

/* ── Products mega-dropdown ─────────────────────────────────────────────── */
.nav-has-mega { position: static; }
.mega {
  position: absolute; left: 0; right: 0; top: var(--nav-h);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  padding: 0 24px 24px;
}
.nav-has-mega.open .mega { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-has-mega.open .nav-caret { transform: rotate(180deg); }
.mega-inner {
  max-width: 1240px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.mega-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
  padding: 26px 26px 22px;
}
.mega-col { min-width: 0; }
.mega-col-head { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; border-radius: 10px; }
.mega-col-head:hover { background: var(--bg-soft); }
.mega-col-icon {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 9px; color: #fff;
}
.mega-col-icon svg { width: 18px; height: 18px; }
.mega-pms { background: linear-gradient(135deg,#6366f1,#818cf8); }
.mega-channel-manager { background: linear-gradient(135deg,#0ea5e9,#38bdf8); }
.mega-booking-engine { background: linear-gradient(135deg,#8b5cf6,#a78bfa); }
.mega-community-app { background: linear-gradient(135deg,#ec4899,#f472b6); }
.mega-payments { background: linear-gradient(135deg,#10b981,#34d399); }
.mega-operations { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.mega-col-name { display: block; font-weight: 750; font-size: .92rem; color: var(--ink); }
.mega-col-tag { display: block; font-size: .76rem; color: var(--muted); margin-top: 1px; }
.mega-links { margin-top: 6px; display: flex; flex-direction: column; }
.mega-link {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px;
  font-size: .855rem; color: var(--ink-2); transition: background .12s, color .12s;
}
.mega-link:hover { background: var(--bg-soft); color: var(--indigo); }
.mega-link-dot { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--line); transition: background .12s; }
.mega-link:hover .mega-link-dot { background: var(--indigo); }
.mega-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 26px; background: var(--bg-soft); border-top: 1px solid var(--line);
}
.mega-foot p { font-size: .86rem; color: var(--muted); max-width: 720px; }

/* ── Mobile nav ─────────────────────────────────────────────────────────── */
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-burger.on span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.on span:nth-child(2) { opacity: 0; }
.nav-burger.on span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile {
  display: none; flex-direction: column; gap: 2px;
  padding: 12px 20px 22px; background: #fff; border-top: 1px solid var(--line);
  max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { padding: 12px 10px; border-radius: 9px; font-weight: 600; color: var(--ink-2); }
.nav-mobile a:hover { background: var(--bg-soft); color: var(--indigo); }
.nav-mobile .btn { margin-top: 10px; }
.lang-switch-mobile { align-self: flex-start; margin-top: 14px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { background: var(--bg-dark); color: #cbd5e1; padding: 64px 0 30px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: .92rem; color: #94a3b8; max-width: 320px; }
.footer-madeby { margin-top: 10px; font-size: .82rem; color: #6b7a90; font-style: italic; }
.footer-col h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer-col a { display: block; padding: 5px 0; font-size: .9rem; color: #94a3b8; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08);
  font-size: .85rem; color: #6b7a90;
}

/* ── Demo / trial modal ─────────────────────────────────────────────────── */
.demo-modal {
  position: fixed; inset: 0; z-index: 400;
  display: none; align-items: center; justify-content: center; padding: 20px;
  background: rgba(14,14,26,.55); backdrop-filter: blur(4px);
}
.demo-modal.open { display: flex; }
.demo-modal-card {
  position: relative; width: 100%; max-width: 440px;
  background: #fff; border-radius: var(--radius-lg); padding: 34px 32px;
  box-shadow: var(--shadow-lg); animation: modalIn .22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.demo-modal-x {
  position: absolute; top: 14px; right: 16px; font-size: 1.7rem; line-height: 1;
  color: var(--muted);
}
.demo-modal-x:hover { color: var(--ink); }
.demo-modal-card h3 { font-size: 1.5rem; font-weight: 800; }
.demo-modal-sub { color: var(--muted); font-size: .94rem; margin: 6px 0 22px; }
#demoForm label { display: block; font-size: .85rem; font-weight: 650; color: var(--ink-2); margin-bottom: 14px; }
#demoForm input {
  width: 100%; margin-top: 6px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; font-size: .95rem; font-family: inherit;
  transition: border-color .15s;
}
#demoForm input:focus { outline: none; border-color: var(--indigo); }
#demoForm .btn { margin-top: 6px; }
.demo-modal-msg { margin-top: 12px; font-size: .88rem; text-align: center; min-height: 1.2em; }
.demo-modal-msg.ok { color: #10b981; font-weight: 600; }
.demo-modal-msg.err { color: #ef4444; font-weight: 600; }

/* ── Generic section scaffolding ────────────────────────────────────────── */
.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--bg-dark); color: #fff; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 850; line-height: 1.12; }
.section-head p { margin-top: 14px; font-size: 1.1rem; color: var(--muted); }
.section-dark .section-head p { color: #94a3b8; }

/* ── Fade-scroll engine (home page full-viewport sections) ──────────────── */
/* Each .fade-section is pinned full-height; JS toggles .is-active as you
   scroll so one product fades in while the previous fades away. Falls back
   to a normal stacked scroll if JS doesn't run (.no-js on <html>). */
.fade-stage { position: relative; }
.fade-section {
  min-height: 100vh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 60px;
}
html:not(.no-js) .fade-section {
  opacity: .12; transform: translateY(26px) scale(.985);
  transition: opacity .6s ease, transform .6s ease;
}
html:not(.no-js) .fade-section.is-active { opacity: 1; transform: none; }
.fade-section .container { width: 100%; }

/* scroll progress dots (right edge of the home page) */
.scroll-dots {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%);
  z-index: 150; display: flex; flex-direction: column; gap: 11px;
}
.scroll-dots button {
  width: 9px; height: 9px; border-radius: 50%; background: var(--line);
  transition: background .2s, transform .2s;
}
.scroll-dots button.on { background: var(--indigo); transform: scale(1.45); }
@media (max-width: 900px) { .scroll-dots { display: none; } }

/* ── Reveal-on-scroll (used on product/pricing pages) ───────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── Screenshot frame ───────────────────────────────────────────────────── */
.shot {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: #fff;
}
.shot img,
.shot-browser img { display: block; width: 100%; height: auto; }
.shot-browser { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; border: 1px solid var(--line); }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 9px 14px; background: #f1f2f7; border-bottom: 1px solid var(--line); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d4d6e0; display: block; }
.shot-bar i:nth-child(1) { background: #ff5f57; }
.shot-bar i:nth-child(2) { background: #febc2e; }
.shot-bar i:nth-child(3) { background: #28c840; }
.shot-bar span { margin-left: 10px; font-size: .76rem; color: var(--muted); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .mega-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .nav-center, .nav-right .lang-switch, .nav-right .btn-outline { display: none; }
  .nav-burger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-right .btn-primary { display: none; }
}
