/*
Theme Name: rel-advocaat
Theme URI: https://rel-advocaat.test.bluect.nl
Author: BlueCT Site Factory
Description: Maatwerk classic PHP-thema voor Jansen Advocaten. Layout in PHP, content in SCF-velden.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: rel-advocaat
*/

/* ============================================================
   Design tokens
   ============================================================ */
:root {
  /* Brand */
  --brand:          #0e2a47; /* deep navy */
  --brand-light:    #1d3f63; /* navy hover */
  --accent:         #b08d57; /* brass/gold: fills, borders, icons, large headings (>=3:1) */
  --accent-text:    #6b4f17; /* darkened brass for SMALL accent text on light (>=4.5:1) */
  --accent-on-dark: #d4b483; /* light brass for small accent text on dark sections */

  /* Surfaces */
  --bg:        #ffffff;
  --bg-alt:    #f5f3ee; /* warm cream section */
  --bg-dark:   #0e2a47; /* dark section / footer */
  --line:      #e4e0d8; /* hairline borders */

  /* Text */
  --ink:       #16263a; /* primary text on light */
  --ink-soft:  #44546a; /* secondary text on light */
  --on-dark:   #ffffff; /* text on dark */
  --on-dark-soft: #cdd6e2; /* secondary text on dark */

  /* Type */
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --maxw: 1280px;
  --measure: 760px;
  --gutter: clamp(1rem, 5vw, 2rem);
  --radius: 10px;
  --shadow: 0 6px 24px rgba(14, 42, 71, 0.08);
  --shadow-lg: 0 18px 48px rgba(14, 42, 71, 0.14);
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-light); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

/* ============================================================
   Layout primitives
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: var(--on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--on-dark); }
.section--dark p { color: var(--on-dark-soft); }

/* Long-form prose measure: ONLY for blog/news articles & genuinely long bodies */
.prose--longform { max-width: var(--measure); }
.prose--longform p { margin-bottom: 1.15rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text); /* small accent text on light -> darkened token */
  margin-bottom: 0.75rem;
}
.section--dark .eyebrow,
.hero .eyebrow { color: var(--accent-on-dark); }

