/* Vaulta site styles — ported from the DFT Core Apps design tokens so the
   pages keep their original look after moving off Next/Tailwind. Dark by
   default; `?darkmode=false` sets html[data-theme="light"] for the in-app
   webview. */

:root {
  --color-background: #070d1a;
  --color-surface: #0f1b31;
  --color-surface-hover: #15264a;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.14);

  --color-text: #f3efe6;
  --color-text-muted: rgba(243, 239, 230, 0.72);
  --color-text-dim: rgba(243, 239, 230, 0.5);
  --color-text-faint: rgba(243, 239, 230, 0.3);

  --color-accent: #8f97fb;
  --color-accent-hover: #a5abf8;
  --color-accent-dim: rgba(143, 151, 251, 0.12);
  --color-accent-glow: rgba(85, 72, 236, 0.35);

  --color-teal: #7fb0fc;
  --color-teal-dim: rgba(127, 176, 252, 0.12);
  --color-emerald: #10b981;
  --color-emerald-dim: rgba(16, 185, 129, 0.12);

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --fs-h1: clamp(2.6rem, 5vw, 4.25rem);
  --fs-h2: clamp(1.9rem, 3.4vw, 2.75rem);
  --fs-h3: clamp(1.125rem, 1.6vw, 1.375rem);
  --fs-body: clamp(0.9375rem, 0.95vw, 1rem);
  --fs-small: 0.8125rem;

  --space-section: 56px;
  --space-gutter: 20px;
}

html[data-theme='light'] {
  color-scheme: light;
  --color-background: #ffffff;
  --color-surface: #f4f6fa;
  --color-surface-hover: #eef1f7;
  --color-border: rgba(0, 0, 0, 0.09);
  --color-border-strong: rgba(0, 0, 0, 0.16);

  --color-text: #0f1a2e;
  --color-text-muted: rgba(15, 26, 46, 0.72);
  --color-text-dim: rgba(15, 26, 46, 0.5);
  --color-text-faint: rgba(15, 26, 46, 0.35);

  --color-accent: #3845da;
  --color-accent-hover: #2e35b5;
  --color-accent-dim: rgba(56, 69, 218, 0.08);
  --color-accent-glow: rgba(56, 69, 218, 0.25);

  --color-teal: #2757e4;
  --color-teal-dim: rgba(39, 87, 228, 0.08);
  --color-emerald: #059669;
  --color-emerald-dim: rgba(5, 150, 105, 0.08);
}

html[data-theme='light'] .glass,
html[data-theme='light'] .card {
  background: rgba(0, 0, 0, 0.02);
}
html[data-theme='light'] .card:hover {
  background: rgba(0, 0, 0, 0.04);
}
html[data-theme='light'] .btn-ghost {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(22, 22, 26, 0.85);
}
html[data-theme='light'] .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #000;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

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

h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 52rem;
}

h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

p {
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--color-text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── header & navigation ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 10, 15, 0.75);
  border-bottom: 1px solid var(--color-border);
}

html[data-theme='light'] .site-header {
  background: rgba(255, 255, 255, 0.82);
}

.nav-container {
  max-width: 60rem;
  margin-inline: auto;
  padding: 0.85rem var(--space-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-link {
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

.nav-cta {
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
}

/* ── layout ────────────────────────────────────────────────────────────── */
.section-padding {
  padding: var(--space-section) var(--space-gutter);
}

.section-padding.pt-0 {
  padding-top: 0;
}

.home-page main > .section-padding:first-child {
  padding-bottom: 36px;
}

.container-narrow {
  max-width: 60rem;
  margin-inline: auto;
}

.legal-page .container-narrow,
.article-page .container-narrow {
  max-width: 57.5rem;
}

/* ── components ────────────────────────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--color-border);
}

.card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--color-border);
  border-radius: 1.75rem;
  transition:
    transform 0.35s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
  white-space: nowrap;
}

.btn svg {
  width: 1rem;
  height: 1rem;
}

.btn-primary {
  background: linear-gradient(110deg, #2757e4 0%, #3845da 55%, #5548ec 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 32px -12px rgba(85, 72, 236, 0.7);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 16px 40px -12px rgba(85, 72, 236, 0.8);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
  border-color: var(--color-border);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-border-strong);
  color: #fff;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn-secondary:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
}

.accent-bar {
  height: 3px;
  width: 3rem;
  border-radius: 2px;
  background: linear-gradient(90deg, #8b5cf6, #22d3ee);
  box-shadow: 0 0 16px rgba(85, 72, 236, 0.4);
  margin-top: 2.5rem;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--color-accent-dim);
  color: var(--color-accent);
  border: 1px solid var(--color-accent-glow);
}

.pill-teal {
  background: var(--color-teal-dim);
  color: var(--color-teal);
  border-color: rgba(34, 211, 238, 0.3);
}

.pill-emerald {
  background: var(--color-emerald-dim);
  color: var(--color-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

/* ── page pieces ───────────────────────────────────────────────────────── */
.eyebrow {
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-text-faint);
}

.app-icon {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 1.5rem;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.home-page .app-icon {
  margin-inline-start: -2px;
}

.product-name {
  margin-top: 18px;
  color: var(--color-accent);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.home-tagline {
  margin-top: 10px;
}

.home-page h1 {
  margin-top: 1rem;
  font-size: clamp(2.15rem, 4.6vw, 4rem);
}

.lede {
  margin-top: 1.25rem;
  max-width: 44rem;
  color: var(--color-text-muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.section-header-block {
  margin-bottom: 2rem;
}

.section-header-block h2 {
  margin-top: 0.4rem;
}

.section-header-block p {
  margin-top: 0.5rem;
  max-width: 38rem;
}

.feature-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

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

@media (min-width: 960px) {
  .feature-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-dim);
  color: var(--color-accent);
  border: 1px solid var(--color-accent-glow);
}

.feature-icon-wrapper svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  font-size: 1.22rem;
  margin-bottom: 0.65rem;
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-link {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-accent);
  transition: gap 0.2s ease;
}

.feature-link:hover {
  gap: 0.65rem;
  color: var(--color-accent-hover);
}

/* ── FAQ styling (Details/Summary Accordions) ────────────────────────────── */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-category {
  margin-top: 2rem;
}

.faq-category:first-of-type {
  margin-top: 0;
}

.faq-category-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-accent);
}

details.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1.25rem;
  padding: 1.15rem 1.4rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  margin-bottom: 0.75rem;
}

details.faq-item:hover {
  border-color: var(--color-border-strong);
}

details.faq-item[open] {
  border-color: var(--color-accent-glow);
  background: rgba(85, 72, 236, 0.03);
}

details.faq-item summary {
  list-style: none;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  color: var(--color-text);
}

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

details.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--color-accent);
  transition: transform 0.25s ease;
}

