/* ==========================================================
   davidbarens.com
   Kleuren: blauw #0303AB, oranje #FF661F, papier #EEEBE5
   Type: Bricolage Grotesque (koppen), Instrument Sans (tekst)
   ========================================================== */

@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque.woff2") format("woff2-variations"), url("../fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans.woff2") format("woff2-variations"), url("../fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-italic.woff2") format("woff2-variations"), url("../fonts/instrument-sans-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --blue: #0303ab;
  --blue-deep: #020275;
  --blue-soft: #1f1fc4;
  --orange: #ff661f;
  --orange-dark: #e5520d;
  --paper: #eeebe5;
  --paper-line: #d8d3ca;
  --ink: #0d0d3a;
  --white: #ffffff;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: clamp(16px, 1.05vw + 10px, 18px);
  line-height: 1.65;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; font-optical-sizing: auto; line-height: 1; margin: 0; letter-spacing: -.03em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--orange); color: var(--white); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--orange); color: var(--white); padding: 12px 18px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

.eyebrow {
  font-family: var(--text); font-weight: 500; font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: transform .5s var(--ease), background-color .4s ease, box-shadow .4s ease;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.site-header.is-scrolled { background: rgba(3, 3, 171, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.site-header.is-hidden { transform: translateY(-100%); }
.brand { font-family: var(--display); font-weight: 700; color: var(--orange); text-decoration: none; font-size: 23px; line-height: .92; letter-spacing: -.03em; display: block; }
.brand span { display: block; }
.nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.nav a { color: var(--white); text-decoration: none; font-weight: 500; font-size: 15.5px; letter-spacing: 0; position: relative; padding-block: 6px; }
.nav a:not(.nav-icon)::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--orange); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav a:not(.nav-icon):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid rgba(255,255,255,.35); border-radius: 50%; transition: background .3s, border-color .3s; }
.nav-icon:hover { background: var(--orange); border-color: var(--orange); }
.nav-icon svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--orange); --fg: var(--white);
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--bg); color: var(--fg); text-decoration: none; border: 0; cursor: pointer;
  font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.01em;
  padding: 17px 28px; border-radius: 999px; position: relative; overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--white); transform: translateY(101%); transition: transform .5s var(--ease); z-index: -1; border-radius: inherit; }
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--orange); }
.btn .arrow { width: 22px; height: 22px; transition: transform .45s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }
.btn--blue::before { background: var(--blue); }
.btn--blue:hover { color: var(--white); }

/* ---------- Hero ---------- */
.hero { background: var(--blue); color: var(--white); position: relative; overflow: hidden; padding-top: calc(76px + env(safe-area-inset-top, 0px)); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(24px, 4vw, 64px);
  align-items: end; padding-block: clamp(40px, 7vw, 96px) 0; min-height: min(88vh, 900px);
}
.hero-title { color: var(--orange); font-size: clamp(84px, 18vw, 244px); font-weight: 700; line-height: .78; letter-spacing: -.05em; padding-bottom: clamp(28px, 5vw, 64px); }
.hero-title .line { display: block; overflow: hidden; padding-block: .03em .05em; }
.hero-title .char { display: inline-block; }
.hero-sub { display: block; max-width: 22em; margin-top: clamp(20px, 3vw, 36px); font-family: var(--display); font-weight: 500; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.015em; line-height: 1.15; }
.hero-sub .amp { color: var(--orange); }
.hero-photo { position: relative; align-self: end; }
.hero-photo .frame { overflow: hidden; border-radius: 220px 220px 0 0; aspect-ratio: 3 / 4.2; max-width: 100%; background: var(--blue-deep); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transform-origin: 50% 80%; }
.hero-badge {
  position: absolute; left: -44px; top: 18%; width: 132px; height: 132px; border-radius: 50%;
  background: var(--orange); color: var(--white); display: grid; place-items: center; z-index: 2;
}
.hero-badge .ring { width: 100%; height: 100%; animation: spin 18s linear infinite; position: absolute; inset: 0; }
.hero-badge text { font-family: var(--display); font-weight: 600; font-size: 10.5px; letter-spacing: .06em; fill: var(--white); text-transform: uppercase; }
.hero-badge .core { width: 30%; height: 30%; color: var(--white); animation: spin 18s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-cue { position: absolute; left: var(--gutter); bottom: 22px; display: none; }

/* ---------- Intro ---------- */
.intro { padding-block: clamp(80px, 12vw, 170px); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 110px); align-items: start; }
.intro h2 { color: var(--blue); font-size: clamp(36px, 4.8vw, 72px); line-height: 1.02; }
.intro h2 em { font-style: normal; color: var(--orange); }
.intro .body { display: grid; gap: 22px; max-width: 34em; padding-top: 10px; }
.intro .body p:first-child { font-size: 1.2em; font-weight: 400; color: var(--blue); line-height: 1.55; }
.intro .body .btn { justify-self: start; margin-top: 12px; }

