/* ============================================================
   Wandrr marketing site · shared styles
   Sun-warmed scrapbook meets modern iOS.
   No frameworks. No external fonts (Caveat is self-hosted).
   ============================================================ */

/* ---- Caveat (self-hosted per hosting setup) ---- */
@font-face {
  font-family: 'Caveat';
  src: url('assets/Caveat-Regular.ttf') format('truetype');
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: 'Caveat';
  src: url('assets/Caveat-Bold.ttf') format('truetype');
  font-weight: 600 700;
  font-display: swap;
}

/* ---- Tokens ---- */
:root {
  --cream: #FBF6EF;
  --paper: #FFF8EC;
  --ink: #241B17;
  --muted: #8A7D74;
  --muted-strong: #6E6156;   /* small-text-safe muted (AA on cream) */
  --sun: #F2A856;
  --coral: #E47163;
  --ocean: #5B86C7;
  --sage: #9DAE89;
  --rule: rgba(36, 27, 23, 0.1);
  --card: #FFFFFF;
  --sunset: linear-gradient(120deg, var(--sun), var(--coral));

  --sans: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont,
          'Segoe UI', system-ui, sans-serif;
  --hand: 'Caveat', 'Bradley Hand', 'Segoe Print', cursive;

  --wrap: 1080px;
  --radius: 22px;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint paper grain */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.48 0 0 0 0 0.4 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

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

a { color: var(--coral); text-decoration: none; }
a:hover { color: #c85748; }

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.025em; margin: 0; font-weight: 800; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

/* ---- Type helpers ---- */
.eyebrow {
  font-family: var(--hand);
  font-size: 26px; line-height: 1;
  color: var(--coral);
  display: block; margin-bottom: 12px;
  transform: rotate(-1.2deg);
}
.h-xl { font-size: clamp(38px, 7vw, 68px); }
.h-lg { font-size: clamp(30px, 5vw, 46px); }
.h-md { font-size: clamp(22px, 3.4vw, 30px); }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted-strong); max-width: 34em; }
.hand { font-family: var(--hand); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 700; font-size: 16px; line-height: 1;
  border: 0; cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.btn-primary {
  background: var(--ink); color: var(--paper);
  box-shadow: 0 10px 24px rgba(36, 27, 23, 0.22);
}
.btn-primary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 14px 30px rgba(36, 27, 23, 0.26); }
.btn-sunset {
  background: var(--sunset); color: #fff;
  box-shadow: 0 10px 24px rgba(228, 113, 99, 0.35);
}
.btn-sunset:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 14px 32px rgba(228, 113, 99, 0.42); }
.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgba(36, 27, 23, 0.22);
}
.btn-ghost:hover { background: rgba(36, 27, 23, 0.05); color: var(--ink); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---- Chips / badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(36, 27, 23, 0.06);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted-strong);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sun); }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid rgba(36, 27, 23, 0.06);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; gap: 26px;
}
.nav-logo { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.nav-logo img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 3px 10px rgba(36,27,23,0.16); }
.nav-logo span { font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.nav-links a {
  color: var(--muted-strong); font-weight: 600; font-size: 15px;
  padding: 9px 13px; border-radius: 999px;
}
.nav-links a:hover { color: var(--ink); background: rgba(36, 27, 23, 0.05); }
.nav-links a.active { color: var(--ink); }
.nav-cta { margin-left: 6px; padding: 11px 20px; font-size: 15px; }
.nav-burger {
  display: none; margin-left: auto;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-burger svg { display: block; }

@media (max-width: 740px) {
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper);
    padding: 10px 16px 16px;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 18px 40px rgba(36, 27, 23, 0.12);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 14px; font-size: 17px; }
  .nav-cta { margin: 8px 0 0; text-align: center; justify-content: center; }
  .nav-burger { display: block; }
}

