/*
 * samaritan-systems.com — "Eigen regio (luchtfoto)" aerial ground (OWNER direction 15-11-2026,
 * DESIGN-DIRECTION-20261115.md, approved mockup B "Eigen regio (luchtfoto)").
 *
 * The public site gets the same treatment as the Connect shell: a real Dutch aerial photo (PDOK
 * Actueel_orthoHR), duotone-tinted to Samaritan navy with a vignette so text stays readable, behind a
 * MORE see-through nav — owner: "don't forget the see-through of the menu bars" and "this also counts
 * for the website". The brand globe in the hero stays the brand element; Jost, the dark palette and
 * the glass tiers are unchanged.
 *
 * This file is ADDITIVE and loaded AFTER site.css, which is left byte-identical (its hero geometry,
 * button sizing and pill positions are owner-tuned and test-pinned). It only:
 *   1. replaces the body atmosphere with the darkened aerial ground (keeping the gradient as the base
 *      layer, so a slow or blocked photo falls back to the current look);
 *   2. makes the floating nav bar and the glassy pills more see-through, driven through the
 *      `--glass-strong` TOKEN under `prefers-reduced-transparency: no-preference` — so a
 *      reduced-transparency person still gets the solid bar site.css already defines (its
 *      @media (prefers-reduced-transparency: reduce) sets --glass-strong: var(--solid));
 *   3. adds the required PDOK attribution.
 *
 * Accessibility: the photo is darkened to ~navy (top band for the nav, overall tint, edge vignette) so
 * body text keeps ≥4.5:1 over it, verified by rendering the built site over the real tile and sampling
 * the PNG. Reduced motion and the opaque glass fallback are both inherited from site.css unchanged.
 */

:root {
  /* Colours are DESIGN.md tokens (owner 25-11-2026): the photo is tinted towards the page background, so
   * it reads light in light mode and dark in dark mode; text contrast is the token's own. */
  --aerial-navy: var(--color-background);
  /* A representative Dutch region (Utrecht + Houten): fields, motorways and parcels that read as
   * structure even heavily darkened. The site is not per-client, so the region is fixed; the URL is a
   * PDOK WMS GetMap in EPSG:3857, the same service the Connect shell frames per client. */
  --aerial-img: url("https://service.pdok.nl/hwh/luchtfotorgb/wms/v1_0?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&LAYERS=Actueel_orthoHR&CRS=EPSG:3857&BBOX=550804.7,6802291.2,590220.1,6826925.8&WIDTH=1600&HEIGHT=1000&FORMAT=image/jpeg&STYLES=");
  /* How much of the page background covers the photo. Light mode needs more cover than dark: the
   * accent text (#0B7A6E) only keeps 4.5:1 while the ground stays near the token background. */
  --aerial-k-top: 95%; --aerial-k-band: 86%; --aerial-k: 95%; --aerial-k-edge: 97%; --aerial-k-end: 96%;
  --aerial-tint: color-mix(in srgb, var(--color-background) var(--aerial-k), transparent);
  --aerial-vignette: color-mix(in srgb, var(--color-background) var(--aerial-k-edge), transparent);
  --aerial-credit-bg: color-mix(in srgb, var(--color-background) 54%, transparent);
}
/* Dark mode keeps the photo's earlier strength (light text holds 4.5:1 over a darker photo). */
@media (prefers-color-scheme: dark) {
  :root { --aerial-k-top: 84%; --aerial-k-band: 46%; --aerial-k: 80%; --aerial-k-edge: 90%; --aerial-k-end: 86%; }
}

/* The aerial photo behind everything, duotone-navy and darkened. `luminosity` keeps the photo's
 * luminance and takes the navy hue of the base, so it reads as one navy duotone; the top band darkens
 * the area the floating nav sits over, the tint darkens overall, and the vignette darkens the edges to
 * ~0.6 brightness. The site.css ground gradient stays as the backmost layer, so if the photo is slow
 * or blocked the page is the current Midnight look rather than a flat navy block. */
body::before {
  background-color: var(--aerial-navy);
  background-image:
    linear-gradient(180deg, color-mix(in srgb, var(--color-background) var(--aerial-k-top), transparent) 0, color-mix(in srgb, var(--color-background) var(--aerial-k-band), transparent) 92px, transparent 190px),
    radial-gradient(140% 130% at 50% 30%, transparent 6%, var(--aerial-vignette) 88%),
    linear-gradient(180deg, color-mix(in srgb, var(--color-background) var(--aerial-k), transparent), var(--aerial-tint) 50%, color-mix(in srgb, var(--color-background) var(--aerial-k-end), transparent)),
    var(--aerial-img, none),
    linear-gradient(160deg, var(--ground), var(--ground-2));
  background-repeat: no-repeat;
  background-position: top center, center, center, center, center;
  background-size: 100% 220px, cover, cover, cover, cover;
  background-blend-mode: normal, normal, normal, luminosity, normal;
}

/* See-through menu bar + glassy pills over the photo (owner: "the map must stay visible behind them").
 * Driven ONLY through the --glass-strong token, and ONLY when the person has not asked for reduced
 * transparency — under reduced transparency site.css's own rule sets --glass-strong to the solid
 * colour and wins, so the bar goes opaque exactly as before. The nav's bar carries no small body text
 * (the links are a legible size and the bar's blur softens the photo), so it stays readable at .20. */
@media (prefers-reduced-transparency: no-preference) {
  :root {
    --glass-strong: color-mix(in srgb, var(--color-surface-solid) 20%, transparent);
  }
}

/* ----------------------------------------------------------------- PDOK credit --- */
/* Required attribution for the PDOK aerial. Small, fixed, low corner; never over a call to action. */
.site-aerial-credit {
  position: fixed; right: 12px; bottom: 10px; z-index: 8; pointer-events: none;
  font-size: 12px; line-height: 15px; letter-spacing: .01em;
  color: var(--color-text);
  background: var(--aerial-credit-bg);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--color-border);
}
/* Reduced transparency (glass-aerial-design.contract.md §6): no photo behind the page. Replace the
 * aerial ground with a flat navy block so body text never sits on an untinted photo — the `background`
 * shorthand clears the image, tint, vignette and luminosity-blend layers of body::before. site.css
 * already turns the nav bar solid in this mode (--glass-strong: var(--solid)); the credit goes solid
 * too, matching it. This mirrors the shared src/styles/glass-aerial.css reduced-transparency rule. */
@media (prefers-reduced-transparency: reduce) {
  body::before { background: var(--aerial-navy); }
  .site-aerial-credit { background: var(--color-surface-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
