/* Night Embers site styles. Brand values mirror docs/PRODUCT_SPEC.md §4 and the app's src/theme/tokens.ts. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-latin-wght.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0d1c;
  --bg-glow: #1a1430;
  --surface: #161935;
  --surface-2: #20244a;
  --border: #2e335e;
  --text: #f7f1e6;
  --text-muted: #b4b2cc;
  --ember: #ff7a3d;
  --on-ember: #1a0c05;
  --firefly: #f2dc6b;
  --wildfire: #ff4b5c;
  --success: #7fd8a6;

  --font-heading: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --radius-card: 20px;
  --page: 68rem;
  --prose: 42rem;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(60rem 34rem at 50% 108%, rgba(255, 122, 61, 0.1), transparent 70%),
    radial-gradient(80rem 46rem at 50% 100%, var(--bg-glow), transparent 75%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--firefly);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--text);
}

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

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--ember);
  color: var(--on-ember);
  border-radius: 999px;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
  color: var(--on-ember);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Fireflies sit behind everything and never take clicks. */
#fireflies {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

main {
  flex: 1;
  width: 100%;
}

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

.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 5.5rem) 1.5rem 0;
  text-align: center;
}

.hero-logo {
  width: clamp(11rem, 44vw, 15.5rem);
  margin: 0 auto;
}

.hero h1 {
  margin: clamp(1.75rem, 5vh, 2.75rem) auto 0;
  max-width: 20ch;
  font-size: clamp(2rem, 6.2vw, 3.5rem);
  font-weight: 700;
  text-wrap: balance;
}

.hero-sub {
  margin: 1.1rem auto 0;
  max-width: 34rem;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2.6vw, 1.2rem);
  text-wrap: balance;
}

.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 2rem auto 0;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(22, 25, 53, 0.82);
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
}

.coming-soon .dot {
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--firefly);
  box-shadow: 0 0 0.75rem 0.15rem rgba(242, 220, 107, 0.65);
  animation: pulse 2.8s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.45;
    box-shadow: 0 0 0.3rem 0 rgba(242, 220, 107, 0.4);
  }
}

.points {
  max-width: var(--page);
  margin: clamp(3rem, 9vh, 5rem) auto 0;
  padding: 0 1.5rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  list-style: none;
}

.point {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: rgba(22, 25, 53, 0.86);
}

.point-mark {
  display: block;
  width: 0.75rem;
  height: 0.75rem;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  background: var(--mark);
  box-shadow: 0 0 1.1rem 0.25rem color-mix(in srgb, var(--mark) 45%, transparent);
}

.point.spark {
  --mark: var(--firefly);
}

.point.ember {
  --mark: var(--ember);
}

.point.wildfire {
  --mark: var(--wildfire);
}

.point h2 {
  font-size: 1.3rem;
  font-weight: 600;
}

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

.adults-note {
  max-width: var(--prose);
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
}

/* ---------- Header and footer ---------- */

.site-header {
  max-width: var(--page);
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
}

.site-header a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-header img {
  width: 10.5rem;
}

.site-footer {
  max-width: var(--page);
  width: 100%;
  margin: clamp(3rem, 9vh, 5rem) auto 0;
  padding: 1.5rem 1.5rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: var(--text);
}

.site-footer p {
  margin: 0;
}

/* ---------- Text pages (privacy, terms, delete account) ---------- */

.prose {
  max-width: var(--prose);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vh, 3rem) 1.5rem 0;
}

.prose h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
}

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

.prose h2 {
  margin-top: 2.4rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0.85rem 0 0;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

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

.prose li::marker {
  color: var(--ember);
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.draft-note {
  margin-top: 1.5rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--firefly);
  border-radius: 14px;
  background: rgba(242, 220, 107, 0.08);
  font-size: 0.95rem;
}

.steps {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: rgba(22, 25, 53, 0.86);
}

.steps h2 {
  margin-top: 0;
}

/* ---------- Invite and 404 ---------- */

.center-page {
  max-width: 36rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 10vh, 6rem) 1.5rem 0;
  text-align: center;
}

.center-page .symbol {
  width: 6.5rem;
  margin: 0 auto;
}

.center-page .eyebrow {
  margin: 1.75rem 0 0;
  color: var(--firefly);
  font-weight: 600;
}

.center-page h1 {
  margin-top: 0.5rem;
  font-size: clamp(1.9rem, 6vw, 2.75rem);
  font-weight: 700;
  text-wrap: balance;
}

.center-page p {
  margin: 1rem auto 0;
  color: var(--text-muted);
  text-wrap: balance;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 1.75rem;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  background: var(--ember);
  color: var(--on-ember);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: #ff8d58;
  color: var(--on-ember);
}

@media (prefers-reduced-motion: reduce) {
  .coming-soon .dot {
    animation: none;
  }
}
