/* PHEM Logger — shared styles for index.html and privacy-policy.html */

/* ---------- THEME TOKENS ---------- */
/* Dark is the default; light applies via system preference or the toggle. */
:root{
  --bg:            #12161a;
  --panel:         #1a2025;
  --panel-raised:  #1f262c;
  --line:          #2a3238;
  --line-soft:     #232a30;
  --text:          #edf1f3;
  --text-dim:      #9aa5ad;
  --text-faint:    #6b767d;
  --accent:        #ef5a4c;
  --accent-hover:  #f46f62;
  --accent-dim:    #7a2c25;
  --accent-ink:    #1a0c0a;
  --accent-wash:   rgba(239,90,76,0.10);
  --blue:          #4c8dff;
  --amber:         #f2b33d;
  --header-bg:     rgba(18,22,26,0.86);
  --font-display:  'Space Grotesk', sans-serif;
  --font-body:     'IBM Plex Sans', sans-serif;
  --font-mono:     'IBM Plex Mono', monospace;
  --max: 1080px;
  color-scheme: dark;
}

/* Light tokens: used when the OS prefers light and the user hasn't forced dark … */
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]){
    --bg:            #f5f6f7;
    --panel:         #ffffff;
    --panel-raised:  #fbfbfc;
    --line:          #d9dee2;
    --line-soft:     #e6e9ec;
    --text:          #13181c;
    --text-dim:      #4a555c;
    --text-faint:    #737e85;
    --accent:        #c9372b;
    --accent-hover:  #b02e23;
    --accent-dim:    #efb3ad;
    --accent-ink:    #ffffff;
    --accent-wash:   rgba(201,55,43,0.07);
    --blue:          #2563eb;
    --amber:         #b7791f;
    --header-bg:     rgba(245,246,247,0.86);
    color-scheme: light;
  }
}
/* … or when the user picks light with the toggle. */
:root[data-theme="light"]{
  --bg:            #f5f6f7;
  --panel:         #ffffff;
  --panel-raised:  #fbfbfc;
  --line:          #d9dee2;
  --line-soft:     #e6e9ec;
  --text:          #13181c;
  --text-dim:      #4a555c;
  --text-faint:    #737e85;
  --accent:        #c9372b;
  --accent-hover:  #b02e23;
  --accent-dim:    #efb3ad;
  --accent-ink:    #ffffff;
  --accent-wash:   rgba(201,55,43,0.07);
  --blue:          #2563eb;
  --amber:         #b7791f;
  --header-bg:     rgba(245,246,247,0.86);
  color-scheme: light;
}

/* ---------- BASE ---------- */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

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

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  transition:background .2s ease, color .2s ease;
}

a{ color:inherit; }
::selection{ background:var(--accent-dim); color:var(--text); }
:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; }

.wrap{ max-width:var(--max); margin:0 auto; padding:0 28px; }

.eyebrow{
  font-family:var(--font-mono);
  font-size:12px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--accent);
  display:flex; align-items:center; gap:10px;
  margin:0 0 20px;
}
/* Beat page rules like ".section-head p" that would otherwise grey the eyebrow out. */
.section-head .eyebrow, .doc-head .eyebrow, .download .eyebrow{ color:var(--accent); }
.eyebrow::before{
  content:""; width:7px; height:7px; background:var(--accent); border-radius:1px;
  display:inline-block; flex:none;
}

/* ---------- HEADER / NAV ---------- */
header.site{
  position:sticky; top:0; z-index:40;
  background:var(--header-bg);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line-soft);
}
.nav{
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  padding:14px 28px;
  max-width:var(--max); margin:0 auto;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-family:var(--font-display); font-weight:600; font-size:17px;
  letter-spacing:0.01em;
  text-decoration:none; color:var(--text);
}
.brand .mark{
  width:28px; height:28px; flex:none; display:block;
  border-radius:7px;
  background:#fff;
  box-shadow:0 0 0 1px var(--line);
}
.nav-right{ display:flex; align-items:center; gap:28px; }
nav.links{ display:flex; gap:26px; font-size:14px; }
nav.links a, .back{
  text-decoration:none; color:var(--text-dim);
  transition:color .15s ease;
}
nav.links a:hover, .back:hover{ color:var(--text); }
.back{ font-size:14px; }

/* ---------- THEME TOGGLE ---------- */
.theme-toggle{
  appearance:none;
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; flex:none;
  border-radius:9px;
  border:1px solid var(--line);
  background:var(--panel);
  color:var(--text-dim);
  cursor:pointer;
  transition:color .15s ease, border-color .15s ease;
}
.theme-toggle:hover{ color:var(--text); border-color:var(--accent-dim); }
.theme-toggle svg{ width:18px; height:18px; }
/* Show the sun in dark mode (click → light), the moon in light mode (click → dark). */
.theme-toggle .i-moon{ display:none; }
:root[data-theme="light"] .theme-toggle .i-sun{ display:none; }
:root[data-theme="light"] .theme-toggle .i-moon{ display:block; }

/* ---------- BUTTONS ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:13px 22px;
  border-radius:8px;
  font-size:14px; font-weight:600;
  text-decoration:none;
  border:1px solid transparent;
  transition:transform .15s ease, border-color .15s ease, background .15s ease;
}
.btn-primary{ background:var(--accent); color:var(--accent-ink); }
.btn-primary:hover{ transform:translateY(-1px); background:var(--accent-hover); }
.btn-ghost{ border-color:var(--line); color:var(--text); }
.btn-ghost:hover{ border-color:var(--accent-dim); }
.btn svg{ width:16px; height:16px; }
/* Store button that isn't live yet (see assets/store-links.js). */
.btn-soon{
  border-style:dashed;
  color:var(--text-dim);
  cursor:default;
  pointer-events:none;
}
.btn-soon .soon{
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--accent);
  border:1px solid var(--accent-dim);
  border-radius:4px;
  padding:1px 6px;
  margin-left:2px;
}

/* ---------- FOOTER ---------- */
footer{ padding:40px 0 56px; }
.foot-row{
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:16px;
}
.foot-links{ display:flex; flex-wrap:wrap; gap:22px; font-size:13.5px; }
.foot-links a{ text-decoration:none; color:var(--text-dim); }
.foot-links a:hover{ color:var(--text); }
.foot-note{ font-size:12.5px; color:var(--text-faint); }

@media (max-width: 860px){
  nav.links{ display:none; }
}
@media (max-width: 520px){
  .wrap{ padding:0 16px; }
  .nav{ padding:12px 16px; }
}
