/*
Theme Name: Dré Facility Service
Theme URI: https://facility-service.nl
Author: Ng-solutions
Description: Donker, strak en plugin-vrij thema voor Dré Facility Service in rood, wit en zwart. Scramble-menu, magnetische contactknop, dienstenlijst met detailpaneel en een werkend contactformulier via wp_mail().
Version: 4.7.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dre-facility
*/

/* ==========================================================
   1. Tokens — donker, rood / wit / zwart
   ========================================================== */
:root {
  --bg: #131313;
  --bg-soft: #1a1a1a;
  --white: #f5f4f2;
  --pure-white: #ffffff;
  --red: #e02531;
  --red-dark: #a5121b;
  --grey: #9a9a9a;
  --line: #2c2c2c;
  --line-strong: #3a3a3a;

  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;

  --container: 1200px;
  --header-h: 72px;
  --pad: clamp(64px, 9vw, 120px);
}

/* ==========================================================
   2. Base
   ========================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--white);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--white); text-decoration: none; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.02;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--pure-white);
}
h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; color: var(--grey); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--pad) 0; }
.section + .section, .rule-top { border-top: 1px solid var(--line); }

.eyebrow {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}

/* ==========================================================
   3. Header — donker, scramble-menu, magnetische knop
   ========================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(19, 19, 19, 0.97) 55%, rgba(19, 19, 19, 0.82) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Subtiel rood lichtlijntje dat langzaam onderlangs de header glijdt */
.header-glow {
  position: absolute;
  left: 0; bottom: 0;
  width: 220px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.75;
  animation: glow-sweep 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glow-sweep {
  0%   { transform: translateX(-220px); }
  50%  { transform: translateX(100vw); }
  100% { transform: translateX(-220px); }
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; flex: none; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--pure-white);
}
.brand-text em { font-style: normal; color: var(--red); }
.brand:hover .brand-text { color: var(--pure-white); }

.main-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block;
  padding: 6px 0;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--white);
  transition: color .35s ease, opacity .35s ease;
}
/* Vervloeien: bij hover over het menu dimmen de overige items zacht weg */
.main-nav ul:hover a { opacity: 0.4; }
.main-nav ul:hover a:hover { opacity: 1; color: var(--red); }
.main-nav a.is-active { color: var(--red); }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--white);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  overflow: hidden;
  transition: color .25s ease, border-color .25s ease;
  z-index: 0;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: translateX(-101%);
  transition: transform .25s ease;
  z-index: -1;
}
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: none; }
.btn-red { border-color: var(--red); background: var(--red); color: var(--pure-white); }
.btn-red::before { background: var(--pure-white); }
.btn-red:hover { color: var(--bg); border-color: var(--pure-white); }

.header-cta { padding: 10px 20px; font-size: 0.82rem; }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--white); margin: 5px 0; transition: transform .25s ease, opacity .25s ease; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================
   4. Hero — donker, intro-animatie
   ========================================================== */
.hero {
  padding: calc(var(--header-h) + clamp(72px, 11vw, 150px)) 0 clamp(64px, 9vw, 110px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
/* Logo in de hero */
.hero-logo {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
}
.hero-logo img {
  height: 78px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  /* zachte rode gloed achter het witte logo */
  filter: drop-shadow(0 0 18px rgba(224, 37, 49, 0.35));
}
.hero-logo-rule {
  flex: none;
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, transparent, var(--red), transparent);
}
.hero-logo-claim {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--grey);
  max-width: 7ch;
  line-height: 1.4;
}

