/* TrailLeaf marketing — light mode, matches app brand tokens */
:root {
  --forest: #0a5c55;
  --deep-forest: #034344;
  --leaf: #6baf3a;
  --sage: #7fa87c;
  --sage-deep: #5c8a5a;
  --meadow: #ddf2cf;
  --meadow-soft: #e8f5dc;
  --moss: #e7eedb;
  --cream: #fbf7ef;
  --paper: #fffdf8;
  --ink: #1a3532;
  --muted: #6a7d7a;
  --sun: #ffb91c;
  --sky-soft: #b8dcf0;
  --stitch: rgba(61, 107, 79, 0.14);
  --shadow: rgba(10, 92, 85, 0.12);
  --radius: 1.25rem;
  --font-title: "Fraunces", "Palatino Linotype", Palatino, serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
  --max: 68rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--leaf);
}

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--deep-forest);
}

p {
  margin: 0 0 1rem;
}

.muted {
  color: var(--muted);
}

/* ——— Nav ——— */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 1.1rem 1.5rem;
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--deep-forest);
}

.brand img {
  width: 2.1rem;
  height: 2.1rem;
  object-fit: contain;
}

.brand__name {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--deep-forest);
}

.nav-links a:hover {
  color: var(--forest);
}

@media (max-width: 720px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    gap: 0.65rem 1rem;
  }

  .nav-links .btn {
    padding: 0.55rem 0.95rem;
    font-size: 0.9rem;
  }
}

/* ——— Hero (full-bleed) ——— */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--paper);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 67, 68, 0.18) 0%, rgba(3, 67, 68, 0.55) 55%, rgba(3, 67, 68, 0.82) 100%),
    linear-gradient(90deg, rgba(3, 67, 68, 0.35) 0%, transparent 55%);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 7.5rem 1.5rem 3.5rem;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  animation: rise 0.9s ease both;
}

.hero__brand img {
  width: 3.25rem;
  height: 3.25rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.hero__wordmark {
  font-family: var(--font-title);
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--paper);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  margin: 0;
}

.hero h1 {
  display: none; /* brand is the hero signal */
}

.hero__tagline {
  max-width: 28rem;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--paper);
  margin: 0 0 0.65rem;
  animation: rise 0.9s ease 0.1s both;
}

.hero__support {
  max-width: 26rem;
  font-size: 1.05rem;
  color: rgba(255, 253, 248, 0.88);
  margin: 0 0 1.75rem;
  animation: rise 0.9s ease 0.18s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  animation: rise 0.9s ease 0.26s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

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

.btn--primary {
  background: var(--leaf);
  color: var(--paper);
  box-shadow: 0 8px 24px rgba(107, 175, 58, 0.35);
}

.btn--primary:hover {
  background: #5c9a30;
  color: var(--paper);
}

.btn--ghost {
  background: rgba(255, 253, 248, 0.12);
  color: var(--paper);
  border-color: rgba(255, 253, 248, 0.45);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover {
  background: rgba(255, 253, 248, 0.22);
  color: var(--paper);
}

.btn--solid {
  background: var(--forest);
  color: var(--paper);
}

.btn--solid:hover {
  background: var(--deep-forest);
  color: var(--paper);
}

.btn[aria-disabled="true"] {
  opacity: 0.85;
  cursor: default;
  pointer-events: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ——— Sections ——— */
.section {
  padding: 4.5rem 1.5rem;
}

.section--meadow {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, var(--sky-soft) 0%, transparent 50%),
    linear-gradient(180deg, var(--meadow-soft) 0%, var(--cream) 100%);
}

.section--paper {
  background: var(--paper);
}

.section__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section__eyebrow {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin: 0 0 0.5rem;
}

.section__title {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  margin: 0 0 0.75rem;
}

.section__lead {
  max-width: 36rem;
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 2.25rem;
}

/* ——— Device mockups ——— */
.devices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: end;
  perspective: 1200px;
}

@media (max-width: 840px) {
  .devices {
    grid-template-columns: 1fr;
    max-width: 17rem;
    margin: 0 auto;
  }

  .phone--offset {
    display: none;
  }
}

.phone {
  --phone-w: 100%;
  --phone-lift: 0;
  --phone-scale: 1;
  width: var(--phone-w);
  margin: 0 auto;
  animation: float-in 1s ease both;
}

.phone:nth-child(2) {
  animation-delay: 0.12s;
}

.phone:nth-child(3) {
  animation-delay: 0.22s;
}

.phone--center {
  --phone-lift: -1.25rem;
  --phone-scale: 1.06;
  z-index: 2;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(calc(var(--phone-lift) + 24px)) scale(var(--phone-scale));
  }
  to {
    opacity: 1;
    transform: translateY(var(--phone-lift)) scale(var(--phone-scale));
  }
}

