/*
Theme Name: Lars Curfs
Theme URI: https://larscurfs.nl
Author: Lars Curfs
Description: Persoonlijk one-page thema. Compact redactioneel raster met het sectielabel in de linkerkolom, zware koppen die van contour naar gevuld gaan en beeld dat de pagina draagt.
Version: 4.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: larscurfs
*/

/* ============================================================
   1. Tokens
   ============================================================ */

:root {
  --paper:        #edebe6;
  --ink:          #12151a;
  --ink-soft:     #4a4f57;
  --rule:         #c6c2b9;
  --on-dark:      #e7e4de;
  --on-dark-soft: #9aa0a8;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 72rem;
  --labelcol: 8.5rem;
  --ease: cubic-bezier(0.16, 0.84, 0.24, 1);
  --head-h: 4rem;
}

/* ============================================================
   2. Basis
   ============================================================ */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
figure { margin: 0; }
p { margin: 0; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  z-index: 99;
}
.skip:focus { left: 0; }

.label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero .label { color: var(--on-dark-soft); }

/* ============================================================
   3. Koppen en de vulanimatie
   ============================================================ */

.display {
  font-weight: 900;
  font-variation-settings: "wdth" 112, "wght" 900;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.88;
  margin: 0;
}

.display--xl { font-size: clamp(2.5rem, 11vw, 8rem); }
.display--l  { font-size: clamp(1.625rem, 4.5vw, 3rem); }
.display--m  { font-size: clamp(1.125rem, 2.2vw, 1.5rem); line-height: 1.02; }

/* Kop staat eerst in contour en wordt daarna gevuld, zoals een kaal
   oppervlak dat gewrapt wordt. */
.fill { position: relative; display: inline-block; isolation: isolate; }

.fill__outline {
  color: transparent;
  -webkit-text-stroke-width: clamp(1px, 0.18vw, 2px);
  -webkit-text-stroke-color: currentColor;
}
.fill__solid {
  position: absolute;
  inset: 0;
  color: currentColor;
  pointer-events: none;
}
.js .fill__solid { clip-path: inset(0 100% 0 0); }
.fill.is-filled .fill__solid { animation: fill-in 1000ms var(--ease) forwards; }

.fill__blade {
  position: absolute;
  top: -0.04em;
  bottom: -0.04em;
  left: 0;
  width: 2px;
  background: currentColor;
  transform: scaleY(0);
  opacity: 0;
  pointer-events: none;
}
.fill.is-filled .fill__blade { animation: blade 1000ms var(--ease) forwards; }

@keyframes fill-in {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes blade {
  0%   { left: 0;    transform: scaleY(0); opacity: 0; }
  10%  { left: 0;    transform: scaleY(1); opacity: 1; }
  90%  { left: 100%; transform: scaleY(1); opacity: 1; }
  100% { left: 100%; transform: scaleY(1); opacity: 0; }
}

@supports not (-webkit-text-stroke-width: 1px) {
  .fill__outline { color: currentColor; }
  .fill__solid, .fill__blade { display: none; }
}

/* ============================================================
   4. Header, ligt over de hero
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  color: var(--on-dark);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.site-header.is-stuck {
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--head-h);
}

.brand {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav-link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  opacity: 0.75;
  transition: opacity 0.25s ease;
}
.nav-link:hover { opacity: 1; }

/* ============================================================
   5. Hero
   ============================================================ */

.hero {
  position: relative;
  min-height: min(100svh, 46rem);
  margin-top: calc(var(--head-h) * -1);
  display: flex;
  align-items: flex-end;
  background: var(--ink);
  color: var(--on-dark);
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.12) translate3d(-1%, -1.5%, 0); }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(18, 21, 26, 0.6) 0%,
    rgba(18, 21, 26, 0.18) 36%,
    rgba(18, 21, 26, 0.88) 100%
  );
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: calc(var(--head-h) + 1.5rem) clamp(1.75rem, 4vh, 2.75rem);
}

.hero__label { margin-bottom: 0.75rem; }

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
  padding-top: 1rem;
  border-top: 1px solid rgba(231, 228, 222, 0.28);
}

.hero__intro {
  font-size: clamp(0.9375rem, 0.9rem + 0.3vw, 1.125rem);
  line-height: 1.4;
  max-width: 38ch;
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  text-decoration: none;
}
.hero__scroll::after {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  animation: pull 2.4s var(--ease) infinite;
}
@keyframes pull {
  0%, 100% { transform: scaleX(0.35); opacity: 0.5; }
  50%      { transform: scaleX(1);    opacity: 1; }
}