.hero h1 { max-width: 15ch; }
.hero h1 .accent { color: var(--red); }
.hero p.lead { font-size: 1.15rem; max-width: 34em; margin-top: 8px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-media {
  margin: 0;
  border: 1px solid var(--line-strong);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  opacity: 0;
  animation: intro .7s .35s ease forwards;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(35%) contrast(1.05);
  transition: transform .6s ease, filter .6s ease;
}
.hero-media:hover img { transform: scale(1.04); filter: none; }

.intro > * { opacity: 0; transform: translateY(18px); animation: intro .7s ease forwards; }
.intro > *:nth-child(1) { animation-delay: .05s; }
.intro > *:nth-child(2) { animation-delay: .18s; }
.intro > *:nth-child(3) { animation-delay: .3s; }
.intro > *:nth-child(4) { animation-delay: .42s; }
.intro > *:nth-child(5) { animation-delay: .54s; }
@keyframes intro { to { opacity: 1; transform: none; } }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(48px, 7vw, 80px);
  border-top: 1px solid var(--line);
}
.hero-facts > div { padding: 22px 24px 0 0; }
.hero-facts > div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.hero-facts strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pure-white);
}
.hero-facts strong em { font-style: normal; color: var(--red); }
.hero-facts span { font-size: 0.82rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.1em; }

/* ==========================================================
   5. Over ons
   ========================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.about-media {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.about-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(25%); transition: filter .5s ease; }
.about-media:hover img { filter: none; }
.check-list { list-style: none; margin: 24px 0 0; padding: 0; }
.check-list li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--grey); }
.check-list li:last-child { border-bottom: 1px solid var(--line); }
.check-list strong { color: var(--pure-white); }

/* ==========================================================
   6. Diensten — lijst met detailpaneel
   ========================================================== */
.services-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-strong);
  /* Ruimte voor de afbeelding + tekst in het detailpaneel */
  min-height: 660px;
}
.services-list {
  border-right: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
}
.services-list .service-item { flex: 1; }
.service-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--white);
  transition: background .18s ease, color .18s ease;
}
.service-item:last-child { border-bottom: 0; }
/* Titel schuift met transform i.p.v. padding: geen herberekening van de hoogte */
.service-item .label {
  display: block;
  transition: transform .18s ease;
}
.service-item:hover .label, .service-item.is-active .label { transform: translateX(8px); }
.service-item .arrow { font-family: var(--font-body); font-weight: 400; opacity: 0; transform: translateX(-6px); transition: opacity .18s ease, transform .18s ease; }
.service-item:hover { color: var(--red); }
.service-item.is-active { background: var(--red); color: var(--pure-white); }
.service-item.is-active:hover { color: var(--pure-white); }
.service-item.is-active .arrow { opacity: 1; transform: none; color: var(--pure-white); }
.service-item:hover .arrow { opacity: 1; transform: none; }

.services-split { align-items: stretch; }
.service-detail {
  position: relative;
  background: var(--bg-soft);
  /* De kolom leent zijn hoogte van de dienstenlijst: het paneel groeit niet mee
     met de tekstlengte, zodat de sectie nooit verspringt. */
  min-height: 0;
  overflow: hidden;
}
.service-detail > .detail-swap {
  position: absolute;
  inset: 0;
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
}
.detail-media {
  margin: 0 0 24px;
  border: 1px solid var(--line-strong);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
  flex: none;
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.service-detail h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: 14px; }
.service-detail h3::after {
  content: "";
  display: block;
  width: 44px; height: 3px;
  background: var(--red);
  margin-top: 14px;
}
.service-detail p { max-width: 42em; }
.service-detail .detail-tag {
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 6px 12px;
  margin-top: 20px;
}
.detail-swap { transition: opacity .22s ease; }
.detail-swap.is-out { opacity: 0; }

/* ==========================================================
   7. Waarom wij — wit contrastblok
   ========================================================== */
