:root {
  --bg: #f6f1e7;
  --bg-card: #fdfaf3;
  --ink: #1c1a17;
  --ink-soft: #5b554c;
  --ink-fade: #8a8378;
  --brand: #1f9aa3;
  --brand-soft: #d8efef;
  --rule: rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --shadow: 0 8px 28px rgba(31, 154, 163, 0.07);
}

/* Dark theme — applied when the user (or the head script reading the OS
   setting) sets data-theme="dark" on <html>. */
[data-theme="dark"] {
  --bg: #15130e;
  --bg-card: #221e16;
  --ink: #f2ede2;
  --ink-soft: #b6ad9d;
  --ink-fade: #837b6c;
  --brand: #35b9c2;
  --brand-soft: rgba(53, 185, 194, 0.16);
  --rule: rgba(255, 255, 255, 0.10);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* No-JS fallback: honour the OS setting when no explicit choice is stored. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #15130e;
    --bg-card: #221e16;
    --ink: #f2ede2;
    --ink-soft: #b6ad9d;
    --ink-fade: #837b6c;
    --brand: #35b9c2;
    --brand-soft: rgba(53, 185, 194, 0.16);
    --rule: rgba(255, 255, 255, 0.10);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

nav.site {
  display: flex;
  align-items: center;
}

nav.site a {
  color: var(--ink-soft);
  margin-left: 22px;
  font-size: 0.95rem;
}

nav.site a:hover { color: var(--brand); }

.theme-toggle {
  margin-left: 22px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover { color: var(--brand); border-color: var(--brand); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 18px;
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}

p { margin: 0 0 18px; color: var(--ink-soft); }

.lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin-bottom: 28px;
  max-width: 56ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin: 28px 0 8px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 24px;
  border-radius: 999px;
  box-shadow: 0 10px 24px -10px rgba(31, 154, 163, 0.6);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.cta:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -10px rgba(31, 154, 163, 0.7);
}

.cta:active { transform: translateY(0); }

[data-theme="dark"] .cta { color: #0c1112; }

.cta-ghost {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-soft);
}

.cta-ghost::after {
  content: "→";
  margin-left: 7px;
  transition: transform 0.18s ease;
}

.cta-ghost:hover { color: var(--brand); text-decoration: none; }
.cta-ghost:hover::after { transform: translateX(3px); }

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 30px;
  border: 1px solid var(--rule);
  margin: 24px 0;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand);
}

/* Soft expanding "ping" radiating from the dot. */
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--brand);
  animation: dot-ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes dot-ping {
  0% { transform: scale(1); opacity: 0.55; }
  70% { transform: scale(3.4); opacity: 0; }
  100% { transform: scale(3.4); opacity: 0; }
}

ul.principles {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

ul.principles li {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
}

ul.principles li:last-child { border-bottom: 1px solid var(--rule); }

.screens {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 22px;
  margin: 36px 0 12px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.screens figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.screens img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 28px;
  background: var(--bg-card);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 18px 40px -18px rgba(20, 60, 70, 0.28);
}

/* Light/dark screenshot swap — keyed to the active theme. Scoped under
   .screens so these win over the `.screens img` display rule above. */
.screens .shot-dark { display: none; }
[data-theme="dark"] .screens .shot-light { display: none; }
[data-theme="dark"] .screens .shot-dark { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .screens .shot-light { display: none; }
  :root:not([data-theme]) .screens .shot-dark { display: block; }
}

[data-theme="dark"] .screens img {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 40px -18px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .screens img {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 18px 40px -18px rgba(0, 0, 0, 0.6);
  }
}

.screens figcaption {
  font-size: 0.85rem;
  color: var(--ink-fade);
  text-align: center;
  line-height: 1.35;
}

.screens img {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.screens figure:hover img {
  transform: translateY(-5px);
}

/* Gentle one-time entrance for the hero, staggered. */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.pill { animation: rise 0.6s ease both; animation-delay: 0.02s; }
h1 { animation: rise 0.6s ease both; animation-delay: 0.10s; }
.lead { animation: rise 0.6s ease both; animation-delay: 0.18s; }
.cta-row { animation: rise 0.6s ease both; animation-delay: 0.26s; }

@media (prefers-reduced-motion: reduce) {
  .dot::after,
  .pill, h1, .lead, .cta-row { animation: none !important; }
  .screens figure:hover img { transform: none; }
}

.screens figure:nth-child(odd) { transform: translateY(8px); }
.screens figure:nth-child(even) { transform: translateY(-8px); }

@media (max-width: 640px) {
  .screens {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .screens figure:nth-child(n) { transform: none; }
}

ul.principles strong {
  color: var(--ink);
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

footer.site {
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  color: var(--ink-fade);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer.site a {
  color: var(--ink-fade);
  margin-left: 18px;
}

footer.site a:first-child { margin-left: 0; }

/* Privacy page */
.policy h2 { margin-top: 36px; }
.policy ul { color: var(--ink-soft); padding-left: 20px; }
.policy li { margin: 6px 0; }
.policy .meta {
  color: var(--ink-fade);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

@media (max-width: 540px) {
  .wrap { padding: 36px 18px 60px; }
  h1 { font-size: 2rem; }
  header.site { margin-bottom: 40px; }
  .logo { font-size: 1rem; }
  nav.site a { margin-left: 13px; font-size: 0.85rem; }
  .theme-toggle { margin-left: 13px; width: 32px; height: 32px; }
  footer.site { flex-direction: column; }
  footer.site a { margin-left: 0; }
}

/* On very narrow screens, keep the "E" mark but drop the wordmark so the
   nav links and theme toggle always fit. */
@media (max-width: 400px) {
  .logo span { display: none; }
}
