/* TripOverall landing page — self-contained, no external deps */

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --ink: #17263b;
  --ink-soft: #4a5a70;
  --brand: #0f6ef2;
  --brand-ink: #ffffff;
  --accent: #ffb020;
  --line: #e3e9f2;
  --radius: 16px;
  --shadow: 0 4px 18px rgba(23, 38, 59, 0.08);
  --shadow-lift: 0 14px 34px rgba(23, 38, 59, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1b2d;
    --surface: #16263c;
    --ink: #eef3fa;
    --ink-soft: #a8b7cb;
    --brand: #4d94ff;
    --brand-ink: #0b1524;
    --line: #24374f;
    --shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 14px 34px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.25; }

main { display: block; }

section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 52px 20px;
}

.section-lede {
  color: var(--ink-soft);
  max-width: 640px;
}

/* ---------- Scroll-reveal system ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.slide-l { transform: translateX(-44px); }
.reveal.slide-r { transform: translateX(44px); }

.reveal.visible {
  opacity: 1;
  transform: none;
}

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: padding 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  padding: 8px 22px;
  border-bottom-color: var(--line);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover img { transform: rotate(-8deg) scale(1.08); }

.btn {
  display: inline-block;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 26px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }

.header-nav { display: flex; align-items: center; gap: 16px; }
.header-nav > a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.2s ease; }
.header-nav > a:not(.btn):hover { color: var(--brand); }

/* Language switcher */
.lang-switch { display: inline-flex; align-items: center; gap: 5px; }
.lang-switch .globe { font-size: 0.95rem; }
.lang-switch select {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); font: inherit; font-size: 0.9rem; font-weight: 600;
  padding: 6px 26px 6px 12px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234a5a70'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  transition: border-color 0.2s ease;
}
.lang-switch select:hover { border-color: var(--brand); }
.lang-switch option { color: #17263b; }
@media (max-width: 560px) { .header-nav { gap: 10px; } .header-nav > a:not(.btn) { display: none; } }

/* RTL support (Arabic) */
[dir="rtl"] .value-line::after { transform-origin: right; }
[dir="rtl"] .reveal.slide-l { transform: translateX(44px); }
[dir="rtl"] .reveal.slide-r { transform: translateX(-44px); }
[dir="rtl"] .reveal.slide-l.visible,
[dir="rtl"] .reveal.slide-r.visible { transform: none; }
[dir="rtl"] .tldr { border-left: none; border-right: 5px solid var(--brand); }
[dir="rtl"] .lang-switch select { padding: 6px 12px 6px 26px; background-position: left 10px center; }
[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.btn-small { padding: 8px 18px; font-size: 0.95rem; }

.btn-glow { position: relative; }

.btn-glow::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: var(--brand);
  opacity: 0;
  z-index: -1;
  animation: pulse-ring 2.6s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.45; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 30px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: -1;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: drift 16s ease-in-out infinite alternate;
}

.blob-a { width: 380px; height: 380px; background: var(--brand);  top: -80px;  left: -120px; }
.blob-b { width: 300px; height: 300px; background: var(--accent); top: 40%;    right: -100px; animation-delay: -5s; }
.blob-c { width: 220px; height: 220px; background: #ff6a88;       bottom: -60px; left: 30%;   animation-delay: -10s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(46px, -34px) scale(1.12); }
}

.plane-path {
  position: absolute;
  top: 6px;
  left: 0;
  width: min(600px, 90%);
  color: var(--ink-soft);
  opacity: 0.5;
}

.plane textPath { font-size: 20px; }

.plane { animation: fly 9s linear infinite; }

@keyframes fly {
  from { transform: translateX(0); }
  to   { transform: translateX(0); } /* movement done via startOffset fallback below */
}

/* animate the textPath startOffset where supported */
@supports (offset-path: path("M0,0 L10,10")) {
  .plane textPath { animation: fly-offset 9s linear infinite; }
}

@keyframes fly-offset {
  from { startOffset: 0%; }
  to   { startOffset: 100%; }
}

.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.2rem);
  margin: 0 0 14px;
}

.headline .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.headline .w:nth-child(1) { animation-delay: 0.05s; }
.headline .w:nth-child(2) { animation-delay: 0.14s; }
.headline .w:nth-child(3) { animation-delay: 0.23s; }
.headline .w:nth-child(4) { animation-delay: 0.32s; }
.headline .w:nth-child(5) { animation-delay: 0.45s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

.headline .hl {
  background: linear-gradient(92deg, var(--brand), #7c3aed 55%, var(--accent));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards,
             hue-slide 6s ease-in-out 1.2s infinite alternate;
}

@keyframes hue-slide {
  from { background-position: 0% 0; }
  to   { background-position: 100% 0; }
}

.fact-line { font-size: 1.08rem; color: var(--ink-soft); }
.fact-line strong { color: var(--ink); }

.hero-image { position: relative; }

.hero-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}

.floaty img { animation: floaty 6s ease-in-out infinite; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0.4deg); }
  50%      { transform: translateY(-12px) rotate(-0.4deg); }
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 22px 0 6px;
}

