/* =========================
   RESET
   ========================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* =========================
   THEME TOKENS
   ========================= */
:root{
  --paper: #f6f6f1;
  --paper-2: #f1efe8;
  --ink: #121212;
  --ink-soft: rgba(18,18,18,.72);

  --blue-pen: #1f6feb;

  --tape: #0f0f10;
  --tape-text: #f6f6f1;

  --line: rgba(18,18,18,.14);
  --shadow: 0 18px 40px rgba(0,0,0,.10);
}

/* =========================
   BASE
   ========================= */
html, body{
  width: 100%;
  height: 100%;
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-y: auto;
  color: var(--ink);

  /* paper feel */
  background:
    radial-gradient(1200px 900px at 20% 10%, rgba(0,0,0,.035), transparent 60%),
    radial-gradient(900px 700px at 80% 20%, rgba(0,0,0,.025), transparent 55%),
    linear-gradient(180deg, var(--paper), var(--paper-2));
}

body{
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

h1, h2, h3{ letter-spacing: -0.01em; }

/* =========================
   HEADER & NAV
   ========================= */
header, .site-header{
  position: sticky;
  top: 0;
  height: 64px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

  background: rgba(246, 246, 241, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(18,18,18,.08);

  z-index: 9999;
  transform: translateZ(0); /* keeps header clickable after back-navigation */
}

.nav-center{
  display: flex;
  gap: 40px;
}

.nav-center a,
nav a{
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: var(--blue-pen);
  font-weight: 500;
  opacity: 0.78;

  transition: opacity 0.2s ease;
}

.nav-center a:hover,
nav a:hover{ opacity: 1; }

.nav-center a[aria-current="page"],
nav a[aria-current="page"]{
  font-weight: 700;
  opacity: 1;
}

/* =========================
   MAIN
   ========================= */
main{
  width: 100%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* =========================
   HOME TITLE (fallback text title)
   ========================= */
.project-title{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(3.2rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-align: center;
  z-index: 10;
  pointer-events: none;
  color: var(--blue-pen);
}

/* =========================
   IMAGE TITLE – PAGE VARIANTS
   (used for SVG/PNG titles)
   ========================= */
#home .image-title{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}

#home .image-title img{
  display: block;
  max-width: min(680px, 90vw);
  width: 100%;
  height: auto;
  margin: 0 auto;
  user-select: none;
  transform: rotate(-1deg);
}

/* Upload / Verhalen titles share the same calmer layout */
.page-upload .image-title,
.page-verhalen .image-title{
  position: relative;
  margin: 40px auto 24px;
  transform: rotate(-0.5deg);
}

.page-upload .image-title img,
.page-verhalen .image-title img{
  max-width: min(520px, 90vw);
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.page-verhalen .image-title img{
  max-height: 5rem;
}

/* =========================
   HOME MOODBOARD LAYER
   ========================= */
.moodboard-layer{
  position: absolute;
  inset: 0;
  z-index: 1;
}

.moodboard{
  position: absolute;
  border-radius: 6px;
  overflow: hidden;
  opacity: 1;

  left: var(--x, 20px);
  transform: translateY(var(--py, 0px));
  will-change: transform;

  animation: floatUp linear infinite;
  animation-fill-mode: both;

  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.moodboard:hover{
  animation-play-state: paused;
  transform: scale(1.12) translateZ(0);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.15);
}

.moodboard:hover::after{
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(255,255,255,0.8);
  opacity: 0.3;
  border-radius: inherit;
  pointer-events: none;
}

.moodboard-img{ display: block; width: 100%; height: auto; }

.preview{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  color: #fff;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.moodboard:hover .preview{ opacity: 1; }

.preview .location{ font-size: 1.1rem; font-weight: 500; }
.preview .year{ font-size: 0.85rem; opacity: 0.8; }

.size-small  { width: 220px; animation-duration: 28s; }
.size-medium { width: 320px; animation-duration: 32s; }
.size-large  { width: 420px; animation-duration: 40s; }

@keyframes floatUp{
  0%   { transform: translateY(120vh); }
  100% { transform: translateY(-150%); }
}

/* Scroll hint */
.scroll-hint{
  position: absolute;
  bottom: 7%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.scroll-hint span{
  display: block;
  width: 24px;
  height: 36px;
  border: 2px solid rgb(0,0,0);
  border-radius: 12px;
  position: relative;
}

.scroll-hint span::after{
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 4px;
  background: rgb(0,0,0);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: scrollHint 1.5s infinite ease-in-out;
}

@keyframes scrollHint{
  0%   { opacity: 0; transform: translate(-50%, 0); }
  50%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 10px); }
}

/* =========================
   GENERIC PAGES
   ========================= */
.page .content{
  max-width: 1040px;
  margin: 0 auto;
  padding: 34px 20px 70px;
}

.page-intro h1{
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.page-intro p{
  opacity: 0.85;
  max-width: 60ch;
  color: var(--ink-soft);
}

/* =========================
   FORM ELEMENTS (shared)
   ========================= */
.field{
  width: 100%;
  max-width: 520px;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.80);
  outline: none;
}

.field:focus{ border-color: rgba(0,0,0,0.35); }

.label{
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  opacity: 0.9;
}

.check{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* =========================
   HANDMADE UTILITIES
   ========================= */
.pen{
  color: var(--blue-pen);
  font-family: ui-rounded, "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  letter-spacing: .01em;
}

.pen-underline{
  position: relative;
  display: inline-block;
}

.pen-underline::after{
  content:"";
  position:absolute;
  left:-2px; right:-2px;
  bottom:-6px;
  height: 10px;
  background: linear-gradient(90deg, rgba(31,111,235,.0), rgba(31,111,235,.35), rgba(31,111,235,.0));
  transform: rotate(-1deg);
  pointer-events:none;
}

/* “printed frame” container */
.frame{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(18,18,18,.10);
  box-shadow: var(--shadow);
}

.frame::before{
  content:"";
  position:absolute;
  inset: 10px;
  pointer-events:none;
  opacity:.55;
  
}

/* tape label */
.tape-label{
  position:absolute;
  left: 12px;
  bottom: 12px;
  background: var(--tape);
  color: var(--tape-text);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: .02em;
  transform: rotate(-1.2deg);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  max-width: calc(100% - 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tape-label span{
  font-family: ui-rounded, "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  letter-spacing: .02em;
  text-transform: none;
}

.tape-label::after{
  content:"";
  position:absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,.06),
    rgba(255,255,255,.06) 2px,
    rgba(0,0,0,.06) 2px,
    rgba(0,0,0,.06) 4px
  );
  opacity:.35;
  pointer-events:none;
  mix-blend-mode: overlay;
}

/* =========================
   VERHALEN PAGE (cards)
   ========================= */
.filters{
  display: flex;
  gap: 12px;
  margin: 18px 0 22px;
  flex-wrap: wrap;
}

.stories-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.story-card{
  display:block;
  text-decoration:none;
  color:inherit;
  border-radius: 16px;
  overflow: visible;
  background: transparent;
}

.story-card .print{
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(18,18,18,.12);
  box-shadow: var(--shadow);
  transform: rotate(var(--rot, -1deg));
  transform-origin: center;
  transition: transform .18s ease, box-shadow .18s ease;
}

.story-card:hover .print{
  transform: rotate(var(--rot, -1deg)) translateY(-2px);
  box-shadow: 0 22px 55px rgba(0,0,0,.14);
}

.story-card .thumb{
  width:100%;
  aspect-ratio: 4 / 3;
  background: center/cover no-repeat;
  position: relative;
}

/* =========================
   STORY DETAIL PAGE
   ========================= */
.story-page{
  overflow: auto;
}

.story{
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.story-hero{
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 22px;
  align-items: end;
}

.story-hero-full{
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;

  border-radius: 16px;
  border: 1px solid rgba(18,18,18,.12);
  box-shadow: var(--shadow);
  background: rgba(255,255,255,.55);
}

.story-hero-image{
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
}

.story-hero-overlay{
  z-index: 2;
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  pointer-events: none;
}

.story-title{
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 10px;
}

.story-year{ font-size: 1rem; opacity: 0.7; }

.story-content{
  margin-top: 28px;
  line-height: 1.65;
  font-size: 1rem;
}

.story-content h2{
  margin: 22px 0 10px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.story-content p{
  opacity: 0.9;
  margin-bottom: 12px;
}

.story-footer{
  margin-top: 34px;
  display: flex;
  justify-content: center;
}

.back-link, .back-button{
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  opacity: 0.7;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
}
.back-link:hover, .back-button:hover{ opacity: 1; }

/* =========================
   UPLOAD PAGE
   ========================= */
.page-upload main{
  display: flex;
  justify-content: center;
}

.page-upload .content{
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 20px 90px;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-upload .project-title{
  width: 100%;
  text-align: center;
  margin: 22px auto 18px;
  z-index: 2;
}

/* upload form */
.upload-form{
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
}

.upload-preview{
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(18,18,18,.14);
  background: rgba(255,255,255,.45);
  box-shadow: var(--shadow);
}

.upload-preview img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* upload form fields in handmade look */
.page-upload .field{
  max-width: none;
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  padding: 14px 14px;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  border: 1px solid rgba(18,18,18,.14);
}

.page-upload textarea.field{
  min-height: 140px;
  resize: vertical;
}

.page-upload .field:focus{
  border-color: rgba(31,111,235,.55);
  box-shadow: 0 12px 28px rgba(31,111,235,.12);
}

.page-upload .check{
  background: rgba(255,255,255,.40);
  border: 1px solid rgba(18,18,18,.10);
  border-radius: 14px;
  padding: 12px 12px;
}

/* button */
.button{
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.page-upload .button{
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--tape);
  color: var(--tape-text);
  box-shadow: 0 16px 34px rgba(0,0,0,.16);
  font-weight: 700;
  letter-spacing: .02em;
  transform: rotate(-0.4deg);
}

.page-upload .button:hover{
  transform: rotate(-0.4deg) translateY(-1px);
  background: rgba(15,15,16,.92);
}

/* =========================
   INFO PAGE
   ========================= */
.info-section{
  padding: 100px 20px;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.7;
  color: #333;
}

.info-section h1, .info-section h2{
  margin-bottom: 12px;
  font-weight: 600;
}

.info-section p, .info-section li{ margin-bottom: 16px; }

.info-section ol{
  padding-left: 20px;
  list-style: decimal;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 820px){
  .story-hero{ grid-template-columns: 1fr; }
}

@media (max-width: 768px){
  .moodboard{ width: 160px; }
  .nav-center{ gap: 24px; }
}

@media (max-width: 560px){
  .stories-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 520px){
  .project-title{
    font-size: clamp(2.4rem, 9vw, 3.2rem);
    letter-spacing: -0.02em;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .story-card .print{ transition: none; }
  .story-card:hover .print{ transform: rotate(var(--rot, -1deg)); }
}

/* =========================
   HOME MOODBOARDS – SOFT LANDSCAPE CONSTRAINT
   ========================= */

.moodboard{
  height: auto;
  max-height: 320px;     /* <<< subtiele bovengrens */
  overflow: hidden;      /* snijdt niets af, alleen container */
}

.moodboard-img{
  width: 100%;
  height: auto;
  max-height: 100%;      /* respecteert max-height van container */
  object-fit: contain;  /* geen crop, altijd volledig zichtbaar */
  display: block;
}






