/* =========================================================
   Vagabond AI — shared design system
   Apple HIG–inspired, terracotta accent. Serif headings.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&display=swap');

:root {
  --accent: #A04B2D;        /* terracotta */
  --accent-dark: #823c23;
  --navy: #1B2A4A;          /* deep navy for contrast */
  --tint: #F4E9E3;          /* warm tint */
  --bg: #F7F7F5;            /* off-white */
  --surface: #FFFFFF;
  --text: #1C1C1E;          /* primary */
  --text-2: #6E6E73;        /* secondary */
  --border: #E7E5E1;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(28,28,30,.04), 0 12px 32px rgba(28,28,30,.06);
  --shadow-sm: 0 1px 2px rgba(28,28,30,.04), 0 6px 16px rgba(28,28,30,.05);
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Top navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 247, 245, .82);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-2);
  font-size: .95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 980px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--accent-dark); text-decoration: none; }

@media (max-width: 640px) {
  .nav-links .hide-sm { display: none; }
  .nav-links { gap: 16px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 980px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--tint); text-decoration: none; }

/* ---------- Store badges ---------- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.store-badges a { display: inline-flex; }
.store-badges img { height: 52px; width: auto; }
.store-badges a:hover { opacity: .85; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(1100px 480px at 80% -10%, var(--tint) 0%, rgba(244,233,227,0) 60%),
    var(--bg);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  background: var(--tint);
  color: var(--accent);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .02em;
  padding: 6px 13px;
  border-radius: 980px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 18px;
  font-weight: 700;
}
.hero .lede {
  font-size: 1.22rem;
  color: var(--text);
  margin: 0 0 14px;
  max-width: 30ch;
  font-weight: 500;
}
.hero .subline {
  font-size: 1.05rem;
  color: var(--text-2);
  margin: 0 0 30px;
  max-width: 46ch;
}

/* Hero visual / screenshot placeholder */
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  background: linear-gradient(160deg, var(--tint), #fff);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .placeholder {
  color: var(--accent);
  text-align: center;
  font-weight: 600;
  opacity: .65;
  padding: 24px;
}
.hero-visual .placeholder small {
  display: block;
  color: var(--text-2);
  font-weight: 500;
  margin-top: 6px;
}

/* ---------- Scanner effect (hero) ---------- */
.hero-visual.is-scanning img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* faint scanner sheen + subtle horizontal texture */
  background:
    radial-gradient(120% 80% at 50% 50%, rgba(28,28,30,0) 55%, rgba(28,28,30,.18) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 4px);
}
/* the moving scan line + symmetric glow (reads the same up or down) */
.scan-line {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 4%;
  height: 3px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(244,233,227,0), var(--tint), #ffffff, var(--tint), rgba(244,233,227,0));
  box-shadow:
    0 0 16px 3px rgba(160,75,45,.65),
    0 0 46px 10px rgba(160,75,45,.28);
  animation: scanY 3.2s ease-in-out infinite alternate;
}
@keyframes scanY {
  0%   { top: 4%; }
  100% { top: 96%; }
}
/* AR focus brackets in the corners */
.corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2.5px solid rgba(244,233,227,.92);
}
.corner.tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.corner.tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.corner.bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.corner.br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  .scan-line { animation: none; top: 50%; }
}

@media (max-width: 860px) {
  .hero { padding: 48px 0 40px; }
  .hero .container { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { max-width: 360px; margin: 0 auto; order: -1; }
  .hero .lede, .hero .subline { max-width: none; }
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  letter-spacing: -.02em;
  margin: 0 0 12px;
  font-weight: 700;
}
.section-head p { color: var(--text-2); font-size: 1.08rem; margin: 0; }

/* ---------- Feature cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--tint);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.card .icon svg { width: 26px; height: 26px; stroke: var(--accent); }
.card h3 { margin: 0 0 8px; font-size: 1.18rem; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--text-2); font-size: .98rem; }

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.step .num {
  counter-increment: step;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  margin-bottom: 16px;
}
.step .num::before { content: counter(step); }
.step h3 { margin: 0 0 6px; font-size: 1.18rem; }
.step p { margin: 0; color: var(--text-2); }

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Premium / note band ---------- */
.band {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px 40px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.band h3 { margin: 0 0 10px; font-size: 1.4rem; }
.band p { margin: 0 auto; color: var(--text-2); max-width: 56ch; }

.ai-note {
  max-width: 760px;
  margin: 24px auto 0;
  text-align: center;
  color: var(--text-2);
  font-size: .9rem;
  padding: 0 16px;
}

/* ---------- Languages chips ---------- */
.lang-band {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.lang-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.lang-chips span {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .92rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 980px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Section screenshot strip ---------- */
.showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}
.shot {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.shot img {
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 720px) {
  .showcase { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .showcase { grid-template-columns: 1fr; max-width: 280px; margin-inline: auto; }
}

/* ---------- Final CTA band ---------- */
.cta {
  padding: 72px 0;
  background:
    radial-gradient(900px 400px at 20% -20%, var(--tint) 0%, rgba(244,233,227,0) 60%),
    var(--navy);
}
.cta .container {
  text-align: center;
  max-width: 720px;
}
.cta h2 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -.02em;
  margin: 0 0 14px;
}
.cta p {
  color: rgba(255,255,255,.78);
  font-size: 1.1rem;
  margin: 0 0 28px;
}
.cta .store-badges { justify-content: center; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Generic content page (support, etc.) ---------- */
.page-header { padding: 56px 0 8px; }
.page-header h1 {
  font-size: clamp(2rem, 4.4vw, 2.8rem);
  letter-spacing: -.02em;
  margin: 0 0 10px;
}
.page-header .sub { color: var(--text-2); font-size: 1.1rem; margin: 0; }

.prose { padding: 24px 0 56px; }
.prose .card { margin-bottom: 20px; padding: 28px 30px; }
.prose .card h2 { margin: 0 0 10px; font-size: 1.3rem; }
.prose .card p { color: var(--text-2); }
.prose .card p:last-child { margin-bottom: 0; }
.prose ol, .prose ul { color: var(--text-2); padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose code {
  background: var(--tint);
  color: var(--accent-dark);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: .92em;
}

/* ---------- Footer (required on every page) ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
.site-footer .container { padding-top: 48px; padding-bottom: 40px; }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}
.footer-brand { max-width: 360px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand address {
  font-style: normal;
  color: var(--text-2);
  font-size: .92rem;
  line-height: 1.7;
}
.footer-brand address strong { color: var(--text); display: block; margin-bottom: 2px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}
.footer-col h4 {
  font-family: var(--font);
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-2);
  margin: 0 0 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--text); font-size: .94rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  align-items: center;
  color: var(--text-2);
  font-size: .85rem;
}
.footer-disclaimer {
  margin-top: 14px;
  color: var(--text-2);
  font-size: .8rem;
  max-width: 70ch;
}

@media (max-width: 640px) {
  .footer-links { gap: 28px; }
}

/* ── Download redirect page (desktop / no-JS fallback) ───────────────── */
.download-page { display: flex; min-height: 100vh; margin: 0; }
.download-fallback {
  margin: auto;
  text-align: center;
  padding: 40px 24px;
  max-width: 480px;
}
.download-fallback .brand { display: inline-flex; margin-bottom: 20px; }
.download-fallback h1 { margin: 0 0 8px; }
.download-fallback p { margin: 0 0 28px; color: #555; }
.download-fallback .store-badges { justify-content: center; flex-wrap: wrap; }
