/* ==========================================================================
   Seyfree — single stylesheet. No frameworks, no web fonts, no icon fonts.
   Light + dark follow the visitor's system setting.
   ========================================================================== */

:root {
  --bg: #fbfcfb;
  --surface: #ffffff;
  --soft: #f1f6f3;
  --ink: #0e1a15;
  --muted: #4f5f58;
  --line: #e1e8e4;

  --accent: #047857;
  --accent-ink: #ffffff;
  --accent-soft: #d9f2e7;

  --warn: #92400e;
  --warn-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --ok: #166534;
  --ok-soft: #dcfce7;
  --info: #1e40af;
  --info-soft: #dbeafe;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgb(10 30 20 / .05), 0 10px 28px -14px rgb(10 30 20 / .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a110e;
    --surface: #111a16;
    --soft: #0e1713;
    --ink: #e9f1ed;
    --muted: #9db1a8;
    --line: #1f2d27;

    --accent: #34d399;
    --accent-ink: #05281c;
    --accent-soft: #12302a;

    --warn: #fcd34d;
    --warn-soft: #3a2d0a;
    --danger: #fca5a5;
    --danger-soft: #3b1414;
    --ok: #86efac;
    --ok-soft: #12301c;
    --info: #93c5fd;
    --info-soft: #12223d;

    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 28px -14px rgb(0 0 0 / .7);
  }
}