/* ---------- Services ---------- */
.services { background: var(--blue); color: var(--white); padding-block: clamp(80px, 11vw, 160px); position: relative; overflow: hidden; }
.services-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(48px, 7vw, 96px); }
.services-head h2 { color: var(--orange); font-size: clamp(36px, 4.8vw, 72px); max-width: 13em; }
.services-head .eyebrow { color: rgba(255,255,255,.7); }
.service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.service {
  position: relative; padding: clamp(28px, 3.6vw, 52px); border-radius: 28px; background: var(--blue-deep);
  display: grid; align-content: start; gap: 22px; overflow: hidden; isolation: isolate;
  transition: transform .6s var(--ease);
}
.service::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(600px circle at var(--mx, 80%) var(--my, 0%), rgba(255, 102, 31, .22), transparent 45%);
  opacity: 0; transition: opacity .5s ease;
}
.service:hover::before { opacity: 1; }
.service-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.service h3 { font-size: clamp(30px, 3.2vw, 46px); color: var(--white); }
.service .icon { flex: none; width: 58px; height: 58px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; transition: transform .6s var(--ease); }
.service:hover .icon { transform: rotate(-45deg) scale(1.06); }
.service .icon svg { width: 24px; height: 24px; stroke: var(--white); fill: none; stroke-width: 2.2; }
.service .lead { font-size: 1.14em; font-weight: 500; color: var(--orange); line-height: 1.45; }
.service .copy { display: grid; gap: 14px; color: rgba(255,255,255,.86); }
.service .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.service .tags span { font-size: 12.5px; font-weight: 500; letter-spacing: .06em; padding: 6px 13px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; color: rgba(255,255,255,.9); }

