/* The one stylesheet for de-chipskast.be. Design tokens and rules: see DESIGN.md.
   Sections: base, header, typography, cards, timeline, "What I bring", contact, footer,
   popover, homepage, copy button and abbreviations, pickle chip easter egg, preview version. */
:root { --fg: #f2f2f2; --muted: #8a8a8a; --soft: #c9c9c9; --line: #2c2c2c; --card: #0d0d0d; --accent: #3cc8ff; --trace: #3a3a3a; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #000; color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6; font-size: 1.0625rem;
}
a { color: var(--fg); text-decoration: none; border-bottom: 1px solid #444; transition: color .15s, border-color .15s; }
a:hover, a:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }

.page { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem 0 1rem; }
.home { display: inline-flex; align-items: center; gap: .75rem; border: 0; }
.home img { width: 34px; height: auto; display: block; }
.home span { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.top nav { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .9rem; }
.home span { white-space: nowrap; }
@media (max-width: 560px) {
  .top { flex-direction: column; align-items: flex-start; gap: .75rem; }
}
.top nav a { border: 0; color: var(--muted); }
.top nav a:hover, .top nav a:focus-visible, .top nav a[aria-current="page"] { color: var(--fg); }

/* Typography */
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; margin: 2.5rem 0 1rem; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 3.5rem 0 1.5rem;
  display: flex; align-items: center; gap: .7rem; }