/* ---------- Reset / base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  font: 1rem/1.65 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.1rem, 5vw + .5rem, 3.6rem); font-weight: 750; }
h2, .h2 { font-size: clamp(1.45rem, 2vw + .8rem, 2.1rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

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

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

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: .75rem; top: -4rem; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1rem; border-radius: var(--radius-sm); text-decoration: none;
}
.skip-link:focus { top: .75rem; }

.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Buttons / badges / links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.15rem; border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: transform .15s, background-color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: .45rem .95rem; font-size: .95rem; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

.badge {
  display: inline-block; padding: .15rem .65rem; border-radius: 999px;
  background: var(--soft); border: 1px solid var(--line);
  color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.5;
}
.badge-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  margin: 0 0 1rem; padding: .3rem .8rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: .85rem; font-weight: 650; letter-spacing: .01em;
}

.lead { font-size: clamp(1.05rem, .5vw + 1rem, 1.25rem); color: var(--muted); max-width: 56ch; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.2rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #0ea5e9));
  color: var(--accent-ink); font-size: 1.05rem; font-weight: 800;
}

.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a:not(.btn) {
  padding: .5rem .8rem; border-radius: 999px; color: var(--muted);
  font-weight: 550; text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--ink); background: var(--soft); }
.site-nav a[aria-current="page"]:not(.btn) { color: var(--accent); background: var(--accent-soft); }
.site-nav .btn { margin-left: .5rem; }

.nav-toggle {
  display: none; padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.nav-toggle .icon { width: 1.4rem; height: 1.4rem; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

@media (max-width: 760px) {
  /* Without JS the menu simply stays visible and wraps; with JS it collapses. */
  .header-row { flex-wrap: wrap; padding-block: .6rem; }
  .site-nav { flex-wrap: wrap; width: 100%; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; flex-direction: column; align-items: stretch; padding-bottom: .75rem; }
  .js.nav-open .site-nav { display: flex; }
  .js .site-nav a:not(.btn) { padding: .75rem 1rem; }
  .js .site-nav .btn { margin: .5rem 0 0; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section-tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section-soft { background: var(--soft); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }

.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1.1fr 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(3rem, 8vw, 6rem);
  background:
    radial-gradient(60% 90% at 90% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(45% 70% at 0% 100%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.3fr 1fr; } }
.hero h1 { max-width: 14ch; }

.hero-art { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.tile {
  width: clamp(5rem, 14vw, 7rem); aspect-ratio: 1; object-fit: cover;
  border-radius: 24%; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tile:nth-child(odd) { transform: rotate(-6deg) translateY(.5rem); }
.tile:nth-child(even) { transform: rotate(5deg) translateY(-.5rem); }

/* ---------- Page header ---------- */

.page-header {
  padding-block: clamp(2rem, 5vw, 3.5rem);
  background: radial-gradient(50% 120% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
  border-bottom: 1px solid var(--line);
}
.page-header h1 { font-size: clamp(2rem, 4vw + .5rem, 3rem); margin-bottom: .35em; }
.page-header .lead { margin-bottom: 0; }

.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Feature cards / stats ---------- */

.feature-icon {
  display: grid; place-items: center; width: 2.9rem; height: 2.9rem; margin-bottom: 1rem;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent);
}
.feature-icon .icon { width: 1.5rem; height: 1.5rem; }
.feature h2 { font-size: 1.25rem; margin-bottom: .4em; }
.feature p { color: var(--muted); }

.stats { display: grid; gap: 1rem; }
@media (min-width: 560px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { padding: 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat strong { display: block; font-size: 2.4rem; line-height: 1; letter-spacing: -.03em; color: var(--accent); }
.stat span { display: block; margin: .35rem 0 .5rem; font-weight: 650; }
.stat p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- App cards ---------- */

.app-card {
  position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
}
.app-card:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }

.app-icon {
  width: 4rem; height: 4rem; flex: none; object-fit: cover;
  border-radius: 22%; background: var(--soft); border: 1px solid var(--line);
}
.app-icon-lg { width: clamp(5rem, 14vw, 7rem); height: clamp(5rem, 14vw, 7rem); }

.app-card-body { display: grid; gap: .15rem; min-width: 0; flex: 1; }
.app-card-title { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.app-card-text { color: var(--muted); font-size: .95rem; line-height: 1.45; }
.app-card-meta { color: var(--muted); font-size: .8rem; margin-top: .25rem; }
.app-card-arrow { color: var(--muted); transition: transform .15s, color .15s; }
.app-card:hover .app-card-arrow { transform: translateX(3px); color: var(--accent); }

/* ---------- App detail ---------- */

.app-hero-row { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.app-hero h1 { margin-bottom: .25em; }

.app-layout { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .app-layout { grid-template-columns: minmax(0, 1fr) 20rem; } .app-aside { position: sticky; top: 5.5rem; } }
.app-aside { display: grid; gap: 1.25rem; }
.aside-title { font-size: 1.1rem; margin-bottom: .5rem; }

.facts { margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.facts div:first-child { border-top: 0; padding-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.highlight { background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.highlight .feature-icon { background: var(--surface); }
.highlight p { color: var(--ink); opacity: .85; }

.shots { display: flex; gap: 1.25rem; overflow-x: auto; padding: .25rem .25rem 1rem; scroll-snap-type: x proximity; }
.shots img {
  height: clamp(22rem, 60vw, 32rem); width: auto; flex: none; scroll-snap-align: start;
  border-radius: 1.5rem; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface);
}

/* ---------- Prose / legal ---------- */

.prose { max-width: 70ch; }
.prose-wide { max-width: 52rem; }
.prose h2 { margin-top: 1.75em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.5em 0 .4em; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 88%, var(--bg)); }
.prose ul { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: .3rem; }

.prose-legal h2 { font-size: 1.35rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.prose-legal h2:first-child { padding-top: 0; border-top: 0; }
.prose-legal h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.back-link { margin-top: 2.5rem; }

.checks { list-style: none; padding: 0 !important; }
.checks li { display: flex; align-items: center; gap: .6rem; }
.checks .icon { color: var(--accent); }

/* ---------- Accordion (native <details>, no JS) ---------- */

.accordion { padding: 0; margin-bottom: 1.25rem; overflow: hidden; }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.5rem; cursor: pointer; list-style: none;
  font-size: 1.15rem; font-weight: 700;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; width: .6rem; height: .6rem; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .2s;
}
.accordion[open] summary::after { transform: rotate(-135deg); }
.accordion-body { padding: 0 1.5rem 1.5rem; border-top: 1px solid var(--line); }
.accordion-body h3:first-child { margin-top: 1.25rem; }

/* ---------- CTA band ---------- */

.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: calc(var(--radius) + 6px);
  background: var(--accent); color: var(--accent-ink);
}
.cta-band h2 { margin-bottom: .25em; }
.cta-band p { margin: 0; opacity: .88; max-width: 48ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.cta-band .btn-primary { background: var(--accent-ink); color: var(--accent); }
.cta-band .btn-ghost { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 45%, transparent); }
.cta-band .btn-ghost:hover { color: var(--accent-ink); border-color: var(--accent-ink); }

/* ---------- Donate / empty / confirmation ---------- */

.donate-card { max-width: 38rem; margin-inline: auto; text-align: center; padding: clamp(1.75rem, 5vw, 3rem); }
.donate-card .feature-icon { margin-inline: auto; }
.donate-card p { color: var(--muted); }
.fine { margin-top: 1rem; font-size: .85rem; }
.empty { max-width: 34rem; text-align: center; margin-inline: auto; }

/* ---------- Contact / forms ---------- */

.contact-layout { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: minmax(0, 1fr) 20rem; } }
.contact-aside { display: grid; gap: 1.25rem; }
.contact-aside p { color: var(--muted); }

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: .95rem; }
input[type="text"], input[type="email"], textarea {
  width: 100%; padding: .75rem .9rem; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
textarea { resize: vertical; min-height: 9rem; }
input:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.form .btn { justify-self: start; }

/* Honeypot: kept in the DOM for bots, invisible and unreachable for people. */
.field-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

altcha-widget {
  --altcha-color-base: var(--surface);
  --altcha-color-text: var(--ink);
  --altcha-color-border: var(--line);
  --altcha-color-active: var(--accent);
  --altcha-border-radius: var(--radius-sm);
  max-width: 22rem;
}

/* ---------- Alerts ---------- */

.flash-wrap { margin-top: 1.25rem; display: grid; gap: .75rem; }
.alert { padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-weight: 500; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert-success { background: var(--ok-soft); color: var(--ok); }
.alert-danger  { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warn-soft); color: var(--warn); }
.alert-info    { background: var(--info-soft); color: var(--info); }

/* ---------- Footer ---------- */

.site-footer { margin-top: clamp(2rem, 5vw, 4rem); background: var(--soft); border-top: 1px solid var(--line); font-size: .95rem; }
.footer-grid { display: grid; gap: 2rem; padding-block: 3rem 2rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.5fr .8fr .9fr 1.4fr; } }
.footer-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer p { color: var(--muted); }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-about .brand { margin-bottom: .9rem; }
.footer-count strong { color: var(--accent); font-size: 1.3rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  padding-block: 1.25rem 2rem; border-top: 1px solid var(--line);
}
.footer-bottom p { margin: 0; }
.footer-bottom p a + a { margin-left: 1.25rem; }

/* ---------- Motion / print ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .tile:nth-child(odd), .tile:nth-child(even) { transform: none; }
}

@media print {
  .site-header, .site-footer, .cta-band, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; }
}