/* ---------- Built ---------- */
.built { padding-block: clamp(80px, 11vw, 160px); }
.built-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(40px, 6vw, 80px); }
.built-head h2 { color: var(--blue); font-size: clamp(36px, 4.8vw, 72px); max-width: 12em; }
.built-head .eyebrow { color: var(--blue); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--blue); margin-bottom: clamp(40px, 6vw, 72px); }
.stat { padding: 26px 20px 8px 0; display: grid; gap: 6px; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--paper-line); }
.stat .num { font-family: var(--display); font-weight: 600; letter-spacing: -.04em; color: var(--orange); font-size: clamp(40px, 4.8vw, 72px); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .label { font-size: 14px; line-height: 1.45; color: var(--ink); max-width: 16em; }

.ventures { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--paper-line); }
.venture {
  display: grid; grid-template-columns: 90px minmax(0, 1.05fr) minmax(0, 1.4fr) 180px; gap: clamp(16px, 3vw, 48px);
  align-items: start; padding-block: clamp(28px, 3.4vw, 44px); border-bottom: 1px solid var(--paper-line);
  position: relative; isolation: isolate;
}
.venture::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -0.5); background: var(--blue); z-index: -1; border-radius: 22px; transform: scaleY(.6); opacity: 0; transition: transform .55s var(--ease), opacity .35s ease; }
.venture .year { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--orange); letter-spacing: -.01em; padding-top: 6px; font-variant-numeric: tabular-nums; }
.venture .role { font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); display: block; margin-bottom: 8px; }
.venture h3 { color: var(--blue); font-size: clamp(26px, 2.6vw, 38px); transition: color .35s ease; }
.venture .copy { display: grid; gap: 12px; transition: color .35s ease; }
.venture .logo { justify-self: end; width: 150px; height: 84px; border-radius: 16px; background: var(--blue); display: grid; place-items: center; padding: 16px; transition: background .35s ease, transform .55s var(--ease); }
.venture .logo img { max-height: 52px; width: auto; object-fit: contain; }
.venture .logo--book { background: transparent; padding: 0; height: 100px; }
.venture .logo--book img { max-height: 100px; transform: rotate(6deg); transition: transform .55s var(--ease); filter: drop-shadow(0 12px 18px rgba(3,3,171,.25)); }
@media (hover: hover) {
  .venture:hover::before { transform: scaleY(1); opacity: 1; }
  .venture:hover h3, .venture:hover .copy { color: var(--white); }
  .venture:hover .logo { transform: scale(1.04) rotate(-2deg); }
  .venture:hover .logo--book img { transform: rotate(-4deg) scale(1.08); }
}
.venture a { color: inherit; text-decoration-color: var(--orange); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.venture a:hover { color: var(--orange); }

/* ---------- Contact ---------- */
.contact { background: var(--blue); color: var(--white); padding-block: clamp(80px, 11vw, 160px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.contact h2 { color: var(--orange); font-size: clamp(42px, 5.6vw, 86px); margin-bottom: 28px; }
.contact .intro-copy { display: grid; gap: 16px; color: rgba(255,255,255,.86); max-width: 30em; }
.contact .direct { margin-top: 36px; display: grid; gap: 10px; }
.contact .direct a { display: inline-flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; font-weight: 500; width: fit-content; }
.contact .direct a:hover { color: var(--orange); }
.contact .direct svg { width: 18px; height: 18px; fill: currentColor; }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; background: var(--blue-deep); padding: clamp(24px, 3.4vw, 48px); border-radius: 28px; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.field label .opt { font-weight: 400; letter-spacing: .04em; text-transform: none; opacity: .7; }
.field input, .field textarea {
  width: 100%; font: inherit; font-weight: 400; color: var(--white); background: transparent;
  border: 0; border-bottom: 1.5px solid rgba(255,255,255,.3); padding: 10px 0 12px; border-radius: 0;
  transition: border-color .3s ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.35); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--orange); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--white); transition: background-color 9999s; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 8px; }
