/* ============================================
   TRVL3 — Marketing website
   Design tokens + global styles, translated from
   the React prototype (styles.css + site.css)
   ============================================ */

:root {
  /* Surface */
  --ink: oklch(0.22 0.03 250);
  --ink-2: oklch(0.34 0.025 250);
  --ink-3: oklch(0.50 0.02 250);
  --ink-4: oklch(0.66 0.015 250);
  --line: oklch(0.90 0.008 250);
  --line-2: oklch(0.94 0.005 250);
  --paper: oklch(0.985 0.004 90);
  --paper-2: oklch(0.965 0.006 90);
  --surface: #ffffff;
  --tint: oklch(0.96 0.012 200);

  /* Brand — Ocean & Coral accent */
  --brand: oklch(0.55 0.12 215);
  --brand-ink: oklch(0.30 0.10 215);
  --brand-tint: oklch(0.95 0.025 215);
  --accent: oklch(0.71 0.18 35);
  --accent-tint: oklch(0.96 0.04 35);

  /* Semantic */
  --good: oklch(0.62 0.13 155);
  --good-tint: oklch(0.95 0.03 155);
  --warn: oklch(0.78 0.15 80);
  --warn-tint: oklch(0.96 0.04 80);
  --danger: oklch(0.60 0.20 25);
  --danger-tint: oklch(0.96 0.04 25);
  --info: oklch(0.60 0.12 245);
  --info-tint: oklch(0.96 0.03 245);

  /* Site-specific */
  --site-bg: oklch(0.99 0.005 90);
  --site-ink: oklch(0.18 0.025 250);
  --site-ink-2: oklch(0.34 0.02 250);
  --site-ink-3: oklch(0.52 0.018 250);
  --site-line: oklch(0.92 0.005 250);
  --site-cream: oklch(0.97 0.01 60);
  --site-deep: oklch(0.18 0.04 250);

  /* Type */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-he: 'Heebo', 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px oklch(0.22 0.03 250 / 0.06);
  --shadow-md: 0 4px 16px oklch(0.22 0.03 250 / 0.08);
  --shadow-lg: 0 16px 40px oklch(0.22 0.03 250 / 0.12);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--site-ink);
  background: var(--site-bg);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[dir="rtl"] body { font-family: var(--font-he); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--site-ink-3); }

.site { min-height: 100vh; background: var(--site-bg); }

/* ===== Nav bar ===== */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(0.99 0.005 90 / 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--site-line);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links { display: flex; gap: 4px; align-items: center; flex: 1; }
.nav-links a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--site-ink-2);
  border-radius: 8px;
  cursor: pointer;
}
.nav-links a:hover { background: var(--site-line); color: var(--site-ink); }
.nav-links a[aria-current="page"] { color: var(--site-ink); }

/* ===== Containers ===== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}
.container.narrow { max-width: 760px; }
.container.wide   { max-width: 1360px; }

/* ===== Typography ===== */
h1.display {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
  text-wrap: balance;
}
h2.section {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  text-wrap: balance;
}
h3.sub {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 24px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--site-line);
  background: white;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--site-ink-2);
}
.lede {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--site-ink-3);
  margin: 0 0 28px;
  text-wrap: pretty;
  max-width: 64ch;
}

/* ===== Buttons ===== */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 22px;
  border-radius: 99px;
  background: var(--site-ink);
  color: var(--site-bg);
  font-weight: 700;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.btn-pill:hover { text-decoration: none; }
.btn-pill.ghost {
  background: transparent;
  color: var(--site-ink);
  border: 1px solid var(--site-line);
}
.btn-pill.sm { height: 40px; font-size: 14px; padding: 0 18px; }

/* ===== Section spacing ===== */
section { padding: 80px 0; }
section.tight { padding: 48px 0; }
section.cream { background: var(--site-cream); }
section.white-band { background: white; border-top: 1px solid var(--site-line); border-bottom: 1px solid var(--site-line); }

