/*
Theme Name: contextman
Theme URI: https://www.contextman.nl
Author: Pim van Bezooijen
Author URI: https://www.contextman.nl
Description: Thema voor contextman.nl (Film & Vorm) - woudgroen/limoen huisstijl, bewerkbaar Werk en Video's, haakjes-hover en video-overlay.
Version: 2.4.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: contextman
*/

  :root {
    --green: #0F5A41;
    --green-deep: #0A3F2E;
    --green-tint: #E9F3EF;
    --lime: #B8E83C;
    --ink: #16202B;
    --muted: #55606C;
    --line: #C3D8E3;
    --paper: #FFFFFF;
    --accent: #B8E83C;
    --font: "Lexend", "Helvetica Neue", Arial, sans-serif;
  }
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; scroll-padding-top: 96px; }
  body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: #fff;
    background: var(--green);
  }
  img { max-width: 100%; display: block; }
  /* Links: standaard limoen (de pagina is donker); op witte vlakken (kaarten) terug naar donkergroen */
  a { color: var(--lime); text-underline-offset: 3px; }
  a:hover { color: #fff; }
  .card a { color: var(--green-deep); }
  .card a:hover { color: var(--green); }
  .video-card:hover { color: var(--green); }
  :focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
  .wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

  /* Header */
  header.site {
    position: fixed; top: 0; left: 0; right: 0; z-index: 10;
    background: var(--paper);
    transform: translateY(-100%);
    transition: transform .3s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
  }
  header.site.is-visible { transform: translateY(0); }
  header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; }
  .logo { display: flex; align-items: center; text-decoration: none; }
  .logo .logo-svg { height: 40px; width: auto; display: block; }
  nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
  nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
  nav a:hover { color: var(--green); }

  /* Hero */
  .hero { background: var(--hero-bg, var(--green)); }
  .hero-inner {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px;
    padding: clamp(40px, 7vw, 64px) 24px;
  }
  .hero-logo .logo-svg { height: clamp(40px, 6vw, 60px); width: auto; display: block; }
  .hero-tag { margin: 0; color: #fff; font-weight: 600; letter-spacing: -0.01em; font-size: clamp(1rem, 1.8vw, 1.25rem); opacity: .9; }

  section { padding: clamp(28px, 4vw, 52px) 0; }
  h2 {
    margin: 0 0 32px; font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 500; letter-spacing: -0.02em; line-height: 1;
    position: relative; display: inline-flex; align-items: center; gap: 6px;
    text-transform: lowercase;
  }
  h2 .brk { color: var(--lime); }

  /* Over */
  .about::after { content: ""; display: table; clear: both; }
  .portrait {
    width: 140px; aspect-ratio: 1 / 1; background: #F1EFE9; border-radius: 6px;
    position: relative; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,.22);
    float: left; margin: 0 clamp(20px, 4vw, 32px) 16px 0;
    shape-outside: margin-box;
  }
  .portrait img { width: 100%; height: 100%; object-fit: cover; }
  .about h3 { margin: 0 0 4px; font-size: 1.6rem; letter-spacing: -0.02em; }
  .about .name { margin: 0 0 20px; color: rgba(255,255,255,.78); font-weight: 600; }
  .about p { max-width: 62ch; margin: 0 0 1em; }

  /* Instagram-feed naast de Over-tekst */
  .about-row.has-insta { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
  .insta { background: var(--paper); color: var(--ink); border-radius: 6px; padding: 14px; box-shadow: 0 8px 20px rgba(0,0,0,.22); }
  .insta img { max-width: 100%; height: auto; }
  .insta a { color: var(--green-deep); }
  .insta a:hover { color: var(--green); }
  .insta-more { margin: 14px 0 0; }
  .insta .btn.ghost { color: var(--green); border-color: var(--green); }
  .insta .btn.ghost:hover { background: var(--green); color: #fff; border-color: var(--green); }

  /* Werk */
  .filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
  .filters button {
    font: inherit; font-weight: 600; cursor: pointer;
    background: var(--paper); color: var(--ink);
    border: 1.5px solid var(--line); border-radius: 6px; padding: 9px 22px;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  }
  .filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
  .filters button:hover { background: var(--lime); color: var(--ink); border-color: var(--lime); transform: scale(1.04); }

  .grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; }
  .card {
    grid-column: span 4; background: var(--paper); overflow: hidden; color: var(--ink); border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15,35,28,.06);
    display: flex; flex-direction: column;
    position: relative; z-index: 1; transition: transform .2s ease, box-shadow .2s ease;
  }
  .card:hover { transform: translateY(-5px); box-shadow: 0 18px 34px rgba(0,0,0,.28); z-index: 2; }
  .card.wide { grid-column: span 8; }
  .card[hidden] { display: none; }
  .thumb {
    aspect-ratio: 16 / 9; background: var(--green); color: #fff;
    display: flex; align-items: flex-end; padding: 16px;
    font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; line-height: 1;
    position: relative; overflow: hidden;
  }
  .card.vorm .thumb { background: var(--green-deep); }
  .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
  .thumb.has-img > .thumb-caption { display: none; }

  /* Hover: haakjes ("[ ]") die als een vizier om de foto sluiten, i.p.v. een kleurwas */
  .thumb::after, .portrait::after {
    content: ""; position: absolute; inset: 14px; z-index: 2; pointer-events: none;
    opacity: 0; transform: scale(.94); transition: opacity .2s ease, transform .2s ease;
    background:
      linear-gradient(var(--ink), var(--ink)) top    left  / 28px 5px no-repeat,
      linear-gradient(var(--ink), var(--ink)) top    left  / 5px 28px no-repeat,
      linear-gradient(var(--ink), var(--ink)) top    right / 28px 5px no-repeat,
      linear-gradient(var(--ink), var(--ink)) top    right / 5px 28px no-repeat,
      linear-gradient(var(--ink), var(--ink)) bottom left  / 28px 5px no-repeat,
      linear-gradient(var(--ink), var(--ink)) bottom left  / 5px 28px no-repeat,
      linear-gradient(var(--ink), var(--ink)) bottom right / 28px 5px no-repeat,
      linear-gradient(var(--ink), var(--ink)) bottom right / 5px 28px no-repeat;
  }
  .thumb.has-img::after, .portrait.has-img::after { background-image:
      linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent)),
      linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent)),
      linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent)),
      linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent));
  }
  .card:hover .thumb::after, .card:focus-within .thumb::after,
  .portrait:hover::after { opacity: 1; transform: scale(1); }

  /* Haakjes kleiner schalen op het (kleinere) portret */
  .portrait::after {
    inset: 8px;
    background:
      linear-gradient(var(--ink), var(--ink)) top    left  / 16px 3px no-repeat,
      linear-gradient(var(--ink), var(--ink)) top    left  / 3px 16px no-repeat,
      linear-gradient(var(--ink), var(--ink)) top    right / 16px 3px no-repeat,
      linear-gradient(var(--ink), var(--ink)) top    right / 3px 16px no-repeat,
      linear-gradient(var(--ink), var(--ink)) bottom left  / 16px 3px no-repeat,
      linear-gradient(var(--ink), var(--ink)) bottom left  / 3px 16px no-repeat,
      linear-gradient(var(--ink), var(--ink)) bottom right / 16px 3px no-repeat,
      linear-gradient(var(--ink), var(--ink)) bottom right / 3px 16px no-repeat;
  }
  .card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
  .tag { font-size: 0.9rem; font-weight: 600; color: var(--green-deep); }
  .card h3 { margin: 0; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.15; }
  .card p { margin: 0; font-size: 1rem; color: var(--ink); }
  .card ul { margin: auto 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 6px; }
  .card li a { font-weight: 600; font-size: 0.98rem; }
  .credit { font-size: 0.9rem; color: var(--muted); }

  /* Video's (Vimeo) */
    .video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
  .video-card {
    background: var(--paper); text-decoration: none; color: var(--ink); overflow: hidden; border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15,35,28,.06);
    display: flex; flex-direction: column;
    position: relative; z-index: 1; transition: transform .2s ease, box-shadow .2s ease;
  }
  .video-card:hover { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(0,0,0,.28); z-index: 2; }
  .video-card:hover .thumb::after, .video-card:focus-within .thumb::after { opacity: 1; transform: scale(1); }
  .video-card .thumb { aspect-ratio: 16/10; }
  .video-card .thumb .dur {
    position: absolute; z-index: 3; right: 8px; bottom: 8px;
    background: rgba(0,0,0,.65); color: #fff; font-size: 0.78rem; font-weight: 600;
    padding: 2px 7px; letter-spacing: 0.02em;
  }
  .video-card .vbody { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
  .video-card h4 { margin: 0; font-size: 1.05rem; letter-spacing: -0.01em; line-height: 1.25; }
  .video-card .vdesc {
    font-size: 0.92rem; color: var(--ink); margin: 2px 0 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  .video-more { margin-top: 28px; }

  .social { margin-top: 40px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
  .btn {
    display: inline-block; text-decoration: none; font-weight: 600;
    background: var(--green); color: #fff; padding: 12px 26px; border: none; border-radius: 6px;
    transition: transform .15s ease, background .15s ease;
  }
  .btn:hover { background: var(--green-deep); transform: scale(1.04); }
  .btn.ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
  .btn.ghost:hover { background: #fff; color: var(--green); border-color: #fff; }

  /* Contact */
  .contact { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 72px); }
  .contact p { max-width: 58ch; margin: 0 0 1em; }
  .contact address { font-style: normal; }
  .contact .big { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }
  .contact .big a { color: var(--lime); text-decoration: none; border-bottom: 2px solid rgba(184,232,60,.45); }
  .contact .big a:hover { color: #fff; border-color: #fff; }
  .company { margin-top: 24px; color: rgba(255,255,255,.7); font-size: 0.98rem; }

  footer { background: var(--green); color: #fff; padding: 28px 0; }
  footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
  footer a { color: var(--lime); }
  footer a:hover { color: #fff; }
  footer p { margin: 0; }

  @media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; min-height: 0; }
    .hero-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
    .hero-cell + .hero-cell { border-top: 0; }
    .hero-cell { min-height: 170px; }
    .contact { grid-template-columns: 1fr; }
    .about-row.has-insta { grid-template-columns: 1fr; }
    .card, .card.wide { grid-column: span 6; }
  }
  @media (max-width: 620px) {
    .card, .card.wide { grid-column: span 12; }
  }

  /* Hamburgermenu op smalle schermen */
  .nav-toggle {
    display: none; width: 40px; height: 36px; padding: 0; margin: 0;
    background: none; border: 0; cursor: pointer;
    flex-direction: column; justify-content: center; align-items: flex-end; gap: 5px;
  }
  .nav-toggle span { display: block; width: 26px; height: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease, width .2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 26px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 26px; }

  @media (max-width: 760px) {
    .nav-toggle { display: flex; }
    header.site nav[aria-label="Hoofdmenu"] {
      position: fixed; left: 0; right: 0; top: 84px; z-index: 9;
      background: var(--paper);
      max-height: 0; overflow: hidden;
      transition: max-height .25s ease;
      box-shadow: 0 10px 20px rgba(0,0,0,.08);
    }
    header.site nav[aria-label="Hoofdmenu"].is-open { max-height: 320px; }
    nav ul { flex-direction: column; gap: 0; padding: 8px 24px 20px; }
    nav ul li { border-top: 1px solid var(--line); }
    nav ul li:first-child { border-top: 0; }
    nav a { display: block; padding: 14px 2px; }
  }
  @media (max-width: 420px) {
    .logo .logo-svg { height: 32px; }
  }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .thumb::before, .thumb::after, .portrait::before, .portrait::after { transition: none; } }

  /* Video-overlay (lightbox) */
  .video-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(8,16,24,.92);
    display: flex; align-items: center; justify-content: center;
    padding: 56px 16px 16px;
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  .video-overlay.open { opacity: 1; pointer-events: auto; }
  .video-overlay-inner { width: 100%; max-width: 960px; }
  .video-overlay-frame {
    position: relative; width: 100%; aspect-ratio: 16/9;
    background: #000; box-shadow: 0 20px 60px rgba(0,0,0,.5);
  }
  .video-overlay-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
  .video-overlay-title { color: #fff; font-weight: 600; margin: 14px 2px 0; font-size: 1rem; }
  .video-overlay-close {
    position: fixed; top: 16px; right: 16px; z-index: 101;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.5); color: #fff;
    font-size: 1.3rem; line-height: 1; cursor: pointer;
  }
  .video-overlay-close:hover { background: var(--green); border-color: var(--green); }

/* WordPress basics */
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