/* ---- Scrapbook bits ---- */
.tape {
  position: absolute;
  width: 92px; height: 26px;
  background: color-mix(in srgb, var(--sun) 72%, #fff 10%);
  opacity: 0.75;
  background-image: repeating-linear-gradient(90deg, transparent 0 5px, rgba(255,255,255,0.32) 5px 6px);
  box-shadow: 0 1px 3px rgba(36, 27, 23, 0.12);
  pointer-events: none;
}
.tape.blue { background-color: color-mix(in srgb, var(--ocean) 62%, #fff 20%); }
.tape.coral { background-color: color-mix(in srgb, var(--coral) 66%, #fff 14%); }

.stamp {
  display: inline-block;
  border: 2px solid var(--coral); color: var(--coral);
  padding: 5px 12px;
  font-family: var(--hand); font-size: 19px; line-height: 1.15;
  text-transform: uppercase; letter-spacing: 0.04em;
  transform: rotate(-4deg);
  border-radius: 4px;
}
.postmark {
  width: 92px; height: 92px; border-radius: 50%;
  border: 2px dashed rgba(36, 27, 23, 0.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--hand); font-size: 15px; line-height: 1.1; text-align: center;
  color: var(--muted-strong);
  transform: rotate(8deg);
}

.annot {
  font-family: var(--hand);
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.15;
  color: var(--ink);
}
.annot.coral { color: var(--coral); }
.annot.ocean { color: var(--ocean); }

/* hand-drawn arrow (inline svg uses currentColor) */
.arrow-doodle { color: inherit; }

/* ---- Phone frame ---- */
.iphone {
  position: relative;
  border-radius: clamp(34px, 11%, 48px);
  background: #17120e;
  padding: clamp(7px, 2.4%, 11px);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.14) inset,
    0 24px 50px rgba(36, 27, 23, 0.28),
    0 8px 18px rgba(36, 27, 23, 0.16);
}
.iphone > img {
  border-radius: clamp(27px, 8.6%, 38px);
  width: 100%; height: auto;
}
.iphone::after { /* soft screen sheen */
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,0.09) 0%, transparent 30%);
  pointer-events: none;
}

/* ---- Polaroid frame (screenshots as keepsakes) ---- */
.polaroid {
  background: #fff;
  padding: 10px 10px 16px;
  box-shadow: 0 14px 34px rgba(36, 27, 23, 0.16), 0 3px 8px rgba(36, 27, 23, 0.08);
}
.polaroid img { border-radius: 6px; }
.polaroid .cap {
  font-family: var(--hand); font-size: 20px; text-align: center;
  padding-top: 10px; color: var(--ink);
}

/* ---- Sections ---- */
.section { padding: clamp(64px, 10vw, 120px) 0; position: relative; }
.section-tight { padding: clamp(44px, 7vw, 80px) 0; }

/* alternating feature story */
.story {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
}
.story.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.story.flip .story-copy { order: 2; }
.story.flip .story-art { order: 1; }
.story-copy .h-lg { margin: 6px 0 16px; }
.story-copy .lede { font-size: 17.5px; }
.story-art { position: relative; }

.feature-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); }
.feature-list .tick {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: color-mix(in srgb, var(--sage) 28%, #fff);
  color: #4c6b3f; display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.feature-list .tick svg { width: 12px; height: 12px; }

@media (max-width: 860px) {
  .story, .story.flip { grid-template-columns: 1fr; }
  .story.flip .story-copy { order: 1; }
  .story.flip .story-art { order: 2; }
  .story-art { max-width: 420px; margin: 0 auto; }
}

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* gentle float for hero phones */
@media (prefers-reduced-motion: no-preference) {
  .float { animation: float 7s ease-in-out infinite alternate; }
  .float.slow { animation-duration: 9s; animation-delay: 1.2s; }
  @keyframes float {
    from { transform: translateY(0) rotate(var(--tilt, 0deg)); }
    to   { transform: translateY(-14px) rotate(var(--tilt, 0deg)); }
  }
}

/* ---- Footer ---- */
.footer {
  background: var(--ink); color: rgba(255, 248, 236, 0.72);
  padding: 56px 0 40px;
  margin-top: clamp(40px, 8vw, 90px);
}
.footer a { color: var(--paper); font-weight: 600; }
.footer a:hover { color: var(--sun); }
.footer-grid {
  display: flex; flex-wrap: wrap; gap: 32px;
  align-items: flex-start; justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--paper); }
.footer-brand img { width: 44px; height: 44px; border-radius: 11px; }
.footer-brand b { font-size: 20px; letter-spacing: -0.02em; }
.footer-brand .hand { display: block; color: var(--sun); font-size: 19px; margin-top: 1px; }
.footer-links { display: flex; gap: 8px 26px; flex-wrap: wrap; font-size: 15px; }
.footer-legal {
  margin-top: 34px; padding-top: 22px;
  border-top: 1px solid rgba(255, 248, 236, 0.14);
  font-size: 13.5px; color: rgba(255, 248, 236, 0.55);
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
}

/* ---- Big CTA (boarding pass) ---- */
.boarding {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(36, 27, 23, 0.14), 0 4px 12px rgba(36, 27, 23, 0.06);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
}
.boarding::before { /* sunset edge */
  content: '';
  position: absolute; inset: 0 auto 0 0; width: 10px;
  background: var(--sunset);
}
.boarding-main { padding: clamp(30px, 5vw, 54px); }
.boarding-stub {
  border-left: 2px dashed rgba(36, 27, 23, 0.2);
  padding: clamp(30px, 5vw, 54px) clamp(22px, 3.5vw, 44px);
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  min-width: 210px;
}
.boarding-stub .code {
  height: 44px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 6px, transparent 6px 11px);
  opacity: 0.8; border-radius: 2px;
}
.boarding-meta { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 22px; }
.boarding-meta div small {
  display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-strong); font-weight: 700;
}
.boarding-meta div b { font-size: 17px; }
@media (max-width: 640px) {
  .boarding { grid-template-columns: 1fr; }
  .boarding-stub { border-left: 0; border-top: 2px dashed rgba(36, 27, 23, 0.2); }
}