/* ===== Cards ===== */
.feature-card {
  background: white;
  border: 1px solid var(--site-line);
  border-radius: 18px;
  padding: 26px;
}
.feature-card.flush { padding: 0; display: flex; flex-direction: column; }
.feature-card.accent { background: linear-gradient(135deg, oklch(0.97 0.025 215), oklch(0.97 0.03 35)); }

.image-tile {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--site-line);
}
.image-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ===== Chips ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--paper-2);
  color: var(--site-ink-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--site-line);
}
.chip.active { background: var(--site-ink); color: white; border-color: var(--site-ink); }
.chip.tint { background: var(--brand-tint); color: var(--brand-ink); border-color: transparent; }
.chip.good { background: var(--good-tint); color: var(--good); border-color: transparent; }
.chip.accent { background: var(--accent-tint); color: oklch(0.45 0.15 35); border-color: transparent; }

/* ===== Footer ===== */
.footer {
  background: var(--site-deep);
  color: oklch(0.9 0.01 250);
  padding: 64px 0 28px;
  margin-top: 80px;
}
.footer a { color: oklch(0.78 0.01 250); cursor: pointer; }
.footer a:hover { color: white; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid oklch(1 0 0 / 0.08);
}
.footer-grid h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(0.65 0.01 250);
  margin: 0 0 14px;
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-grid li a { font-size: 13.5px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: oklch(0.6 0.01 250);
}
.footer-bottom .legal-links {
  display: flex;
  gap: 18px;
}

/* ===== Logo (TRVL3 image — same asset as the app project) ===== */
.site-logo {
  display: inline-flex;
  align-items: center;
  height: 32px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img { height: 100%; width: auto; display: block; }
.site-logo.dark { height: 40px; }

/* ===== Grids ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }

/* ===== Forms ===== */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--site-ink-2);
}
.input, .textarea, select.input {
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--site-line);
  background: white;
  padding: 0 14px;
  font-size: 15px;
  color: var(--site-ink);
  outline: none;
  width: 100%;
}
.textarea { height: auto; padding: 12px 14px; resize: vertical; }
.input:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }

/* ===== Alerts ===== */
.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert.error { background: var(--danger-tint); color: var(--danger); border: 1px solid oklch(0.85 0.06 25); }
.alert.info { background: var(--info-tint); color: var(--info); border: 1px solid oklch(0.85 0.05 245); }
.alert.good { background: var(--good-tint); color: var(--good); border: 1px solid oklch(0.85 0.05 155); }

/* ===== Quote mark ===== */
.qmark { font-family: var(--font-display); font-size: 80px; line-height: 0.6; color: var(--site-line); display: block; }

/* ===== FAQ ===== */
details.faq {
  border-bottom: 1px solid var(--site-line);
  padding: 22px 0;
}
details.faq > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 16px;
}
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary > .q-text {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
details.faq > summary > .q-icon {
  width: 32px; height: 32px; border-radius: 99px; flex-shrink: 0;
  background: var(--site-line); color: var(--site-ink);
  display: grid; place-items: center;
  transition: transform .2s, background .2s, color .2s;
}
details.faq[open] > summary > .q-icon { background: var(--site-ink); color: white; transform: rotate(45deg); }
details.faq > .a-text {
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--site-ink-2);
}

/* ===== Story card (Stories page) ===== */
.story-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  background: white;
  border: 1px solid var(--site-line);
  border-radius: 24px;
  overflow: hidden;
}
@media (max-width: 720px) {
  .story-card { grid-template-columns: 1fr; }
  .story-card .image-tile { height: 220px !important; }
}

/* ===== Storefront card (Marketplace page) ===== */
.storefront-card {
  padding: 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 720px) {
  .storefront-card { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
}

/* ===== Logo strip (Index) ===== */
.logo-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
  opacity: 0.7;
}
.logo-strip > * {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--site-ink-2);
  min-width: 0;
}
@media (max-width: 980px) {
  .logo-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .logo-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .logo-strip > * { font-size: 15px; }
}

