/* SmartFlashlight — legal pages
   Theme: a beam of warm light cutting through the dark.
   That's the app's whole job, so it's the design's whole job too. */

:root {
  --night: #10131a;
  --night-deep: #0a0c11;
  --panel: #161b24;
  --line: #262d3a;
  --text: #cdd2db;
  --text-dim: #7d8496;
  --beam: #ffb238;
  --beam-soft: #ffdba0;
  --beam-glow: rgba(255, 178, 56, 0.18);
  --max: 42rem;
  --font-head: "Space Grotesk", "Archivo", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--beam-soft);
  text-decoration-color: rgba(255, 178, 56, 0.35);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--beam); }
a:focus-visible,
button:focus-visible,
.switch-btn:focus-visible {
  outline: 2px solid var(--beam);
  outline-offset: 3px;
}

/* ---------- top bar ---------- */

.topbar {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--night-deep), var(--night));
}

.topbar-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 1.6rem;
  height: 1.6rem;
  flex-shrink: 0;
}

.brand-mark svg { display: block; width: 100%; height: 100%; }

.toplinks {
  display: flex;
  gap: 1.5rem;
  font-size: 0.92rem;
}

.toplinks a { color: var(--text-dim); text-decoration: none; }
.toplinks a[aria-current="page"] { color: var(--beam-soft); }
.toplinks a:hover { color: var(--text); }

/* ---------- hero (index only) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 1.5rem 4.5rem;
  text-align: left;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 30rem;
  background: radial-gradient(ellipse 55% 60% at 30% 0%, var(--beam-glow), transparent 70%);
  pointer-events: none;
  animation: flicker 6s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  45% { opacity: 0.85; }
  50% { opacity: 1; }
  52% { opacity: 0.9; }
  60% { opacity: 1; }
}

.hero-inner {
  position: relative;
  max-width: 56rem;
  margin: 0 auto;
}

.eyebrow-beam {
  width: 2.75rem;
  height: 3px;
  background: var(--beam);
  border-radius: 2px;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 12px var(--beam);
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 1rem;
  max-width: 30rem;
}

.hero p {
  color: var(--text-dim);
  max-width: 34rem;
  font-size: 1.05rem;
  margin: 0 0 2.25rem;
}

.hero-links {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  background: var(--panel);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.pill-link:hover {
  border-color: var(--beam);
  color: var(--beam-soft);
}

.pill-link.primary {
  background: var(--beam);
  color: var(--night-deep);
  border-color: var(--beam);
  font-weight: 600;
}
.pill-link.primary:hover { color: var(--night-deep); background: var(--beam-soft); border-color: var(--beam-soft); }

/* ---------- feature strip (index only) ---------- */

.strip {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.strip-item {
  background: var(--panel);
  padding: 1.4rem 1.2rem;
}

.strip-item .n {
  font-family: var(--font-head);
  color: var(--beam-soft);
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.35rem;
}

.strip-item .l {
  color: var(--text-dim);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- legal document layout ---------- */

.doc-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 0;
}

.doc-header .eyebrow-beam { margin-bottom: 1.25rem; }

.doc-header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.doc-meta {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0 0 2.5rem;
}

.doc-body {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.doc-body h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text);
  margin: 2.6rem 0 0.9rem;
  padding-top: 0.1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}

.doc-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.doc-body p { margin: 0 0 1.1rem; }

.doc-body ul {
  margin: 0 0 1.1rem;
  padding-left: 1.1rem;
}

.doc-body li { margin-bottom: 0.5rem; }

.doc-body strong { color: var(--text); }

.callout {
  border-left: 2px solid var(--beam);
  background: var(--panel);
  padding: 0.9rem 1.1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.92rem;
  color: var(--text-dim);
  margin: 0 0 1.3rem;
}

.doc-nav-switch {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.switch-btn {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
}

.switch-btn[aria-current="page"] {
  border-color: var(--beam);
  color: var(--beam-soft);
}

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

footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

footer a { color: var(--text-dim); }
footer a:hover { color: var(--beam-soft); }
