/* TripScout Landing — plain HTML/CSS/JS */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal:          #0D9488;
  --teal-dark:     #0F766E;
  --teal-light:    #CCFBF1;
  --teal-tint:     #EEF9F7;
  --teal-border:   #C7EDE8;
  --coral:         #F97066;
  --bg:            #F8FAFB;
  --surface:       #FFFFFF;
  --border:        #E8ECF0;
  --border-light:  #F1F5F9;
  --text-primary:  #0F172A;
  --text-secondary:#64748B;
  --text-muted:    #5E6A78;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  --shadow-card:  0 4px 16px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-phone: 0 30px 60px -20px rgba(13, 148, 136, 0.25), 0 20px 40px -15px rgba(15, 23, 42, 0.12);

  --container: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 700px at 110% 8%,  rgba(249, 112, 102, 0.10), transparent 60%),
    radial-gradient(1000px 600px at -10% 30%, rgba(13, 148, 136, 0.10), transparent 60%),
    radial-gradient(1400px 800px at 50% 140%, rgba(13, 148, 136, 0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ─── Typography ─── */

h1, h2, h3 {
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 30%, var(--coral) 60%, var(--teal) 80%, var(--teal-dark) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShimmer 4s ease-in-out infinite;
  will-change: background-position;
}

@keyframes gradientShimmer {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}

h2 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 800;
}

h3 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  margin-bottom: 16px;
}

.lede {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 520px;
  margin-bottom: 40px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(13, 148, 136, 0.6);
}
.btn-primary:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -10px rgba(13, 148, 136, 0.6);
}

.app-store-badge {
  display: inline-flex;
  transition: transform .2s ease;
  line-height: 0;
}
.app-store-badge:hover { transform: translateY(-2px); }
.app-store-badge:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: 14px;
}

/* ─── Nav ─── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 251, 0.8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.scrolled {
  background: rgba(248, 250, 251, 0.92);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.logo svg { color: var(--teal); flex-shrink: 0; }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--text-primary); }

/* ─── Hero ─── */

.hero {
  position: relative;
  padding: 96px 0 120px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(780px 520px at 12% 8%,   rgba(13, 148, 136, 0.28), transparent 65%),
    radial-gradient(620px 460px at 95% 30%,  rgba(249, 112, 102, 0.20), transparent 65%),
    radial-gradient(900px 520px at 50% 100%, rgba(91, 191, 181, 0.22), transparent 65%);
  pointer-events: none;
  z-index: -1;
}
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
  z-index: -1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  align-items: center;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* Desktop-only QR: lets visitors on a computer hop to the App Store on their phone */
.hero-qr {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}
.hero-qr img {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  background: #fff;
  padding: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.hero-qr span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

/* ─── Phone screenshot ─── */

.phone {
  position: relative;
  width: 100%;
  max-width: 275px;
  margin: 0 auto;
  isolation: isolate;
}

/* Soft teal glow behind the screenshot */
.phone::before {
  content: '';
  position: absolute;
  inset: 6% -8% -8% -8%;
  background: radial-gradient(60% 50% at 50% 65%, rgba(13, 148, 136, 0.18), transparent 70%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

.phone img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 44px;
  background: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.06),
    0 24px 48px -16px rgba(15, 23, 42, 0.18),
    0 40px 80px -24px rgba(13, 148, 136, 0.22);
}

.phone-float { animation: float 7s ease-in-out infinite; }

.phone-float::before {
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes ctaShimmer {
  0%        { transform: translateX(-100%) skewX(-15deg); opacity: 0; }
  5%        { opacity: 1; }
  30%       { transform: translateX(250%) skewX(-15deg); opacity: 0; }
  100%      { transform: translateX(250%) skewX(-15deg); opacity: 0; }
}

/* ─── Features ─── */

.features {
  padding: 120px 0;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 96px;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: center;
  padding: 56px 0;
}

.feature-copy p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 460px;
}

.feature-right .feature-copy  { order: 1; }
.feature-right .feature-visual { order: 2; }
.feature-left  .feature-copy  { order: 2; }
.feature-left  .feature-visual { order: 1; }

/* ─── Live section ─── */

.live {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.live::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 440px at 85% 20%, rgba(13, 148, 136, 0.22), transparent 65%),
    radial-gradient(600px 380px at 15% 90%, rgba(249, 112, 102, 0.14), transparent 65%),
    linear-gradient(180deg, var(--teal-tint) 0%, transparent 90%);
  z-index: -1;
  pointer-events: none;
}

.live-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
}

.live-copy p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 480px;
}

/* ─── Download CTA ─── */

.download {
  padding: 120px 0;
}

.download-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(135deg, #0F766E 0%, #0D9488 55%, #14B8A6 100%);
  color: #fff;
  padding: 88px 40px;
  border-radius: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(13, 148, 136, 0.45);
}
.download-inner::before {
  content: '';
  position: absolute;
  top: -220px; right: -180px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 65%);
  pointer-events: none;
}
.download-inner::after {
  content: '';
  position: absolute;
  bottom: -160px; left: -120px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(249, 112, 102, 0.25), transparent 65%);
  pointer-events: none;
}

