/*
Theme Name: mensedesigns
Theme URI: https://mensedesigns.nl
Author: Twan ten Hoove
Description: Portfolio- en bureauthema van mensedesigns. Strak en hoekig: petrol, zwart en wit, met de zaagtand en schuine snede uit het beeldmerk.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: All rights reserved
Text Domain: mensedesigns
*/

:root {
  --teal: #368083;
  --teal-deep: #2a6669;
  --teal-light: #6fb3b5;
  --teal-tint: #e3eeee;
  --paper: #ffffff;
  --paper-alt: #f3f6f6;
  --ink: #000000;
  --ink-muted: #4a5a5b;
  --line: #d5dfdf;
  --font: 'Source Sans 3', 'Myriad Variable Concept', system-ui, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 26px;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--teal-deep); }
a:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 16px;
}
.skip-link:focus { left: 0; color: #fff; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { max-width: 1440px; margin: 0 auto; padding-left: 80px; padding-right: 80px; }

/* Typografie */
.label {
  font-size: 13px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.label--teal { color: var(--teal-deep); }
.display {
  margin: 0; font-weight: 900; font-style: italic;
  letter-spacing: -0.01em; text-transform: lowercase;
}
.display--l { font-size: 56px; line-height: 56px; }
.lead { font-size: 19px; line-height: 30px; }
.muted { color: var(--ink-muted); }

/* Knoppen */
.btn {
  display: inline-flex; align-items: center; min-height: 48px;
  padding: 0 28px; font-size: 16px; font-weight: 600; text-decoration: none;
}
.btn--teal { background: var(--teal); color: #fff; }
.btn--teal:hover { background: var(--teal-deep); color: #fff; }
.btn--outline { border: 2px solid var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: var(--teal-tint); color: var(--ink); }

/* Header */
.site-header .header-inner {
  display: flex; flex-wrap: wrap; gap: 16px 32px;
  align-items: center; justify-content: space-between;
  padding-top: 20px; padding-bottom: 20px;
}
.site-logo { display: block; }
.site-logo img, .custom-logo { display: block; width: 210px; height: auto; }
.site-nav ul {
  display: flex; flex-wrap: wrap; gap: 4px 28px; align-items: center;
  list-style: none; margin: 0; padding: 0;
}
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 16px; font-weight: 600; text-decoration: none;
}
.site-nav .menu-cta a, .site-nav a.menu-cta {
  padding: 0 24px; background: var(--ink); color: #fff;
}
.site-nav .menu-cta a:hover, .site-nav a.menu-cta:hover {
  background: var(--teal-deep); color: #fff;
}

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: stretch; padding-top: 24px; }
.hero-text {
  flex: 1 1 480px; display: flex; flex-direction: column;
  justify-content: center; padding: 24px 0 64px;
}
.hero-text h1 {
  margin: 16px 0 24px;
  font-size: clamp(44px, 6.4vw, 96px); line-height: 0.98;
}
.hero-text p { margin: 0 0 32px; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visual {
  flex: 1 1 420px; position: relative; min-height: 520px;
  background: var(--teal); overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 200px 100%, 0 calc(100% - 162px));
}
.hero-visual img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; }
.m-shape {
  position: absolute; right: -6%; bottom: 12%; width: 92%; aspect-ratio: 9 / 5;
  background: var(--teal-deep);
  clip-path: polygon(4.6% 8.3%, 72.2% 8.3%, 72.2% 29.3%, 95.4% 8.3%, 95.4% 94%, 71.3% 94%, 71.3% 58.7%, 51.5% 94%, 29.6% 94%, 29.6% 57.3%, 4.6% 94%);
}

/* Secties */
.section { padding-top: 88px; padding-bottom: 80px; }
.section-head {
  display: flex; flex-wrap: wrap; gap: 12px 32px;
  align-items: baseline; justify-content: space-between; margin-bottom: 40px;
}

/* Werk */
.grid-work {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px 24px;
}
.card a { display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: var(--ink); }
.card a:hover .card-title { color: var(--teal-deep); }
.card-img {
  aspect-ratio: 4 / 3; background: var(--teal-tint); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--ink-muted);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 80px 100%, 0 calc(100% - 65px));
}
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-title { font-size: 22px; line-height: 28px; font-weight: 600; }
.card-label { margin-top: 6px; }

