/* Zarvy website. Colours follow the app's Ledger theme, day and night. */
:root {
  /* Zarvy: purple #8D00DE and green #00A551 from the logo, darkened where text needs it. */
  --bg: #f6f4fa; --surface: #ffffff; --sunken: #eeeaf4; --border: #d6cee2;
  --text: #1f1529; --muted: #5a4f66; --accent: #8d00de; --on-accent: #ffffff; --accent-soft: #f0e2fc;
  --brand-green: #00a551; --green-text: #00753a; --rule: #00803e; --focus: #8d00de;
  --row-a: #e6f6ec; --row-b: #f3e8fc; --row-c: #ffefdd;
  --radius: 10px; --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #130e1a; --surface: #1c1526; --sunken: #251c31; --border: #3b2f4b;
    --text: #f0eaf7; --muted: #b8acc8; --accent: #c38bff; --on-accent: #1e0638; --accent-soft: #33204d;
    --brand-green: #2fd07c; --green-text: #45d18a; --rule: #2fd07c; --focus: #c38bff;
    --row-a: #10271b; --row-b: #241836; --row-c: #2e1f10; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code { font-size: 0.9em; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }
main { max-width: 1120px; margin: 0 auto; padding: 0 24px 64px; }

.announcement { background: var(--accent); color: var(--on-accent); text-align: center; padding: 8px 16px; font-size: 0.95rem; }
.site-header { max-width: 1120px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; margin-right: auto; line-height: 0; }
.brand img { height: 38px; width: auto; }
.site-header nav { display: flex; gap: 20px; }
.site-header nav a { color: var(--text); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { border-bottom-color: var(--accent); }

.button { display: inline-block; padding: 12px 20px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; }
.button:hover { border-color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { filter: brightness(1.08); }
.button.small { padding: 8px 14px; font-size: 0.95rem; }
.button[disabled] { opacity: 0.55; cursor: not-allowed; filter: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5em 0 1em; }

.hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; padding: 48px 0 56px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 38em; }
.hero-shot { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 1px 0 var(--border); background: var(--surface); }

.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 64px; }
.points > div { padding: 24px; border-left: 1px solid var(--border); }
.points > div:first-child { border-left: 0; padding-left: 0; }
.points h2 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; border-bottom: 3px double var(--rule); display: inline-block; padding-bottom: 2px; }

.section-title { font-family: var(--serif); font-weight: 400; font-size: 2rem; margin-bottom: 0.8em; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 64px; }
.feature-grid article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.feature-grid p { color: var(--muted); margin: 0; font-size: 0.97rem; }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 64px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 12px; border: 1px solid var(--border); }
.gallery figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 8px; }

.faq { max-width: 760px; margin-bottom: 64px; }
.faq details { border-top: 1px solid var(--border); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

.cta { text-align: center; background: var(--accent-soft); border-radius: 16px; padding: 48px 24px; }
.cta h2 { font-family: var(--serif); font-weight: 400; font-size: 2rem; }

.page-head { padding: 40px 0 24px; max-width: 760px; }
.narrow { max-width: 760px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 16px 0 40px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; position: relative; }
.plan.featured { border: 2px solid var(--accent); }
.plan .tag { position: absolute; top: -12px; left: 24px; background: var(--accent); color: var(--on-accent); font-size: 0.8rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; margin: 0; }
.plan .price { font-family: var(--serif); font-size: 2.6rem; margin: 0; border-bottom: 3px double var(--rule); align-self: flex-start; line-height: 1.15; }
.plan ul { padding-left: 1.2em; margin: 1em 0; }
.plan .actions { margin-top: auto; }

.existing-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.existing-form .form-message { grid-column: 1 / -1; margin: 0; color: var(--muted); min-height: 1.6em; }
.field { display: grid; gap: 6px; }
.field span { font-weight: 600; font-size: 0.95rem; }
.field input, .field select { padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.compare thead th { font-size: 0.9rem; color: var(--muted); }

.platforms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px; }
.platforms .panel { margin: 0; }
.downloads { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.downloads li { display: grid; gap: 6px; justify-items: start; }

.licence-number { font: 600 1.6rem ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: 0.04em; padding: 16px 20px; border: 2px dashed var(--rule); border-radius: 10px; background: var(--surface); display: inline-block; }
.prose { max-width: 720px; padding-top: 40px; }
.prose h2 { margin-top: 1.6em; }
.key-points { background: var(--accent-soft); border-radius: var(--radius); padding: 16px 16px 16px 36px; }

.site-footer { border-top: 1px solid var(--border); max-width: 1120px; margin: 0 auto; padding: 32px 24px; display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; align-items: start; }
.site-footer nav a { color: var(--text); }
.site-footer .small { grid-column: 1 / -1; }
.brand-line { margin: 0 0 8px; line-height: 0; }
.brand-line img { height: 30px; width: auto; }

@media (max-width: 860px) {
  .hero, .gallery, .plans, .platforms { grid-template-columns: 1fr; }
  .points { grid-template-columns: 1fr; }
  .points > div { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); }
  .points > div:first-child { border-top: 0; }
  .site-header { flex-wrap: wrap; gap: 12px 20px; }
  .site-header nav { order: 3; width: 100%; flex-wrap: wrap; gap: 4px 18px; }
  .existing-form { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
}

/* Row colours, as in the apps: light green, light purple, light orange in turn. */
.feature-grid article:nth-child(3n + 1) { background: var(--row-a); border-color: transparent; }
.feature-grid article:nth-child(3n + 2) { background: var(--row-b); border-color: transparent; }
.feature-grid article:nth-child(3n) { background: var(--row-c); border-color: transparent; }
.compare tbody tr:nth-child(3n + 1) > * { background: var(--row-a); }
.compare tbody tr:nth-child(3n + 2) > * { background: var(--row-b); }
.compare tbody tr:nth-child(3n) > * { background: var(--row-c); }
.compare tbody th, .compare tbody td { border-bottom-color: var(--surface); }
.faq details:nth-child(3n + 1) summary::marker { color: var(--green-text); }
.faq details:nth-child(3n + 2) summary::marker { color: var(--accent); }
.points > div:nth-child(1) h2 { color: var(--green-text); }
.points > div:nth-child(2) h2 { color: var(--accent); }
.legal .lead { margin-bottom: 1em; }
.legal .address { margin-top: -0.4em; }
.legal ul li { margin: 0.3em 0; }
.table-wrap { overflow-x: auto; margin: 1em 0; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.95rem; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table-wrap th { font-weight: 600; }

/* WhatsApp chat button, shown on every page when a number is set in the admin panel. */
.whatsapp-float { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 50; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 999px; background: #1f7a4d; color: #fff; font-weight: 600; text-decoration: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.whatsapp-float:hover, .whatsapp-float:focus-visible { background: #17633e; }
.whatsapp-float:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 560px) { .whatsapp-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .whatsapp-float { padding: 14px; } }
.button.whatsapp-button { background: #1f7a4d; border-color: #1f7a4d; color: #fff; }
.button.whatsapp-button:hover { background: #17633e; }