.bg-light { background: var(--white); color: #4a4a4a; }
.bg-light h2, .bg-light h3 { color: #111111; }
.bg-light .section-head p { color: #6b6b6b; }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }

.usp-row { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #111111; }
.usp { padding: 30px 26px 6px 0; }
.usp + .usp { border-left: 1px solid #d9d7d3; padding-left: 26px; }
.usp h3 { font-size: 1.02rem; }
.usp h3::before {
  content: "";
  display: block;
  width: 26px; height: 3px;
  background: var(--red);
  margin-bottom: 14px;
}
.usp p { font-size: 0.93rem; color: #6b6b6b; margin: 0; }

/* ==========================================================
   8. Contact — vlak formulier met onderlijnen
   ========================================================== */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(40px, 7vw, 96px); align-items: start; }
.contact-line { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.contact-line b { min-width: 88px; font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--red); }
.contact-line a, .contact-line span { color: var(--white); font-weight: 600; }
.contact-line a:hover { color: var(--red); }
.contact-meta { font-size: 0.85rem; color: var(--grey); margin-top: 18px; }

.field { margin-bottom: 26px; }
.field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  color: var(--white);
}
.field input, .field textarea {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  font: inherit;
  color: var(--pure-white);
  background: transparent;
  transition: border-color .15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom: 2px solid var(--red); }
.field textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.hp-field { position: absolute !important; left: -9999px !important; }

.form-notice { padding: 14px 18px; margin-bottom: 24px; font-weight: 600; border-left: 3px solid; background: var(--bg-soft); }
.form-notice.success { color: #7fd693; border-color: #7fd693; }
.form-notice.error { color: #ff8a8a; border-color: var(--red); }

/* ==========================================================
   9. Footer
   ========================================================== */
.site-footer { background: #0d0d0d; color: var(--grey); padding: 56px 0 28px; font-size: 0.93rem; border-top: 1px solid var(--line); }
.footer-logo { max-width: 190px; height: auto; margin-bottom: 16px; }

/* Telefoonnummers netjes onder elkaar uitgelijnd */
.footer-contact {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 18px;
  row-gap: 8px;
  margin: 0 0 1.1em;
  align-items: baseline;
}
.footer-contact dt {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red);
}
.footer-contact dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.footer-contact dd a { color: var(--pure-white); font-weight: 600; }
.footer-contact dd a:hover { color: var(--red); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.site-footer h4 { color: var(--pure-white); font-size: 0.85rem; letter-spacing: 0.1em; margin-bottom: 14px; }
.site-footer a { color: #c5c5c5; }
.site-footer a:hover { color: var(--red); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.82rem; }

/* ==========================================================
   9b. Terug-naar-boven-knop
   ========================================================== */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  width: 52px;
  height: 52px;
  border: 1px solid var(--red);
  background: var(--red);
  color: var(--pure-white);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--bg); color: var(--red); }

/* ==========================================================
   10. Reveal & motion
   ========================================================== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .intro > *, .hero-media { opacity: 1; transform: none; }
  .header-glow { display: none; }
  .to-top { transition: none; }
}

/* ==========================================================
   11. Standaardpagina's
   ========================================================== */
.page-plain { padding: calc(var(--header-h) + 48px) 0 80px; }
.page-plain .entry { max-width: 760px; margin: 0 auto; }

/* ==========================================================
   12. Responsive
   ========================================================== */
@media (max-width: 1100px) and (min-width: 981px) {
  .services-split { min-height: 720px; }
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16 / 9; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .usp-row { grid-template-columns: 1fr 1fr; }
  .usp:nth-child(3) { border-left: 0; padding-left: 0; }
  .usp { padding-bottom: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .services-split { grid-template-columns: 1fr; min-height: 0; }
  .services-list { border-right: 0; border-bottom: 1px solid var(--line-strong); display: block; }
  .service-detail { overflow: visible; min-height: auto; }
  .service-detail > .detail-swap {
    position: static;
    inset: auto;
    overflow: visible;
    min-height: 380px;
  }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    width: min(320px, 84vw);
    height: 100vh;
    background: var(--bg);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform .3s ease;
    padding: 96px 28px 28px;
    z-index: 90;
  }
  .nav-open .main-nav { transform: none; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { font-size: 1.1rem; padding: 12px 0; }
  .header-cta { display: none; }
  .hero-logo img { height: 58px; }
  .hero-logo-rule { height: 40px; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 16px; }
  .usp-row { grid-template-columns: 1fr; }
  .usp + .usp { border-left: 0; padding-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
