/* ============================================================
   PORTFOLIO — style.css
   ------------------------------------------------------------
   Zwart, rustig en editorial. Serif voor koppen (Cormorant),
   sans voor tekst (Inter). Onderdelen 'verschijnen' bij scrollen.
   ============================================================ */

/* --- Kleuren & instellingen op één plek (CSS-variabelen) ----- */
:root {
  --bg:      #050505;                  /* bijna-zwart */
  --fg:      #f4f2ee;                  /* crème (tekst) */
  --fg-dim:  rgba(244, 242, 238, 0.55);/* gedempte tekst */
  --line:    rgba(255, 255, 255, 0.14);/* fijne lijntjes */
  --card:    rgba(255, 255, 255, 0.03);/* subtiel kaartvlak */
  --ease:    cubic-bezier(0.16, 1, 0.3, 1); /* zachte, trage easing */
  --serif:   "Cormorant Garamond", Georgia, serif;
  --sans:    "Inter", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }       /* vloeiend scrollen bij menuklik */

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* De 3D-achtergrond: vast achter alles, niet klikbaar */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Alle inhoud ligt bóven de 3D-achtergrond */
.site-header, .hero, .werk, .contact { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }


/* ============================================================
   KOPBALK
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  /* subtiele donkere vervaging zodat tekst leesbaar blijft */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.logo { font-family: var(--serif); font-size: 22px; letter-spacing: 0.5px; }
.logo-dim { color: var(--fg-dim); font-size: 14px; }
.nav { display: flex; gap: 26px; font-size: 14px; }
.nav a { color: var(--fg-dim); transition: color 0.3s var(--ease); }
.nav a:hover { color: var(--fg); }


/* ============================================================
   1) INTRO (hero)
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  text-align: center;
}
.hero-inner { max-width: 900px; }

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 12px;
  color: var(--fg-dim);
  margin-bottom: 26px;
}

/* De grote regel met "I am a ___" */
.hero-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.28em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 9vw, 104px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.prefix { color: var(--fg); }
.word   { display: inline-block; color: var(--fg); }

.hero-sub {
  max-width: 560px;
  margin: 30px auto 0;
  color: var(--fg-dim);
  font-size: 17px;
}
.hero-scroll {
  display: inline-block;
  margin-top: 40px;
  font-size: 14px;
  color: var(--fg-dim);
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.hero-scroll:hover { color: var(--fg); transform: translateY(3px); }


/* --- De letters van het wisselende woord (het "opkom"-effect) - */
.letter {
  display: inline-block;
  white-space: pre;
  animation: letterOmhoog 0.5s var(--ease) both;
}
.letter.weg { animation: letterOmhoogWeg 0.45s cubic-bezier(0.55, 0, 0.67, 0.5) both; }

@keyframes letterOmhoog {
  from { opacity: 0; transform: translateY(0.75em);  filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);       filter: blur(0);   }
}
@keyframes letterOmhoogWeg {
  from { opacity: 1; transform: translateY(0);       filter: blur(0);   }
  to   { opacity: 0; transform: translateY(-0.75em); filter: blur(6px); }
}


/* ============================================================
   2) WERK / PROJECTEN
   ============================================================ */
.werk {
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 40px 120px;
}
.section-head { margin-bottom: 70px; max-width: 620px; }
.section-title {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 500;
  margin-bottom: 14px;
}
.section-note { color: var(--fg-dim); }

/* --- Standaard (o.a. mobiel): projecten gewoon ONDER ELKAAR --- */
.scroll-track { display: flex; flex-direction: column; gap: 120px; }

