/* ==========================================================================
   Out n About — marketing site
   Design tokens mirror lib/core/theme/app_theme.dart (TripPalette) exactly.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #F7F3EC;
  --surface: #FFFDFA;
  --surface-hi: #F1ECE3;

  /* Ink */
  --ink: #21201D;
  --ink-soft: #4B4A45;
  --muted: #7F7C73;

  /* Hairlines */
  --border: #E6DFD2;
  --border-soft: #EFE9DD;

  /* Brand */
  --clay: #C2552F;
  --clay-soft: #F7E1D2;
  --forest: #1F6B5C;
  --forest-dark: #164F44;
  --forest-soft: #DFEDE7;
  --ochre: #CC9A48;
  --ochre-soft: #F3E7D2;
  --plum: #8A4863;
  --plum-soft: #EADDE3;

  /* Status */
  --danger: #B23A26;
  --success: #2F8F6A;
  --warning: #C68A2C;

  /* Radii (from app_theme.dart) */
  --r-card: 22px;
  --r-btn: 14px;
  --r-pill: 999px;
  --r-tile: 14px;

  /* Type */
  --font-display: "Work Sans", sans-serif;
  --font-body: "Inter", sans-serif;

  --shadow-soft: 0 4px 24px rgba(33, 32, 29, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
}

