/* Vaulta site styles — ported from the muj-i.github.io 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: #0a0a0f;
  --color-surface: #111118;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.14);

  --color-text: #f5f5f7;
  --color-text-muted: rgba(245, 245, 247, 0.68);
  --color-text-dim: rgba(245, 245, 247, 0.45);
  --color-text-faint: rgba(245, 245, 247, 0.28);

  --color-accent: #8b5cf6;
  --color-accent-hover: #a78bfa;

  --font-sans: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;

  --fs-h1: clamp(1.75rem, 3.6vw, 2.75rem);
  --fs-h2: clamp(1.5rem, 2.8vw, 2.25rem);
  --fs-h3: clamp(1.125rem, 1.6vw, 1.375rem);
  --fs-body: clamp(0.9375rem, 0.95vw, 1rem);
  --fs-small: 0.8125rem;

  --space-section: clamp(3.5rem, 6vw, 5.5rem);
  --space-gutter: clamp(1.25rem, 4vw, 4rem);
}

html[data-theme='light'] {
  color-scheme: light;
  --color-background: #ffffff;
  --color-surface: #f6f6f8;
  --color-border: rgba(0, 0, 0, 0.1);
  --color-border-strong: rgba(0, 0, 0, 0.18);

  --color-text: #16161a;
  --color-text-muted: rgba(22, 22, 26, 0.7);
  --color-text-dim: rgba(22, 22, 26, 0.5);
  --color-text-faint: rgba(22, 22, 26, 0.35);

  --color-accent: #7c3aed;
  --color-accent-hover: #6d28d9;
}

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-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 48rem;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.25;
  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;
}

/* ── layout ────────────────────────────────────────────────────────────── */
.section-padding {
  padding: var(--space-section) var(--space-gutter);
}

.section-padding.pt-0 {
  padding-top: 0;
}

.container-narrow {
  max-width: 64rem;
  margin-inline: auto;
}

/* ── 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: 1rem;
  transition:
    transform 0.4s ease,
    border-color 0.3s ease,
    background 0.3s 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: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.4);
}

.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;
}

.accent-bar {
  height: 3px;
  width: 3rem;
  border-radius: 2px;
  background: linear-gradient(90deg, #8b5cf6, #22d3ee);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
  margin-top: 2.5rem;
}

/* ── page pieces ───────────────────────────────────────────────────────── */
.eyebrow {
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-text-faint);
}

.app-icon {
  width: 80px;
  height: 80px;
  border-radius: 1.25rem;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.lede {
  margin-top: 1.25rem;
  max-width: 42rem;
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-grid .card {
  padding: 1.5rem;
}

.feature-grid .card p {
  margin-top: 0.75rem;
}

.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;
  gap: 1.5rem;
  font-size: var(--fs-small);
}

.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;
}

@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;
}

/* Section numbers come from a counter rather than the markup, because a build
   with Premium disabled hides whole clauses (see [data-premium] below) and
   hardcoded numbers would then skip — a legal document that jumps from 3 to 5
   reads as though a term were withheld. `display: none` does not increment a
   counter, so the visible sections always number 1..n. */
.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) '. ';
}

/* Clauses that only apply when the app actually offers Premium. The app passes
   `?premium=0` from a build with it switched off. */
html[data-premium='off'] [data-premium] {
  display: none;
}

/* The counterpart wording for a build without Premium. Some clauses cannot
   simply be dropped — Drive backup and the device identifier still exist when
   Premium does not, so the disclosure has to stay and only lose its "Premium"
   framing. Deleting it instead would under-disclose. */
html:not([data-premium='off']) [data-no-premium] {
  display: none;
}

.legal-card section p + p {
  margin-top: 0.75rem;
}

::selection {
  background: rgba(139, 92, 246, 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;
  }
}
