/* StreakSpark web — colours mirror src/design-system/tokens.ts (dark theme only, D20). */
:root {
  --bg: #0b1020; /* navy950 */
  --surface: #121935; /* navy900 */
  --surface-raised: #19213f; /* navy850 */
  --border: #2e3860; /* navy700 */
  --orange: #ff8a3d; /* orange500 — primary */
  --orange-bright: #ffa061; /* orange400 — links */
  --orange-pressed: #e9711f; /* orange600 */
  --text: #fff7ec; /* warmWhite */
  --text-2: #b4b9cb; /* gray300 */
  --text-3: #8f96ae; /* gray400 */
  --on-primary: #0b1020;
  --measure: 68ch;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    17px/1.65 -apple-system,
    BlinkMacSystemFont,
    'SF Pro Text',
    'Segoe UI',
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  overflow-x: hidden;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--orange-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover {
  color: var(--text);
}
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 10px 14px;
  background: var(--orange);
  color: var(--on-primary);
  border-radius: 10px;
  font-weight: 600;
  z-index: 10;
}
.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}
.brand img {
  width: 28px;
  height: 28px;
  flex: none;
}
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-2);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--text);
  background: var(--surface-raised);
}

/* Main */
main {
  flex: 1;
  padding: 40px 0 56px;
}
.prose {
  max-width: var(--measure);
}
h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin: 0 0 8px;
}
h2 {
  font-size: 1.35rem;
  margin: 40px 0 10px;
}
h3 {
  font-size: 1.1rem;
  margin: 24px 0 6px;
}
p,
ul,
ol {
  margin: 0 0 16px;
}
li {
  margin-bottom: 6px;
}
li::marker {
  color: var(--orange);
}
.meta {
  color: var(--text-3);
  margin-bottom: 28px;
}
.lead {
  font-size: 1.15rem;
  color: var(--text-2);
}
.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--orange);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0 24px;
}
.note p:last-child {
  margin-bottom: 0;
}
code,
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95em;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}
.path {
  white-space: nowrap;
}
dl.defs dt {
  font-weight: 600;
  margin-top: 14px;
}
dl.defs dd {
  margin: 2px 0 0;
  color: var(--text-2);
}
table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 20px;
  font-size: 0.95rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 10px 10px 0;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--text-2);
  font-weight: 600;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 700;
  background: var(--orange);
  color: var(--on-primary);
  text-decoration: none;
}
.button:hover {
  background: var(--orange-pressed);
  color: var(--on-primary);
}
.button.secondary {
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
}
.button.secondary:hover {
  background: var(--border);
}
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 8px;
}
.button-row.center {
  justify-content: center;
}

/* Landing */
.hero {
  text-align: center;
  padding: 24px 0 8px;
}
.hero .mark {
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  display: block;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  margin-bottom: 4px;
}
.tagline {
  font-size: 1.3rem;
  color: var(--orange-bright);
  font-weight: 600;
  margin: 0 0 20px;
}
.hero .lead {
  max-width: 60ch;
  margin: 0 auto 24px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 138, 61, 0.16);
  color: var(--orange-bright);
  border: 1px solid rgba(255, 138, 61, 0.32);
  font-weight: 600;
  font-size: 0.95rem;
}
.badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}
.pillars {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  text-align: left;
}
.pillars li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin: 0;
}
.pillars strong {
  display: block;
  margin-bottom: 4px;
}
.pillars span {
  color: var(--text-2);
  font-size: 0.95rem;
}

/* FAQ */
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
  margin-bottom: 10px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
  min-height: 44px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  color: var(--orange);
  font-size: 1.4rem;
  line-height: 1;
  flex: none;
}
details[open] summary::after {
  content: '–';
}
details > div {
  padding: 0 0 16px;
  color: var(--text-2);
}
details > div p:last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.9rem;
  padding: 20px 0;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
}
.site-footer a {
  color: var(--text-2);
}
.site-footer .sep {
  color: var(--border);
}

/* Verse-style quote on landing */
blockquote {
  margin: 28px auto 0;
  max-width: 56ch;
  color: var(--text-2);
  font-style: italic;
  border-left: 3px solid var(--orange);
  padding-left: 14px;
  text-align: left;
}
blockquote cite {
  display: block;
  font-style: normal;
  color: var(--text-3);
  font-size: 0.9rem;
  margin-top: 4px;
}