.section__head { max-width: 720px; margin-bottom: 2.5rem; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.section--dark .lead { color: var(--on-dark-soft); }

/* ============================================================
   Buttons (contrast verified per placement)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s ease, background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); }

/* Primary: white text on navy fill -> high contrast on any background */
.btn--primary { background: var(--brand); color: #ffffff; }
.btn--primary:hover { background: var(--brand-light); color: #ffffff; }

/* Accent: DARK ink text on brass fill (white-on-brass fails 4.5:1, dark passes 5.8:1) */
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: #c39c63; color: var(--ink); }

/* Outline on light: navy text + navy border */
.btn--outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--outline:hover { background: var(--brand); color: #ffffff; }

/* Outline on DARK sections/heroes ONLY: white text + white border */
.btn--ghost { background: transparent; color: #ffffff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: #ffffff; color: var(--brand); border-color: #ffffff; }

/* ============================================================
   Header / nav
   ============================================================ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}
.site-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.site-brand__logo { max-height: 48px; width: auto; }
.site-brand__text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--brand);
  white-space: nowrap;
}

.header__nav { display: flex; align-items: center; gap: 2rem; }
.primary-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 0.4rem 0;
  position: relative;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--brand);
}
.primary-nav .current-menu-item > a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
}
.header__cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: var(--brand);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.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); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 1rem var(--gutter) 1.5rem;
    display: none;
  }
  .header__nav.is-open { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
  .header__cta { margin-top: 1rem; }
  .header__cta .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  color: #fff;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(11,24,40,0.80) 0%, rgba(11,24,40,0.62) 60%, rgba(11,24,40,0.72) 100%);
}
.hero__inner {
  padding-block: clamp(4rem, 12vw, 8rem);
  max-width: 760px;
}
.hero h1 { color: #fff; }
.hero p { color: #f0f2f6; font-size: 1.2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero--compact .hero__inner { padding-block: clamp(3rem, 8vw, 5rem); }

/* ============================================================
   Cards / grids
   ============================================================ */
.grid { display: grid; gap: 1.75rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card__link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  color: var(--accent-text);
  text-decoration: none;
}
.card__link:hover { color: var(--brand); }
.card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(176,141,87,0.14);
  color: var(--accent-text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat { text-align: center; }
.stat__value { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; color: var(--accent); line-height: 1; }
.section--dark .stat__value { color: var(--accent-on-dark); }
.stat__label { margin-top: .5rem; font-size: .95rem; color: var(--ink-soft); }
.section--dark .stat__label { color: var(--on-dark-soft); }

/* Steps / process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; }
.step { padding-top: 1rem; border-top: 3px solid var(--accent); }
.step__num { font-family: var(--font-head); font-weight: 700; color: var(--accent-text); font-size: 1.1rem; }

/* Split media + text */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); padding: 1.25rem 0; }
.faq-item h3 { font-family: var(--font-body); font-size: 1.1rem; font-weight: 700; margin-bottom: .4rem; color: var(--brand); }
.faq-item p:last-child { margin-bottom: 0; }

/* Team */
.member__photo img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.member__name { margin: 1rem 0 0; }
.member__role { color: var(--accent-text); font-weight: 600; font-size: .95rem; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .container { max-width: 760px; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.75rem; }

/* News list */
.post-card { display: flex; flex-direction: column; height: 100%; }
.post-card__meta { font-size: .85rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.post-card h3 { margin: .5rem 0; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--brand); }

/* Article (single post) */
.article-header { padding-block: clamp(2.5rem, 6vw, 4rem); }
.article-meta { color: var(--ink-soft); font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.article__lead { font-size: 1.2rem; color: var(--ink-soft); }
.article__figure { margin: 1.5rem 0; }
.article__figure figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: .5rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-card { background: var(--bg-alt); border-radius: var(--radius); padding: 2rem; }
.contact-card ul { list-style: none; padding: 0; margin: 0; }
.contact-card li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.contact-card li:last-child { border-bottom: 0; }
.contact-card a { color: var(--accent-text); font-weight: 600; }
.form-placeholder { border: 2px dashed var(--line); border-radius: var(--radius); padding: 2rem; color: var(--ink-soft); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--bg-dark); color: var(--on-dark-soft); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.site-footer h2, .site-footer h3 { color: #fff; font-family: var(--font-body); font-size: 1.05rem; letter-spacing: .02em; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; }
.footer-brand__text { font-family: var(--font-head); font-size: 1.4rem; color: #fff; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: .55rem; }
.footer-nav a { color: var(--on-dark-soft); text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-contact a { color: var(--accent-on-dark); }
.footer-socials { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.footer-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .35rem .8rem; border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  color: #fff; text-decoration: none; font-size: .85rem;
}
.footer-socials a:hover { background: rgba(255,255,255,.12); }
.footer-cta { margin-top: 1.25rem; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.15);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .85rem; color: var(--on-dark-soft);
}
.footer-bottom a { color: var(--on-dark-soft); }

/* ============================================================
   404
   ============================================================ */
.error-404 { text-align: center; padding-block: clamp(4rem, 10vw, 7rem); }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease-out, transform .5s ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Focus
   ============================================================ */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 599px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; align-items: stretch; }
  .stats { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; align-items: stretch; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__inner { padding-block: clamp(3rem, 14vw, 5rem); }
  .cta-band__actions, .hero__actions { flex-direction: column; align-items: stretch; }
  .cta-band__actions .btn, .hero__actions .btn { justify-content: center; }
}

/* ============================================================
   Reduced motion — disable all motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .btn:hover, .card:hover { transform: none !important; }
}