.phone__bezel {
  position: relative;
  background: linear-gradient(160deg, #2a3f3c 0%, #1a2826 100%);
  border-radius: 2.1rem;
  padding: 0.55rem;
  box-shadow:
    0 28px 50px var(--shadow),
    0 2px 0 rgba(255, 255, 255, 0.08) inset;
}

.phone__notch {
  position: absolute;
  top: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 0.7rem;
  background: #111;
  border-radius: 999px;
  z-index: 2;
}

.phone__screen {
  border-radius: 1.65rem;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  background: var(--moss);
}

.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.phone__caption {
  text-align: center;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--forest);
}

.note {
  margin-top: 1.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* ——— How it works ——— */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.step {
  padding: 0.25rem 0;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--meadow);
  color: var(--forest);
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.step h3 {
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
}

.step p {
  color: var(--muted);
  margin: 0;
}

/* ——— CTA band ——— */
.cta-band {
  padding: 4rem 1.5rem;
  background:
    linear-gradient(135deg, var(--forest) 0%, var(--deep-forest) 100%);
  color: var(--paper);
  text-align: center;
}

.cta-band h2 {
  color: var(--paper);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 0.65rem;
}

.cta-band p {
  max-width: 32rem;
  margin: 0 auto 1.5rem;
  color: rgba(255, 253, 248, 0.88);
}

.cta-band .cta-row {
  justify-content: center;
}

/* ——— Legal / support pages ——— */
.page-hero {
  padding: 6.5rem 1.5rem 2.5rem;
  background:
    linear-gradient(180deg, var(--meadow-soft) 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--stitch);
}

.page-hero__inner {
  max-width: 42rem;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 0.5rem;
}

.page-body {
  padding: 2.5rem 1.5rem 4rem;
}

.page-body__inner {
  max-width: 42rem;
  margin: 0 auto;
}

.page-body h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.65rem;
}

.page-body ul {
  padding-left: 1.2rem;
  color: var(--ink);
}

.page-body li {
  margin-bottom: 0.4rem;
}

.faq details {
  border-top: 1px solid var(--stitch);
  padding: 1rem 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--stitch);
}

.faq summary {
  font-weight: 700;
  color: var(--deep-forest);
  cursor: pointer;
}

.faq details p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.support-box {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.35rem;
  background: var(--meadow-soft);
  border: 1px solid var(--stitch);
  border-radius: var(--radius);
}

.support-box strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--deep-forest);
}

/* ——— Footer ——— */
.site-footer {
  padding: 2.5rem 1.5rem 2rem;
  background: var(--deep-forest);
  color: rgba(255, 253, 248, 0.78);
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .site-footer__inner {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

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

.site-footer .brand__name {
  color: var(--paper);
}

.site-footer p {
  margin: 0.65rem 0 0;
  font-size: 0.95rem;
  max-width: 28rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  color: rgba(255, 253, 248, 0.88);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-nav a:hover {
  color: var(--meadow);
}

.site-footer__meta {
  grid-column: 1 / -1;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 253, 248, 0.12);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
}

.site-footer__meta a {
  color: rgba(255, 253, 248, 0.7);
}

/* Header on legal pages needs solid contrast */
.site-header--solid {
  position: relative;
  background: rgba(251, 247, 239, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stitch);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
