/* ==========================================================================
   Placeholder page: white page, one message, particle sea (js/particles.js)
   in the lower half, optional link at the bottom (.site-link).
   Shared by datistics.nl and webscraping.nl — keep both copies identical.

   Sections: 1. Colours & fonts  2. Base  3. Particle canvas  4. Message (+ link)
             5. Responsive       6. Reduced motion
   ========================================================================== */

/* ---------- 1. Colours & fonts ---------- */

:root {
  --bg: #ffffff;
  --bg-bottom: #f1f1f0;     /* faint grey towards the bottom, under the sea */
  --ink: #1e1e1e;           /* soft black text */
  --ink-muted: #5f5d59;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 2. Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;       /* stable height on mobile (ignores the browser bar) */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 45%, var(--bg-bottom) 100%) fixed var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--bg); }

/* Hidden visually, still read by search engines and screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. Particle canvas ---------- */

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;     /* purely decorative */
}

/* ---------- 4. Message ---------- */

.message {
  position: relative;
  z-index: 1;
  margin-bottom: 22vh;      /* sit in the open space above the sea */
  margin-bottom: 22svh;
  padding: 24px max(24px, env(safe-area-inset-right)) 24px max(24px, env(safe-area-inset-left));
  text-align: center;
  animation: appear 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;   /* first: the intro particles stream out of it */
}

.message h1 {
  margin: 0;
  font-size: clamp(1.05rem, 3.4vw, 1.6rem);
  font-weight: 300;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  padding-left: 0.5em;      /* balances the trailing letter-spacing: truly centred */
}

/* Heartbeat: scale / blur / opacity are set from js/particles.js. */
[data-heartbeat] { will-change: transform, filter, opacity; }

/* 404 page: link back home. */
.message p {
  margin: 20px 0 0;
  font-size: clamp(1rem, 3.5vw, 1.15rem);
}

.message a {
  color: var(--ink-muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.message a:hover,
.message a:focus-visible { color: var(--ink); }

/* Optional link at the bottom of the page (e.g. webscraping.nl → datistics.nl).
   Same colour and typography as the message, smaller; letters only (no box).
   A soft white halo keeps the letters readable over the particle sea. */
.site-link {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 1;
  text-align: center;
  pointer-events: none;     /* only the link itself is clickable */
  animation: appear 1.8s cubic-bezier(0.22, 1, 0.36, 1) 2.6s both;   /* after the sea has formed */
}

.site-link a {
  display: inline-block;
  pointer-events: auto;
  padding: 10px 0 10px 0.5em;   /* invisible tap area; left = balances trailing letter-spacing */
  color: var(--ink);
  font-size: clamp(0.62rem, 2vw, 0.75rem);
  font-weight: 300;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  text-decoration: none;
  text-shadow: 0 0 6px #fff, 0 0 12px #fff;
}

.site-link a:hover,
.site-link a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.site-link a:focus-visible { outline: none; }

@keyframes appear {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ---------- 5. Responsive ---------- */

/* Narrow phones: slightly tighter letter-spacing so the line never wraps. */
@media (max-width: 400px) {
  .message h1 { letter-spacing: 0.4em; padding-left: 0.4em; }
  .site-link a { letter-spacing: 0.4em; padding-left: 0.4em; }
}

/* Landscape phones: little height, so keep the message higher up. */
@media (max-height: 480px) and (orientation: landscape) {
  .message { margin-bottom: 30vh; margin-bottom: 30svh; }
}

/* ---------- 6. Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .message,
  .site-link { animation: none; }
}
