/* ============================================================
   ClearCodes: layout layer, November 2026.

   The same layout as brmostudio.nl (see studio.css there), on the fully
   dark page and with the tokens from this site's styles.css. To remove it:
   delete this file and its <link>, and restore the markup from git.
   ============================================================ */

:root {
  --gutter: clamp(20px, 2.4vw, 40px);
  --s-section: clamp(72px, 9vw, 144px);
  --s-display: clamp(3rem, 7.3vw, 7rem);
  --s-title: clamp(2.375rem, 5.6vw, 5.5rem);
  --s-title-sm: clamp(2rem, 3.6vw, 3.5rem);
  --s-split: minmax(0, 7fr) minmax(0, 4fr);
  --s-gap: 28px clamp(32px, 5vw, 96px);
  --s-line: rgba(255, 255, 255, 0.14);
  --header: 65px;
}

.wrap { max-width: none; padding-inline: var(--gutter); }
section { padding-block: var(--s-section); }

/* ---- Type ---- */
h1, h2 { font-weight: 500; color: var(--wit); text-wrap: balance; margin: 0; }
h1 { font-size: var(--s-display); line-height: 0.98; letter-spacing: -0.035em; }
h2 { font-size: var(--s-title); line-height: 1.02; letter-spacing: -0.03em; }
h3 { font-weight: 500; font-size: clamp(1.25rem, 1.7vw, 1.625rem); line-height: 1.15; letter-spacing: -0.015em; color: var(--wit); }
.lede { margin: 0; font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.5; max-width: 46ch; }
.note { margin: 14px 0 0; max-width: 46ch; }

/* The square from the wordmark as the full stop of a large heading. The real
   full stop stays in the text for screen readers, search and copying. */
.punt {
  display: inline-block;
  width: 0.15em; height: 0.15em;
  margin-left: 0.06em;
  overflow: hidden;
  color: transparent;
  background: var(--accent);
  line-height: 0;
  vertical-align: baseline;
}

/* ---- Buttons and header ---- */
.btn-solid:hover { background: #5CC1B2; }
.btn { min-height: 48px; justify-content: center; }
.s-link { color: var(--wit); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.s-link:hover { color: var(--accent); }
.site-header { background: rgba(16, 22, 28, 0.62); border-bottom-color: transparent; }

/* ---- Hero ---- */
.s-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end;
  margin-top: calc(var(--header) * -1);
  min-height: clamp(620px, 100svh, 1100px);
  padding: 0;
  background: var(--ink);
}
.s-hero__bg { position: absolute; inset: 0; z-index: -1; }
.s-hero__bg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.s-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(16, 22, 28, 0.5) 0, rgba(16, 22, 28, 0.1) 20%,
    rgba(16, 22, 28, 0.2) 38%, rgba(16, 22, 28, 0.78) 68%,
    rgba(16, 22, 28, 0.94) 100%);
}
.s-hero__inner {
  width: 100%;
  display: grid; grid-template-columns: var(--s-split); align-items: end; gap: 32px clamp(32px, 5vw, 96px);
  padding: 140px var(--gutter) clamp(32px, 4vw, 56px);
}
.s-hero__side p { margin: 0; font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.45; color: var(--wit); max-width: 44ch; }
.s-hero .btn-row { align-items: center; gap: 14px 24px; margin-top: 26px; }
@media (prefers-reduced-motion: no-preference) {
  .s-hero__bg img { animation: s-settle 1.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
}
@keyframes s-settle { from { transform: scale(1.06); } to { transform: none; } }

/* ---- Number strip ---- */
.s-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; background: var(--ink); border-bottom: 1px solid var(--s-line); }
.s-stat {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  min-height: clamp(300px, 29vw, 440px);
  margin: 0;
  padding: clamp(24px, 2.4vw, 36px) var(--gutter);
}
.s-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--accent); transform-origin: top; }
.s-stat::after { content: ""; position: absolute; left: 0; top: 0; width: 9px; height: 9px; background: var(--accent); }
.s-stat__num {
  display: block;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(3.25rem, 5.8vw, 5.5rem); line-height: 1; letter-spacing: -0.035em;
  color: var(--wit); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.s-stat__label { display: block; margin-top: 14px; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wit); }
