/* Shared across every page: reset, colour tokens, base element styles, the
   Phronix wordmark link, and the theme-toggle button. Single source so the
   brand link can't drift into a different look/behaviour on a new page —
   page-specific layout (hero, offer lists, doc body, etc.) stays local to
   each page's own <style> block. */

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

:root {
  --bg:      #FFFFFF;
  --text:    #161616;
  --body:    #3A3A3A;
  --muted:   #767676;
  --faint:   #ABABAB;
  --border:  #E8E8E8;
  --surface: #F5F5F5;
  --link:    #1D4ED8;
  --accent:      #1D4ED8;
  --accent-ink:  #0B1B4A;
  --accent-soft: rgba(29, 78, 216, 0.08);
  --spark:       #6E8FE0;
  --never-text: #B91C1C;
  --never-bg:   #FEF2F2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #111111;
    --text:    #EBEBEB;
    --body:    #C8C8C8;
    --muted:   #888888;
    --faint:   #555555;
    --border:  #282828;
    --surface: #1A1A1A;
    --link:    #60A5FA;
    --accent:      #60A5FA;
    --accent-ink:  #0B1B4A;
    --accent-soft: rgba(96, 165, 250, 0.10);
    --spark:       #8FB4FF;
    --never-text: #F87171;
    --never-bg:   #2D1515;
  }
}

:root[data-theme="light"] {
  --bg: #FFFFFF; --text: #161616; --body: #3A3A3A; --muted: #767676; --faint: #ABABAB;
  --border: #E8E8E8; --surface: #F5F5F5; --link: #1D4ED8;
  --accent: #1D4ED8; --accent-ink: #0B1B4A; --accent-soft: rgba(29, 78, 216, 0.08); --spark: #6E8FE0;
  --never-text: #B91C1C; --never-bg: #FEF2F2;
}

:root[data-theme="dark"] {
  --bg: #111111; --text: #EBEBEB; --body: #C8C8C8; --muted: #888888; --faint: #555555;
  --border: #282828; --surface: #1A1A1A; --link: #60A5FA;
  --accent: #60A5FA; --accent-ink: #0B1B4A; --accent-soft: rgba(96, 165, 250, 0.10); --spark: #8FB4FF;
  --never-text: #F87171; --never-bg: #2D1515;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--body);
  font-family: 'Lexend', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ── Top bar: wordmark + nav, identical on every marketing/offer page ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 780px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.wordmark:hover { color: var(--text); text-decoration: none; }

.topbar nav { display: flex; align-items: center; gap: 1.5rem; }
.topbar nav a { font-size: 0.8125rem; color: var(--muted); }
.topbar nav a:hover { color: var(--text); text-decoration: none; }

/* ── Theme toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.theme-toggle svg { width: 1.25rem; height: 1.25rem; }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 640px) {
  .topbar { flex-direction: column; align-items: flex-start; }
}

/* ── Install nudge — identical on every offers/hub page ── */
.install-cta {
  display: block;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  text-decoration: none;
}
.install-cta:hover { text-decoration: none; }
.install-cta strong { color: var(--accent-ink); display: block; font-size: 1.0625rem; margin-bottom: 0.25rem; }
.install-cta span { color: var(--body); font-size: 0.9375rem; }

:root:not([data-theme="light"]) .install-cta strong { color: var(--accent); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .install-cta strong { color: var(--accent-ink); } }