/* Eén project = twee kolommen (preview + info) */
.project {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
/* Zig-zag: bij even projecten de preview rechts */
.project:nth-child(even) .project-preview { order: 2; }

/* --- Teller (verborgen tot de horizontale modus aan staat) --- */
.scroll-progress { display: none; }


/* ============================================================
   HORIZONTALE SCROLL-GALERIJ  (script.js zet de class 'horizontaal')
   ------------------------------------------------------------
   De sectie 'plakt' vast in beeld en de projecten schuiven
   zijwaarts mee terwijl je verticaal scrolt.
   ============================================================ */
/* De galerij mag over de volle schermbreedte (buiten de tekstkolom) */
.werk.horizontaal .scroll-stage {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.werk.horizontaal .scroll-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;                    /* we schuiven via scrollLeft (script.js) */
}
.werk.horizontaal .scroll-track {
  flex-direction: row;                 /* nu naast elkaar */
  width: max-content;                  /* zo breed als alle projecten samen */
  height: 100vh;
  gap: 8vw;
  padding: 0 max(40px, 7vw);
  align-items: center;
}
/* Elk project is nu een 'paneel' met een vaste breedte */
.werk.horizontaal .project {
  flex: 0 0 auto;
  width: min(1040px, 86vw);
}
/* De teller rechtsonder in beeld */
.werk.horizontaal .scroll-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  right: max(40px, 7vw);
  bottom: 40px;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--fg-dim);
  z-index: 3;
}
.scroll-progress #proj-huidig { color: var(--fg); font-size: 26px; }
.proj-streep { width: 46px; height: 1px; background: var(--line); }

/* --- De 'browser' met live preview ------------------------- */
.project-preview {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #0c0c0c;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.browser-bar > span {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.browser-url {
  margin-left: 12px;
  font-size: 12px;
  font-style: normal;
  color: var(--fg-dim);
}
.project-frame {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
  background: #fff;
}
/* Nette 'binnenkort'-tegel als de live-link nog niet is ingevuld */
.project-frame.leeg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #0c0c0c;
  color: var(--fg-dim);
  font-size: 14px;
  text-align: center;
}
.project-frame.leeg small { font-size: 12px; opacity: 0.7; }

/* Ankerlinks (#werk, #contact) niet onder de vaste kopbalk laten vallen */
#werk, #contact { scroll-margin-top: 90px; }

/* --- De informatie naast de preview ------------------------ */
.project-nr {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--fg-dim);
}
.project-titel {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  margin: 4px 0 4px;
}
.project-rol {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--fg-dim);
  margin-bottom: 18px;
}
.project-beschrijving { margin-bottom: 26px; color: rgba(244, 242, 238, 0.8); }

/* Detail-blokjes: Kleurenpalet, Typografie, Aanpak */
.detail { margin-bottom: 20px; }
.detail-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--fg-dim);
  margin-bottom: 10px;
}

/* Kleur-staaltjes */
.swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.swatch-kleur {
  width: 44px; height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease);
}
.swatch:hover .swatch-kleur { transform: translateY(-4px) scale(1.05); }
.swatch-hex { font-size: 11px; color: var(--fg-dim); letter-spacing: 0.03em; }

/* Lettertypes */
.fonts { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.fonts li { font-size: 14px; color: rgba(244, 242, 238, 0.8); }
.fonts li::before { content: "· "; color: var(--fg-dim); }

.project-aanpak { font-size: 14px; color: rgba(244, 242, 238, 0.8); }

/* De knop naar de echte website */
.project-link {
  display: inline-block;
  margin-top: 14px;
  padding: 12px 24px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 14px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.project-link:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }


/* ============================================================
   3) CONTACT
   ============================================================ */
.contact {
  border-top: 1px solid var(--line);
  padding: 100px 40px 80px;
  text-align: center;
}
.contact-title {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 500;
  margin-bottom: 12px;
}
.contact-sub { color: var(--fg-dim); margin-bottom: 26px; }
.contact-mail {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: border-color 0.3s var(--ease);
}
.contact-mail:hover { border-color: var(--fg); }
.contact-credit { margin-top: 60px; font-size: 12px; color: var(--fg-dim); }


/* ============================================================
   SCROLL-ANIMATIE (.reveal -> .in-view)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   RESPONSIEF (telefoon / tablet)
   ============================================================ */
@media (max-width: 860px) {
  .site-header { padding: 18px 22px; }
  .werk { padding: 40px 22px 90px; }
  .project { grid-template-columns: 1fr; gap: 28px; }
  .project:nth-child(even) .project-preview { order: 0; } /* geen zig-zag op smal scherm */
  .scroll-track { gap: 80px; }
  .project-frame { height: 300px; }
  .hero-line { white-space: normal; }
}

/* Respecteer 'minder beweging' */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: opacity 0.4s ease; transform: none; }
  .letter     { animation: fadeIn 0.3s ease both; }
  .letter.weg { animation: fadeOut 0.3s ease both; }
  @keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
  @keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
}