p { margin: 0; color: var(--ink-soft); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------- Buttons ---------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 26px;
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover { box-shadow: var(--shadow-soft); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-outline:hover { background: var(--surface-hi); }

.btn-forest {
  background: var(--forest);
  color: #fff;
}

/* ---------------------------------- Nav ---------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 236, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.nav .wrap {
  display: flex;
  align-items: center;
  height: 104px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
}

.brand img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

/* ---------------------------------- Hero ---------------------------------- */

.hero {
  padding: 88px 0 64px;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy, .hero-visual { min-width: 0; }

.hero-eyebrow { margin-bottom: 18px; }

.hero h1 {
  font-size: clamp(38px, 5vw, 58px);
  color: var(--ink);
}

.hero h1 em {
  font-style: italic;
  color: var(--forest);
}

/* Rotating headline phrase */
.rotator {
  position: relative;
  display: block;
  height: 1.22em;
  overflow: hidden;
}

.rotator-word {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  font-style: italic;
  color: var(--forest);
  opacity: 0;
  transform: translateY(65%);
  transition: transform 0.6s cubic-bezier(0.16, 0.8, 0.3, 1), opacity 0.45s ease;
}

.rotator-word.is-active {
  opacity: 1;
  transform: translateY(0);
}

.rotator-word.is-leaving {
  opacity: 0;
  transform: translateY(-65%);
}

.hero-sub {
  margin-top: 20px;
  font-size: 18px;
  max-width: 480px;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-proof {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.hero-proof > span:last-child {
  min-width: 0;
  flex: 1 1 220px;
}

.avatar-stack { display: flex; }

.avatar-stack .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

.avatar-stack .avatar:first-child { margin-left: 0; }

.avatar.c1 { background: var(--clay); }
.avatar.c2 { background: var(--forest); }
.avatar.c3 { background: var(--plum); }

/* Hero visual: phone mockup stage */

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

.hero-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at 60% 30%, var(--clay-soft), transparent 60%),
              radial-gradient(circle at 20% 80%, var(--forest-soft), transparent 55%);
  filter: blur(6px);
  z-index: 0;
}

.phone {
  position: relative;
  z-index: 1;
  width: 260px;
  height: 540px;
  background: var(--ink);
  border-radius: 42px;
  padding: 12px;
  box-shadow: 0 30px 60px -20px rgba(33, 32, 29, 0.35);
  transition: transform 0.2s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  background: var(--surface);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Screenshot placeholder: swap by replacing this element's contents with
   <img src="images/screenshot-home.png" alt="..."> */
.screenshot-slot {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  background:
    repeating-linear-gradient(45deg, var(--surface-hi) 0 10px, var(--surface) 10px 20px);
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  image-rendering: -webkit-optimize-contrast;
}

/* Hero phone: auto-cycling screenshots */
.hero-shot {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-shot.is-active {
  opacity: 1;
}


.screenshot-slot .slot-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.phone-float {
  position: absolute;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}

.phone-float.float-1 { top: 10%; left: -8%; }
.phone-float.float-2 { bottom: 12%; right: -10%; }

.float-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.float-icon.forest { background: var(--forest-soft); color: var(--forest); }
.float-icon.clay { background: var(--clay-soft); color: var(--clay); }

.float-sub { color: var(--muted); font-weight: 500; font-size: 11.5px; }

/* ---------------------------------- Section shell ---------------------------------- */

section { padding: 96px 0; }

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

.section-head .eyebrow { display: block; margin-bottom: 14px; }

.section-head h2 {
  font-size: clamp(30px, 3.6vw, 42px);
  color: var(--ink);
}

.section-head p {
  margin-top: 16px;
  font-size: 17px;
}

/* ---------------------------------- Features ---------------------------------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px 26px;
}

.feature-icon-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px dashed;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-icon-ring.forest { border-color: var(--forest); }
.feature-icon-ring.clay { border-color: var(--clay); }
.feature-icon-ring.ochre { border-color: var(--ochre); }
.feature-icon-ring.plum { border-color: var(--plum); }

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.feature-icon.forest { background: var(--forest-soft); color: var(--forest); }
.feature-icon.clay { background: var(--clay-soft); color: var(--clay); }
.feature-icon.ochre { background: var(--ochre-soft); color: var(--ochre); }
.feature-icon.plum { background: var(--plum-soft); color: var(--plum); }

.feature-card h3 {
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}

.feature-card p { font-size: 14.5px; }

/* ---------------------------------- Showcase (screens) ---------------------------------- */

.showcase-bg {
  background: var(--surface-hi);
}

.screens-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
}

.screen-card { text-align: center; }

.screen-card:nth-child(2) { margin-top: 24px; }
.screen-card:nth-child(3) { margin-top: -6px; }
.screen-card:nth-child(4) { margin-top: 20px; }
.screen-card:nth-child(5) { margin-top: 4px; }

.screen-phone {
  width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 10px;
  box-shadow: 0 20px 40px -18px rgba(33, 32, 29, 0.22);
}

.screen-phone img {
  width: 100%;
  display: block;
  border-radius: 15px;
}

.screen-card p {
  margin-top: 14px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

/* ---------------------------------- How it works ---------------------------------- */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.steps::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 16.6667%;
  right: 16.6667%;
  height: 2px;
  background-image: linear-gradient(to right, var(--border) 50%, transparent 0%);
  background-size: 14px 2px;
  background-repeat: repeat-x;
  z-index: 0;
}

.step {
  position: relative;
  z-index: 1;
  text-align: center;
  transition: transform 0.25s ease;
}

.step:hover { transform: translateY(-3px); }

.step-num {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 26px;
  box-shadow: 0 10px 24px -8px rgba(33, 32, 29, 0.35);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-num span {
  transform: rotate(45deg);
  font-family: var(--font-display);
  font-size: 20px;
  color: #fff;
}

.step:hover .step-num { transform: rotate(-45deg) scale(1.08); }

.step-num.forest { background: var(--forest); }
.step-num.clay { background: var(--clay); }
.step-num.ochre { background: var(--ochre); }

.step h3 {
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}

.step p {
  font-size: 14.5px;
  max-width: 260px;
  margin: 0 auto;
}

/* ---------------------------------- CTA banner ---------------------------------- */

.cta-banner {
  border-radius: 60% 40% 55% 45% / 45% 55% 45% 55%;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-dark) 100%);
  padding: 72px 48px;
  position: relative;
  overflow: hidden;
  text-align: center;
  color: #fff;
}

.cta-banner::before,
.cta-banner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
}

.cta-banner::before { width: 320px; height: 320px; top: -140px; right: -80px; }
.cta-banner::after { width: 220px; height: 220px; bottom: -110px; left: -60px; }

.cta-banner h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  color: #fff;
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  margin-top: 16px;
  font-size: 16px;
  position: relative;
}

.cta-actions {
  position: relative;
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------------------------------- Store badges ---------------------------------- */

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.store-badge:hover { transform: translateY(-1px); opacity: 0.92; }

.cta-banner .store-badge {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(4px);
}

.store-badge svg { width: 22px; height: 22px; flex-shrink: 0; }

.store-badge .store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.store-badge .store-text small {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0.2px;
}

.store-badge .store-text strong {
  font-size: 15.5px;
  font-weight: 600;
  font-family: var(--font-display);
}

/* ---------------------------------- Footer ---------------------------------- */

footer {
  border-top: 1px solid var(--border-soft);
  padding: 64px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .brand { margin-bottom: 14px; }

.footer-brand p {
  font-size: 14px;
  max-width: 260px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
  letter-spacing: 0.2px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }

.footer-col li { margin-bottom: 12px; }

.footer-col a {
  font-size: 14px;
  color: var(--ink-soft);
}

.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------------------------------- Legal pages ---------------------------------- */

.legal {
  padding: 72px 0 96px;
}

.legal .wrap { max-width: 780px; }

.legal h1 {
  font-size: 38px;
  margin-bottom: 8px;
}

.legal .updated {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 40px;
  display: block;
}

.legal h2 {
  font-size: 21px;
  font-weight: 500;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--ink);
}

.legal p, .legal li {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.legal ul { padding-left: 20px; }

/* ---------------------------------- Responsive ---------------------------------- */

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 12px; }
  .phone { width: 220px; height: 460px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav .wrap { height: 78px; }
  .brand { font-size: 24px; gap: 12px; }
  .brand img { width: 44px; height: 44px; }
  .features-grid, .steps { grid-template-columns: 1fr; }
  .steps { gap: 40px; }
  .steps::before { display: none; }
  .carousel-bar, .carousel { max-width: 300px; }
  .carousel-slide { width: 260px; }
  .carousel-track { padding-left: calc(50% - 130px); padding-right: calc(50% - 130px); }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .cta-banner { padding: 48px 24px; }
  section { padding: 64px 0; }
  .hero { padding: 48px 0 40px; }
}

/* ---------------------------------- Motion ---------------------------------- */

/* Hero: entrance on load */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow, .hero h1, .hero-sub, .hero-actions, .hero-proof {
  animation: fadeUp 0.8s cubic-bezier(0.16, 0.8, 0.3, 1) both;
}

.hero-eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.12s; }
.hero-sub { animation-delay: 0.22s; }
.hero-actions { animation-delay: 0.32s; }
.hero-proof { animation-delay: 0.42s; }

.hero-visual {
  animation: fadeUp 0.9s cubic-bezier(0.16, 0.8, 0.3, 1) 0.2s both;
}

/* Hero: floating badges + glow drift */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.phone-float.float-1 { animation: floatY 5s ease-in-out infinite; }
.phone-float.float-2 { animation: floatY 5.6s ease-in-out infinite 0.4s; }

@keyframes glowDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8px, -10px) scale(1.05); }
}

