/* Dual Minds — shared stylesheet.
   Plain CSS, no dependencies, no external fonts. Light by default, dark via the
   system preference. Palette: Mad Minds. */

:root {
  color-scheme: light dark;

  /* Mad Minds palette (light) */
  --background: #fff9e6;
  --surface: #f5eac4;
  --text: #28181b;
  --text-muted: #52222d;
  --accent-fill: #ff542c;
  --accent-fill-text: #28181b;
  --accent-text: #a93212;
  --secondary: #6b4c8f;

  /* Derived helpers */
  --border: rgba(40, 24, 27, 0.16);
  --focus: #a93212;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #28181b;
    --surface: #39244b;
    --text: #fff9e6;
    --text-muted: #ffcab7;
    --accent-fill: #ff542c;
    --accent-fill-text: #28181b;
    --accent-text: #ff8a70;
    --secondary: #ffa093;

    --border: rgba(255, 249, 230, 0.18);
    --focus: #ff8a70;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent-fill);
  color: var(--accent-fill-text);
}

a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.2rem;
}

/* ---------- Home ---------- */

.home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.home main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 8vw, 4rem) 1.5rem 2rem;
  text-align: center;
}

.home h1 {
  margin: 0;
  font-size: clamp(2.5rem, 9vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.home .tagline {
  margin: 1.1rem 0 0;
  max-width: 24rem;
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  margin: 1.9rem 0 0;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--accent-fill-text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.home footer {
  padding: 1.5rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.home footer p {
  margin: 0;
}

.home footer .separator {
  padding: 0 0.35em;
  opacity: 0.6;
}

/* ---------- Content pages (privacy, 404) ---------- */

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 3.5rem) 1.5rem calc(3rem + env(safe-area-inset-bottom));
}

.backlink {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.page h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.85rem, 5.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.page .updated {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.page h2 {
  margin: 2.25rem 0 0.6rem;
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--secondary);
}

.page p,
.page ul {
  margin: 0 0 1rem;
}

.page ul {
  padding-left: 1.25rem;
}

.page li + li {
  margin-top: 0.4rem;
}

.page strong {
  font-weight: 600;
}

.page hr {
  margin: 2.5rem 0 1.5rem;
  border: 0;
  border-top: 1px solid var(--border);
}

.page footer {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.notfound main {
  max-width: 28rem;
  padding: 2rem 1.5rem;
}

.notfound h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.notfound p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
