/* VaultAll website. Colours are the app's own (App/Vault/Vault/Design/Theme.swift, "3 · Teal"). */

:root {
  color-scheme: light dark;
  --bg: #F2F6F6;
  --surface: #FFFFFF;
  --ink: #10201F;
  --muted: #55686A;          /* Theme.secondaryText (WCAG AA) */
  --accent: #0A7270;
  --accent-ink: #FFFFFF;
  --line: #DCE6E5;
  --hero-top: #0D5759;       /* Theme.onboardingTop */
  --hero-bottom: #05262A;    /* Theme.onboardingBottom */
  --hero-ink: #E8FAF9;       /* Theme.onboardingInk */
  --hero-accent: #5FE6DF;    /* Theme.onboardingAccent */
  --radius: 18px;            /* Theme.cardRadius */
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1517;
    --surface: #152325;
    --ink: #E9F4F3;
    --muted: #B4CBCA;
    --accent: #2CC4C0;
    --accent-ink: #06201F;
    --line: #22373A;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  padding: 0.5rem 1rem;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--accent);
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 40rem) {
  .wrap { padding: 0 2rem; }
}

/* Header */

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: 0.5rem 0;
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; text-decoration: underline; }

/* Home hero, on the app's onboarding gradient */

.hero {
  background: linear-gradient(180deg, var(--hero-top), var(--hero-bottom));
  color: var(--hero-ink);
  text-align: center;
  padding: 4rem 0 4.5rem;
}
.hero img { width: 112px; height: 112px; border-radius: 25px; }
.hero h1 {
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  line-height: 1.1;
  margin: 1.25rem 0 0.75rem;
  letter-spacing: -0.02em;
}
.hero .promise {
  text-wrap: balance;
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 600;
  color: var(--hero-accent);
  margin: 0 auto 1rem;
  max-width: 32rem;
}
.hero .lede { max-width: 34rem; margin: 0 auto 1.75rem; }
.badge-soon {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border: 2px solid var(--hero-accent);
  border-radius: 999px;
  font-weight: 600;
}

/* Feature blocks */

.features { padding: 3.5rem 0; }
.features h2 { text-align: center; margin: 0 0 2rem; font-size: 1.75rem; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.2rem; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); }

.note { text-align: center; color: var(--muted); max-width: var(--measure); margin: 2.5rem auto 0; }

/* Text pages */

.page { padding: 2.5rem 0 4rem; }
.prose { max-width: var(--measure); }
h1, h2, h3 { text-wrap: balance; }
.prose h1 { font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1.15; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.prose h2 { font-size: 1.4rem; line-height: 1.3; margin: 2.5rem 0 0.5rem; }
.prose h3 { font-size: 1.15rem; line-height: 1.35; margin: 1.75rem 0 0.4rem; }
.prose p, .prose li { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: 0.3rem 0; }
.meta { color: var(--muted); margin-top: 0; }
.summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.summary p:first-child { margin-top: 0; }
.summary p:last-child, .summary ul:last-child { margin-bottom: 0; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0.75rem 0;
}
.faq summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
}
.faq details > div { padding: 0 1.25rem 1rem; }
.faq details > div > :first-child { margin-top: 0; }

.contact-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
}
.contact-box p { margin: 0.25rem 0; }
.contact-box a { font-weight: 600; font-size: 1.15rem; overflow-wrap: anywhere; }

kbd, .ui {
  font-family: inherit;
  font-weight: 600;
}

/* Footer */

.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.site-footer p { margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
