/* ==========================================================================
   Vaultwarden.uk — modern single page theme
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f6f8fc;
  --color-ink: #12162b;
  --color-ink-soft: #565d78;
  --color-border: #e6e9f2;

  --color-navy: #0b0e1f;
  --color-navy-soft: #141833;

  --grad-start: #5b6ef5;
  --grad-mid: #4f8ff7;
  --grad-end: #22d3ee;
  --gradient: linear-gradient(120deg, var(--grad-start) 0%, var(--grad-mid) 50%, var(--grad-end) 100%);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-soft: 0 10px 30px rgba(18, 22, 43, 0.06);
  --shadow-card: 0 4px 18px rgba(18, 22, 43, 0.05);
  --shadow-pop: 0 24px 60px rgba(8, 10, 25, 0.35);

  --max-width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grad-mid);
  margin-bottom: 14px;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 38px);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--color-ink-soft);
  font-size: 17px;
  margin: 0;
}

section { padding: 96px 0; }
section.tight { padding: 64px 0; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 24px rgba(79, 143, 247, 0.35);
}
.btn-primary:hover { box-shadow: 0 14px 30px rgba(79, 143, 247, 0.45); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

.btn-outline {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-border);
}
.btn-outline:hover { border-color: var(--grad-mid); color: var(--grad-mid); }

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled {
  border-color: var(--color-border);
  box-shadow: 0 6px 20px rgba(18, 22, 43, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand img { height: 30px; width: auto; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-ink-soft);
  transition: color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--color-ink); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-ink);
  margin: 4px auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  background: var(--color-navy);
  color: #fff;
  overflow: hidden;
  padding: 120px 0 100px;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background: radial-gradient(60% 60% at 30% 20%, rgba(91, 110, 245, 0.55), transparent 70%),
              radial-gradient(50% 50% at 80% 10%, rgba(34, 211, 238, 0.4), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #cfd6ff;
  margin-bottom: 28px;
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.25);
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  font-weight: 800;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: #b7bdd8;
  max-width: 620px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 420px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 36px;
}
.hero-stats div strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats div span {
  font-size: 13px;
  color: #9aa1c3;
}

/* ---------- notice / disclaimer banner ---------- */

.notice {
  margin-top: -56px;
  position: relative;
  z-index: 3;
}
.notice-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.notice-card .notice-text { flex: 1 1 420px; }
.notice-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.notice-card p {
  margin: 0;
  color: var(--color-ink-soft);
  font-size: 14.5px;
}
.notice-card .notice-cta {
  flex: 0 0 auto;
}

/* ---------- feature cards ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  color: #fff;
  font-size: 19px;
  margin-bottom: 18px;
}

.card h4 {
  margin: 0 0 10px;
  font-size: 17.5px;
}
.card p {
  margin: 0;
  color: var(--color-ink-soft);
  font-size: 15px;
}

/* ---------- about ---------- */

.about-section { background: var(--color-bg-alt); }

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.about-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.about-item { display: flex; gap: 14px; }
.about-item .num {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--grad-mid);
}
.about-item h4 { margin: 0 0 4px; font-size: 15.5px; }
.about-item p { margin: 0; font-size: 14px; color: var(--color-ink-soft); }

.about-visual {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--color-navy);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.about-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 70% 30%, rgba(91, 110, 245, 0.55), transparent 70%),
              radial-gradient(50% 50% at 20% 80%, rgba(34, 211, 238, 0.35), transparent 70%);
}
.about-visual img {
  position: relative;
  width: 46%;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

/* ---------- FAQ accordion ---------- */

.faq-list { max-width: 780px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  color: var(--color-ink);
}

.faq-question .icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
  font-size: 14px;
  color: var(--grad-mid);
}

.faq-item.is-open .faq-question .icon {
  transform: rotate(45deg);
  background: var(--gradient);
  color: #fff;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-answer p {
  margin: 0;
  padding: 0 24px 22px;
  color: var(--color-ink-soft);
  font-size: 15px;
}

/* ---------- support / donation ---------- */

.support-section {
  background: var(--color-navy);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.support-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 60% at 50% 0%, rgba(91, 110, 245, 0.35), transparent 70%);
}
.support-section .wrap { position: relative; z-index: 2; }
.support-section .section-head p { color: #b7bdd8; }
.support-section .section-head h2 { color: #fff; }

.support-box {
  max-width: 420px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 32px;
}

/* ---------- other instances ---------- */

.table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
table.instances {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
table.instances th {
  text-align: left;
  background: var(--color-bg-alt);
  padding: 14px 20px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-ink-soft);
}
table.instances td {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
}
table.instances tr:hover td { background: var(--color-bg-alt); }
table.instances a { color: var(--grad-mid); font-weight: 600; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--color-navy);
  color: #b7bdd8;
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-grid h4 {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 16px;
}
.footer-grid p { font-size: 14.5px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { font-size: 14.5px; transition: color .15s ease; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 13px;
  color: #7c84ab;
}
.footer-bottom a { color: #9aa1c3; }
.footer-bottom a:hover { color: #fff; }

/* ---------- donation popup ---------- */

.donate-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 25, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.donate-popup-overlay.is-visible { opacity: 1; }
.donate-popup-overlay.is-hidden { display: none; }

.donate-popup {
  position: relative;
  background: #fff;
  color: var(--color-ink);
  max-width: 460px;
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 40px 34px 32px;
  box-shadow: var(--shadow-pop);
  text-align: center;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.3s ease;
}
.donate-popup-overlay.is-visible .donate-popup { transform: translateY(0) scale(1); }

.donate-popup .popup-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0 auto 18px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
}

.donate-popup h3 { margin: 0 0 12px; font-size: 22px; font-weight: 800; }
.donate-popup p { margin: 0 0 22px; font-size: 15.5px; line-height: 1.55; color: var(--color-ink-soft); }

.donate-popup .donate-popup-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #b0b4c8;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
}
.donate-popup .donate-popup-close:hover { color: var(--color-ink); }

.donate-popup .donate-popup-dismiss {
  display: inline-block;
  margin-top: 18px;
  background: none;
  border: none;
  color: #9aa1c3;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}
.donate-popup .donate-popup-dismiss:hover { color: var(--color-ink-soft); }

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .nav-actions .btn-outline { display: none; }
  .nav-toggle { display: flex; }
  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px 24px 28px;
    border-bottom: 1px solid var(--color-border);
    gap: 16px;
  }
  .features-grid { grid-template-columns: 1fr; }
  .about-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .notice-card { padding: 26px; }
  section { padding: 64px 0; }
}