/* ============================================================
   6. Blokraster: label links, inhoud rechts
   ============================================================ */

.block {
  display: grid;
  grid-template-columns: var(--labelcol) minmax(0, 1fr);
  gap: 0 clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
  border-top: 1px solid var(--rule);
}
.block:first-of-type { border-top: 0; padding-top: clamp(2rem, 4vw, 3rem); }
.block__label { padding-top: 0.3rem; }

/* Even voorstellen: tekst naast de portretfoto */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 15rem);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
.about__text { max-width: 52ch; }
.about__text p + p { margin-top: 0.75rem; }
.about__lead {
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.375rem);
  line-height: 1.35;
  margin-bottom: 1rem;
}
.about__portrait { overflow: hidden; }
.about__portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* Werkplaats: foto naast tekst */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}
.split--flip .split__media { order: 2; }
.split__media { overflow: hidden; }
.split__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 1.6s var(--ease);
}
.split__media.is-in img { transform: scale(1); }
.split__text { max-width: 38ch; }
.split__title { margin-bottom: 0.75rem; }
.split__caption {
  margin-top: 0.875rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* Twee korte blokken naast elkaar */
.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.duo__title { margin-bottom: 0.75rem; }
.duo p { max-width: 32ch; }

.creed { max-width: 46ch; }

/* ============================================================
   7. Contact
   ============================================================ */

.contact__lead { max-width: 34ch; margin-bottom: clamp(1rem, 2.5vw, 1.5rem); }

.contact__big { display: inline-block; text-decoration: none; word-break: break-word; }

.contact__mail { margin-top: clamp(1rem, 2.5vw, 1.5rem); }
.contact__mail a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  white-space: nowrap;
}
.contact__mail a:hover { text-decoration-thickness: 2px; }

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.contact__links a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 3px;
  transition: border-color 0.25s ease;
}
.contact__links a:hover { border-bottom-color: var(--ink); }

.site-footer {
  padding-block: 1.25rem 1.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

/* ============================================================
   8. Scroll-reveal
   ============================================================ */

/* Alleen verbergen wanneer JavaScript draait. Zonder JS staat alles
   gewoon in beeld, in plaats van onzichtbaar te blijven wachten. */
.js .reveal {
  clip-path: inset(0 100% 0 0);
  opacity: 0.001;
  transition:
    clip-path 0.8s var(--ease) var(--delay, 0ms),
    opacity 0.3s ease var(--delay, 0ms);
}
.js .reveal.is-in { clip-path: inset(0 0 0 0); opacity: 1; }

.js .rise {
  transform: translateY(10px);
  opacity: 0.001;
  transition:
    transform 0.65s var(--ease) var(--delay, 0ms),
    opacity 0.5s ease var(--delay, 0ms);
}
.js .rise.is-in { transform: none; opacity: 1; }

/* ============================================================
   9. Losse pagina's
   ============================================================ */

.prose { max-width: 62ch; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.prose h1 {
  font-weight: 900;
  font-variation-settings: "wdth" 112, "wght" 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: clamp(1.625rem, 4.5vw, 2.75rem);
  line-height: 0.95;
  margin: 0 0 1.25rem;
}
.prose h2 { font-weight: 800; text-transform: uppercase; font-size: 1.125rem; margin-top: 2rem; }
.prose p { margin-bottom: 1rem; }
.prose a { text-underline-offset: 3px; }

/* ============================================================
   10. Toegankelijkheid en kleine schermen
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal, .js .rise { clip-path: none; opacity: 1; transform: none; }
  .js .fill__solid { clip-path: inset(0 0 0 0); }
  .fill__blade { display: none; }
  .hero__media img { animation: none; transform: none; }
}

@media (max-width: 56rem) {
  .about { grid-template-columns: minmax(0, 1fr) minmax(0, 11rem); }
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .split__text { max-width: none; }
}

@media (max-width: 40rem) {
  :root { --head-h: 3.5rem; }
  .block { grid-template-columns: 1fr; }
  .block__label { padding-top: 0; margin-bottom: 0.875rem; }
  .about { grid-template-columns: 1fr; }
  .about__portrait { max-width: 13rem; order: -1; }
}
