/* Ray-Media: basis en gedeelde bouwstenen voor alle drie de omgevingen
 * (Publieke site, Klantportaal en Studio-backoffice).
 * Regelnummers verwijzen naar Shipshape (CK-...). */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--demo-h) + 72px);
  overflow-x: clip;
  accent-color: var(--steun);
  caret-color: var(--steun);
  scrollbar-color: var(--vlak-3) transparent;
}

html:has(dialog[open]:modal) {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--papier);
  color: var(--inkt);
  font-family: var(--f-tekst);
  font-size: var(--t-16);
  line-height: 1.55;
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Hallmark Gate 38a & 51: nooit cursieve koppen; veilig afbreken op smalle schermen. */
h1,
h2,
h3,
h4 {
  font-style: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-color: var(--steun);
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--steun-zacht);
  color: var(--inkt);
}

/* Focusring: verschijnt direct zonder animatie op minstens 3:1 (CK-CMP-46). */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

[tabindex="-1"]:focus {
  outline: none;
  box-shadow: none;
}

.sr {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.overslaan {
  position: fixed;
  left: 12px;
  top: -120px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--hoek);
  background: var(--inkt);
  color: var(--papier);
  font-weight: 600;
  text-decoration: none;
}

.overslaan:focus {
  top: calc(var(--demo-h) + 8px);
}

/* --- getekende iconenset (24-raster, lijn 1.75; CK-AI-01, CK-CMP-11) --- */
.ic {
  flex: none;
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ic--k {
  width: 1em;
  height: 1em;
}

.ic--g {
  width: 1.5em;
  height: 1.5em;
}

/* --- woordmerk (.merk) --- */
.merk {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--inkt);
  min-height: 40px;
}

.merk__teken {
  width: 30px;
  height: 30px;
  flex: none;
}

.merk__tekst {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.merk__naam {
  font-family: var(--f-display);
  font-size: var(--t-21);
  font-weight: 680;
  font-variation-settings: "wdth" 115;
  letter-spacing: -0.01em;
}

.merk__sub {
  font-size: var(--t-12);
  font-weight: 600;
  color: var(--inkt-2);
  margin-top: 2px;
}

/* --- knoppen (8 staten: default, hover, focus, active, disabled, loading, error, success; CK-CMP-12) --- */
.knop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--lijn-sterk);
  border-radius: var(--hoek);
  background: var(--vlak);
  color: var(--inkt);
  font-size: var(--t-14);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--snel) var(--zacht), border-color var(--snel) var(--zacht), color var(--snel) var(--zacht), transform var(--snel) var(--zacht);
}

@media (hover: hover) {
  .knop:hover:not(:disabled) {
    background: var(--vlak-2);
    border-color: var(--inkt-3);
  }
}

.knop:active:not(:disabled) {
  transform: translateY(1px);
}

.knop--hoofd {
  background: var(--steun);
  border-color: transparent;
  color: var(--op-kleur);
}

@media (hover: hover) {
  .knop--hoofd:hover:not(:disabled) {
    background: var(--steun-hover);
    border-color: transparent;
  }
}

.knop--inkt {
  background: var(--inkt);
  border-color: transparent;
  color: var(--papier);
}

@media (hover: hover) {
  .knop--inkt:hover:not(:disabled) {
    background: var(--inkt-60);
    border-color: transparent;
  }
}

.knop--stil {
  background: transparent;
  border-color: transparent;
  color: var(--inkt-2);
}

@media (hover: hover) {
  .knop--stil:hover:not(:disabled) {
    background: color-mix(in srgb, var(--inkt) 7%, transparent);
    border-color: transparent;
    color: var(--inkt);
  }
}

.knop--gevaar {
  color: var(--rood);
  border-color: color-mix(in srgb, var(--rood) 45%, transparent);
}

@media (hover: hover) {
  .knop--gevaar:hover:not(:disabled) {
    background: var(--rood-zacht);
    border-color: var(--rood);
  }
}

.knop--gevaar-vol {
  background: var(--rood);
  border-color: transparent;
  color: var(--op-kleur);
}

@media (hover: hover) {
  .knop--gevaar-vol:hover:not(:disabled) {
    background: var(--rood-hover);
    border-color: transparent;
  }
}

.knop--groot {
  min-height: 46px;
  padding: 11px 22px;
  font-size: var(--t-15);
}

.knop--klein {
  min-height: 32px;
  padding: 5px 11px;
  font-size: var(--t-13);
}

.knop--icoon {
  width: 40px;
  padding: 0;
}

.knop:disabled,
.knop[aria-disabled="true"] {
  opacity: 0.48;
  cursor: not-allowed;
}

.knop[aria-busy="true"],
.knop[data-state="loading"] {
  cursor: progress;
  opacity: 0.82;
}

.knop[data-state="error"] {
  background: var(--rood-zacht);
  color: var(--rood);
  border-color: var(--rood);
}

.knop[data-state="success"] {
  background: var(--groen-zacht);
  color: var(--groen);
  border-color: var(--groen);
}

