/* ==========================================================================
   zcashwallets.org — global stylesheet
   Dark editorial theme · Inter typeface
   ========================================================================== */

:root {
  --bg: #0a1120;
  --bg-soft: #0d1526;
  --surface: #111b30;
  --surface-2: #16233c;
  --border: rgba(148, 175, 220, 0.14);
  --border-strong: rgba(148, 175, 220, 0.28);
  --text: #e9eef8;
  --muted: #a6b3ca;
  --faint: #7d8ba4;
  --accent: #ecb244;
  --accent-strong: #f0c15e;
  --accent-ink: #241a05;
  --accent-soft: rgba(236, 178, 68, 0.12);
  --link: #8ab8ff;
  --good: #4cd0a5;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 18px 44px -20px rgba(3, 9, 24, 0.65);
  --header-h: 72px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #b4d2ff; }

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }

.container {
  width: min(1140px, 100% - clamp(40px, 8vw, 64px));
  margin-inline: auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -56px; z-index: 200;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  padding: 10px 16px; border-radius: var(--radius-sm); text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; color: var(--accent-ink); }

::selection { background: rgba(236, 178, 68, 0.35); }

a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-weight: 600; font-size: 0.98rem; line-height: 1.2;
  padding: 0.8em 1.5em; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
              background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 10px 24px -12px rgba(236, 178, 68, 0.55);
}
.btn-primary:hover {
  color: var(--accent-ink);
  box-shadow: 0 14px 30px -12px rgba(236, 178, 68, 0.65);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ---------- Header & navigation ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 17, 32, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: var(--header-h);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); font-weight: 700;
  letter-spacing: -0.01em; white-space: nowrap;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(145deg, #f6cf7a, #d99a26);
  color: #241a05; display: grid; place-items: center;
  font-weight: 800; font-size: 1.15rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35),
              0 6px 16px -8px rgba(236, 178, 68, 0.6);
}
.brand-text { font-size: 1.06rem; }
.brand-text span { color: var(--accent); }

.site-nav ul {
  display: flex; gap: clamp(14px, 2.5vw, 30px);
  list-style: none; margin: 0; padding: 0;
}
.site-nav a {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.97rem;
  padding: 6px 2px; border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--accent-strong); border-bottom-color: var(--accent); }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px; justify-content: center;
    background: none; border: 1px solid var(--border-strong); border-radius: 10px;
    padding: 12px 10px; cursor: pointer;
  }
  .nav-toggle span {
    width: 20px; height: 2px; background: var(--text); border-radius: 2px; display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
    background: rgba(10, 17, 32, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 12px clamp(20px, 6vw, 32px) 24px;
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s;
  }
  body.nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a { display: block; padding: 12px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative; overflow: hidden;
  padding: clamp(64px, 10vw, 110px) 0 clamp(48px, 7vw, 80px);
}
.hero::before {
  content: ""; position: absolute; inset: -20% -30% auto auto; height: 130%; width: 160%;
  background:
    radial-gradient(640px 340px at 50% 0%, rgba(236, 178, 68, 0.16), transparent 70%),
    radial-gradient(900px 420px at 82% 8%, rgba(76, 141, 255, 0.10), transparent 70%);
  pointer-events: none;
}

.hero-inner { position: relative; text-align: center; max-width: 840px; margin-inline: auto; }

.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.45em 1.1em; margin-bottom: 26px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  font-size: 0.85rem; font-weight: 500;
}
.eyebrow-pill .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 4px rgba(76, 208, 165, 0.15);
}

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.4em;
}

.grad {
  background: linear-gradient(92deg, #f6cf7a 10%, var(--accent) 55%, #e09b2d 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--muted); max-width: 640px; margin: 0 auto 34px;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex; justify-content: center; align-items: baseline;
  gap: clamp(28px, 6vw, 72px); margin-top: 58px; padding: 0;
}
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.hero-stats span { color: var(--muted); font-size: 0.9rem; }

/* ---------- Sections (shared) ---------- */

.section { padding: clamp(56px, 8vw, 92px) 0; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--border); }

.section-head { max-width: 740px; margin-bottom: clamp(36px, 5vw, 56px); }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.78rem; font-weight: 700; color: var(--accent); margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.section-sub { color: var(--muted); font-size: 1.05rem; margin-bottom: 0; }

/* ---------- Mini feature cards (Why section) ---------- */

.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .mini-grid { grid-template-columns: 1fr; } }

.mini-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 26px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.mini-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.mini-icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px;
  display: grid; place-items: center; font-size: 1.3rem;
  background: var(--accent-soft); color: var(--accent);
}
.mini-card h3 { font-size: 1.12rem; }
.mini-card p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* ---------- Wallet cards (Top 5) ---------- */

.wallet-list { display: flex; flex-direction: column; gap: 30px; }

.wallet-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface), rgba(17, 27, 48, 0.55));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(24px, 3.5vw, 36px);
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease;
}
.wallet-card:hover { border-color: var(--border-strong); }
.wallet-card.featured { border-color: rgba(236, 178, 68, 0.4); }

.choice-ribbon {
  position: absolute; top: -13px; right: 26px;
  background: linear-gradient(90deg, #f6cf7a, #e09b2d); color: #241a05;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.4em 1em; border-radius: 999px;
  box-shadow: 0 8px 20px -8px rgba(236, 178, 68, 0.5);
}

.card-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }

.rank-badge {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-strong); background: var(--accent-soft);
  border: 1px solid rgba(236, 178, 68, 0.35);
  padding: 0.45em 0.9em; border-radius: 999px; white-space: nowrap;
}

.wallet-id { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 230px; }
.monogram {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: #0a1120;
  background: var(--mono, var(--accent));
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.wallet-id h3 { margin: 0; font-size: 1.4rem; }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; }

.rating {
  display: flex; align-items: center; gap: 8px; margin-left: auto;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 0.5em 0.9em; border-radius: 999px; white-space: nowrap;
}
.stars { color: var(--accent); letter-spacing: 2px; font-size: 0.95rem; }
.rating strong { font-size: 1.05rem; }
.rating small { color: var(--faint); }

.wallet-desc { color: var(--muted); max-width: 860px; margin-bottom: 20px; }

.features {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 28px;
}
@media (max-width: 700px) { .features { grid-template-columns: 1fr; } }

.features li { position: relative; padding-left: 30px; font-size: 0.97rem; }
.features li::before {
  content: "✓"; position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 50%; margin-top: 3px;
  background: rgba(76, 208, 165, 0.14); color: var(--good);
  font-size: 0.72rem; display: grid; place-items: center;
}

.meta-chips { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 26px; padding: 0; }
.meta-chips > div {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px 16px; min-width: 150px;
}
.meta-chips dt {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--faint); font-weight: 600; margin-bottom: 2px;
}
.meta-chips dd { margin: 0; font-size: 0.93rem; font-weight: 500; }

.card-actions {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-top: 24px;
}
.ext-note { color: var(--faint); font-size: 0.85rem; }

/* ---------- Comparison table ---------- */

.table-wrap {
  overflow-x: auto; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface);
  box-shadow: var(--shadow-card);
}
table.compare { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare thead th {
  background: var(--surface-2); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted);
}
.compare tbody tr:last-child td, .compare tbody tr:last-child th { border-bottom: none; }
.compare tbody tr:hover { background: rgba(148, 175, 220, 0.05); }
.compare td:first-child { font-weight: 600; white-space: nowrap; }
.compare .site-link { display: block; font-size: 0.8rem; color: var(--faint); font-weight: 400; margin-top: 2px; }

/* ---------- Methodology ---------- */

.method-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px;
}
.method-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px 20px; }
.method-num { font-size: 0.85rem; font-weight: 800; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 10px; display: block; }
.method-item h3 { font-size: 1.02rem; margin-bottom: 6px; }
.method-item p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- FAQ ---------- */

.faq { max-width: 840px; }
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 4px; font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border-strong); display: grid; place-items: center;
  color: var(--accent); font-size: 0.9rem; line-height: 1;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.faq details[open] .faq-icon { transform: rotate(45deg); background: var(--accent-soft); }
.faq details p { color: var(--muted); padding: 0 4px 20px; margin: 0; max-width: 780px; }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border-block: 1px solid var(--border);
  padding: clamp(56px, 7vw, 84px) 0;
}
.cta-band::before {
  content: ""; position: absolute; left: -30%; right: -30%; bottom: -120%; height: 120%;
  background: radial-gradient(closest-side, rgba(236, 178, 68, 0.14), transparent);
  pointer-events: none;
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); position: relative; }
.cta-band p { color: var(--muted); max-width: 580px; margin: 0 auto 28px; position: relative; }

/* ---------- Page hero (subpages) ---------- */

.page-hero {
  padding: clamp(48px, 7vw, 76px) 0 clamp(36px, 5vw, 56px);
  position: relative; overflow: hidden; border-bottom: 1px solid var(--border);
  background: radial-gradient(720px 320px at 50% -30%, rgba(236, 178, 68, 0.1), transparent 70%), var(--bg-soft);
}
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 0.35em; }
.page-hero .lede { margin: 0 auto 0; max-width: 720px; }

/* ---------- Prose (about / privacy pages) ---------- */

.prose { max-width: 840px; }
.prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin-top: 1.6em; padding-top: 0.4em; border-top: 1px solid var(--border); }
.prose h2:first-of-type { border-top: none; margin-top: 0.8em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.4em; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul { margin-bottom: 1.2em; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 32px 0; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; text-align: center; }
.stat-card strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--accent-strong); letter-spacing: -0.02em; margin-bottom: 4px; }
.stat-card span { color: var(--muted); font-size: 0.88rem; }

/* ---------- Contact page ---------- */

.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 4vw, 48px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(24px, 3.5vw, 36px);
  box-shadow: var(--shadow-card);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  padding: 13px 15px; font-family: inherit; font-size: 0.98rem; line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(236, 178, 68, 0.18);
}
.form-note { color: var(--faint); font-size: 0.85rem; margin-top: 14px; }

.contact-aside .mini-card + .mini-card { margin-top: 18px; }
.contact-aside a.mail-link { word-break: break-all; }

/* ---------- Footer ---------- */

.site-footer { background: #070d19; border-top: 1px solid var(--border); padding-top: clamp(48px, 6vw, 72px); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand p { color: var(--muted); font-size: 0.95rem; max-width: 320px; margin-top: 14px; }
.site-footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent-strong); }
.footer-contact p { color: var(--muted); font-size: 0.95rem; margin-bottom: 8px; }

.footer-bottom { border-top: 1px solid var(--border); padding: 24px 0 32px; display: flex; flex-direction: column; gap: 10px; }
.footer-bottom p { margin: 0; color: var(--faint); font-size: 0.85rem; }
.disclaimer { max-width: 960px; line-height: 1.6; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