.s-stat__desc { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--tekst-stil); max-width: 34ch; }
@media (prefers-reduced-motion: no-preference) {
  .s-stat::before { animation: s-draw 1.2s cubic-bezier(0.16, 1, 0.3, 1) both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
}
@keyframes s-draw { from { transform: scaleY(0); } to { transform: none; } }

/* ---- Section intro: heading left, text right ---- */
.s-intro, section > .wrap.s-grid {
  display: grid; grid-template-columns: var(--s-split); align-items: end; gap: var(--s-gap);
}
.s-grid > h2 { grid-column: 1; }
.s-grid > .lede, .s-grid > .s-side { grid-column: 2; }
.s-grid > .code, .s-grid > .cards, .s-grid > .facts { grid-column: 1 / -1; margin-top: clamp(24px, 4vw, 56px); }

/* ---- Project block ---- */
section.s-flush { padding-bottom: 0; }
.s-case { display: grid; grid-template-columns: var(--s-split); margin: clamp(48px, 6vw, 88px) 0 0; }
.s-case .coded__frame, .s-case .coded__frame img { border: 0; border-radius: 0; }
.s-case__panel { display: flex; flex-direction: column; padding: clamp(24px, 2.6vw, 40px) var(--gutter); background: var(--ink-raised); }
.s-case .coded__legend { display: block; margin: 0; }
.s-case .coded__item { grid-template-columns: 30px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid var(--s-line); }
.s-case .coded__item:first-child { border-top: 0; padding-top: 0; }
.s-case .coded__naam { font-size: 1.0625rem; font-weight: 500; }
.s-case .coded__codes { margin-top: 4px; font-size: 0.8125rem; }
.s-case__caption { margin: auto 0 0; padding-top: 18px; border-top: 1px solid var(--s-line); font-size: 0.875rem; color: var(--tekst-stil); }
.s-case .coded__item:hover .coded__n { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.s-case:has(.coded__item:nth-child(1):hover) .coded__dot:nth-of-type(1),
.s-case:has(.coded__item:nth-child(2):hover) .coded__dot:nth-of-type(2),
.s-case:has(.coded__item:nth-child(3):hover) .coded__dot:nth-of-type(3),
.s-case:has(.coded__item:nth-child(4):hover) .coded__dot:nth-of-type(4) { background: var(--wit); }
.s-case:has(.coded__item:nth-child(1):hover) .coded__dot:nth-of-type(1) .coded__tip,
.s-case:has(.coded__item:nth-child(2):hover) .coded__dot:nth-of-type(2) .coded__tip,
.s-case:has(.coded__item:nth-child(3):hover) .coded__dot:nth-of-type(3) .coded__tip,
.s-case:has(.coded__item:nth-child(4):hover) .coded__dot:nth-of-type(4) .coded__tip { opacity: 1; visibility: visible; }

/* ---- Columns between hairlines instead of cards ---- */
.cards { gap: 0; border-top: 1px solid var(--s-line); border-bottom: 1px solid var(--s-line); }
.card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  background: transparent; border: 0; border-left: 1px solid var(--s-line); border-radius: 0;
  padding: clamp(20px, 2vw, 32px);
  min-height: clamp(200px, 19vw, 300px);
}
.card:first-child { border-left: 0; padding-left: 0; }
.card h3 { margin: 0; }
.card p { font-size: 1rem; line-height: 1.45; color: var(--tekst-stil); }

/* ---- The figure ---- */
.stat { grid-template-columns: var(--s-split); align-items: end; }
.stat-getal { font-size: clamp(7rem, 25vw, 24rem); font-weight: 500; line-height: 0.8; letter-spacing: -0.05em; }
.stat h2 { font-size: var(--s-title-sm); line-height: 1.06; letter-spacing: -0.025em; margin-bottom: 18px; }
@media (min-width: 54rem) { .stat { grid-template-columns: var(--s-split); } }

/* ---- Facts ---- */
.facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--s-line); }
.facts > div { padding: 22px clamp(18px, 2vw, 32px); border-left: 1px solid var(--s-line); }
.facts > div:first-child { border-left: 0; padding-left: 0; }
.facts dd { line-height: 1.45; color: var(--tekst-stil); font-size: 1rem; }
.facts dd b { margin-bottom: 8px; font-weight: 500; font-size: clamp(1.25rem, 1.7vw, 1.625rem); line-height: 1.15; letter-spacing: -0.015em; }

/* ---- Closing split ---- */
.split { gap: clamp(40px, 6vw, 112px); }
.split h2 { font-size: var(--s-title-sm); line-height: 1.06; letter-spacing: -0.025em; margin-bottom: 18px; }
.split-fig { margin: 0; }
.split-fig img { border: 0; }

/* ---- Footer ---- */
.footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }

/* ---- Smaller screens ---- */
@media (max-width: 1100px) {
  .s-strip, .cards-4, .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s-stat { min-height: 300px; }
  .cards-4 .card:nth-child(3), .facts > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .cards-4 .card:nth-child(n+3), .facts > div:nth-child(n+3) { border-top: 1px solid var(--s-line); }
}
@media (max-width: 900px) {
  .s-hero__inner, .s-intro, section > .wrap.s-grid, .s-case, .stat, .stat-getal + div { grid-template-columns: minmax(0, 1fr); }
  .s-grid > .lede, .s-grid > .s-side, .s-grid > h2 { grid-column: 1; }
  .cards-3 { grid-template-columns: minmax(0, 1fr); }
  .cards-3 .card { border-left: 0; padding-left: 0; min-height: 0; }
  .cards-3 .card + .card { border-top: 1px solid var(--s-line); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .coded__tip { display: none; }
  .s-strip, .cards-4, .facts { grid-template-columns: minmax(0, 1fr); }
  .s-stat { min-height: 0; gap: 22px; padding-top: 28px; padding-bottom: 28px; border-top: 1px solid var(--s-line); }
  .s-stat:first-child { border-top: 0; }
  .card, .cards-4 .card:nth-child(n) { min-height: 0; gap: 12px; border-left: 0; padding-left: 0; padding-right: 0; }
  .card + .card { border-top: 1px solid var(--s-line); }
  .facts > div, .facts > div:nth-child(n) { border-left: 0; padding-left: 0; padding-right: 0; }
  .facts > div + div { border-top: 1px solid var(--s-line); }
  .s-hero .btn-row .btn { width: 100%; }
}

/* ---- 404 ---- */
.hero .wrap { display: grid; gap: 22px; justify-items: start; }