/* ===== Mobile-first + RTL section (Index) ===== */
.mobile-rtl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.phone-mockups {
  position: relative;
  height: 480px;
  min-width: 0;
}
.phone-mockup {
  position: absolute;
  width: 230px;
  height: 460px;
  border-radius: 32px;
  overflow: hidden;
  border: 8px solid var(--site-ink);
  background: var(--paper);
}
.phone-mockup--right {
  inset-inline-end: 8%;
  top: 0;
  transform: rotate(5deg);
  box-shadow: 0 30px 60px oklch(0.22 0.03 250 / 0.25);
}
.phone-mockup--left {
  inset-inline-start: 8%;
  top: 40px;
  transform: rotate(-5deg);
  box-shadow: 0 30px 60px oklch(0.22 0.03 250 / 0.20);
}
.phone-mockup > img { width: 100%; height: 60%; object-fit: cover; display: block; }
.phone-mockup-body { padding: 16px; }
.phone-mockup-head {
  padding: 18px;
  background: linear-gradient(135deg, var(--brand-ink), oklch(0.20 0.04 250));
  color: white;
  height: 40%;
}

@media (max-width: 980px) {
  .mobile-rtl-grid { grid-template-columns: 1fr; gap: 32px; }
  /* Mockup section becomes optional eye-candy below the text — single, centered, no rotation */
  .phone-mockups { height: 460px; max-width: 260px; margin: 0 auto; }
  .phone-mockup--left { display: none; }
  .phone-mockup--right { position: static; transform: none; margin: 0 auto; }
}
@media (max-width: 720px) {
  /* On phones, drop the mockup illustration entirely — body copy + chips carry the message
     and the rotated phones can't fit in a 360px gutter without overflow. */
  .phone-mockups { display: none; }
}

/* ===== Responsive ===== */

/* Page-level safety net — never let horizontal scroll happen on the marketing site.
   Anything wider than the viewport gets clipped instead of forcing a sideways drag. */
html, body { overflow-x: clip; }
img, svg, video { max-width: 100%; height: auto; }
/* Some pages drop pixel-min-width values into inline grid styles; this keeps any
   `repeat(N, 1fr)` grid from blowing past its container by removing the implicit
   `min-width: auto` on grid items. */
[style*="display:grid"] > *, [style*="display: grid"] > * { min-width: 0; }

@media (max-width: 980px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* Inline `grid-template-columns: 1fr 1fr` on the hero / index sections wins by
     specificity over .grid-2, so we use a stronger selector to flip them on tablet. */
  .container[style*="grid-template-columns:1fr 1fr"],
  .container[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  /* With .nav-links hidden, the flex:1 spacer that used to push Sign in + Get started
     to the right is gone. Add an auto inline-start margin to the first sibling after
     the (hidden) nav-links so the two buttons jump to the inline-end edge. */
  .nav-links + a { margin-inline-start: auto; }

  section { padding: 48px 0; }
  section.tight { padding: 36px 0; }
  .nav-inner { padding: 12px 16px; gap: 10px; }
  .container { padding: 0 16px; }
  .container.narrow, .container.wide { padding: 0 16px; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4, .grid-5 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

  /* Inline 6-column logo strip (Index) collapses to a 3x2 grid */
  [style*="grid-template-columns:repeat(6,1fr)"],
  [style*="grid-template-columns: repeat(6, 1fr)"] {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }

  /* Hero image — clamp height so it doesn't dominate the viewport on phones */
  .container.wide img[style*="height:480px"],
  .container.wide img[style*="height: 480px"] { height: 220px !important; }

  /* Image tile — same deal */
  .image-tile[style*="height:440px"],
  .image-tile[style*="height: 440px"] { height: 240px !important; }

  /* Final CTA card — tighten padding so the dark band doesn't overflow the gutter */
  section [style*="padding:60px 56px"],
  section [style*="padding: 60px 56px"] {
    padding: 32px 24px !important;
  }

  /* Hero CTA row — let avatar pile / rating cluster wrap below the buttons */
  .display + p.lede + div[style*="flex-wrap:wrap"] {
    gap: 10px;
  }
}

/* Very small phones — three-column footer collapses, tag pills wrap cleanly */
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  h1.display { font-size: clamp(30px, 8vw, 40px); }
}

/* ===== Focus visible ===== */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
