/* ===================================
   farotrips.com – base styles
   Fonts, theme tokens, layout, navigation, footer and the sections
   that only this site has. Components shared with the app demo live in faro.css.
   =================================== */

/* ---------- Fonts (self-hosted Poppins, latin subset) ---------- */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/poppins-400.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/poppins-500.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/poppins-600.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/poppins-700.woff2) format('woff2'); }

/* ---------- Theme tokens: dark by default, light via [data-theme="light"] ---------- */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg:          #07131d;
  --bg-alt:      #0c1c29;
  --text:        #e8f0f5;
  --text-muted:  #93a6b4;
  --border:      #20384a;
  --card-bg:     #102332;
  --link:        #7cc8e2;
  --nav-solid:   rgba(7, 19, 29, 0.86);
  --footer-bg:   #040d15;
}

[data-theme="light"] {
  color-scheme: light;
  --bg:          #ffffff;
  --bg-alt:      #f2f7fa;
  --text:        #10212d;
  --text-muted:  #52626e;
  --border:      #d8e3ea;
  --card-bg:     #ffffff;
  --link:        #1a6b8a;
  --nav-solid:   rgba(6, 18, 31, 0.9);
  --footer-bg:   #06121f;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); }
main p a { text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--f-gold, #ffd866); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 96px 0; }
@media (max-width: 767px) { .section-padding { padding: 64px 0; } }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 2000;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--f-gold);
  color: var(--f-gold-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Anchored sections stop below the fixed navigation */
section[id] { scroll-margin-top: 70px; }

/* ---------- Navigation: transparent over the night sky, solid once scrolled ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
  padding: 16px 0;
}
.site-nav.scrolled,
.site-nav.open {
  background: var(--nav-solid);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 10px 0;
}
.nav-inner { display: flex; align-items: center; gap: 16px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.nav-cta { padding: 9px 18px; font-size: 0.88rem; }

.theme-toggle,
.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.theme-toggle:hover,
.nav-toggle:hover { background: rgba(255, 255, 255, 0.22); }
.theme-toggle .i-moon { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-moon { display: block; }
.nav-toggle { display: none; }
.nav-toggle .i-close { display: none; }
.site-nav.open .nav-toggle .i-close { display: block; }
.site-nav.open .nav-toggle .i-menu { display: none; }

.lang-switch { margin-right: 0; }

@media (max-width: 991px) {
  .nav-toggle { display: inline-grid; }
  .nav-inner { flex-wrap: wrap; }
  .nav-tools { margin-left: auto; }
  .nav-links {
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
  }
  .site-nav.open .nav-links { max-height: 420px; padding: 10px 0 6px; }
  .nav-links a { padding: 12px 10px; font-size: 1rem; }
}
@media (max-width: 575px) {
  .nav-cta { display: none; }
  .brand { font-size: 1.2rem; }
}

/* ---------- Hero additions ---------- */
.fh-hero { min-height: min(100vh, 920px); }
.fh-hero-inner { padding-top: 130px; }
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
}
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust .ico { color: #5ed39a; }
@media (max-width: 767px) { .fh-hero-inner { padding-top: 104px; } }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 34px;
  left: 16%;
  right: 16%;
  border-top: 2px dashed var(--border);
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 10px;
}
.step-icon {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--f-primary), #2f87a8);
  color: #fff;
  box-shadow: 0 12px 30px rgba(26, 107, 138, 0.35);
  position: relative;
}
.step-icon .ico { width: 30px; height: 30px; }
.step-icon::after {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--f-gold);
  color: var(--f-gold-ink);
  font-size: 0.8rem;
  font-weight: 700;
}
.step h3 { margin: 0 0 8px; font-size: 1.15rem; }
.step p { margin: 0 auto; max-width: 300px; color: var(--text-muted); font-size: 0.95rem; }
@media (max-width: 767px) {
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .steps::before { display: none; }
}

