/* Root design tokens */
:root {
  --bg: #fcfcfd;
  --fg: #0a0a0b;
  --muted: #6b7280;
  --line: #e7e8ea;
  --accent: #0f172a;
  --card: #ffffffcc;
  --shadow: 0 1px 1px rgba(0,0,0,0.02), 0 4px 14px rgba(0,0,0,0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10;
    --fg: #e7eaee;
    --muted: #94a3b8;
    --line: #1f2937;
    --accent: #e5e7eb;
    --card: #0f1216cc;
    --shadow: 0 1px 1px rgba(0,0,0,0.2), 0 8px 32px rgba(0,0,0,0.45);
  }
}

/* Base reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
  color: var(--fg);
  background: linear-gradient(180deg, var(--bg) 0%, color-mix(in oklab, var(--bg), black 2%) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.viewport {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(20px, 4vw, 48px);
}

.brand {
  display: grid;
  gap: 6px;
  align-content: start;
}
.logo {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: clamp(18px, 2vw, 20px);
}
.org {
  font-weight: 500;
  color: var(--muted);
  font-size: clamp(12px, 1.6vw, 14px);
}
.nonprofit {
  color: var(--muted);
  font-size: clamp(11px, 1.4vw, 13px);
}

.hero {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
  padding: clamp(8px, 2vw, 16px) 0;
}
.title {
  margin: 0;
  font-weight: 700;
  line-height: 1.12; /* prevent descender clipping (e.g., g, y) */
  letter-spacing: -0.01em;
  font-size: clamp(28px, 6vw, 64px);
}
.title.liquid {
  position: relative;
  display: inline-block;
  font-weight: 600;
  letter-spacing: -0.015em;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent; /* safari gradient text */
  padding-bottom: 0.08em; /* ensure visual breathing room for descenders */
  background-image: linear-gradient(
    180deg,
    color-mix(in oklab, var(--fg), white 18%) 0%,
    var(--fg) 58%,
    color-mix(in oklab, var(--fg), black 10%) 100%
  );
  text-shadow: 0 1px 0 rgba(255,255,255,0.18), 0 6px 18px rgba(0,0,0,0.18);
}
@media (prefers-color-scheme: dark) {
  .title.liquid {
    background-image: linear-gradient(
      180deg,
      color-mix(in oklab, var(--fg), white 12%) 0%,
      var(--fg) 62%,
      color-mix(in oklab, var(--fg), black 20%) 100%
    );
    text-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 8px 24px rgba(0,0,0,0.35);
  }
}

.title.liquid::selection {
  color: var(--fg);
  -webkit-text-fill-color: var(--fg);
}

/* Page-load reveal animations (subtle, Apple-like) */
:root {
  --ease-spring: cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-animate] {
  opacity: 0;
  transform: translateY(14px);
  will-change: opacity, transform;
}
.loaded [data-animate] {
  animation: reveal-up 700ms var(--ease-spring) forwards;
}
.loaded [data-animate].delay-1 { animation-delay: 90ms; }
.loaded [data-animate].delay-2 { animation-delay: 180ms; }
.loaded [data-animate].delay-3 { animation-delay: 270ms; }

@keyframes reveal-up {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Motion preferences and no-js fallback */
.no-js [data-animate] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-animate] { opacity: 1; transform: none; animation: none !important; }
}
.title .brandword {
  opacity: 0.9;
}
.title .divider {
  margin: 0 0.25em;
  opacity: 0.4;
}
.title .labword {
  opacity: 0.8;
}
.coming {
  margin: 0;
  font-size: clamp(14px, 2vw, 18px);
  color: var(--muted);
}

.subscribe {
  display: grid;
  align-content: start;
}
.card {
  width: min(760px, 100%);
  backdrop-filter: saturate(140%) blur(12px);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 16px;
  padding: clamp(16px, 3vw, 28px);
  display: grid;
  gap: 14px;
}
.copy h2.subtle {
  margin: 0 0 4px 0;
  font-size: clamp(16px, 2.2vw, 18px);
  font-weight: 600;
}
.copy p {
  margin: 0 0 8px 0;
  color: var(--muted);
  font-size: clamp(13px, 1.8vw, 15px);
}

/* Typeform overrides */
[data-tf-live] {
  --tf-font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --tf-font-color: var(--fg);
  --tf-background-color: transparent;
}

.footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

/* Motion: minimal and subtle */
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform 300ms ease, box-shadow 300ms ease; }
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 2px rgba(0,0,0,0.04), 0 14px 38px rgba(0,0,0,0.12);
  }
}

