/*
Theme Name: Young Energy Canvas
Theme URI: https://suprevo.com
Author: Suprevo
Description: Client theme (Young Energy Totaal Techniek) — fork of Suprevo Canvas. Thin renderer + the real Young Energy brand (amber/charcoal, Neue Haas Grotesk) and client section templates.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: young-energy-canvas
*/

/* ============================================================= Fonts */
@font-face {
	font-family: 'Neue Haas Grotesk';
	src: url('assets/fonts/NeueHaasGroteskPro-regular.ttf') format('truetype');
	font-weight: 400 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Neue Haas Grotesk';
	src: url('assets/fonts/NeueHaasGroteskPro-bold.ttf') format('truetype');
	font-weight: 600 800;
	font-style: normal;
	font-display: swap;
}

/* ============================================================= Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
	margin: 0;
	font-family: var(--sv-font-sans, 'Neue Haas Grotesk', system-ui, sans-serif);
	color: var(--sv-color-fg, #333333);
	background: var(--sv-color-bg, #fff);
	line-height: 1.65;
	overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 {
	font-family: var(--sv-font-sans, 'Neue Haas Grotesk', system-ui, sans-serif);
	font-weight: 700;
	line-height: 1.08;
	color: var(--sv-color-heading, #1A1B1B);
	letter-spacing: -0.02em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sv-color-primary, #F9B40B); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--sv-color-orange, #F8A233); }

.ye-container { width: 100%; max-width: var(--sv-container, 1240px); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 3rem); }

.sv-skip-link { position: absolute; left: -9999px; top: 0; }
.sv-skip-link:focus { left: 1rem; top: 1rem; background: var(--sv-color-primary, #F9B40B); color: var(--sv-color-dark, #1A1B1B); padding: .6rem 1rem; border-radius: 8px; z-index: 999; font-weight: 700; }

/* ============================================================= Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 15px 34px; border-radius: 10px; font-weight: 600; font-size: 16px; line-height: 1.4;
	font-family: var(--sv-font-sans, 'Neue Haas Grotesk', sans-serif);
	cursor: pointer; text-decoration: none; border: 2px solid transparent;
	transition: all .25s cubic-bezier(.25,.46,.45,.94);
}
.btn--sm { padding: 10px 22px; font-size: 15px; }
.btn--lg { padding: 17px 42px; font-size: 1.0625rem; }
.btn--primary { background: var(--sv-color-primary, #F9B40B); color: var(--sv-color-dark, #1A1B1B); border-color: var(--sv-color-primary, #F9B40B); }
.btn--primary:hover { background: var(--sv-color-orange, #F8A233); border-color: var(--sv-color-orange, #F8A233); color: var(--sv-color-dark, #1A1B1B); transform: translateY(-2px); box-shadow: 0 8px 26px rgba(249,180,11,.35); }
.btn--secondary { background: var(--sv-color-dark, #1A1B1B); color: #fff; border-color: var(--sv-color-dark, #1A1B1B); }
.btn--secondary:hover { background: #000; border-color: #000; color: #fff; transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--sv-color-dark, #1A1B1B); border-color: var(--sv-color-dark, #1A1B1B); }
.btn--outline:hover { background: var(--sv-color-dark, #1A1B1B); color: #fff; transform: translateY(-2px); }
.btn--white { background: #fff; color: var(--sv-color-dark, #1A1B1B); border-color: #fff; }
.btn--white:hover { background: var(--sv-color-primary, #F9B40B); border-color: var(--sv-color-primary, #F9B40B); color: var(--sv-color-dark, #1A1B1B); transform: translateY(-2px); }
.btn--outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--outline-white:hover { border-color: var(--sv-color-primary, #F9B40B); color: var(--sv-color-primary, #F9B40B); background: rgba(249,180,11,.08); transform: translateY(-2px); }

/* ================================ Header — floating black pill, contained, over the hero */
.site-header {
	position: fixed; top: 20px; left: 0; right: 0; margin-inline: auto; z-index: 100;
	width: min(calc(100% - 40px), var(--sv-container, 1240px));
	height: 80px; padding: 0 18px 0 26px;
	display: flex; align-items: center; justify-content: space-between;
	transition: top .35s ease;
}
/* The frosted "pill" lives on a pseudo-element, NOT on .site-header itself. `backdrop-filter` (and the
 * old `transform` centering) each establish a containing block for position:fixed descendants — which
 * trapped the full-screen mobile menu inside this pill instead of the viewport. Keeping both effects on
 * ::before, and centering via margin-auto, frees the fixed overlay to fill the screen. */