/* ---------- Highlights: three big feature cards ---------- */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hl {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 30px 26px 26px;
  border-radius: 26px;
  color: #fff;
  min-height: 460px;
  isolation: isolate;
}
.hl::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(500px 260px at 90% -10%, rgba(255, 255, 255, 0.18), transparent 60%);
}
.hl.solo { background: linear-gradient(160deg, #6b3fa0 0%, #b2457d 55%, #e0795a 100%); }
.hl.ai { background: linear-gradient(160deg, #0f3b57 0%, #1a6b8a 55%, #39a3b8 100%); }
.hl.offline { background: linear-gradient(160deg, #1d4d3b 0%, #2c7a57 55%, #6bb37a 100%); }
.hl-tag {
  align-self: flex-start;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hl h3 { font-size: 1.5rem; margin: 16px 0 10px; }
.hl p { margin: 0; color: rgba(255, 255, 255, 0.88); font-size: 0.95rem; }
.hl-visual { margin-top: auto; padding-top: 26px; }

/* Solo: two people meet */
.meet { display: flex; align-items: center; justify-content: center; gap: 0; }
.meet .face {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.3rem;
  color: #3b1e55;
  background: #ffe1c7;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.meet .face.b { background: #c9f0e1; color: #133d30; }
.meet .wave-hi {
  font-size: 1.6rem;
  margin: 0 -6px;
  z-index: 1;
  animation: hi 2.4s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes hi { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(18deg); } 20%, 40% { transform: rotate(-10deg); } }
.meet-note {
  margin: 16px auto 0;
  max-width: 260px;
  text-align: center;
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

/* AI app: a short chat */
.chat { display: flex; flex-direction: column; gap: 8px; font-size: 0.82rem; }
.chat p {
  margin: 0;
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 16px;
  line-height: 1.45;
}
.chat .q { align-self: flex-end; background: rgba(255, 255, 255, 0.95); color: #10212d; border-bottom-right-radius: 4px; }
.chat .a { align-self: flex-start; background: rgba(0, 0, 0, 0.25); border-bottom-left-radius: 4px; }
.chat .a strong { color: #ffe9a8; }
.hl.ai .chat p { opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease, transform 0.5s ease; }
.hl.ai.visible .chat p { opacity: 1; transform: none; }
.hl.ai.visible .chat p:nth-child(2) { transition-delay: 0.6s; }
.hl.ai.visible .chat p:nth-child(3) { transition-delay: 1.2s; }

/* Offline: signal gone, things still work */
.offline-card {
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.82rem;
}
.offline-card .bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 600; }
.offline-card .bar span:last-child { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); font-size: 0.7rem; }
.offline-card ul { list-style: none; margin: 0; padding: 0; }
.offline-card li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.offline-card li span:last-child { display: inline-flex; align-items: center; gap: 5px; color: #d6ffe6; }

@media (max-width: 991px) {
  .highlights { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .hl { min-height: 0; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card-bg);
  margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.faq details[open] { border-color: var(--f-primary); box-shadow: var(--f-shadow); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { color: var(--f-primary); transition: transform 0.25s ease; }
.faq details[open] summary .ico { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--text-muted); line-height: 1.7; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.72);
  padding: 64px 0 28px;
  font-size: 0.92rem;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.site-footer .brand { margin-bottom: 12px; }
.site-footer p { margin: 0; max-width: 340px; line-height: 1.7; }
.footer-heading { color: #fff; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 6px 0 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
}
.footer-bottom a { color: rgba(255, 255, 255, 0.85); }
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--f-gold);
  color: var(--f-gold-ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: none; }

.back-to-top .ico { transform: rotate(180deg); }

.f-cta.lost { min-height: 100vh; display: grid; place-items: center; }

/* ---------- Scroll reveal ---------- */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .meet .wave-hi { animation: none; }
  .hl.ai .chat p { opacity: 1; transform: none; transition: none; }
}
