/* Shared chrome for Vista's secondary pages (compare, privacy).
   Mirrors the design tokens and components used in index.html. */

:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --stage: #F5F8F6;
  --surface: #FFFFFF;
  --paper: #E9F3EE;
  --ink: #05261C;
  --muted: #42554C;
  --faint: #52645C;
  --line: #E4EBE7;
  --line-strong: #CFDCD5;
  --accent: #13803B;
  --accent-hover: #0F6B31;
  --accent-ink: #FFFFFF;
  --accent-soft: #D3E8DA;
  --accent-strong: #0F6B31;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --r-card: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

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

img, svg { max-width: 100%; }

a { color: inherit; }

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}

.sr-only {
  position: absolute;
  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: 16px;
  top: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- Header ---------- */

.page-head {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.04);
  backdrop-filter: blur(14px) saturate(1.04);
  padding-top: env(safe-area-inset-top, 0px);
}

.page-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1232px;
  height: 64px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.025em;
  color: var(--ink);
  text-decoration: none;
}

.appicon {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 23%;
  background: url("/images/vista-icon.svg") center / cover no-repeat;
  overflow: hidden;
}

.page-nav {
  display: none;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
}

.page-nav a { text-decoration: none; transition: color .15s ease; }
.page-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }

@media (hover: hover) and (pointer: fine) {
  .page-nav a:hover { color: var(--ink); }
}

@media (min-width: 780px) {
  .page-nav { display: flex; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  height: 46px;
  min-width: 160px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .15s ease, transform 140ms var(--ease-out);
}
.btn:active { transform: scale(.97); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-hover); }
}

@media (max-width: 380px) {
  .btn { min-width: 0; height: 40px; padding-inline: 14px; font-size: 13.5px; }
  .page-head-inner { height: 60px; }
}

/* ---------- Page content ---------- */

.page-main {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(56px, 7vw, 92px) max(16px, env(safe-area-inset-left, 0px)) 0;
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-strong);
}

.page-title {
  margin: 14px 0 0;
  font-size: clamp(38px, 5.6vw, 60px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.lede {
  max-width: 62ch;
  margin: 20px 0 0;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.prose { margin-top: clamp(36px, 4.5vw, 52px); }

.prose h2 {
  margin: clamp(40px, 5vw, 56px) 0 12px;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.prose h2:first-child { margin-top: 0; }

.prose h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.prose p {
  margin: 0 0 16px;
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

.prose ul {
  margin: 0 0 18px;
  padding-left: 22px;
  max-width: 70ch;
}

.prose li {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.prose strong { color: var(--ink); font-weight: 600; }

.prose a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--stage);
  border: 1px solid var(--line);
  font-size: .92em;
}

.callout {
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--stage);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.callout strong { color: var(--ink); }

/* ---------- Comparison table ---------- */

.table-scroll {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 1px 2px rgba(5, 38, 28, .04);
}

table.compare {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 14.5px;
  text-align: left;
}

table.compare thead th {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--stage);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

table.compare thead th:last-child { color: var(--accent-strong); }

table.compare tbody th {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  color: var(--ink);
  vertical-align: top;
  width: 26%;
}

table.compare tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}

table.compare tbody td:last-child {
  background: rgba(19, 128, 59, .045);
  color: var(--ink);
}

table.compare tbody tr:last-child th,
table.compare tbody tr:last-child td { border-bottom: 0; }

.table-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--faint);
}

.table-hint {
  display: none;
  margin: 18px 0 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--faint);
}

@media (max-width: 700px) {
  /* Stack each task as its own card so nothing is cut off on a phone. */
  .table-scroll {
    border: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    margin-top: 0;
  }
  table.compare { display: block; min-width: 0; font-size: 15px; }
  table.compare thead { display: none; }
  table.compare tbody { display: grid; gap: 12px; }
  table.compare tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    overflow: hidden;
  }
  table.compare tbody th {
    display: block;
    width: auto;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--stage);
    font-weight: 600;
  }
  table.compare tbody td {
    display: block;
    padding: 12px 16px;
    border-bottom: 0;
  }
  table.compare tbody td + td { border-top: 1px solid var(--line); }
  table.compare tbody td:last-child { background: rgba(19, 128, 59, .05); color: var(--ink); }
  table.compare tbody td::before {
    content: "Finder";
    display: block;
    margin-bottom: 3px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--faint);
  }
  table.compare tbody td:nth-of-type(2)::before { content: "Vista"; color: var(--accent-strong); }
}

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

.page-foot {
  margin-top: clamp(64px, 9vw, 112px);
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
}

.page-foot-inner {
  display: grid;
  gap: 36px;
  width: 100%;
  max-width: 1232px;
  margin-inline: auto;
  padding: clamp(36px, 5vw, 56px) max(16px, env(safe-area-inset-left, 0px)) 0;
}

@media (min-width: 760px) {
  .page-foot-inner { grid-template-columns: minmax(0, 1fr) auto; gap: clamp(48px, 8vw, 110px); }
}

.page-foot .foot-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.025em;
  color: var(--ink);
  text-decoration: none;
}

.page-foot .foot-desc {
  max-width: 34ch;
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.foot-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

@media (min-width: 560px) {
  .foot-links { grid-template-columns: repeat(2, minmax(150px, auto)); gap: clamp(48px, 6vw, 84px); }
}

.foot-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--faint);
}

.foot-links ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.foot-links a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .foot-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  width: 100%;
  max-width: 1232px;
  margin: clamp(32px, 4vw, 48px) auto 0;
  padding: 18px max(16px, env(safe-area-inset-right, 0px)) clamp(24px, 3vw, 32px);
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--faint);
}

.foot-bar p { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }

.foot-bar a { color: inherit; text-decoration: none; }

@media (hover: hover) and (pointer: fine) {
  .foot-bar a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:active { transform: none; }
}