/* Diensten */
.services { background: var(--paper-alt); }
.grid-services {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px 24px;
}
.service { border-top: 3px solid var(--teal); padding-top: 20px; }
.service h3 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; }
.service p { margin: 10px 0 0; color: var(--ink-muted); }

/* Over mij */
.about { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 88px; padding-bottom: 88px; }
.about-photo {
  flex: 0 1 380px; aspect-ratio: 4 / 5; background: var(--teal-tint);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--ink-muted);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 120px 100%, 0 calc(100% - 97px));
}
.about-photo { position: relative; }
.about-photo img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; display: block; }
.about-text { flex: 1 1 420px; max-width: 640px; }
.about-text h2 { margin-bottom: 24px; }
.about-text p { margin: 0 0 16px; }

/* Contact */
.contact { position: relative; overflow: hidden; background: var(--teal); color: #fff; }
.contact a { color: inherit; }
.contact .btn--white { color: var(--ink); }
.sawtooth { display: block; position: relative; z-index: 1; width: 100%; height: 60px; background: var(--paper); }
.contact-inner { padding-top: 56px; padding-bottom: 88px; }
.contact h2 { max-width: 900px; margin-bottom: 20px; font-size: clamp(40px, 5.6vw, 80px); line-height: 0.98; }
.contact p { margin: 0 0 32px; max-width: 520px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }

/* Footer */
.site-footer { background: var(--ink); color: #9aabab; }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center;
  justify-content: space-between; padding-top: 32px; padding-bottom: 32px;
}
.footer-inner img { display: block; width: 190px; height: auto; }
.footer-inner small { font-size: 13px; line-height: 18px; }

/* Pagina's en projecten */
.page-content { padding-top: 64px; padding-bottom: 88px; max-width: 840px; }
.page-content h1 { margin-bottom: 32px; font-size: clamp(40px, 5vw, 64px); line-height: 1; }
.prose p, .prose li { font-size: 17px; line-height: 28px; }
.prose h2, .prose h3 { font-weight: 700; line-height: 1.2; }
.prose img { height: auto; }
.project-hero {
  margin: 32px 0; max-height: 560px; overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 120px 100%, 0 calc(100% - 97px));
}
.project-hero img { display: block; width: 100%; height: auto; }

/* Responsive */
@media (max-width: 720px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .display--l { font-size: 44px; line-height: 44px; }
  .section, .about { padding-top: 56px; padding-bottom: 56px; }
  .hero-visual { min-height: 360px; clip-path: polygon(0 0, 100% 0, 100% 100%, 120px 100%, 0 calc(100% - 97px)); }
}

/* ===== Beweging (versie 1.1) ===== */

/* Header blijft staan en krijgt een lijn zodra je scrolt */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .3s; }
.admin-bar .site-header { top: 32px; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .site-logo img, .site-header .custom-logo { transition: width .3s; }
.site-header.is-scrolled .site-logo img, .site-header.is-scrolled .custom-logo { width: 170px; }

/* Knoppen met schuine hoek (39 graden), zoals het beeldmerk */
.btn--teal, .btn--white {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 16px 100%, 0 calc(100% - 13px));
}
.btn--teal:focus-visible, .btn--white:focus-visible { clip-path: none; }

/* Kaarten: beeld zoomt zacht in bij hover */
.card-img img { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card a:hover .card-img img { transform: scale(1.05); }

/* Onthullen bij scrollen (alleen met JavaScript) */
html.js [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s ease var(--d, 0s), transform .8s cubic-bezier(.2, .8, .2, 1) var(--d, 0s);
}
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Parallax-elementen bewegen via JavaScript */
[data-parallax] { will-change: transform; }

/* Contact: grote M-vorm op de achtergrond */
.contact-m {
  position: absolute; right: -4%; bottom: -12%; width: min(560px, 60vw); aspect-ratio: 9 / 5;
  background: var(--teal-deep); pointer-events: none;
  clip-path: polygon(4.6% 8.3%, 72.2% 8.3%, 72.2% 29.3%, 95.4% 8.3%, 95.4% 94%, 71.3% 94%, 71.3% 58.7%, 51.5% 94%, 29.6% 94%, 29.6% 57.3%, 4.6% 94%);
}
.contact-inner { position: relative; z-index: 1; }

/* Contact: de tanden groeien een voor een omhoog tot scherpe punten */
html.js .tooth {
  transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0);
  transition: transform .65s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 45ms);
}
html.js .contact.is-visible .tooth { transform: scaleY(1); }

