/* ChatVault marketing site — self-contained, no external dependencies */

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --bg: #f8fafc;
  --bg-tint: #f1f5f9;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --max: 1080px;
  --header-h: 64px;
  --font-display: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::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.65;
  color: var(--ink-soft);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(900px 420px at 0% 20%, rgba(37, 99, 235, 0.06), transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 40%, #f1f5f9 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

a {
  color: var(--blue-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue-800);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.125rem;
  font-weight: 650;
  margin-bottom: 0.5rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(12px);
  background: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--ink);
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}

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

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--blue-600);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.2;
  border: 0;
  text-decoration: none;
  transition: background 0.15s ease;
}

.nav-cta:hover {
  background: var(--blue-700);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  width: 42px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Coming soon CTA tooltip balloon */
.coming-soon {
  position: relative;
  cursor: default;
}

.coming-soon::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(-4px);
  width: max-content;
  max-width: min(240px, 72vw);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 70;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.coming-soon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 71;
  pointer-events: none;
}

.coming-soon:hover::after,
.coming-soon:focus-visible::after,
.coming-soon:hover::before,
.coming-soon:focus-visible::before {
  opacity: 1;
  visibility: visible;
}

.coming-soon:hover::after,
.coming-soon:focus-visible::after {
  transform: translateX(-50%) translateY(0);
}

.coming-soon--above::after {
  top: auto;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
}

.coming-soon--above::before {
  top: auto;
  bottom: calc(100% + 2px);
  border-bottom-color: transparent;
  border-top-color: var(--ink);
}

.coming-soon--above:hover::after,
.coming-soon--above:focus-visible::after {
  transform: translateX(-50%) translateY(0);
}

.coming-soon-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
}

.coming-soon-link:hover,
.coming-soon-link:focus-visible {
  color: var(--blue-700);
}

@media (prefers-reduced-motion: reduce) {
  .coming-soon::after,
  .coming-soon::before {
    transition: none;
  }
}

.btn-primary {
  background: var(--blue-600);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-700);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--ink-soft);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  padding-inline: 0.5rem;
}

.btn-secondary:hover {
  color: var(--blue-700);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 40%),
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59, 130, 246, 0.1), transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  max-width: 720px;
}

.brand-name {
  font-size: clamp(2.75rem, 7vw, 4.25rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0 0 1rem;
  line-height: 1.05;
}

.brand-name span {
  background: linear-gradient(120deg, var(--blue-700), var(--blue-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-headline {
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 1.75rem;
}

.trust-line {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-header {
  max-width: 36rem;
  margin-bottom: 2rem;
}

.section-header p {
  color: var(--muted);
}

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-700);
  margin-bottom: 0.6rem;
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.4rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--blue-200);
  transform: translateY(-2px);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--blue-50);
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  font-size: 1.15rem;
  line-height: 1;
}

.card p {
  color: var(--muted);
  font-size: 0.975rem;
}

/* Privacy-first */
.privacy-panel {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.checklist li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-700);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--blue-700);
  margin-bottom: 0.75rem;
}

.step p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Screenshots */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.75rem 0.75rem 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.shot:hover {
  border-color: var(--blue-200);
  transform: translateY(-2px);
}

.shot-label {
  font-weight: 650;
  color: var(--ink);
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}

.shot-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.shot img {
  display: block;
  border-radius: 8px;
  border: 1px solid var(--line);
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background:
    linear-gradient(180deg, #eef5ff 0%, #f8fafc 100%);
  pointer-events: none;
}

.shot-trigger {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
  line-height: 0;
}

.shot-trigger:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 3px;
}

/* Lightbox */
body.lightbox-open {
  overflow: hidden;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1080px);
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.lightbox-close {
  position: absolute;
  top: -0.35rem;
  right: -0.15rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
}

.lightbox-close:hover {
  background: #fff;
}

.lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 5.5rem);
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.35);
}

.lightbox-caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.45;
  padding: 0 0.5rem;
}

@media (max-width: 720px) {
  .lightbox {
    padding: 0.75rem;
  }

  .lightbox-close {
    top: 0.35rem;
    right: 0.35rem;
  }

  .lightbox-image {
    max-height: calc(100vh - 6rem);
    border-radius: 8px;
  }

  .lightbox-caption {
    font-size: 0.875rem;
  }
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.65rem;
  max-width: 760px;
}

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1.15rem;
  box-shadow: var(--shadow);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  color: var(--blue-600);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
}

.faq-list details[open] summary::after {
  content: "–";
}

.faq-list details p {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.975rem;
}

/* Inner pages */
.page-hero {
  padding: 3rem 0 1.5rem;
}

.page-hero h1 {
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--muted);
  max-width: 40rem;
}

.prose {
  padding: 0 0 4rem;
  max-width: 720px;
}

.prose h2 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  color: var(--ink-soft);
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose .meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.note-box {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 1.25rem 0;
  color: var(--ink-soft);
  font-size: 0.975rem;
}

.template {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  font-size: 0.875rem;
  white-space: pre-wrap;
  color: var(--ink);
  line-height: 1.6;
}

.troubleshoot {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0 2rem;
}

.troubleshoot li {
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}

.troubleshoot {
  padding: 0;
  margin-left: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  padding: 2.5rem 0 2rem;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
}

.footer-brand {
  max-width: 280px;
}

.footer-brand .logo {
  margin-bottom: 0.65rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--blue-700);
}

.footer-note {
  width: 100%;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

/* Motion */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero .brand-name,
.hero .hero-headline,
.hero .hero-sub,
.hero .btn-row,
.hero .trust-line {
  animation: rise-in 0.55s ease both;
}

.hero .hero-headline {
  animation-delay: 0.08s;
}

.hero .hero-sub {
  animation-delay: 0.14s;
}

.hero .btn-row {
  animation-delay: 0.2s;
}

.hero .trust-line {
  animation-delay: 0.28s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero .brand-name,
  .hero .hero-headline,
  .hero .hero-sub,
  .hero .btn-row,
  .hero .trust-line,
  .card {
    animation: none;
    transition: none;
  }

  .card:hover,
  .shot:hover {
    transform: none;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .feature-grid,
  .steps,
  .shot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .privacy-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(248, 250, 252, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid var(--line);
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0.25rem;
  }

  .nav-links .nav-cta {
    display: flex;
    width: 100%;
    margin-top: 0.75rem;
    text-align: center;
  }

  .feature-grid,
  .steps,
  .shot-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .section {
    padding: 3rem 0;
  }
}