h2::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px rgba(60,200,255,.6); flex: none; }
h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to right, var(--trace), transparent); }
h3 { font-size: 1.15rem; margin: 0 0 .35rem; font-weight: 600; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.2rem; color: var(--soft); max-width: 40em; }
.muted { color: var(--muted); }
ul { padding-left: 1.1rem; margin: .5rem 0 0; }
li { margin: .3rem 0; color: var(--soft); }
li::marker { color: var(--accent); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.4rem 1.4rem 1.2rem; }
.card { position: relative; }
.card::before { content: ""; position: absolute; top: -1px; left: 1.4rem; width: 2.2rem; height: 1px; background: var(--accent); }
.card::after { content: ""; position: absolute; top: -4px; left: calc(1.4rem + 2.2rem); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px rgba(60,200,255,.6); }
.card:hover { border-color: #3a3a3a; }
.card .for { color: var(--muted); font-size: .95rem; margin-bottom: .5rem; }

/* Definition-style list (strengths, ways of working) */
.points { display: grid; gap: 1.25rem; }
.points div { border-left: 1px solid var(--trace); padding-left: 1.2rem; position: relative; }
.points div::before { content: ""; position: absolute; left: -4.5px; top: .45rem; width: 8px; height: 8px; border-radius: 50%; background: #000; border: 1.5px solid var(--accent); }
.points p { color: var(--soft); margin: 0; }

/* Timeline: drawn as a circuit trace with solder points, like the logo.
   Now and then a pulse of "electricity" runs down the wire. */
.timeline { --wire-x: 8.5rem; list-style: none; padding: 0; margin: 0; position: relative; }
.timeline > li { color: var(--fg); margin: 0; display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; }
.timeline > li > div { position: relative; border-left: 1px solid var(--trace); padding: 0 0 2rem 1.4rem; }
.timeline > li:last-child > div { padding-bottom: .25rem; }
.timeline > li > div::before {
  content: ""; position: absolute; left: -4.5px; top: .5rem; width: 8px; height: 8px; border-radius: 50%;
  background: #000; border: 1.5px solid var(--accent);
}
.timeline .when { color: var(--muted); font-size: .9rem; padding-top: .15rem; font-variant-numeric: tabular-nums; text-align: right; }
.timeline .role { color: var(--muted); margin: 0 0 .4rem; }
.timeline .role a { color: inherit; border-color: #444; }
.timeline h3 a { border: 0; }
.timeline h3 a.ext::after { content: "\2197"; font-size: .7em; margin-left: .3em; color: var(--muted); vertical-align: .15em; transition: color .15s; }
.timeline h3 a:hover::after, .timeline h3 a:focus-visible::after { color: var(--accent); }
.timeline .aka { color: #666; white-space: nowrap; }
.timeline p { color: var(--soft); margin: 0 0 .4rem; }
.timeline::after {
  content: ""; position: absolute; left: var(--wire-x); top: 0; width: 1px; height: 64px;
  background: linear-gradient(to bottom, transparent, var(--accent), #e8f8ff, transparent);
  box-shadow: 0 0 8px 1px rgba(60, 200, 255, .55);
  opacity: 0; animation: pulse-down 7s linear infinite; pointer-events: none;
}
.timeline:nth-of-type(2n)::after { animation-delay: 3.1s; }
@keyframes pulse-down {
  0% { transform: translateY(-64px); opacity: 0; }
  4% { opacity: 1; }
  38% { opacity: 1; }
  42%, 100% { transform: translateY(var(--wire-len, 600px)); opacity: 0; }
}
@media (max-width: 560px) {
  .timeline { --wire-x: 0px; }
  .timeline > li { grid-template-columns: 1fr; gap: .15rem; border-left: 1px solid var(--trace); padding-left: 1.4rem; position: relative; }
  .timeline > li > div { border-left: 0; padding-left: 0; position: static; }
  .timeline > li > div::before { left: -4.5px; top: .45rem; }
  .timeline > li { padding-bottom: 2rem; }
  .timeline > li:last-child { padding-bottom: .25rem; }
  .timeline .when { text-align: left; }
}

/* What I bring: the pickle chip gets eaten, one bite per strength */
.bring { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.6rem; }
.bring > li { margin: 0; display: grid; grid-template-columns: 64px 1fr; gap: 1.1rem; align-items: start; color: var(--fg); }
.chip-icon { width: 64px; height: auto; display: block; margin-top: .1rem; overflow: visible;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.bring > li:hover .chip-icon { transform: rotate(-8deg) scale(1.06); }
.bring p { color: var(--soft); margin: 0; }

.background { margin-top: 2.75rem; color: var(--soft); }

/* Call to action */
.cta { margin: 3.5rem 0 0; padding: 1.6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.cta p { margin: 0; color: var(--soft); }

/* Footer */
footer { margin: 4rem 0 0; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .timeline::after { animation: none; display: none; }
  .chip-icon { transition: none; }
}

/* "Why De Chipskast?" popover on the About page */
.namepop { position: relative; display: inline; }
.namepop-btn {
  font: inherit; color: var(--fg); background: none; border: 0; padding: 0; cursor: help;
  border-bottom: 1px dashed var(--accent); line-height: inherit;
}
.namepop-btn:hover, .namepop-btn:focus-visible { color: var(--accent); outline: none; }
.pop {
  position: absolute; left: 0; top: calc(100% + 12px); z-index: 20;
  width: min(360px, calc(100vw - 32px));
  background: #111; border: 1px solid #333; border-radius: 12px; padding: 1.1rem 1.2rem 1rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  font-size: .95rem; line-height: 1.5; color: var(--soft);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.pop::before { /* little trace + solder point connecting the popover to the name */
  content: ""; position: absolute; left: 1.4rem; top: -12px; width: 1px; height: 12px; background: var(--accent);
}
.pop::after {
  content: ""; position: absolute; left: calc(1.4rem - 3px); top: -15px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px rgba(60,200,255,.6);
}
/* Open on tap/click everywhere (.open, set by site.js); also on hover and keyboard focus
   for devices with a real mouse. Touch devices skip :hover, because iOS keeps a tapped
   element "hovered" and the popover would refuse to close. */
.namepop.open .pop {
  opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .namepop:hover .pop, .namepop:focus-within .pop {
    opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease;
  }
}
.pop > span { display: block; }
.pop-title { color: var(--fg); font-weight: 600; font-size: 1.05rem; margin-bottom: .5rem; }
.pop-p { margin-bottom: .55rem; }
.pop-p strong { color: var(--fg); }
/* The hint about the pickle chip only shows where the chip can actually appear:
   devices with a mouse, without "reduce motion" (same conditions as chip.js). */
.pop .pop-hint { display: none; color: var(--muted); font-size: .8rem; font-style: italic; margin-top: .2rem; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .pop .pop-hint { display: block; }
}

/* ---------- Homepage (body.homepage, no header or footer) ---------- */
body.homepage { --line: #333; font-size: 1rem; line-height: normal; }
.homepage-main {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; gap: 2.5rem; padding: 3rem 16px;
}
.homepage a { border: 0; }
.homepage abbr[title] { text-decoration: none; }

/* Logo + electricity overlay (logo.js draws on two canvases on top of the image) */
.logo { position: relative; width: min(300px, 70vw); aspect-ratio: 300 / 396; }
.logo img, .logo canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.logo canvas { pointer-events: none; }
.logo .glow { filter: blur(4px); opacity: 1; }

/* Company details */
.details { text-align: center; display: grid; gap: .75rem; justify-items: center; }
.homepage .name { margin: 0; line-height: normal; font-size: 1rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.homepage .tagline { margin: -.35rem 0 0; color: var(--muted); font-size: .95rem; }
.homepage .vat { display: inline-flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: center; margin: 0; }
.homepage .vat-label { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.homepage .vat-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 6px;
  user-select: all; -webkit-user-select: all; cursor: text;
}
.homepage .vat-copy {
  font: inherit; font-size: .8rem; color: var(--fg); background: transparent; text-decoration: none;
  border: 1px solid var(--line); border-radius: 6px; padding: .35rem .75rem; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.homepage .vat-copy:hover, .homepage .vat-copy:focus-visible, .homepage .vat-copy.copied { border-color: var(--accent); color: var(--accent); outline: none; font-weight: inherit; }
.homepage .contact { margin: 0; font-size: .9rem; }
.homepage .contact a, .homepage .links a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line); transition: color .15s, border-color .15s; }
.homepage .links a { padding-bottom: 1px; }
.homepage .contact a[href]:hover, .homepage .contact a[href]:focus-visible,
.homepage .links a:hover, .homepage .links a:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }
.homepage .links { display: flex; gap: .4rem 1.4rem; flex-wrap: wrap; justify-content: center; margin-top: .5rem; font-size: .95rem; }
.homepage .legal { font-style: normal; font-size: .8rem; color: var(--muted); letter-spacing: .02em; }

/* ---------- Copy button and abbreviations ---------- */
/* <button class="copy" data-copy="…">: looks like text with a dotted underline; click copies the value (script in base.njk) */
button.copy { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: copy; text-decoration: underline dotted; text-decoration-color: var(--accent); text-underline-offset: 3px; }
button.copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
button.copy.copied { color: var(--accent); text-decoration: none; }
abbr[title] { text-decoration: underline dotted; text-decoration-color: #555; text-underline-offset: 3px; cursor: help; }

/* ---------- Pickle chip easter egg (chip.js) ---------- */
/* Pickle chip that sometimes tags along with the cursor */
.chip {
  position: fixed; left: 0; top: 0; width: 45px; height: 39px;
  pointer-events: none; z-index: 10; opacity: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.45));
}
.chip svg { display: block; width: 100%; height: 100%; }
.yum {
  position: fixed; left: 0; top: 0; z-index: 11; pointer-events: none;
  font-size: .95rem; color: var(--fg); white-space: nowrap;
  padding: .35rem .7rem; border-radius: 999px; background: rgba(20,20,20,.85); border: 1px solid var(--line);
  opacity: 0; transform: translate(-50%, -50%);
  transition: opacity .5s ease, transform 2.8s ease-out;
}
.yum.show { opacity: 1; }
.crumbs { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9; }

/* ---------- Preview version only (build:preview) ---------- */
.preview-banner { background: #f2ff00; color: #000; font-size: 14px; padding: 8px 16px; text-align: center; }
.preview-banner a { color: #000; border-color: #000; }
.preview-questions { margin-top: 2rem; }
.preview-questions-box { border: 2px dashed var(--accent); border-radius: 10px; padding: clamp(16px, 3vw, 28px); background: var(--card); }
.preview-questions-box h2 { margin-top: 0; }
.preview-questions-box ol { padding-left: 22px; }
.preview-questions-box li { margin: 8px 0; }
.show-diff .diff-new { background: #f2ff00; box-shadow: 0 0 0 3px #f2ff00; color: #000; border-radius: 2px; }
.show-diff .diff-new a, .show-diff .diff-new abbr, .show-diff .diff-new button { color: #000; }
.diff-toggle { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; color: var(--fg);
  background: #111; border: 1px solid #333; border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.diff-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.diff-dot { width: 12px; height: 12px; border-radius: 50%; background: #555; border: 1px solid #888; }
.diff-toggle[aria-pressed="true"] .diff-dot { background: #f2ff00; }
.concept-list li { margin: .6rem 0; }
@media print { .diff-toggle { display: none; } }