.form-note { font-size: 13.5px; color: rgba(255,255,255,.6); max-width: 26em; line-height: 1.5; }
.form-status { grid-column: 1 / -1; font-weight: 500; border-radius: 14px; padding: 14px 18px; }
.form-status.is-ok { background: rgba(255,255,255,.1); color: var(--white); }
.form-status.is-error { background: rgba(255, 102, 31, .16); color: #ffb48f; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- Marquee + footer ---------- */
.motto { background: var(--orange); color: var(--blue); overflow: hidden; padding-block: clamp(18px, 2.4vw, 30px); }
.marquee { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee span { font-family: var(--display); font-weight: 600; letter-spacing: -.035em; font-size: clamp(40px, 6vw, 96px); line-height: 1; padding-right: .5em; white-space: nowrap; }
.marquee span i { font-style: normal; color: var(--white); }
.motto:hover .marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.site-footer { background: var(--blue); color: rgba(255,255,255,.75); padding-block: 44px calc(44px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 26px; }
.site-footer a { color: var(--white); text-decoration: none; font-weight: 500; }
.site-footer a:hover { color: var(--orange); }

/* ---------- Over David ---------- */
.about-hero { background: var(--blue); color: var(--white); padding-top: calc(76px + env(safe-area-inset-top, 0px)); overflow: hidden; }
.about-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 5vw, 80px); align-items: end; padding-block: clamp(48px, 7vw, 100px) 0; }
.about-hero h1 { color: var(--orange); font-size: clamp(68px, 12vw, 190px); font-weight: 700; line-height: .86; letter-spacing: -.05em; padding-bottom: clamp(28px, 5vw, 64px); }
.about-hero h1 .line { display: block; overflow: hidden; padding-block: .04em .06em; }
.about-hero h1 .char { display: inline-block; }
.about-hero .tagline { font-family: var(--display); font-weight: 500; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -.015em; margin-top: 24px; max-width: 16em; }
.about-hero .frame { border-radius: 220px 220px 0 0; overflow: hidden; aspect-ratio: 3 / 4; max-width: 100%; }
.about-hero .frame img { width: 100%; height: 100%; object-fit: cover; }

.story { padding-block: clamp(80px, 11vw, 150px); }
.story-text { max-width: 40em; margin-inline: auto; display: grid; gap: 1.25em; font-size: 1.08em; line-height: 1.75; }
.story-text .story-lead { font-family: var(--display); font-weight: 600; color: var(--blue); font-size: clamp(28px, 3.4vw, 46px); line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; margin-bottom: .35em; }
.story-text a { color: var(--blue); text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.story-text a:hover { color: var(--orange); }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; background: var(--blue); color: var(--white); display: grid; place-items: center; text-align: center; padding: 120px var(--gutter); }
.notfound h1 { color: var(--orange); font-size: clamp(110px, 22vw, 300px); font-weight: 700; letter-spacing: -.06em; line-height: .85; }
.notfound p { margin: 24px auto 36px; max-width: 26em; }

/* ---------- Reveal-animaties (alleen met JS) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="fade"] { transform: none; }
.js .hero-title .char, .js .about-hero h1 .char { transform: translateY(110%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 45ms + .1s); }
.js.is-loaded .hero-title .char, .js.is-loaded .about-hero h1 .char { transform: none; }
.js .hero-photo .frame, .js .about-hero .frame { clip-path: inset(100% 0 0 0 round 220px 220px 0 0); transition: clip-path 1.4s var(--ease-in-out) .35s; }
.js.is-loaded .hero-photo .frame, .js.is-loaded .about-hero .frame { clip-path: inset(0 0 0 0 round 220px 220px 0 0); }
.js .hero-photo img, .js .about-hero .frame img { transform: scale(1.25); transition: transform 2s var(--ease) .35s; }
.js.is-loaded .hero-photo img, .js.is-loaded .about-hero .frame img { transform: scale(1); }
.js .hero-badge { transform: scale(0) rotate(-90deg); transition: transform 1s var(--ease) 1.1s; }
.js.is-loaded .hero-badge { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .venture { grid-template-columns: 70px minmax(0, 1fr) 150px; }
  .venture .copy { grid-column: 2 / 4; grid-row: 2; }
  .venture .logo { grid-column: 3; grid-row: 1; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-title { padding-bottom: 0; }
  .hero-photo { max-width: 380px; justify-self: end; width: 74%; }
  .hero-badge { left: -30px; width: 110px; height: 110px; }
  .intro-grid, .contact-grid, .about-hero .wrap { grid-template-columns: 1fr; }
  .about-hero h1 { padding-bottom: 0; }
  .about-hero .frame { max-width: 400px; justify-self: end; width: 78%; }
  .service-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero-title { font-size: 25vw; }
  .nav { gap: 16px; }
  .nav a { font-size: 14.5px; }
  .brand { font-size: 20px; }
  .venture { grid-template-columns: 1fr auto; gap: 14px 20px; }
  .venture .year { grid-column: 1; grid-row: 1; padding-top: 0; }
  .venture > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .venture .copy { grid-column: 1 / -1; grid-row: 3; }
  .venture .logo { grid-column: 2; grid-row: 1; width: 110px; height: 64px; padding: 12px; }
  .venture .logo img { max-height: 38px; }
  .venture .logo--book { height: 74px; }
  .venture .logo--book img { max-height: 74px; }
  .form { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { grid-template-columns: 7.5em minmax(0, 1fr); align-items: center; gap: 16px; padding: 18px 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--paper-line); }
  .stat .num { font-size: 40px; }
  .stat .label { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .marquee { animation: none; }
}