.store-badge img {
  display: block;
  height: 52px;
  width: auto;
  border-radius: 8px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.store-badge:hover img {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.micro-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee-track span {
  white-space: nowrap;
  color: var(--ink-soft);
  font-weight: 600;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Pain cards ---------- */
.cards.three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: var(--shadow-lift);
}

.card-emoji {
  display: inline-block;
  font-size: 2rem;
  margin-bottom: 6px;
}

.card:hover .card-emoji { animation: wiggle 0.5s ease-in-out; }

@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25%      { transform: rotate(-12deg) scale(1.15); }
  75%      { transform: rotate(10deg)  scale(1.1); }
}

.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { color: var(--ink-soft); margin-bottom: 0; }

/* ---------- Solution ---------- */
.solution { text-align: center; }
.solution .section-lede { margin: 0 auto; }

/* ---------- Features ---------- */
.feature {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 34px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 34px;
  margin-bottom: 24px;
  transition: box-shadow 0.35s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature:hover { box-shadow: var(--shadow-lift); }

.feature:nth-of-type(even) { grid-template-columns: 1fr 1.35fr; }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature:nth-of-type(even) .feature-media { order: 1; }

.feature h2 { margin-top: 0; font-size: 1.35rem; }
.feature p { color: var(--ink-soft); }

.feature-media {
  overflow: hidden;
  border-radius: var(--radius);
  justify-self: center;
}

.feature-media img {
  display: block;
  border-radius: var(--radius);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature:hover .feature-media img { transform: scale(1.05) rotate(0.6deg); }

.value-line {
  font-weight: 700;
  color: var(--ink) !important;
  position: relative;
  display: inline-block;
}

.value-line::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 3px;
  width: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--brand));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.feature.visible .value-line::after { transform: scaleX(1); }

/* ---------- How it works ---------- */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.steps li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  color: var(--ink-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease,
              opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.steps li:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #17263b;
  font-weight: 800;
  margin-bottom: 10px;
  transform: scale(0);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
}

.steps li.visible::before { transform: scale(1); }

.steps li strong { color: var(--ink); display: block; }

/* ---------- Pricing table ---------- */
.pricing-table-wrap { overflow-x: auto; }

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.pricing-table th,
.pricing-table td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.pricing-table thead th {
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  font-weight: 800;
}

.pricing-table thead th:last-child {
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--accent) 30%, var(--surface)),
    color-mix(in srgb, var(--brand) 22%, var(--surface)));
}

.pricing-table tbody tr {
  transition: background-color 0.25s ease;
}

.pricing-table tbody tr:hover {
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
}

.pricing-table tbody tr:last-child td { border-bottom: none; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
}

.faq details:hover { box-shadow: var(--shadow-lift); }

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 13px 28px 13px 0;
  position: relative;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "▾";
  position: absolute;
  right: 2px;
  top: 50%;
  translate: 0 -50%;
  color: var(--brand);
  transition: rotate 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq details[open] summary::after { rotate: 180deg; }

.faq .faq-body { overflow: hidden; }

.faq details[open] .faq-body {
  animation: faq-open 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

.faq p { color: var(--ink-soft); margin-top: 0; }
.faq a { color: var(--brand); }

/* ---------- Blog teaser ---------- */
.blog-teaser { max-width: 1060px; margin: 0 auto; }
.teaser-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.teaser-head h2 { margin: 0; }
.teaser-all { color: var(--brand); font-weight: 700; text-decoration: none; white-space: nowrap; }
.teaser-all:hover { text-decoration: underline; }
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 22px; }
.tcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column;
}
.tcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.tc-img { overflow: hidden; aspect-ratio: 3/2; }
.tcard img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.22,1,0.36,1); }
.tcard:hover img { transform: scale(1.06); }
.tc-body { padding: 15px 17px 18px; }
.tc-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--brand); font-weight: 700; }
.tcard h3 { margin: 6px 0 0; font-size: 1.02rem; line-height: 1.35; }

@media (max-width: 800px) { .teaser-grid { grid-template-columns: 1fr; } }

/* ---------- Final CTA ---------- */
.cta-final {
  text-align: center;
  margin-bottom: 64px;
  padding: 0 20px;
}

.cta-inner {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  padding: 46px 30px 50px;
  background: var(--surface);
  border: 1px solid transparent;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

.cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(var(--angle, 120deg), var(--brand), var(--accent), #ff6a88, var(--brand));
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: border-flow 7s linear infinite;
  pointer-events: none;
}

@keyframes border-flow {
  from { background-position: 0% 50%; }
  to   { background-position: 300% 50%; }
}

.cta-final .store-buttons { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 26px 20px 40px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-footer a { color: var(--brand); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero,
  .feature,
  .feature:nth-of-type(even) {
    grid-template-columns: 1fr;
  }

  .feature:nth-of-type(even) .feature-text { order: 1; }
  .feature:nth-of-type(even) .feature-media { order: 2; }

  .hero-image { order: -1; }
  .hero-image img { max-height: 320px; object-fit: cover; width: 100%; }

  .cards.three,
  .steps {
    grid-template-columns: 1fr;
  }

  section { padding: 36px 16px; }

  .plane-path { display: none; }
}
