/* Landingspagina PID Analyzer. Het P&ID-blad is de held; de rest blijft rustig.
   Merkblauw uit de viewer (frontend/src/styles.css); markeerkleuren volgen het koppelrapport. */
:root {
  --papier: #f4f6f3;      /* tekenfilm */
  --blad: #fbfcfa;
  --inkt: #16212b;
  --grijs: #56636e;
  --lijn: #c7cfd1;
  --lijn-zacht: #dde3e2;
  --blauw: #0b5cad;
  --blauw-donker: #08478a;
  --blauw-zacht: #e2edf8;
  --ok: #1d7a46;
  --ok-zacht: #e3f1e8;
  --let: #b46a00;
  --let-zacht: #fdf0d9;
  --nee: #c23b22;
  --nee-zacht: #fbe6e1;

  --din: "DIN Alternate", "DIN Next", "Bahnschrift", "D-DIN", "Roboto Condensed", "Arial Narrow", sans-serif;
  --tekst: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --maat: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--inkt);
  font: 17px/1.6 var(--tekst);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--din); font-weight: 700; margin: 0; }
p { margin: 0; }
a { color: var(--blauw); }
:focus-visible { outline: 3px solid var(--blauw); outline-offset: 3px; border-radius: 4px; }

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

.overslaan { position: absolute; left: -9999px; top: 8px; background: var(--inkt); color: #fff; padding: 8px 14px; z-index: 10; }
.overslaan:focus { left: 8px; }

/* kop */
.kop { position: sticky; top: 0; z-index: 5; background: rgb(244 246 243 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--lijn-zacht); }
.kop-rij { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.merk { display: flex; align-items: center; gap: 11px; color: var(--inkt); text-decoration: none; font: 700 1.12rem var(--din); letter-spacing: .01em; }
.kop-link { font-weight: 600; text-decoration: none; padding: 7px 16px; border: 1.5px solid var(--inkt); border-radius: 999px; color: var(--inkt); }
.kop-link:hover { background: var(--inkt); color: #fff; }

/* knoppen */
.knop {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px;
  background: var(--blauw); color: #fff; text-decoration: none; font-weight: 600;
  border: 2px solid var(--blauw); border-radius: 6px;
}
.knop:hover { background: var(--blauw-donker); border-color: var(--blauw-donker); }
.knop-lijn { background: transparent; color: var(--inkt); border-color: var(--inkt); }
.knop-lijn:hover { background: var(--inkt); border-color: var(--inkt); color: #fff; }

/* held */
.held { padding: 72px 0 88px; }
.held-rij { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.held h1 { font-size: clamp(2.4rem, 4.2vw, 3.7rem); line-height: 1.04; letter-spacing: -.015em; max-width: 14ch; text-wrap: balance; }
.lead { margin-top: 26px; font-size: 1.16rem; color: var(--grijs); max-width: 34em; }
.knoppen { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hint { margin-top: 16px; font-size: .92rem; color: var(--grijs); }

/* het blad */
.blad { margin: 0; background: var(--blad); border: 1px solid var(--lijn); border-radius: 3px; box-shadow: 0 1px 0 var(--lijn-zacht), 0 24px 48px -28px rgb(22 33 43 / .35); }
.blad > svg { display: block; width: 100%; height: auto; }
.kader-buiten { fill: none; stroke: var(--inkt); stroke-width: 1.4; }
.kader { fill: none; stroke: var(--inkt); stroke-width: .8; }
.zone-streep { stroke: var(--inkt); stroke-width: .8; }
.zone text { font: 600 9px var(--din); fill: var(--grijs); text-anchor: middle; }
.leiding { fill: none; stroke: var(--inkt); stroke-width: 2.2; }
.pijl, .vul { fill: var(--inkt); }
.symbool { fill: var(--blad); stroke: var(--inkt); stroke-width: 1.8; stroke-linejoin: round; }
.dun { fill: none; stroke: var(--inkt); stroke-width: 1.4; }
.impuls { fill: none; stroke: var(--inkt); stroke-width: 1.1; stroke-dasharray: 5 3; }
.tagtekst text { font: 700 11px var(--din); fill: var(--inkt); text-anchor: middle; }
.tagtekst .groot { font-size: 15px; }
.tagtekst .klein { font-size: 9.5px; }
.tagtekst .links, .markering .links { text-anchor: start; }
.markering .rechts { text-anchor: end; }
.lijnnummer text { font: 600 9px var(--din); fill: var(--grijs); letter-spacing: .04em; }

.markering text { font: 700 11.5px var(--din); }
.markering.ok circle { fill: var(--ok); }
.markering.ok text { fill: var(--ok); }
.vinkje { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wolk { fill: none; stroke-width: 1.9; stroke-linejoin: round; }
.markering.let .wolk, .delta, .markering.let .leider { stroke: var(--let); }
.markering.let text { fill: var(--let); }
.delta { fill: var(--let-zacht); stroke-width: 1.5; stroke-linejoin: round; }
.markering .delta-tekst { font-size: 11px; text-anchor: middle; }
.markering.nee .wolk, .markering.nee .leider { stroke: var(--nee); }
.leider { fill: none; stroke-width: 1.2; }
.markering.nee text { fill: var(--nee); }

/* het enige bewegende moment: de beoordelaar zet zijn wolken */
@media (prefers-reduced-motion: no-preference) {
  .wolk { stroke-dasharray: 1; stroke-dashoffset: 1; animation: teken 1.1s cubic-bezier(.6, .1, .3, 1) forwards; }
  .markering.let .wolk { animation-delay: .5s; }
  .markering.nee .wolk { animation-delay: .9s; }
  .markering.let text, .markering.nee text, .delta, .leider { opacity: 0; animation: verschijn .4s ease-out forwards; }
  .markering.let text, .delta { animation-delay: 1.4s; }
  .markering.nee text, .leider { animation-delay: 1.8s; }
}
@keyframes teken { to { stroke-dashoffset: 0; } }
@keyframes verschijn { to { opacity: 1; } }

.blad-voet { display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--inkt); font-size: .86rem; }
.legenda { list-style: none; margin: 0; padding: 14px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; align-content: center; color: var(--grijs); }
.legenda li { display: flex; align-items: center; gap: 8px; }
.legenda svg { width: 30px; height: 20px; flex: none; }
.l-ok { fill: var(--ok); }
.l-vink { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.l-let, .l-nee { fill: none; stroke-width: 2.2; }
.l-let { stroke: var(--let); }
.l-nee { stroke: var(--nee); }
.l-mist { fill: none; stroke: var(--grijs); stroke-width: 1.8; stroke-dasharray: 4 3; }

.titelhoek { margin: 0; display: grid; grid-template-columns: auto auto; border-left: 1px solid var(--inkt); font-family: var(--din); }
.titelhoek div { padding: 7px 14px; border-bottom: 1px solid var(--lijn); }
.titelhoek div:nth-child(odd) { border-right: 1px solid var(--lijn); }
.titelhoek div:nth-last-child(-n+2) { border-bottom: 0; }
.titelhoek dt { font-size: .7rem; color: var(--grijs); letter-spacing: .03em; }
.titelhoek dd { margin: 0; font-weight: 700; font-size: .92rem; white-space: nowrap; }

/* werkwijze: stations op een leiding */
.werkwijze { padding: 96px 0; background: var(--blad); border-top: 1px solid var(--lijn-zacht); border-bottom: 1px solid var(--lijn-zacht); }
.werkwijze h2, .uitvoer h2, .inloggen h2 { font-size: clamp(1.8rem, 2.8vw, 2.4rem); line-height: 1.1; letter-spacing: -.01em; }
.stroom { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; position: relative; }
.stroom::before { content: ""; position: absolute; left: 0; right: 14px; top: 23px; border-top: 2.5px solid var(--inkt); }
.stroom::after { content: ""; position: absolute; right: 0; top: 17px; border-left: 15px solid var(--inkt); border-top: 7.5px solid transparent; border-bottom: 7.5px solid transparent; }
.stroom li { position: relative; }
.station {
  position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 50%; background: var(--blad); border: 2.5px solid var(--inkt);
  font: 700 1.25rem var(--din);
}
.stroom h3 { margin-top: 22px; font-size: 1.3rem; }
.stroom p { margin-top: 8px; color: var(--grijs); max-width: 30ch; }

/* uitvoer */
.uitvoer { padding: 104px 0; }
.uitvoer-rij { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.uitvoer-tekst p { margin-top: 18px; color: var(--grijs); max-width: 30em; }
.werklijst { margin: 0; overflow-x: auto; }
.werklijst table { width: 100%; border-collapse: collapse; background: var(--blad); border: 1px solid var(--lijn); font-size: .95rem; }
.werklijst caption { text-align: left; font: 600 .85rem var(--din); color: var(--grijs); padding-bottom: 10px; }
.werklijst th { text-align: left; font: 700 .8rem var(--din); color: var(--grijs); letter-spacing: .03em; padding: 12px 16px; border-bottom: 1.5px solid var(--inkt); }
.werklijst td { padding: 13px 16px; border-bottom: 1px solid var(--lijn-zacht); }
.werklijst tr:last-child td { border-bottom: 0; }
.werklijst td:first-child { font: 700 1rem var(--din); white-space: nowrap; }
.st { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.st::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.st.ok { color: var(--ok); }
.st.let { color: var(--let); }
.st.nee { color: var(--nee); }

/* inloggen */
.inloggen { padding: 96px 0 112px; background: var(--inkt); color: #eef2f4; }
.inloggen h2 { color: #fff; }
.inloggen-uitleg { margin-top: 14px; color: #a9b5be; max-width: 38em; }
.ingangen { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-top: 44px; background: #2b3946; border: 2px solid #2b3946; border-radius: 6px; overflow: hidden; }
.ingang { background: var(--inkt); padding: 36px; display: flex; flex-direction: column; align-items: flex-start; }
.ingang h3 { font-size: 1.6rem; color: #fff; }
.ingang p { margin: 12px 0 28px; color: #b8c3cb; flex: 1; max-width: 32em; }
.inloggen .knop:hover { background: #2a77c6; border-color: #2a77c6; }
.inloggen .knop-lijn { color: #fff; border-color: #fff; }
.inloggen .knop-lijn:hover { background: #fff; color: var(--inkt); border-color: #fff; }
.inloggen :focus-visible { outline-color: #8cc0f5; }

.voet { padding: 28px 0; background: var(--inkt); color: #8796a2; font-size: .9rem; border-top: 1px solid #2b3946; }

/* smaller */
@media (max-width: 980px) {
  .held { padding: 48px 0 64px; }
  .held-rij, .uitvoer-rij { grid-template-columns: 1fr; gap: 40px; }
  .held h1 { max-width: 14ch; }
  .stroom { grid-template-columns: 1fr 1fr; row-gap: 44px; }
  .stroom::before, .stroom::after { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .maat { padding: 0 20px; }
  .blad-voet { grid-template-columns: 1fr; }
  .legenda { grid-template-columns: 1fr; }
  .titelhoek { border-left: 0; border-top: 1px solid var(--inkt); }
  .stroom { grid-template-columns: 1fr; padding-left: 0; }
  .stroom li { display: grid; grid-template-columns: 48px 1fr; column-gap: 18px; }
  .stroom h3 { margin-top: 10px; }
  .stroom p { grid-column: 2; }
  .ingangen { grid-template-columns: 1fr; }
  .ingang { padding: 28px; }
}
