/* Homepage: full-screen slides, live configurator and accent tokens.
   slides.js marks the slide on screen with .is-active. The configurator
   (home-config.js) writes data-accent / data-menu / data-logo on <html>, but
   only while its own slide is active; everywhere else the page is brand green. */

/* Registered so a colour change animates through every derived tint. */
@property --studio-green { syntax: '<color>'; inherits: true; initial-value: #30ff0b; }
html[data-accent="goud"] { --studio-green: #f2c14e; }
html[data-accent="blauw"] { --studio-green: #3fb4ff; }
html[data-accent="koraal"] { --studio-green: #ff6f5a; }
html.config-animate { transition: --studio-green .7s cubic-bezier(.3,.6,.25,1); }

.home-page {
    --accent-soft: color-mix(in srgb, var(--studio-green) 68%, #ffffff);
    --accent-line: color-mix(in srgb, var(--studio-green) 58%, #1b221b);
    --accent-dim: color-mix(in srgb, var(--studio-green) 30%, #0b100c);
    --accent-glow: color-mix(in srgb, var(--studio-green) 34%, transparent);
    --accent-haze: color-mix(in srgb, var(--studio-green) 13%, transparent);
    --ink: #0d140f;
    --paper: #f4f6f2;
    --card-line: #e0e6dc;
}

/* Former hard-coded greens, now following the accent. */
.home-page .eyebrow:not(.muted) { color: var(--accent-soft); }
.home-page .site-nav .nav-contact { border-color: var(--accent-line); }
.home-page .btn.btn-primary { box-shadow: 0 0 32px var(--accent-haze); }
.home-page a.btn-primary:hover { background: var(--accent-soft); box-shadow: 0 0 35px var(--accent-glow); }
.home-page .btn.btn-outline { border-color: var(--accent-line); }
.home-page a.btn-outline:hover { background: color-mix(in srgb, var(--studio-green) 14%, #07100a); border-color: var(--studio-green); }
.home-page .signature { color: var(--accent-soft); }
.home-page .signature-line { background: var(--accent-line); }

/* The logo image is green; with another accent, paint it through a mask. */
html[data-accent]:not([data-accent="groen"]) .home-page .brand { background: var(--studio-green); -webkit-mask: url("images/website_logo.png") center / 100% 100% no-repeat; mask: url("images/website_logo.png") center / 100% 100% no-repeat; }
html[data-accent]:not([data-accent="groen"]) .home-page .brand img, html[data-accent]:not([data-accent="groen"]) .home-page .brand .brand-motion { visibility: hidden; }

/* Slides, light slides, live dot and scroll cue: slides.css. */
.slide-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
.slide-heading > p { max-width: 430px; color: var(--studio-muted); font-size: 16px; }
@media (hover: none) { .home-page .only-hover { display: none; } }

/* ---- 1. Hero ------------------------------------------------------------ */
.slide--hero { padding-bottom: 96px; }
.home-page .slide--hero .hero-inner { min-height: 0; align-items: center; }
.home-page .slide--hero .hero-copy { padding-block: 0; }
.home-page .hero-description { max-width: 560px; }
.home-page .hero-benefits { margin-top: 34px !important; }
.slide--hero { background: radial-gradient(ellipse at 26% 50%, #e3f6dc 0%, transparent 55%), var(--paper); }
.home-page .slide--hero .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); }
.home-page .slide--hero .eyebrow { color: #178c05; }
.home-page .slide--hero .hero-description { color: #3f4a40; }
.home-page .slide--hero .hero-benefits li { color: #2c352d; }
/* For now a calm studio photo of the 3D logo (scripts/render_hero_logo.py). */
.hero-logo { position: relative; isolation: isolate; order: -1; justify-self: center; width: min(86%, 520px); margin: 0 0 40px; }
/* Three render layers (scripts/render_hero_logo.py --parts) that rise and fall
   one after another, like a wave running through the logo. */
.hero-logo-part { display: block; width: 100%; height: auto; animation: hero-wave 3s ease-in-out infinite; animation-delay: calc(var(--n) * .28s); }
.hero-logo-part + .hero-logo-part { position: absolute; inset: 0; }
.hero-logo::after { content: ""; position: absolute; z-index: -1; left: 18%; right: 22%; bottom: -34px; height: 28px; border-radius: 50%; background: #0b120d; opacity: .14; filter: blur(16px); }
.js-slides .slide:not(.is-active) .hero-logo-part { animation-play-state: paused; }
@keyframes hero-wave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@media (max-width: 640px) { .hero-logo { width: min(72%, 34svh); margin-bottom: 26px; } }

/* ---- 2. Live configurator ---------------------------------------------- */
.slide--config { background: radial-gradient(ellipse at 76% 45%, var(--accent-haze), transparent 58%), #070a08; }
html[data-menu="onder"] .slide--config { padding-top: 40px; padding-bottom: calc(var(--header-height, 84px) + 28px); }
/* Menubalk onderaan (alleen zichtbaar zolang de configurator-slide actief is). */
html[data-menu="onder"] .home-page .site-header { top: auto; bottom: 0; border-bottom: 0; border-top: 1px solid var(--studio-line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -14px 40px #0009; }
html[data-menu="onder"] .home-page .site-nav a[aria-current="page"]::after { top: 0; bottom: auto; }
.config-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(28px, 4vw, 56px); align-items: stretch; }
.config-lead { max-width: 520px; margin: 14px 0 22px !important; color: var(--studio-muted); font-size: 16px; }
.config-panel { display: grid; gap: 16px; padding: 22px 24px; border: 1px solid var(--studio-line); border-radius: 14px; background: #0b100cd9; }
.config-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.config-group legend { margin-bottom: 9px; padding: 0; color: #9aa59a; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.config-options { display: flex; flex-wrap: wrap; gap: 8px; }
.config-options label { position: relative; display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 8px 15px; border: 1px solid #2f3a2f; border-radius: 9px; background: #0d140f; color: #d5dad5; font-size: 14px; line-height: 1.2; cursor: pointer; transition: border-color .2s, background .2s, color .2s; user-select: none; }
.config-options input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.config-options label:hover { border-color: #4c5b4b; color: #fff; }
.config-options label:has(input:checked) { border-color: var(--studio-green); background: color-mix(in srgb, var(--studio-green) 13%, #0d140f); color: #fff; }
.config-options label:has(input:focus-visible) { outline: 2px solid var(--studio-green); outline-offset: 3px; }
.swatches label { padding: 6px 15px 6px 7px; border-radius: 999px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px #00000040; }
.config-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 12px; border-top: 1px solid var(--studio-line); }
.config-reset { padding: 6px 0; border: 0; background: none; color: #c5cbc5; font-size: 13px; cursor: pointer; transition: color .2s, opacity .2s; }
.config-reset span { display: inline-block; margin-right: 4px; transition: transform .4s; }
.config-reset:hover:not(:disabled) { color: var(--accent-soft); }
.config-reset:hover:not(:disabled) span { transform: rotate(-120deg); }
.config-reset:disabled { opacity: .38; cursor: default; }
.config-status { min-height: 1.4em; color: #8e988e; font-size: 12px; text-align: right; }
.config-stage { position: relative; min-height: min(460px, 54svh); overflow: hidden; isolation: isolate; border: 1px solid var(--studio-line); border-radius: 16px; background: radial-gradient(ellipse at 50% 52%, color-mix(in srgb, var(--studio-green) 15%, #0b120d) 0%, #080c09 64%); cursor: grab; touch-action: pan-y; }
.config-stage.is-dragging { cursor: grabbing; }
.config-stage::after { content: ""; position: absolute; z-index: -1; left: 22%; right: 22%; bottom: 13%; height: 26px; border-radius: 50%; background: #000c; filter: blur(18px); }
.config-poster, #logo-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.config-poster { object-fit: contain; padding: 9%; transition: opacity .6s; }
#logo-canvas { opacity: 0; transition: opacity .6s; outline: none; }
.config-stage.is-ready #logo-canvas { opacity: 1; }
.config-stage.is-ready .config-poster { opacity: 0; }
html[data-accent="goud"] .config-poster { filter: hue-rotate(-75deg) saturate(.8) brightness(1.08); }
html[data-accent="blauw"] .config-poster { filter: hue-rotate(85deg); }
html[data-accent="koraal"] .config-poster { filter: hue-rotate(-112deg) saturate(.9); }
.config-stage-label { position: absolute; top: 20px; left: 22px; padding-left: 10px; border-left: 1px solid var(--accent-line); color: #b3bdb1; font-size: 10px; letter-spacing: .2em; pointer-events: none; }
.config-stage-label span { color: var(--accent-soft); }
.config-stage-hint { position: absolute; left: 50%; bottom: 18px; padding: 7px 13px; border: 1px solid #ffffff1c; border-radius: 999px; background: #050806b3; color: #c9d0c8; font-size: 12px; white-space: nowrap; pointer-events: none; transform: translateX(-50%); transition: opacity .5s; }
.config-stage.was-dragged .config-stage-hint { opacity: 0; }
.config-next { margin-top: 20px !important; color: var(--studio-muted); font-size: 16px; text-align: center; }
.config-next strong { color: var(--studio-text); font-weight: 600; }
.config-next span { color: var(--studio-green); }

/* ---- 3. Productanimaties (light) --------------------------------------- */
.motion-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.motion-card { position: relative; display: block; aspect-ratio: .86; overflow: hidden; isolation: isolate; border: 1px solid var(--card-line); border-radius: 16px; background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f7faf5 55%, #edf2ea 100%); color: var(--ink); box-shadow: 0 1px 2px #0b120d0d, 0 18px 36px -24px #0b120d55; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .25s; }
.motion-card:hover { border-color: #30ff0b; box-shadow: 0 1px 2px #0b120d0d, 0 26px 44px -24px #0b120d70; transform: translateY(-4px); }
.motion-card .work-media { position: absolute; left: 50%; top: 42%; width: 100%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.motion-card .work-media img, .motion-card .work-media canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.motion-card .work-motion-canvas { visibility: hidden; }
.motion-card.has-product-frame .work-motion-canvas { visibility: visible; }
.motion-card.has-product-frame .work-static { visibility: hidden; }
.motion-card[data-home-product="vinyl"] .work-media { width: 84%; top: 40%; }
.motion-card[data-home-product="laptop"] .work-media { width: 112%; top: 40%; }
.motion-card[data-home-product="bier-fles"] .work-media { width: 74%; top: 42%; }
.motion-card[data-home-product="oordopjes-case"] .work-media { width: 90%; top: 47%; }
.motion-card .card-bottom { position: absolute; left: 20px; right: 18px; bottom: 18px; }
.studio-page .motion-card h3 { font-size: 19px; }
.motion-card .card-bottom p { margin-top: 2px !important; color: #5d685d; font-size: 13px; }

/* ---- 4. Configurators (dark) ------------------------------------------- */
.slide--experiences { background: radial-gradient(ellipse at 20% 80%, var(--accent-haze), transparent 55%), #070a08; }
.experience-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.exp-tile { position: relative; display: block; aspect-ratio: .78; overflow: hidden; isolation: isolate; border: 1px solid #384037; border-radius: 16px; background: #0a100c; transition: border-color .25s, transform .35s cubic-bezier(.2,.7,.2,1); }
.exp-tile:hover { border-color: var(--studio-green); transform: translateY(-4px); }
.exp-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.exp-media img { display: block; width: 100%; height: 100%; object-fit: cover; animation: exp-drift 16s ease-in-out infinite alternate; }
.exp-tile:nth-child(2) .exp-media img { animation-delay: -4s; }
.exp-tile:nth-child(3) .exp-media img { animation-delay: -8s; }
.exp-tile:nth-child(4) .exp-media img { animation-delay: -12s; }
.exp-tile:nth-child(5) .exp-media img { animation-delay: -6s; }
.js-slides .slide:not(.is-active) .exp-media img { animation-play-state: paused; }
@keyframes exp-drift { from { transform: scale(1.02); } to { transform: scale(1.09) translate(-1.5%, -1%); } }
.exp-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #050806f2 0%, #050806aa 26%, transparent 52%); pointer-events: none; }
.exp-kind { position: absolute; top: 14px; left: 14px; padding: 6px 10px; border-radius: 999px; background: #050806d9; color: #eef3ec; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.exp-body { position: absolute; left: 20px; right: 16px; bottom: 18px; }
.studio-page .exp-body h3 { font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -.03em; }
.exp-body p { margin-top: 4px !important; color: #d4d9d2; font-size: 14px; }

/* ---- 5. Werkwijze (light) ---------------------------------------------- */
.process-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.process-steps li { padding: 26px; border: 1px solid var(--card-line); border-radius: 16px; background: #fff; box-shadow: 0 18px 36px -28px #0b120d55; }
.process-steps .step-number { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 12px; background: var(--ink); color: #30ff0b; font-size: 15px; font-weight: 700; letter-spacing: 0; }
.studio-page .process-steps h3 { font-size: 20px; }
.process-steps p { margin-top: 8px !important; color: var(--studio-muted); font-size: 15px; }
.process-quote { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; margin: 22px 0 0; padding: 22px 28px; border-radius: 16px; background: var(--ink); color: #f4f5f4; }
.process-quote p { font-size: clamp(17px, 1.5vw, 21px); font-style: italic; font-weight: 300; }
.process-quote cite { color: #8fff74; font-size: 13px; font-style: normal; white-space: nowrap; }

/* ---- 6. Contact + footer ----------------------------------------------- */
.slide--end { justify-content: space-between; padding-bottom: 0; background: radial-gradient(ellipse at 82% 62%, var(--accent-haze), transparent 55%), #070a08; }
.contact-slide { display: flex; flex: 1; align-items: center; padding-bottom: 36px; }
.studio-page .contact-slide h2 { font-size: clamp(34px, 3.8vw, 56px); }
.home-page .contact-slide .contact-description { max-width: 520px; }
.home-page .contact-slide .actions { margin-top: 28px; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 1100px) {
    .config-options label { font-size: 13px; padding-inline: 12px; }
    .motion-grid, .experience-tiles { gap: 12px; }
    .motion-card .card-bottom p { display: none; }
}
@media (max-width: 960px) {
    html[data-logo="midden"] .home-page .header-inner { padding-block: 5px 12px; }
    html[data-logo="rechts"] .home-page .header-inner { flex-direction: row; }
    html[data-logo="rechts"] .home-page .brand { order: 2; margin-top: 4px; }
}
@media (min-width: 961px) {
    html[data-logo="rechts"] .home-page .header-inner { flex-direction: row-reverse; }
    html[data-logo="midden"] .home-page .header-inner { flex-direction: column; justify-content: center; gap: 0; padding-block: 10px 2px; }
}
@media (max-width: 900px) {
    .home-page .slide--hero .hero-inner { grid-template-columns: 1fr; gap: 22px; }
    .config-grid { display: flex; flex-direction: column; gap: 0; }
    .config-copy { display: contents; }
    .config-stage { order: 1; min-height: 30svh; margin-bottom: 14px; }
    .config-panel { order: 2; }
    .config-next { margin-top: 16px !important; font-size: 14px; }
    .slide-heading { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
    .motion-grid, .experience-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .motion-card { aspect-ratio: 1; }
    .motion-card[data-home-product="laptop"] .work-media { width: 100%; }
    .motion-card[data-home-product="oordopjes-case"] .work-media { width: 78%; top: 40%; }
    .exp-tile { aspect-ratio: 1.15; }
    .exp-tile:first-child { grid-column: 1 / -1; aspect-ratio: 2.1; }
    .process-steps { grid-template-columns: 1fr; gap: 10px; }
    .process-steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; padding: 16px 18px; }
    .process-steps .step-number { grid-row: span 2; margin: 0; width: 38px; height: 38px; }
    .process-steps p { margin-top: 2px !important; font-size: 14px; }
}
@media (max-width: 640px) {
    .slide--hero { padding-bottom: 76px; }
    .home-page .hero-benefits { margin-top: 20px !important; }
    .config-lead { display: none; }
    .config-panel { padding: 14px; gap: 10px; }
    .config-group legend { margin-bottom: 6px; font-size: 10px; }
    .config-options { gap: 6px; }
    .config-options label { min-height: 34px; padding: 6px 10px; font-size: 12px; }
    .swatches .option-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .swatches label { padding: 4px; }
    .swatch { width: 24px; height: 24px; }
    .config-status { display: none; }
    .slide-heading > p { font-size: 14px; }
    .motion-card .card-bottom { left: 14px; bottom: 12px; }
    .studio-page .motion-card h3 { font-size: 16px; }
    .exp-kind { top: 10px; left: 10px; font-size: 8px; padding: 5px 8px; }
    .exp-body { left: 12px; bottom: 12px; }
    .exp-body p { display: none; }
    .process-quote { display: none; }
    .studio-page .contact-slide h2 { font-size: 30px; }
    .home-page .contact-slide .signature, .home-page .contact-slide .contact-benefits { display: none; }
    .home-page .contact-slide .actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .contact-slide { padding-bottom: 20px; }
    .slide--end .footer-description, .slide--end .footer-bottom p + p { display: none; }
    .slide--end .site-footer { padding-block: 14px 18px; }
    /* Configurator: menubalk and logo side by side, colours as dots only. */
    .config-panel { grid-template-columns: auto 1fr; }
    .config-panel > .config-group:nth-of-type(1), .config-panel > .config-group:nth-of-type(2), .config-footer { grid-column: 1 / -1; }
    .config-stage { min-height: 27svh; margin-bottom: 12px; }
    .config-next { display: none; }
}
/* Short phones (browser bars visible): tighten the hero further. */
@media (max-width: 640px) and (max-height: 760px) {
    .home-page .slide--hero .hero-benefits { display: none; }
    .config-stage { min-height: 24svh; }
}
@media (prefers-reduced-motion: reduce) {
    html.config-animate { transition: none; }
    .exp-media img, .hero-logo-part { animation: none; }
    .config-poster, #logo-canvas, .config-stage-hint { transition: none; }
}
