/* Shared styles for project pages. Colours match the homepage. */
:root {
  --paper: #0D110E; --ink: #E7EFE2; --muted: #8E9A8C; --line: #253025; --blue: #C6F432;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --paper: #F1F4EA; --ink: #141A12; --muted: #5D6858; --line: #CBD3C0; --blue: #4D7C0F;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { background: var(--paper); color: var(--ink); }
::selection { background: var(--blue); color: var(--paper); }
body {
  background: var(--paper);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  -webkit-font-smoothing: antialiased;
}
canvas.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.22; }
:root[data-theme="light"] canvas.bg { opacity: 0.3; }
body > *:not(canvas) { position: relative; z-index: 1; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.9375rem; }
.back { color: var(--muted); text-decoration: none; transition: color 0.15s ease; }
.back:hover { color: var(--blue); }
.theme {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.25rem 0.7rem 0.25rem 0.5rem;
  font: inherit; font-size: 0.8125rem; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme:hover { color: var(--blue); border-color: var(--blue); }
.theme svg { width: 0.95rem; height: 0.95rem; transition: transform 0.4s ease; }
:root[data-theme="dark"] .theme svg { transform: rotate(180deg); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

article { max-width: 46rem; margin: clamp(3rem, 8vw, 6rem) auto 0; }
.kicker { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
h1 { font-size: clamp(2.6rem, 8vw, 4.75rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; margin: 0.6rem 0 1.1rem; }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.35rem); color: var(--muted); line-height: 1.5; max-width: 38ch; }
.lede strong { color: var(--ink); font-weight: 500; }

figure { margin: 2.5rem 0 0.5rem; }
figure img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
figcaption { font-size: 0.8125rem; color: var(--muted); margin-top: 0.6rem; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 2rem 0 0; }
.facts div { background: var(--paper); padding: 0.9rem 1rem; }
.facts dt { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.facts dd { font-weight: 500; margin-top: 0.15rem; }
@media (max-width: 520px) { .facts div { padding: 0.75rem 0.7rem; } .facts dd { font-size: 0.9375rem; line-height: 1.35; } }

h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin: 3rem 0 0.75rem; }
p + p { margin-top: 0.9rem; }
article p, article li { color: color-mix(in srgb, var(--ink) 88%, var(--paper)); }
ul.points { list-style: none; display: grid; gap: 0.75rem; margin-top: 0.25rem; }
ul.points li { padding-left: 1.4rem; position: relative; }
ul.points li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.5rem; height: 0.5rem; border-radius: 2px; background: var(--blue); }
ul.points b { color: var(--ink); font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.stat .n { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; color: var(--blue); line-height: 1.1; }
.stat .l { font-size: 0.875rem; color: var(--muted); margin-top: 0.25rem; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.5rem; }
.chips li { padding: 0.3rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.875rem; color: var(--ink); }

.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 3rem; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.2rem; border-radius: 12px; font-weight: 500; text-decoration: none; transition: transform 0.2s ease, border-color 0.15s ease, color 0.15s ease; }
.btn.primary { background: var(--blue); color: var(--paper); }
.btn.primary:hover { transform: translateY(-2px); }
.btn.ghost { border: 1px solid var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue); }

.next { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 4rem; padding: 1.2rem 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.next span:first-child { font-size: 0.875rem; color: var(--muted); }
.next strong { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -0.02em; transition: color 0.15s ease; }
.next:hover strong { color: var(--blue); }

footer { max-width: 46rem; margin: 3rem auto 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.875rem; color: var(--muted); }
footer a { color: inherit; }
footer a:hover { color: var(--blue); }