/* Laadanimatie */
html.is-loading { overflow: hidden; }
html:not(.is-loading) .loader:not(.is-done) { display: none; }
.loader {
  position: fixed; inset: 0; z-index: 1000; background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: transform .9s cubic-bezier(.77, 0, .18, 1);
}
.loader.is-done { transform: translateY(-100%); }
.loader-edge { position: absolute; left: 0; top: 100%; width: 100%; height: 60px; pointer-events: none; }
.loader-logo { position: relative; width: min(560px, 80vw); aspect-ratio: 1660 / 300; }
.loader-logo img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.loader-mark { clip-path: inset(100% 67.5% 0 0); animation: loader-mark .75s .15s cubic-bezier(.2, .8, .2, 1) forwards; }
.loader-word { clip-path: inset(0 100% 0 32.5%); animation: loader-word .85s .7s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes loader-mark { to { clip-path: inset(0 67.5% 0 0); } }
@keyframes loader-word { to { clip-path: inset(0 0 0 32.5%); } }

/* Minder beweging: alles direct zichtbaar */
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  html.js .tooth { transform: none; transition: none; }
  [data-parallax] { transform: none !important; will-change: auto; }
  .loader { display: none !important; }
  .card-img img { transition: none; }
}

/* ===== Portfolio en blokken (versie 1.2) ===== */

/* Kop van de portfoliopagina met meebewegende M-vorm */
.portfolio-head { position: relative; overflow: hidden; padding-top: 56px; padding-bottom: 40px; }
.portfolio-head > *:not(.portfolio-m) { position: relative; z-index: 1; }
.portfolio-head h1 { margin-top: 16px; font-size: clamp(48px, 7vw, 96px); line-height: .98; }
.portfolio-m {
  position: absolute; right: -4%; top: -14%; width: min(520px, 55vw); aspect-ratio: 9 / 5;
  background: var(--teal-tint); pointer-events: none;
  clip-path: polygon(4.6% 8.3%, 72.2% 8.3%, 72.2% 29.3%, 95.4% 8.3%, 95.4% 94%, 71.3% 94%, 71.3% 58.7%, 51.5% 94%, 29.6% 94%, 29.6% 57.3%, 4.6% 94%);
}
.portfolio-content { padding-bottom: 88px; }

/* Beeld in de portfolio: schuine snede linksonder (39 graden), scherpe hoeken */
.portfolio-content img {
  display: block; max-width: 100%; height: auto;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 40px 100%, 0 calc(100% - 32px));
}

/* Filter- en sorteerknoppen van een portfolio-plugin in merkstijl */
.portfolio-page .entry-content :is(button, .button, [role="button"]) {
  min-height: 44px; padding: 14px 20px !important; border: 0 !important; border-radius: 0 !important;
  background: var(--paper-alt) !important; color: var(--ink-muted) !important;
  font: 600 13px/16px var(--font) !important; letter-spacing: .08em !important; text-transform: uppercase !important;
  box-shadow: none !important; cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 10px));
  transition: background-color .25s, color .25s;
}
.portfolio-page .entry-content :is(button, .button, [role="button"]):is(:hover, .active, .is-active, .selected, .current, [aria-pressed="true"]) {
  background: var(--teal) !important; color: #fff !important;
}
.portfolio-page .entry-content :is(button, .button, [role="button"]):focus-visible { clip-path: none; }

/* Blokken uit de editor */
.parallax-img {
  position: relative; overflow: hidden; margin: 0; aspect-ratio: 4 / 3;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 80px 100%, 0 calc(100% - 65px));
}
.parallax-img img {
  position: absolute !important; left: 0; top: -8%; width: 100% !important; height: 116% !important;
  object-fit: cover; clip-path: none !important;
}
.wp-block-cover.has-parallax { background-attachment: fixed; }
.entry-content .wp-block-button__link { border-radius: 0; }

@media (prefers-reduced-motion: reduce) {
  .portfolio-page .entry-content :is(button, .button, [role="button"]) { transition: none; }
}
