/*
Theme Name: Mpiece Legal
Theme URI: https://www.mpiecelegal.com
Author: Mpiece Legal
Description: Maatwerkthema voor Mpiece Legal: arbeidsrecht (werknemers en werkgevers), financieel recht, ondernemingsrecht, blog en contact. Bij activering worden de pagina's, het menu en de voorpagina automatisch ingesteld.
Version: 1.1.0
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mpiece-legal
*/

/* ---------- Lettertypen (lokaal gehost, geen Google-verzoeken: AVG-vriendelijk) ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Kleuren uit het logo ---------- */
:root {
  color-scheme: light;
  --brand: #3b2d74;          /* exacte logokleur */
  --brand-deep: #231a4a;
  --bg: #ffffff;
  --surface: #eeebf6;
  --text: #1f1b33;
  --muted: #5e5875;
  --line: #dad5ea;
  --link: #3b2d74;
  --btn-bg: #3b2d74;
  --btn-fg: #ffffff;
  --footer-bg: #231a4a;
  --on-brand: #ffffff;
  --on-brand-muted: #d6cff0;
  --focus: #8a74e8;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Figtree", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --point: clamp(2.5rem, 6vw, 4.5rem); /* hoogte van de diamantpunt onder banners */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #17122f;
    --surface: #221a45;
    --text: #ece9f5;
    --muted: #b7afd3;
    --line: #3a3064;
    --link: #cbbff5;
    --btn-bg: #cbbff5;
    --btn-fg: #17122f;
    --footer-bg: #0f0b22;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17122f;
  --surface: #221a45;
  --text: #ece9f5;
  --muted: #b7afd3;
  --line: #3a3064;
  --link: #cbbff5;
  --btn-bg: #cbbff5;
  --btn-fg: #17122f;
  --footer-bg: #0f0b22;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.375rem; font-weight: 500; }
p { margin: 0 0 1.1em; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.screen-reader-text, .sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link:focus {
  position: fixed; top: 1rem; left: 1rem; z-index: 100; width: auto; height: auto; clip: auto;
  background: var(--bg); color: var(--text); padding: 0.75rem 1rem; margin: 0;
}

/* ---------- Knoppen ---------- */
.button, .wp-block-button__link, button[type="submit"], input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.4rem;
  font: 600 1rem/1.2 var(--sans);
  border: 2px solid var(--btn-bg); border-radius: 0;
  background: var(--btn-bg); color: var(--btn-fg);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.button:hover, .wp-block-button__link:hover, button[type="submit"]:hover { background: transparent; color: var(--link); }
.button--outline { background: transparent; color: var(--link); border-color: var(--link); }
.button--outline:hover { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.button--light { background: #fff; border-color: #fff; color: var(--brand); }
.button--light:hover { background: transparent; color: #fff; }
.button--ghost-light { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.button--ghost-light:hover { background: #fff; color: var(--brand); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text); }
.brand__mark { width: 2.1rem; height: auto; flex: none; }
.brand__mark path { fill: var(--brand); }
.brand__mark .outline { fill: none; stroke: var(--brand); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__mark path { fill: #cbbff5; }
  :root:not([data-theme="light"]) .brand__mark .outline { fill: none; stroke: #cbbff5; }
}
.brand__name { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1; }
.brand__name span { font-weight: 300; }
.custom-logo { max-height: 3rem; width: auto; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--text);
  min-height: 2.75rem; padding: 0.4rem 0.9rem; font: 600 0.95rem var(--sans); cursor: pointer;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a {
  display: block; padding: 0.6rem 0.8rem; color: var(--text); text-decoration: none; font-weight: 500;
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a, .main-nav .current_page_parent > a { color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.main-nav .menu-item-has-children { position: relative; }
.main-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 16rem;
  background: var(--bg); border: 1px solid var(--line);
  padding: 0.4rem 0; display: none;
}
.main-nav .menu-item-has-children:hover > .sub-menu,
.main-nav .menu-item-has-children:focus-within > .sub-menu { display: block; }
.main-nav .menu-cta > a { background: var(--btn-bg); color: var(--btn-fg); padding-inline: 1.1rem; margin-left: 0.5rem; }
.main-nav .menu-cta > a:hover, .main-nav .menu-cta.current-menu-item > a { background: var(--brand-deep); color: #fff; text-decoration: none; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: 0.5rem var(--gutter) 1.25rem; max-height: calc(100vh - 5rem); overflow-y: auto; }
  .main-nav.is-open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
  .main-nav .sub-menu { position: static; display: block; border: 0; padding: 0 0 0 1.25rem; min-width: 0; }
  .main-nav .menu-cta > a { margin: 1rem 0 0; text-align: center; border: 0; }
}

/* ---------- Kenmerkend element: banners die eindigen in de punt van het logo ---------- */
.pointed {
  background: var(--brand);
  color: var(--on-brand);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--point)), 50% 100%, 0 calc(100% - var(--point)));
  padding-bottom: calc(var(--point) + 2rem);
}
.pointed a:not(.button) { color: #fff; }

/* Home-hero */
.hero { padding-top: clamp(3rem, 8vw, 6.5rem); position: relative; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.75rem); font-weight: 400; max-width: 14ch; margin-bottom: 0.45em; }
.hero__lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--on-brand-muted); max-width: 38rem; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.hero__mark { justify-self: end; width: min(100%, 19rem); }
.hero__mark .outline { fill: none; stroke: rgba(255,255,255,.85); }
.hero__mark .solid { fill: rgba(255,255,255,.12); stroke: rgba(255,255,255,.85); }
@media (max-width: 800px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__mark { display: none; }
}

/* Pagina-banner */
.page-banner { padding-top: clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
.page-banner h1 { max-width: 20ch; margin-inline: auto; margin-bottom: 0.3em; }
.page-banner__lead { color: var(--on-brand-muted); font-size: 1.2rem; max-width: 40rem; margin: 0 auto; }
.page-banner__parent { display: inline-block; margin-bottom: 1rem; font-weight: 500; color: var(--on-brand-muted) !important; }
.page-banner__meta { color: var(--on-brand-muted); margin: 0; }

/* ---------- Secties ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--tint { background: var(--surface); }
.section__head { max-width: 40rem; margin-bottom: 2.5rem; }
.section__head p { color: var(--muted); font-size: 1.125rem; }

/* Rechtsgebieden als rijen, niet als kaartjes */
.areas { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.area { border-bottom: 1px solid var(--line); }
.area a {
  display: grid; grid-template-columns: 1.1rem minmax(0, 18rem) minmax(0, 1fr) auto;
  gap: 1.5rem; align-items: baseline;
  padding: 1.75rem 0; color: var(--text); text-decoration: none;
}
.area__marker { width: 0.7rem; height: 0.7rem; background: var(--link); transform: rotate(45deg) translateY(-0.15rem); align-self: center; }
.area__name { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 1.9rem); line-height: 1.15; }
.area__desc { color: var(--muted); max-width: 34rem; }
.area__more { font-weight: 600; color: var(--link); white-space: nowrap; }
.area a:hover .area__name, .area a:focus-visible .area__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.area a:hover .area__marker { background: var(--text); }
@media (max-width: 760px) {
  .area a { grid-template-columns: 1.1rem 1fr; gap: 0.35rem 1rem; }
  .area__desc, .area__more { grid-column: 2; }
}

/* Werkwijze-blok: kop links, inhoud rechts */
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); }
.split__aside h2 { position: sticky; top: 7rem; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } .split__aside h2 { position: static; } }

/* ---------- Werknemers / werkgevers: de twee helften van het logo ---------- */
.halves { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 2.5rem; }
.half { padding: clamp(2rem, 5vw, 3.5rem); display: flex; flex-direction: column; align-items: flex-start; }
.half h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); }
.half p { max-width: 32rem; }
.half .button { margin-top: auto; }
.half--dark { background: var(--brand); color: #fff; }
.half--dark p { color: var(--on-brand-muted); }
.half--light { background: var(--surface); }
.half--light p { color: var(--muted); }
.half ul { margin: 0 0 1.75rem; padding: 0; list-style: none; }
.half li { padding-left: 1.4rem; position: relative; margin-bottom: 0.35rem; }
.half li::before { content: ""; position: absolute; left: 0.1rem; top: 0.62em; width: 0.42rem; height: 0.42rem; background: currentColor; transform: rotate(45deg); }
@media (max-width: 760px) { .halves { grid-template-columns: 1fr; } }

.switch-note {
  margin-top: 3rem; padding: 1.5rem 1.75rem; background: var(--surface);
  border-left: 4px solid var(--brand);
}
.switch-note p { margin: 0; }

/* ---------- Inhoud van pagina's en berichten ---------- */
.entry { max-width: 44rem; }
.entry--center { margin-inline: auto; }
.entry > * + h2 { margin-top: 2.2em; }
.entry > * + h3 { margin-top: 1.8em; }
.entry h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.entry ul { list-style: none; padding-left: 0; }
.entry ul li { padding-left: 1.5rem; position: relative; margin-bottom: 0.5rem; }
.entry ul li::before { content: ""; position: absolute; left: 0.15rem; top: 0.62em; width: 0.45rem; height: 0.45rem; background: var(--link); transform: rotate(45deg); }
.entry ol { padding-left: 1.4rem; }
.entry blockquote { margin: 2rem 0; padding: 0 0 0 1.5rem; border-left: 3px solid var(--brand); font-family: var(--serif); font-size: 1.35rem; line-height: 1.45; }
.entry .wp-block-columns { gap: 2rem; margin-block: 2rem; }
.entry .alignwide { max-width: var(--wrap); }
.entry img { height: auto; }
.entry > .wp-block-buttons { margin-top: 2rem; }
.entry > p:first-child { font-size: 1.2rem; }
.lead, .entry .is-style-lead { font-size: 1.25rem; color: var(--muted); }
.callout {
  background: var(--surface); padding: 1.5rem 1.75rem; border-left: 4px solid var(--brand); margin: 2rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Blog ---------- */
.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.post-row { border-bottom: 1px solid var(--line); padding: 2rem 0; display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 1.5rem; }
.post-row time { color: var(--muted); font-size: 0.95rem; padding-top: 0.35rem; }
.post-row h2, .post-row h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); margin-bottom: 0.4rem; }
.post-row h2 a, .post-row h3 a { color: var(--text); text-decoration: none; }
.post-row h2 a:hover, .post-row h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.post-row p { color: var(--muted); margin: 0; max-width: 44rem; }
.post-row__cat { font-size: 0.95rem; font-weight: 600; color: var(--link); text-decoration: none; }
@media (max-width: 640px) { .post-row { grid-template-columns: 1fr; gap: 0.25rem; } }
.pagination { margin-top: 2.5rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-flex; min-width: 2.75rem; min-height: 2.75rem; align-items: center; justify-content: center; padding: 0 0.75rem; border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.pagination .current { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.empty-state { padding: 2rem; background: var(--surface); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.details { background: var(--surface); padding: 2rem; }
.details h2 { font-size: 1.6rem; }
.details dl { margin: 0; display: grid; gap: 1rem; }
.details dt { font-weight: 600; font-size: 0.95rem; color: var(--muted); }
.details dd { margin: 0; }
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field .hint { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--muted); border-radius: 0; padding: 0.75rem 0.85rem; min-height: 3rem;
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--brand); }
.check { display: flex; gap: 0.7rem; align-items: flex-start; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; accent-color: var(--brand); flex: none; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 1rem 1.25rem; margin-bottom: 1.5rem; border-left: 4px solid; }
.notice--ok { border-color: #2f7a4f; background: rgba(47,122,79,.1); }
.notice--error { border-color: #b3261e; background: rgba(179,38,30,.08); }

/* ---------- Contactband onderaan pagina's ---------- */
.cta-band { padding-block: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line); }
.cta-band__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
.cta-band h2 { margin-bottom: 0.3em; }
.cta-band p { color: var(--muted); margin: 0; font-size: 1.125rem; }
.cta-band__actions { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.cta-band__phone { font-weight: 600; }
@media (max-width: 760px) { .cta-band__inner { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg); color: #d6cff0;
  clip-path: polygon(0 var(--point), 50% 0, 100% var(--point), 100% 100%, 0 100%);
  padding-top: calc(var(--point) + 3rem);
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.98rem;
}
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 1.15rem; color: #fff; margin-bottom: 0.9rem; font-family: var(--serif); font-weight: 500; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer address { font-style: normal; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand__mark path { fill: #fff; }
.footer-brand .brand__mark .outline { fill: none; stroke: #fff; }
.footer-brand p { margin-top: 1rem; max-width: 22rem; }
.footer-bottom { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.15); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.9rem; }
.footer-bottom ul { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-bottom li { margin: 0; }

/* ---------- Beweging ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__mark .outline { animation: drop 1.1s cubic-bezier(.2,.7,.2,1) both .2s; }
  @keyframes drop { from { transform: translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
}