.cta-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 100%
  );
  pointer-events: none;
  animation: ctaShimmer 6s ease-in-out infinite;
}

.download-inner h2 {
  color: #fff;
  margin-bottom: 16px;
  position: relative;
}
.download-inner p {
  color: rgba(255,255,255,0.88);
  font-size: 18px;
  margin-bottom: 36px;
  position: relative;
}
.download-inner .app-store-badge { position: relative; }

/* ─── Footer ─── */

.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 48px;
  background: var(--bg);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.footer-brand .logo { margin-bottom: 8px; }

.footer-note {
  font-size: 14px;
  color: var(--text-muted);
}

.socials {
  display: flex;
  gap: 12px;
  list-style: none;
  justify-content: center;
}
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, transform .2s ease, background .2s ease;
}
.socials a:hover {
  color: var(--teal);
  border-color: var(--teal-border);
  background: var(--teal-tint);
  transform: translateY(-1px);
}

.copyright {
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
}
.copyright a {
  color: var(--text-secondary);
  text-decoration: none;
}
.copyright a:hover { color: var(--text-primary); }

/* ─── Reveal on scroll ─── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1);
}
.reveal-child.in {
  opacity: 1;
  transform: none;
}

.hero-copy .reveal-child:nth-child(1) { transition-delay: 0ms; }
.hero-copy .reveal-child:nth-child(2) { transition-delay: 80ms; }
.hero-copy .reveal-child:nth-child(3) { transition-delay: 160ms; }
.hero-copy .reveal-child:nth-child(4) { transition-delay: 240ms; }

.slide-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay: 0.15s;
  will-change: opacity, transform;
}
.slide-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay: 0.15s;
  will-change: opacity, transform;
}
.slide-left.in,
.slide-right.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal-child { opacity: 1; transform: none; transition: none; transition-delay: 0s !important; }
  .hero-copy .reveal-child:nth-child(n) { transition-delay: 0s; }
  .slide-left, .slide-right { opacity: 1; transform: none; transition: none; transition-delay: 0s; }
  .phone-float { animation: none; }
  .phone-float::before { animation: none; }
  .gradient-text { animation: none; background-size: 100% auto; }
  .cta-shimmer { animation: none; }
  html { scroll-behavior: auto; }
}

/* ─── Responsive ─── */

@media (max-width: 960px) {
  .hero { padding: 64px 0 88px; }
  .hero-inner,
  .live-inner {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .feature {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 32px 0;
  }
  /* Always put the phone first on mobile, regardless of left/right variant */
  .feature-left  .feature-visual,
  .feature-right .feature-visual { order: 1; }
  .feature-left  .feature-copy,
  .feature-right .feature-copy   { order: 2; }

  .section-head { margin-bottom: 56px; }
  .features  { padding: 80px 0; }
  .live      { padding: 80px 0; }
  .download  { padding: 80px 0; }
  .download-inner { padding: 64px 24px; border-radius: 24px; }
  .slide-left, .slide-right { transform: none; }

  .nav-links { display: none; }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
    justify-items: center;
  }
  .footer-brand { text-align: center; }
  .copyright { text-align: center; }
  .feature-copy p,
  .live-copy p,
  .lede { max-width: none; }
}

@media (max-width: 520px) {
  .container { padding: 0 20px; }
  .btn { padding: 10px 18px; }
  .hero-cta { gap: 14px; }
  .phone { max-width: 240px; }
  .phone img { border-radius: 38px; }
}

/* SEO Sections */
.destinations {
  padding: 100px 0;
  background: #fff;
}

.destinations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.dest-card {
  padding: 32px;
  background: #f8fafc;
  border-radius: 20px;
  border: 1px solid #f1f5f9;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dest-card:hover {
  transform: translateY(-4px);
  border-color: #99f6e4;
  background: #fff;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

.dest-card h4 {
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 1.1rem;
}

.dest-card p {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
}

/* ─── FAQ ─── */

.faq {
  padding: 40px 0 120px;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px 24px;
  margin-bottom: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-item[open] {
  border-color: var(--teal-border);
  box-shadow: var(--shadow-card);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  color: var(--text-primary);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 400;
  color: var(--teal);
  line-height: 1;
  transition: transform .2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.faq-item p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  padding: 0 0 22px;
  margin: 0;
  max-width: 640px;
}
.faq-item p a {
  color: var(--teal-dark);
  text-decoration: underline;
}

@media (max-width: 960px) {
  .faq { padding: 24px 0 80px; }
}

@media (max-width: 768px) {
  /* Mobile visitors tap the App Store badge directly — no QR needed */
  .hero-qr { display: none; }
}