/* ---- Utility ---- */
.center { text-align: center; }
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 34px; }
.muted { color: var(--muted-strong); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ============================================================
   Legacy pages (privacy.html / terms.html / support.html)
   These pages keep their original markup — this block maps their
   old class names onto the new design so they stay styled.
   ============================================================ */

/* old nav brand markup: .brand > img + .word */
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 3px 10px rgba(36,27,23,0.16); }
.brand .word { font-family: var(--hand); font-weight: 700; font-size: 30px; line-height: 1; color: var(--ink); }
.nav-inner .brand + .nav-links { margin-left: auto; }
.nav-links a.cta {
  background: var(--ink); color: var(--paper);
  font-weight: 700; padding: 10px 18px; margin-left: 6px;
}
.nav-links a.cta:hover { background: #3a2e26; color: #fff; }

/* legacy pages have no burger button — keep their nav usable on mobile */
@media (max-width: 740px) {
  .nav-inner:not(:has(.nav-burger)) .nav-links {
    display: flex; position: static;
    flex-direction: row; align-items: center;
    background: transparent; padding: 0; border: 0; box-shadow: none;
  }
  .nav-inner:not(:has(.nav-burger)) .nav-links a:not(.cta) { display: none; }
  .nav-inner:not(:has(.nav-burger)) .nav-links a.cta { margin: 0; }
}

/* legal / support document layout */
.legal { padding: 56px 0 80px; }
.legal .doc { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: clamp(32px, 5vw, 46px); margin: 0 0 6px; }
.legal .updated { color: var(--muted-strong); font-size: 15px; margin: 0 0 36px; }
.legal h2 { font-size: 22px; margin: 36px 0 10px; }
.legal h3 { font-size: 18px; margin: 24px 0 8px; }
.legal p, .legal li { color: #3a2e26; font-size: 16px; margin: 0 0 12px; }
.legal ul { padding-left: 22px; margin: 0 0 12px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--ocean); }
.legal a:hover { color: #40679f; }
.legal .lead {
  font-size: 18px; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule);
  border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 8px 20px rgba(36, 27, 23, 0.08);
  margin-bottom: 24px;
}
.legal .toc {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 14px;
  padding: 18px 22px; margin: 28px 0;
}
.legal .toc strong { display: block; margin-bottom: 8px; }
.legal .back { display: inline-block; margin-top: 8px; font-weight: 600; }
.legal .btn { text-decoration: none; }
.legal a.btn-primary { color: var(--paper); }
.legal a.btn-primary:hover { color: #fff; }
.support-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.support-email { font-weight: 600; }

/* legacy footer markup: bare <footer> with .foot-* children */
footer:not(.footer) {
  background: var(--ink); color: rgba(255, 248, 236, 0.72);
  padding: 40px 0; margin-top: clamp(40px, 8vw, 90px);
  font-size: 15px;
}
footer:not(.footer) .foot-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
footer:not(.footer) .foot-brand { font-family: var(--hand); font-size: 26px; color: var(--paper); }
footer:not(.footer) .foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
footer:not(.footer) .foot-links a { color: var(--paper); font-weight: 600; font-size: 15px; }
footer:not(.footer) .foot-links a:hover { color: var(--sun); }
footer:not(.footer) .foot-copy {
  color: rgba(255, 248, 236, 0.55); font-size: 13.5px; width: 100%; margin-top: 8px;
}

/* ============================================================
   Free / Pro tagging — used across index, features, pro
   ============================================================ */
.pro-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  color: #fff; background: var(--sunset);
  padding: 2px 8px; border-radius: 999px; line-height: 1.5;
  vertical-align: middle; white-space: nowrap;
}
.free-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  color: #4c6b3f; background: color-mix(in srgb, var(--sage) 26%, #fff);
  padding: 2px 8px; border-radius: 999px; line-height: 1.5;
  vertical-align: middle; white-space: nowrap;
}
h2 .pro-badge, h3 .pro-badge { font-size: 0.4em; transform: translateY(-0.28em); }
/* a bullet that's a Pro-only feature: lock-tinted marker */
.feature-list li.pro .tick { background: rgba(228, 113, 99, 0.16); color: var(--coral); }
.feature-list li .pro-badge { margin-left: 2px; }
