/*
 * Wishbone marketing. Neutral palette from the app (src/app/globals.css),
 * Geist, and the landing-page-design skill's scales: Tailwind type steps,
 * the 2/4/8/12/16/24/32/40/48/64px spacing set, and one easing curve.
 */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/geist-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #1c2133;
  --muted-foreground: #626880;
  --border: #e3e5ef;
  --button: #2f3956;
  --button-hover: #3d4870;
  --button-foreground: #ffffff;
  --heading-from: #1c2133;
  --heading-to: #6e79b0;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark only when the visitor chose it; see the theme script in each page. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0f111a;
  --foreground: #eef0f7;
  --muted-foreground: #a3a8bd;
  --border: #262b3c;
  --button: #b9c0e3;
  --button-hover: #a5add8;
  --button-foreground: #1c2133;
  --heading-from: #ffffff;
  --heading-to: #9fa9d5;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--background);
  color: var(--foreground);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

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

.skip {
  position: absolute;
  left: 16px;
  top: 16px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--button);
  color: var(--button-foreground);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-64px);
  transition: transform 300ms var(--ease);
}
.skip:focus-visible { transform: none; }

/* Home: one screen, centered. */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

.mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 32px;
}

.hero h1 {
  margin: 0;
  max-width: 680px;
  font-size: 3rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
  background: linear-gradient(90deg, var(--heading-from), var(--heading-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 4px; /* keeps descenders inside the clipped gradient */
}

.hero p {
  margin: 16px 0 0;
  max-width: 480px;
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--button);
  color: var(--button-foreground);
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 300ms var(--ease), transform 300ms var(--ease);
}
.button svg { transition: transform 300ms var(--ease); }
.button:hover { background: var(--button-hover); }
.button:hover svg { transform: translateX(2px); }
.button:active { transform: scale(0.98); }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  padding: 24px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
}
footer a {
  text-decoration: none;
  transition: color 300ms var(--ease);
}
footer a:hover { color: var(--foreground); }
footer a[aria-current="page"] { color: var(--foreground); }

/* Entrance: each piece rises 32px and fades in, once, in reading order. */
.rise {
  animation: rise 700ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rise { animation-name: fade; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .skip, .button, .button svg, footer a { transition: none; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 2.25rem; line-height: 2.5rem; }
  .hero h1 br { display: none; } /* balance breaks it instead */
  .hero p { font-size: 1rem; line-height: 1.5rem; }
}

/* Policy pages. */
.page-header {
  display: flex;
  justify-content: center;
  padding: 24px;
}
.page-header a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; }
.page-header img { width: 24px; height: 24px; border-radius: 6px; }

.prose {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.prose h1 {
  margin: 0;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.prose .updated { margin: 8px 0 0; color: var(--muted-foreground); font-size: 0.875rem; line-height: 1.25rem; }
.prose h2 {
  margin: 40px 0 0;
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
  text-wrap: balance;
}
.prose h3 { margin: 24px 0 0; font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.prose p, .prose ul, .prose ol { margin: 12px 0 0; text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 24px; }
.prose code { font-size: 0.875em; overflow-wrap: anywhere; }
.prose li + li { margin-top: 8px; }
.prose strong { font-weight: 600; }
.prose a { text-underline-offset: 2px; text-decoration-color: var(--muted-foreground); }
.prose a:hover { text-decoration-color: var(--foreground); }
.prose a.button { margin-top: 16px; text-decoration: none; }
