/*
Theme Name: Optiek Timmer
Theme URI: https://optiektimmer.nl/
Author: Maatwerk thema
Description: Maatwerk WordPress-thema voor Optiek Timmer. Layout gebaseerd op de opbouw van lindenhovius.nl (split-hero, afwisselende tekst/beeld-blokken, team-rij, merkenslider), in de kleurstijl van Optiek Timmer. Klassiek PHP-thema met eigen Gutenberg-secties, zonder afhankelijkheid van paginabuilders.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.6
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: optiek-timmer
*/

/* =====================================================================
   1. KLEUREN
   ---------------------------------------------------------------------
   --brand is de HOOFDKLEUR. De met (admin) gemarkeerde variabelen zijn
   los instelbaar via Uiterlijk → Aanpassen → Merkkleuren en overschrijven
   deze standaardwaarden.
   ===================================================================== */
:root {
    --brand:         #935e3a;          /* HOOFDKLEUR */
    --brand-dark:    #754828;          /* Donkerder (tegels/slider/hover) */

    --header-bg:     var(--brand);     /* (admin) Header met hoofdmenu */
    --btn-bg:        #141414;          /* (admin) Knop-achtergrond */
    --btn-text:      #ffffff;          /* (admin) Knop-tekst */
    --footer-bg:     #e3d5bf;          /* (admin) Footer-achtergrond */
    --footer-text:   #3a3a3a;          /* (admin) Footer-tekst */
    --heading-color: #1b1b1b;          /* (admin) Koppen op lichte vlakken */

    /* Neutralen */
    --sand:          #efe7d8;
    --sand-deep:     #e3d5bf;
    --ink:           #1b1b1b;
    --ink-soft:      #3a3a3a;
    --paper:         #ffffff;
    --on-brand:      #ffffff;
    --on-brand-dim:  rgba(255, 255, 255, .82);
    --line:          rgba(255, 255, 255, .55);

    /* Typografie */
    --font-display: "Cormorant Garamond", "Times New Roman", serif;
    --font-sans:    "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

    /* Maatvoering */
    --container: 1360px;
    --radius-pill: 999px;
}

/* =====================================================================
   2. RESET / BASIS
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink-soft);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.08;
    margin: 0 0 .4em;
    color: var(--heading-color);
}

p { margin: 0 0 1.2em; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 64px);
}

.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px; height: 1px; overflow: hidden;
}
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--btn-bg); color: #fff; padding: 12px 20px; z-index: 1000; }
.skip-link:focus { left: 8px; top: 8px; }

a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
}

/* Full-bleed hulpklasse: laat een sectie 100% breed lopen, ook binnen een
   gecentreerde contentkolom. */
.ot-section { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* =====================================================================
   3. KNOPPEN (pills)
   ===================================================================== */
.btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 16px 34px;
    border-radius: var(--radius-pill);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .2s ease, background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn--dark { background: var(--btn-bg); color: var(--btn-text); }
.btn--dark:hover { filter: brightness(1.12); }

.btn--sand { background: var(--sand-deep); color: var(--ink); }
.btn--sand:hover { background: var(--sand); }

.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: #fff; color: var(--ink); }

/* =====================================================================
   4. HEADER / NAVIGATIE
   ===================================================================== */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--header-bg); color: var(--on-brand); }