.site-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: rgba(18,18,18,.92); backdrop-filter: blur(10px);
	border: 1px solid rgba(255,255,255,.07);
	border-radius: 18px;
	box-shadow: 0 16px 44px rgba(0,0,0,.32);
	transition: box-shadow .35s ease, background .35s ease;
}
.site-header.scrolled { top: 10px; }
.site-header.scrolled::before { background: rgba(18,18,18,.97); box-shadow: 0 10px 34px rgba(0,0,0,.46); }
.site-header__logo img { height: 64px; width: auto; display: block; }

.site-header__nav .nav-menu { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.site-header__nav a { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .005em; }
.site-header__nav a:hover { color: var(--sv-color-primary, #F9B40B); }

/* Diensten dropdown */
.site-header__nav .nav-menu > li.has-children { position: relative; }
.nav-caret { font-size: .7em; opacity: .75; }
.site-header__nav .sub-menu {
	position: absolute; top: calc(100% + 28px); left: 50%; transform: translateX(-50%) translateY(8px);
	min-width: 268px; list-style: none; margin: 0; padding: 8px;
	background: rgba(18,18,18,.98); backdrop-filter: blur(12px);
	border: 1px solid rgba(255,255,255,.08); border-radius: 14px; box-shadow: 0 18px 44px rgba(0,0,0,.45);
	opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility .2s;
	z-index: 101;
}
.site-header__nav .has-children:hover .sub-menu,
.site-header__nav .has-children:focus-within .sub-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
/* invisible bridge across the gap so the dropdown stays open while the pointer travels to it */
.site-header__nav .has-children::after { content: ""; position: absolute; top: 100%; left: -12px; right: -12px; height: 34px; }
.site-header__nav .sub-menu li { margin: 0; }
.site-header__nav .sub-menu a { display: block; padding: 10px 14px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: rgba(255,255,255,.82); white-space: nowrap; }
.site-header__nav .sub-menu a:hover { background: rgba(249,180,11,.14); color: var(--sv-color-primary, #F9B40B); }

.site-header__cta .btn { background: var(--sv-color-primary, #F9B40B); color: var(--sv-color-dark, #1A1B1B); border-color: var(--sv-color-primary, #F9B40B); font-weight: 700; }
.site-header__cta .btn:hover { background: #fff; border-color: #fff; color: var(--sv-color-dark, #1A1B1B); }

/* Header power-on — dimmed while the front page is "off" (.ye-preload set on the front page only). */
.site-header__logo img { transition: filter .9s ease; }
.ye-preload:not(.ye-lit) .site-header__logo img { filter: grayscale(1) brightness(.55); }
.ye-preload:not(.ye-lit) .site-header__nav a { color: #6a6a6a; }
.ye-preload:not(.ye-lit) .site-header__cta .btn { background: #2b2b2b; border-color: #2b2b2b; color: #777; }

.site-header__menu-toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; }
.hamburger { display: flex; flex-direction: column; gap: 5px; width: 26px; }
.hamburger span { display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px; transition: background .3s, transform .3s, opacity .3s; }

@media (max-width: 1023px) {
	.site-header { width: calc(100% - 24px); top: 12px; height: 66px; padding: 0 14px 0 18px; }
	.site-header::before { border-radius: 14px; }
	.site-header.scrolled { top: 8px; }
	.site-header__logo img { height: 51px; }
	.site-header__menu-toggle { display: flex; align-items: center; justify-content: center; z-index: 110; }
	.site-header__cta { display: none; }
	.site-header__nav { position: fixed; inset: 0; z-index: 105; background: linear-gradient(150deg, #1A1B1B 0%, #2a2118 60%, #3a2410 100%); display: none; flex-direction: column; align-items: center; justify-content: center; overflow-y: auto; overscroll-behavior: contain; padding: 88px 24px 40px; }
	.menu-open .site-header__nav { display: flex; }
	/* Lock the page behind the overlay (html has default `overflow:visible`, so body's overflow
	   propagates to the viewport — this stops the background from scrolling while the menu is open). */
	body.menu-open { overflow: hidden; }
	/* Keep the open menu's links legible even during the front-page "power-on" dim (same specificity as
	   the global dim rule, but later in source ⇒ wins, and only below the mobile breakpoint). */
	.ye-preload:not(.ye-lit) .site-header__nav a { color: #fff; }
	.site-header__nav .nav-menu { flex-direction: column; gap: 22px; text-align: center; }
	.site-header__nav a { color: #fff; font-size: 24px; font-weight: 700; }
	/* dropdown becomes a static indented list on mobile */
	.site-header__nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; background: none; border: 0; box-shadow: none; padding: 10px 0 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
	/* Cancel the desktop hover/focus reveal-transform — its selectors outrank the plain .sub-menu
	   rule above, so on touch a tapped sub-item's :focus-within slid the list left off-screen. */
	.site-header__nav .has-children:hover .sub-menu,
	.site-header__nav .has-children:focus-within .sub-menu { transform: none; }
	.site-header__nav .sub-menu a { font-size: 17px; font-weight: 600; color: rgba(255,255,255,.7); padding: 0; }
	.site-header__nav .has-children::after { display: none; }
	.nav-caret { display: none; }
	.menu-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.menu-open .hamburger span:nth-child(2) { opacity: 0; }
	.menu-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ============================================================= Footer (charcoal + amber, wave motif) */
.site-footer {
	position: relative; overflow: hidden; color: #fff;
	/* 4px brand gradient bar as a background layer (frees ::before for a swoosh) */
	background:
		linear-gradient(90deg, var(--sv-color-primary, #F9B40B), var(--sv-color-maroon, #923015), var(--sv-color-slate, #737F8C)) top left / 100% 4px no-repeat,
		linear-gradient(155deg, #1A1B1B 0%, #201c17 55%, #2c1d10 100%);
	padding-top: 5.5rem;
}
/* Single brand swoosh — bottom-left only (ye-top-corner shape rotated 180°) */
.site-footer::before {
	content: ""; position: absolute; bottom: 0; left: 0; z-index: 0; pointer-events: none;
	width: min(40%, 500px); aspect-ratio: 1339 / 887;
	background: url('assets/img/ye-top-corner.svg') top right / contain no-repeat;
	transform: rotate(180deg);
}
.site-footer .ye-container, .site-footer__bottom { position: relative; z-index: 1; }
.site-footer a { color: rgba(255,255,255,.62); }
.site-footer a:hover { color: var(--sv-color-primary, #F9B40B); }
.site-footer__grid { display: grid; grid-template-columns: 1fr; gap: 3rem; padding-bottom: 4.5rem; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 3fr 2fr 2.5fr 2.5fr; } }
.site-footer__logo { max-height: 52px; width: auto; }
.site-footer__tagline { margin-top: 1.4rem; font-size: .9375rem; color: rgba(255,255,255,.55); line-height: 1.7; max-width: 300px; }
.site-footer__heading { font-size: 1rem; font-weight: 700; color: #fff; margin: 0 0 1.15rem; letter-spacing: .01em; }
.footer-menu, .footer-contact { list-style: none; padding: 0; margin: 0; font-size: .9375rem; }
.footer-menu li, .footer-contact li { margin-bottom: 10px; }
.footer-contact { color: rgba(255,255,255,.55); }
.footer-contact strong { color: rgba(255,255,255,.85); font-weight: 600; }
.site-footer__bottom { position: relative; border-top: 1px solid rgba(255,255,255,.1); padding: 1.4rem 0; }
.site-footer__bottom-inner { display: flex; flex-direction: column; gap: .5rem; text-align: center; font-size: .8125rem; color: rgba(255,255,255,.4); }
.site-footer__bottom-inner a { color: rgba(255,255,255,.4); }
@media (min-width: 768px) { .site-footer__bottom-inner { flex-direction: row; justify-content: space-between; text-align: left; } }