.hero-glow { animation: glowDrift 11s ease-in-out infinite; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 0.8, 0.3, 1), transform 0.7s cubic-bezier(0.16, 0.8, 0.3, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 0.8, 0.3, 1), transform 0.6s cubic-bezier(0.16, 0.8, 0.3, 1);
}

.reveal-stagger.in-view > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > *:nth-child(1) { transition-delay: 0.02s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.09s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.23s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.30s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.37s; }

/* Feature cards + icons: hover lift */
.feature-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: var(--border-soft);
}

.feature-icon-ring {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-card:hover .feature-icon-ring {
  transform: scale(1.12) rotate(-4deg);
}

/* CTA banner: soft pulsing backdrop circles */
@keyframes pulseSoft {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

.cta-banner::before { animation: pulseSoft 6s ease-in-out infinite; }
.cta-banner::after { animation: pulseSoft 7s ease-in-out infinite 1s; }

/* Nav: shrink on scroll */
.nav {
  transition: box-shadow 0.3s ease;
}

.nav .wrap {
  transition: height 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 2px 20px rgba(33, 32, 29, 0.06);
}

.nav.scrolled .wrap {
  height: 74px;
}

.brand img {
  transition: width 0.3s ease, height 0.3s ease;
}

.brand {
  transition: font-size 0.3s ease;
}

.nav.scrolled .brand img {
  width: 44px;
  height: 44px;
}

.nav.scrolled .brand {
  font-size: 25px;
}

/* Store badges + avatars: small delight on load */
.hero-proof .avatar-stack .avatar {
  animation: fadeUp 0.5s cubic-bezier(0.16, 0.8, 0.3, 1) both;
}

.hero-proof .avatar-stack .avatar:nth-child(1) { animation-delay: 0.46s; }
.hero-proof .avatar-stack .avatar:nth-child(2) { animation-delay: 0.51s; }
.hero-proof .avatar-stack .avatar:nth-child(3) { animation-delay: 0.56s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