@media (pointer: coarse) {
  .knop {
    min-height: 44px;
  }
  .knop--klein {
    min-height: 38px;
  }
}

/* --- formuliervelden (.veld, .invoer, .keuze, .tekstvak; CK-CMP-10, CK-UX-05) --- */
.veld {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.veld__label {
  font-size: var(--t-14);
  font-weight: 600;
  color: var(--inkt);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.veld__opt {
  font-size: var(--t-12);
  font-weight: 400;
  color: var(--inkt-2);
}

.veld__hulp {
  font-size: var(--t-13);
  color: var(--inkt-2);
  line-height: 1.4;
}

.veld__fout {
  font-size: var(--t-13);
  font-weight: 600;
  color: var(--rood);
  display: flex;
  align-items: center;
  gap: 6px;
}

.invoer,
.keuze,
.tekstvak {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--lijn-sterk);
  border-radius: var(--hoek);
  background: var(--vlak);
  color: var(--inkt);
  font-size: var(--t-15);
  line-height: 1.4;
  transition: border-color var(--snel) var(--zacht);
}

.invoer:hover:not(:disabled),
.keuze:hover:not(:disabled),
.tekstvak:hover:not(:disabled) {
  border-color: var(--inkt-3);
}

.invoer:focus,
.keuze:focus,
.tekstvak:focus {
  border-color: var(--focus);
}

.invoer[aria-invalid="true"],
.keuze[aria-invalid="true"],
.tekstvak[aria-invalid="true"] {
  border-color: var(--rood);
  background: color-mix(in srgb, var(--rood-zacht) 35%, var(--vlak));
}

.tekstvak {
  min-height: 104px;
  resize: vertical;
}

.keuze {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

@media (pointer: coarse) {
  .invoer,
  .keuze {
    min-height: 44px;
  }
}

.foutvak {
  padding: 14px 18px;
  border: 1px solid var(--rood);
  border-radius: var(--hoek-paneel);
  background: var(--rood-zacht);
  color: var(--inkt);
  display: grid;
  gap: 8px;
}

.foutvak h3 {
  font-size: var(--t-15);
  color: var(--rood);
  display: flex;
  align-items: center;
  gap: 8px;
}

.foutvak ul {
  padding-left: 20px;
  font-size: var(--t-14);
}

/* --- chips & statuslabels (CK-DSH-02) --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--vlak-2);
  color: var(--inkt);
  font-size: var(--t-12);
  font-weight: 600;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.chip--kaal::before {
  display: none;
}

.chip--inkt {
  background: var(--inkt);
  color: var(--papier);
}

.chip--amber {
  background: var(--amber-zacht);
  color: var(--amber);
}

.chip--leisteen {
  background: var(--leisteen-zacht);
  color: var(--leisteen);
}

.chip--goud {
  background: var(--goud-zacht);
  color: var(--goud);
}

.chip--groen {
  background: var(--groen-zacht);
  color: var(--groen);
}

.chip--rood {
  background: var(--rood-zacht);
  color: var(--rood);
}

.chip--demo {
  background: var(--vlak-2);
  color: var(--inkt-2);
  box-shadow: inset 0 0 0 1px var(--lijn-sterk);
}

.chip--demo::before {
  background: var(--amber);
}

/* --- handtekenelementen: snijtekens (.snij), obi-beeldstrook (.obi) en fotoplaat (.plaat) --- */
.snij {
  position: relative;
}

.snij::before,
.snij::after {
  content: "";
  position: absolute;
  inset: -8px;
  pointer-events: none;
  border: 0;
  background:
    linear-gradient(var(--inkt-3), var(--inkt-3)) left top / 10px 1px no-repeat,
    linear-gradient(var(--inkt-3), var(--inkt-3)) left top / 1px 10px no-repeat,
    linear-gradient(var(--inkt-3), var(--inkt-3)) right top / 10px 1px no-repeat,
    linear-gradient(var(--inkt-3), var(--inkt-3)) right top / 1px 10px no-repeat,
    linear-gradient(var(--inkt-3), var(--inkt-3)) left bottom / 10px 1px no-repeat,
    linear-gradient(var(--inkt-3), var(--inkt-3)) left bottom / 1px 10px no-repeat,
    linear-gradient(var(--inkt-3), var(--inkt-3)) right bottom / 10px 1px no-repeat,
    linear-gradient(var(--inkt-3), var(--inkt-3)) right bottom / 1px 10px no-repeat;
}

.plaat {
  display: flex;
  flex-direction: column;
  background: var(--vlak);
  border: 1px solid var(--lijn);
  border-radius: var(--hoek-plaat);
  overflow: hidden;
  min-width: 0;
  text-decoration: none;
  transition: border-color var(--snel) var(--zacht), transform var(--snel) var(--zacht);
}

@media (hover: hover) {
  a.plaat:hover {
    border-color: var(--steun);
    transform: translateY(-2px);
  }
}

.plaat__kader {
  position: relative;
  overflow: hidden;
  background: var(--lichtbak);
  aspect-ratio: 3 / 2;
}

.plaat__kader img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--midden) var(--zacht);
}

