/* Styles for index.html, privacy.html and terms.html.
   Standalone — the older pages (email-verified, email-verification-failed,
   password-reset) still use colors.css + styles.css. */

/* ---------------------------------------------------------------- tokens */

:root {
  --page-background: #000000;
  --surface-raised: #141414;
  --border-subtle: rgba(255, 255, 255, 0.10);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.62);
  --text-muted: rgba(255, 255, 255, 0.40);

  --accent: #b6df00;
  --accent-ink: #002008;

  --header-height: 68px;
  --content-max-width: 1120px;
  /* Narrower than the page so the wordmark and the button don't sit far apart. */
  --header-max-width: 760px;
}

/* ------------------------------------------------------------ reset/base */

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  /* Always reserve room for the scrollbar. Without this, short pages (index)
     have no scrollbar and long ones (privacy/terms) do, so centred content
     shifts sideways when you move between them. */
  scrollbar-gutter: stable;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--page-background);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

body.is-popup-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

/* ---------------------------------------------------------------- layout */

.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 11px 22px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 150ms ease, opacity 150ms ease;
}

.button:active {
  transform: scale(0.97);
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  opacity: 0.86;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Overrides the max-width from .container; margin-inline: auto keeps it centred. */
.header-inner {
  max-width: var(--header-max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  text-decoration: none;
}

/* ------------------------------------------------------------------ hero */

.hero {
  width: 100%;
  /* Auto margins centre the hero vertically without clipping it when the
     viewport is short — unlike justify-content: center on the flex parent. */
  margin: auto 0;
  padding: clamp(56px, 9vw, 100px) 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-title {
  max-width: 17ch;
  font-size: clamp(2.3rem, 5.6vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-text {
  margin-top: 22px;
  max-width: 48ch;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.65;
}

.app-store-link {
  margin-top: 34px;
}

.app-store-link img {
  height: 54px;
  transition: opacity 150ms ease;
}

.app-store-link:hover img {
  opacity: 0.85;
}

/* ------------------------------------------- document pages (privacy/terms) */

.document {
  width: 100%;
  padding: clamp(40px, 6vw, 64px) 0 clamp(48px, 7vw, 80px);
}

.document-content {
  max-width: 70ch;
  margin-inline: auto;
}

.document-title {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.document-meta {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.draft-notice {
  margin-top: 28px;
  padding: 16px 20px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Plain-English summary shown at the top of a legal document.
   Scoped under .document-content so it outranks the generic `p` rule below. */
.document-content .document-summary {
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.document-content h2 {
  margin-top: 40px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.document-content h3 {
  margin-top: 26px;
  font-size: 1rem;
  font-weight: 600;
}

.document-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.document-content p,
.document-content ul {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* The global reset strips list padding, so put it back for real prose lists. */
.document-content ul {
  padding-left: 20px;
}

.document-content li {
  margin-top: 6px;
}

.document-content a {
  color: var(--accent);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  padding: 48px 0 28px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 150ms ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ----------------------------------------------------------------- popup */

.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.popup-overlay[hidden] {
  display: none;
}

.popup {
  width: 100%;
  max-width: 380px;
  padding: 32px 28px;
  border: 1px solid var(--border-subtle);
  border-radius: 26px;
  background: var(--surface-raised);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.popup h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.popup p {
  margin: 10px 0 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ----------------------------------------------------- motion preference */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
  }
}