details.faq-item[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-content {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.95rem;
  line-height: 1.68;
  color: var(--color-text-muted);
}

.faq-content p + p {
  margin-top: 0.75rem;
}

.faq-content ul {
  margin-top: 0.65rem;
  padding-left: 1.35rem;
}

.faq-content li {
  margin-top: 0.35rem;
}

/* ── Blog styling ───────────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 680px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.blog-card {
  padding: 1.75rem;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  color: var(--color-text-dim);
}

.blog-card h3 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.blog-card:hover h3 {
  color: var(--color-accent);
}

.blog-card p {
  font-size: 0.925rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.article-header {
  margin-bottom: 2.5rem;
}

.article-header h1 {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--color-text-dim);
}

.article-content {
  padding: 2.5rem;
  border-radius: 1.75rem;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

.article-body h2 {
  font-size: 1.6rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.article-body h3 {
  font-size: 1.25rem;
  margin-top: 1.8rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.article-body p {
  margin-top: 1rem;
  font-size: 1.02rem;
  line-height: 1.75;
}

.article-body p:first-of-type {
  margin-top: 0;
}

.article-body ul,
.article-body ol {
  margin-top: 1rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-top: 0.5rem;
}

.article-body strong {
  color: var(--color-text);
  font-weight: 700;
}

.callout {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-dim);
  color: var(--color-text);
}

.callout p {
  color: var(--color-text);
  font-size: 0.96rem;
}

.callout-teal {
  border-left-color: var(--color-teal);
  background: var(--color-teal-dim);
}

.spec-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .spec-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.spec-item {
  padding: 1.25rem;
  border-radius: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.spec-item strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

.spec-item span {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

/* ── footer ────────────────────────────────────────────────────────────── */
.site-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
}

.site-footer p {
  font-size: var(--fs-small);
  color: var(--color-text-dim);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: var(--fs-small);
}

.legal-page .site-footer,
.article-page .site-footer {
  margin-top: 42px;
}

.site-footer nav a {
  color: var(--color-text-muted);
  transition: color 0.25s ease;
}

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

@media (min-width: 640px) {
  .site-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ── legal documents ───────────────────────────────────────────────────── */
.legal-card {
  padding: 2rem;
}

.legal-card a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (min-width: 768px) {
  .legal-card {
    padding: 2.5rem;
  }
}

.legal-card h1 {
  margin-top: 0.75rem;
}

.legal-card .updated {
  margin-top: 0.5rem;
  font-size: var(--fs-small);
  color: var(--color-text-dim);
}

.legal-card section {
  margin-top: 2rem;
}

.legal-card {
  counter-reset: legal-section;
}

.legal-card section h2 {
  font-size: var(--fs-h3);
  margin-bottom: 0.75rem;
  counter-increment: legal-section;
}

.legal-card section h2::before {
  content: counter(legal-section) '. ';
}

html[data-premium='off'] [data-premium] {
  display: none;
}

html[data-ads='off'] [data-ads] {
  display: none;
}

html:not([data-premium='off']) [data-no-premium] {
  display: none;
}

html:not([data-ads='off']) [data-no-ads] {
  display: none;
}

.legal-card section p + p {
  margin-top: 0.75rem;
}

::selection {
  background: rgba(85, 72, 236, 0.35);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 640px) {
  :root {
    --space-section: 28px;
    --space-gutter: 14px;
  }

  /* Navigation matters more on a phone than a store button the hero already
     carries twice. This used to be the other way round — the links were
     hidden and the CTA kept — and the `.btn { width: 100% }` rule below then
     stretched that CTA across the header and straight over the wordmark. */
  .nav-links {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    white-space: nowrap;
  }

  /* The row scrolls, so the last item is meant to be half-visible. A hard cut
     reads as a broken layout; a fade reads as "there is more this way". */
  .nav-links {
    min-width: 0;
    -webkit-mask-image: linear-gradient(to right, #000 84%, transparent);
    mask-image: linear-gradient(to right, #000 84%, transparent);
  }

  .nav-brand {
    flex: 0 0 auto;
  }

  .legal-page,
  .article-page {
    --space-section: 24px;
  }

  .home-page main > .section-padding:first-child {
    padding-bottom: 28px;
  }

  .app-icon {
    width: 76px;
    height: 76px;
    border-radius: 1.375rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  /* Never the header CTA: it shares a row with the wordmark, so a full-width
     button there lands on top of it. Hidden on a phone, and sized to its own
     content if it is ever shown again. */
  .nav-cta {
    display: none;
    width: auto;
  }

  .legal-card,
  .article-content {
    padding: 20px;
  }
}