@media (hover: hover) {
  a.plaat:hover .plaat__kader img {
    transform: scale(1.02);
  }
}

/* De gedrukte obi-beeldstrook (uit Shibuya Boutique Sleeve challenger):
 * technische opname- en ceremoniegegevens onder het beeld, nooit als tekst-brij over gezichten. */
.obi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 7px 12px;
  background: var(--vlak-2);
  border-top: 1px solid var(--lijn);
  font-family: var(--f-display);
  font-size: var(--t-12);
  font-weight: 600;
  font-variation-settings: "wdth" 88;
  font-variant-numeric: tabular-nums;
  color: var(--inkt-2);
}

.obi__code {
  color: var(--inkt);
  font-weight: 700;
}

.obi--donker {
  background: var(--lichtbak-2);
  border-top-color: rgb(255 255 255 / 0.12);
  color: var(--lichtbak-gedempt);
}

.obi--donker .obi__code {
  color: var(--lichtbak-tekst);
}

/* --- werkpanelen (.paneel) en tabellen (.tabel; CK-DSH-07, CK-LAY-01) --- */
.paneel {
  background: var(--vlak);
  border: 1px solid var(--lijn);
  border-radius: var(--hoek-paneel);
  min-width: 0;
}

.paneel__kop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--lijn);
}

.paneel__titel {
  font-family: var(--f-display);
  font-size: var(--t-18);
  font-weight: 640;
  font-variation-settings: "wdth" 106;
  line-height: 1.25;
}

.paneel__lijf {
  padding: 16px 18px;
}

.tabel-wikkel {
  width: 100%;
  overflow-x: auto;
}

.tabel {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-14);
}

.tabel th,
.tabel td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--lijn);
  vertical-align: middle;
}

.tabel th {
  font-size: var(--t-12);
  font-weight: 600;
  color: var(--inkt-2);
  background: var(--vlak-2);
  white-space: nowrap;
}

.tabel tr:last-child td {
  border-bottom: 0;
}

@media (hover: hover) {
  .tabel tbody tr:hover {
    background: color-mix(in srgb, var(--inkt) 3%, transparent);
  }
}

.getal {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --- segmentknoppen (.segment) en tabs (.tabs; CK-NAV-11) --- */
.segment {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: var(--vlak-2);
  border-radius: var(--hoek);
}

.segment button,
.segment label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 11px;
  border: 0;
  border-radius: calc(var(--hoek) - 2px);
  background: transparent;
  color: var(--inkt-2);
  font-size: var(--t-13);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.segment button[aria-pressed="true"],
.segment label:has(input:checked) {
  background: var(--vlak);
  color: var(--inkt);
  box-shadow: inset 0 0 0 1px var(--lijn);
}

.segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  border-bottom: 1px solid var(--lijn);
}

.tabs__knop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: var(--inkt-2);
  font-size: var(--t-14);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
}

.tabs__knop[aria-selected="true"],
.tabs__knop.is-actief {
  color: var(--inkt);
  box-shadow: inset 0 -2px 0 var(--steun);
}

/* --- lege, fout-, laad- en rechtenstaten (CK-UX-03, CK-UX-09) --- */
.staat {
  padding: var(--r-8) var(--r-5);
  text-align: center;
  max-width: 34rem;
  margin-inline: auto;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.staat__ic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--vlak-2);
  color: var(--inkt-2);
  display: grid;
  place-items: center;
}

.staat--fout .staat__ic {
  background: var(--rood-zacht);
  color: var(--rood);
}

.staat--slot .staat__ic {
  background: var(--goud-zacht);
  color: var(--goud);
}

.staat h3 {
  font-family: var(--f-display);
  font-size: var(--t-18);
  font-weight: 650;
}

.staat p {
  font-size: var(--t-14);
  color: var(--inkt-2);
}

.skelet {
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--vlak-2) 25%, var(--vlak-3) 50%, var(--vlak-2) 75%);
  background-size: 200% 100%;
  animation: glans 1.1s infinite;
}

@keyframes glans {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* --- melding / toast (.melding; CK-CMP-06) en dialoog (.dlg; CK-CMP-26) --- */
.meldingen {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(26rem, calc(100vw - 32px));
}

.melding {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--hoek);
  background: var(--inkt);
  color: var(--papier);
  font-size: var(--t-14);
  font-weight: 500;
  box-shadow: var(--schaduw-pop);
}

dialog.dlg {
  width: min(36rem, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--hoek);
  background: var(--vlak);
  color: var(--inkt);
  box-shadow: var(--schaduw-pop);
}

dialog.dlg::backdrop {
  background: var(--scrim);
}

.dlg__kop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--lijn);
}

.dlg__kop h2 {
  font-family: var(--f-display);
  font-size: var(--t-18);
  font-weight: 650;
}

.dlg__lijf {
  padding: 18px 20px;
  display: grid;
  gap: 14px;
}

.dlg__voet {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--lijn);
  background: var(--vlak-2);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