.site-header__inner {
    max-width: var(--container);
    margin-inline: auto;
    padding: 22px clamp(20px, 5vw, 64px);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.site-brand { display: flex; flex-direction: column; line-height: 1; }
.site-brand__word {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(28px, 3vw, 40px); letter-spacing: .06em;
    color: #fff; text-transform: uppercase;
}
.site-brand__tag {
    font-family: var(--font-display); font-size: 13px; letter-spacing: .28em;
    text-transform: uppercase; color: rgba(255,255,255,.9); margin-top: 8px;
    display: flex; align-items: center; gap: 8px; justify-content: center;
}
.site-brand__tag::before, .site-brand__tag::after { content: "\2022"; opacity: .8; }
.custom-logo-link img { max-height: 78px; width: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(18px, 2vw, 34px); }
.main-nav a {
    font-size: 16px; font-weight: 300; color: #fff;
    padding-bottom: 4px; border-bottom: 2px solid transparent;
    transition: border-color .2s ease, opacity .2s ease;
}
.main-nav a:hover, .main-nav .current-menu-item > a { border-color: rgba(255,255,255,.85); }
.main-nav .sub-menu {
    display: none; position: absolute; flex-direction: column; gap: 0;
    background: var(--brand-dark); padding: 10px 0; min-width: 210px;
    box-shadow: 0 18px 40px rgba(0,0,0,.25);
}
.main-nav li { position: relative; }
.main-nav li:hover > .sub-menu { display: flex; }
.main-nav .sub-menu a { padding: 8px 22px; border: 0; display: block; }
.main-nav .sub-menu a:hover { background: rgba(255,255,255,.10); }

.header-tools { display: flex; align-items: center; gap: 18px; }
.search-toggle { background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; line-height: 0; }
.search-toggle svg { width: 22px; height: 22px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; padding: 8px; }
.nav-toggle span { display: block; height: 2px; background: #fff; margin: 5px 0; 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); }

.header-search { display: none; background: var(--brand-dark); padding: 18px clamp(20px, 5vw, 64px); }
.header-search.is-open { display: block; }
.header-search form { max-width: var(--container); margin-inline: auto; display: flex; gap: 10px; }
.header-search input[type="search"] { flex: 1; padding: 14px 18px; border: 0; border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: 16px; }

/* =====================================================================
   5. SECTIES — algemene ritmiek
   ===================================================================== */
.section--brand { background: var(--brand); color: var(--on-brand); }
.section--sand  { background: var(--sand); color: var(--ink-soft); }
.section--paper { background: var(--paper); }
.section-pad { padding-block: clamp(64px, 9vw, 130px); }

.section--brand :is(h1, h2, h3, h4) { color: #fff; }

.display-title {
    font-family: var(--font-display); text-transform: uppercase; font-weight: 500;
    letter-spacing: .04em; font-size: clamp(40px, 6vw, 82px); line-height: 1.02; color: #fff;
}
.display-title--ink { color: var(--heading-color); }
.rule { width: min(560px, 70%); height: 2px; background: rgba(255,255,255,.7); margin-top: 34px; }
.rule--ink { background: var(--ink); opacity: .5; }

.centered-heading { text-align: center; text-transform: uppercase; letter-spacing: .04em; font-size: clamp(28px, 4vw, 52px); margin: 0; }
.section-heading { text-align: center; text-transform: uppercase; letter-spacing: .04em; font-size: clamp(26px, 3.4vw, 46px); margin: 0 auto clamp(36px, 5vw, 60px); }

/* =====================================================================
   6. HERO (split)
   ===================================================================== */
.hero-split { display: grid; grid-template-columns: 1fr 1fr; min-height: clamp(520px, 72vh, 780px); background: var(--brand); }
.hero-split__text { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 6vw, 96px); color: #fff; }
.hero-split__media { background-size: cover; background-position: center; min-height: 320px; }
.hero-split__eyebrow { font-family: var(--font-sans); text-transform: uppercase; letter-spacing: .3em; font-size: 13px; color: var(--on-brand-dim); margin-bottom: 26px; }
.hero-split__cta { margin-top: 40px; }

/* =====================================================================
   7. FULL-WIDTH MEDIA-BAND
   ===================================================================== */
.media-band__caption { background: var(--sand); text-align: center; padding: clamp(28px, 4vw, 46px) 20px; }
.media-band__frame { position: relative; aspect-ratio: 21 / 9; background: #111 center/cover no-repeat; overflow: hidden; }
.media-band__frame video, .media-band__frame img { width: 100%; height: 100%; object-fit: cover; }

/* =====================================================================
   8. INTRO / WELKOM-BLOK
   ===================================================================== */
.intro { text-align: center; max-width: 940px; margin-inline: auto; }
.intro h2 { font-size: clamp(30px, 4.4vw, 58px); text-transform: uppercase; letter-spacing: .03em; }
.intro p { font-size: clamp(17px, 1.5vw, 20px); line-height: 2; color: var(--ink-soft); }
.intro .btn { margin-top: 26px; }

/* =====================================================================
   9. TEAM-RIJ (uit berichten met "Tonen op homepagina")
   ===================================================================== */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); max-width: 1180px; margin-inline: auto; }
.team-card { text-align: center; }
.team-card__photo { aspect-ratio: 4 / 5; background: var(--brand-dark) center/cover no-repeat; margin-bottom: 30px; }
.team-card__name { color: #fff; font-size: 24px; margin-bottom: 4px; }
.team-card__role { color: var(--on-brand-dim); font-family: var(--font-sans); text-transform: uppercase; letter-spacing: .2em; font-size: 12px; margin-bottom: 22px; }

/* =====================================================================
   10. HOMEPAGE SPLIT-BLOK (over ons) — herbruikbaar
   ===================================================================== */
.split-block { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; min-height: clamp(440px, 56vh, 640px); }
.split-block__text { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 6vw, 100px); }
.split-block__media { background: var(--brand-dark) center/cover no-repeat; min-height: 300px; }
.split-block__text h2 { text-transform: uppercase; letter-spacing: .03em; font-size: clamp(28px, 3.4vw, 48px); }
.split-block--reverse .split-block__text { order: 2; }
.split-block--reverse .split-block__media { order: 1; }
.split-block--brand .split-block__text { background: var(--brand); color: #fff; }
.split-block--brand .split-block__text h2 { color: #fff; }
.split-block--sand  .split-block__text { background: var(--sand); color: var(--ink-soft); }
.split-block--paper .split-block__text { background: var(--paper); }
.split-block--brand p { color: var(--on-brand-dim); }
.split-block .btn { margin-top: 28px; align-self: flex-start; }
.split-block--brand.center-text .split-block__text { text-align: center; align-items: center; }
.split-block--brand.center-text .btn { align-self: center; }

/* =====================================================================
   11. MERKENSLIDER
   ===================================================================== */
.brands { background: var(--brand); color: #fff; text-align: center; }
.brands__title { text-transform: uppercase; letter-spacing: .05em; font-size: clamp(26px, 3.4vw, 48px); margin-bottom: clamp(36px, 5vw, 60px); color: #fff; }
.brands__viewport { overflow: hidden; }
.brands__track { display: flex; gap: 4px; transition: transform .5s ease; }
.brand-tile { flex: 0 0 calc((100% / 6) - 4px); aspect-ratio: 1 / 1; background: var(--brand-dark); display: flex; align-items: center; justify-content: center; padding: 24px; }
.brand-tile img { max-height: 64px; width: auto; filter: brightness(0) invert(1); opacity: .92; }
.brand-tile span { font-family: var(--font-display); letter-spacing: .12em; text-transform: uppercase; font-size: 22px; color: #fff; }
.brands__dots { display: flex; gap: 12px; justify-content: center; margin-top: 40px; }
.brands__dots button { width: 11px; height: 11px; border-radius: 50%; border: 0; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; }
.brands__dots button[aria-current="true"] { background: #fff; }

/* =====================================================================
   12. EIGEN SECTIE-BLOKKEN (Gutenberg)
   Achtergrondvarianten gedeeld door de bloktypes.
   ===================================================================== */
.ot--brand  { background: var(--brand); color: var(--on-brand); }
.ot--brand :is(h1,h2,h3,h4) { color: #fff; }
.ot--brand a { color: #fff; }
.ot--sand   { background: var(--sand); color: var(--ink-soft); }
.ot--paper  { background: var(--paper); color: var(--ink-soft); }

/* 12a. Bloksectie: vierkante afbeelding + tekst/HTML */
.ot-block { padding-block: clamp(48px, 7vw, 110px); }
.ot-block__inner {
    max-width: var(--container); margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 64px);
    display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 76px); align-items: center;
}
.ot-block__media { aspect-ratio: 1 / 1; width: 100%; background: var(--brand-dark) center/cover no-repeat; border-radius: 2px; overflow: hidden; }
.ot-block__media img { width: 100%; height: 100%; object-fit: cover; }
.ot-block__text > :first-child { margin-top: 0; }
.ot-block__text > :last-child { margin-bottom: 0; }
.ot-block--img-left  .ot-block__media { order: 0; }
.ot-block--img-left  .ot-block__text  { order: 1; }
.ot-block--img-right .ot-block__media { order: 1; }
.ot-block--img-right .ot-block__text  { order: 0; }

/* 12b. Grote titel-balk */
.ot-title { padding-block: clamp(56px, 8vw, 120px); text-align: center; }
.ot-title__inner { max-width: 960px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }
.ot-title h2 { font-size: clamp(30px, 4.6vw, 62px); text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.ot-title__sub { font-size: clamp(17px, 1.7vw, 22px); line-height: 1.7; margin-top: 18px; }
.ot-title .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }

/* 12c. HTML-sectie met instelbare hoogte */
.ot-html { display: flex; }
.ot-html__inner { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(20px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.ot-html--full .ot-html__inner { max-width: none; padding-inline: 0; }

/* =====================================================================
   13. STANDAARD CONTENT + Gutenberg
   ===================================================================== */
.page-hero { background: var(--brand); color: #fff; padding-block: clamp(60px, 8vw, 110px); text-align: center; }
.page-hero .display-title { color: #fff; }
.entry { max-width: 820px; margin-inline: auto; }
.entry h2 { font-size: clamp(26px, 3vw, 40px); margin-top: 1.4em; }
.entry h3 { font-size: clamp(22px, 2.4vw, 30px); margin-top: 1.2em; }
.entry a { color: var(--brand); text-decoration: underline; }
.entry img { margin-block: 1.4em; }

/* Volledige-breedte content (paginabouwer-template) */
.entry--wide { max-width: none; }
.entry--wide > * { max-width: 820px; margin-inline: auto; }
.entry--wide > .ot-section,
.entry--wide > .alignfull { max-width: none; }

.wp-block-media-text { align-items: center; }
.wp-block-media-text .wp-block-media-text__content { padding: clamp(24px, 4vw, 64px); }
.wp-block-button__link { border-radius: var(--radius-pill); }

/* alignfull/alignwide binnen gecentreerde content */
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.alignwide { width: min(1180px, 92vw); margin-left: 50%; transform: translateX(-50%); }

/* =====================================================================
   14. FOOTER (4 widgetgebieden)
   ===================================================================== */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding-block: clamp(48px, 6vw, 84px); }
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: var(--brand); }
.site-footer__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; align-items: start; }
.footer-col .widget { margin-bottom: 24px; }
.footer-col h3, .footer-col .widget-title {
    font-family: var(--font-sans); text-transform: uppercase; letter-spacing: .12em;
    font-size: 13px; color: var(--brand); margin: 0 0 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 15px; }
.site-footer__bottom { max-width: var(--container); margin: 40px auto 0; padding-top: 22px; border-top: 1px solid rgba(0,0,0,.12); font-size: 13px; letter-spacing: .04em; text-align: center; }

/* =====================================================================
   15. RESPONSIVE
   ===================================================================== */
@media (max-width: 1024px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed; inset: 0 0 0 auto; width: min(360px, 84vw);
        background: var(--brand-dark); transform: translateX(100%);
        transition: transform .3s ease; padding: 96px 32px 32px; overflow-y: auto;
    }
    .main-nav.is-open { transform: translateX(0); }
    .main-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
    .main-nav a { display: block; padding: 12px 0; font-size: 19px; }
    .main-nav .sub-menu { position: static; display: flex; box-shadow: none; background: transparent; padding: 0 0 0 16px; }
    .main-nav .sub-menu a { padding: 8px 0; }

    .hero-split, .split-block,
    .ot-block__inner { grid-template-columns: 1fr; }
    .hero-split__media, .split-block__media { min-height: 320px; order: 0 !important; }
    .split-block--reverse .split-block__text { order: 0; }
    .ot-block--img-left .ot-block__media,
    .ot-block--img-right .ot-block__media { order: 0; }
    .ot-block--img-left .ot-block__text,
    .ot-block--img-right .ot-block__text { order: 1; }

    .team-grid { grid-template-columns: 1fr; max-width: 420px; }
    .brand-tile { flex-basis: calc((100% / 2) - 4px); }
    .media-band__frame { aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .brand-tile { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
