/* ==========================================================
   case-upgrade.css  -  laden NA main.css op de projectdetailpagina's
   (timeless, grillhouse, molby, adventure, archi). Zet dit bestand in
   de hoofdmap, naast main.css. Eigen klassen met prefix "cs-".
   Effecten: alleen transform/clip-path/opacity.
   ========================================================== */

:root {
    --vd-brand: #3a3d78;
    --vd-brand-dark: #2b2e5e;
    --vd-ink: #1f2330;
    --vd-soft: #eef0f6;
    --vd-line: #d8dbe8;
    --vd-muted: #5b6176;
}

/* Scherpe koppen: de tekstschaduw uit main.css maakt ze wazig */
h1,
h2,
h3 {
    text-shadow: none !important;
}

/* Logo: de animatie in main.css bleef met 'forwards' vastzitten en blokkeerde hover */
.logo img {
    opacity: 1;
    animation: slideInFromLeft 1.2s ease-out backwards;
    transition: transform 0.3s ease;
}
.logo img:hover {
    transform: scale(1.05);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Pagina ---------- */
.cs {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 5% 24px;
}
.cs,
.cs *,
.cs *::before,
.cs *::after {
    box-sizing: border-box;
}

.cs-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--vd-brand);
    font-weight: 600;
    text-decoration: none;
}
.cs-back:hover,
.cs-back:focus-visible {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Sectiekoppen: links met een lijn (zoals op de andere pagina's) */
.cs h2 {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    text-align: left;
    font-size: 1.6rem;
    margin: 0 0 1.75rem;
}
.cs h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--vd-line);
}

/* ---------- Hero ---------- */
.cs-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 56px;
    align-items: end;
    margin-bottom: 56px;
}
.cs-hero h1 {
    font-size: clamp(2.1rem, 4.2vw, 3.2rem);
    line-height: 1.12;
    letter-spacing: -0.01em;
    text-align: left;
    margin: 0 0 1rem;
    animation: cs-reveal 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
.cs-lead {
    margin: 0 0 2rem;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    line-height: 1.6;
    text-align: left;
    color: #2f3447;
    animation: cs-rise 0.6s 0.3s ease-out backwards;
}
.cs-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    animation: cs-rise 0.6s 0.45s ease-out backwards;
}

/* Projectgegevens */
.cs-facts {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--vd-line);
    animation: cs-rise 0.6s 0.6s ease-out backwards;
}
.cs-facts div {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--vd-line);
}
.cs-facts dt {
    color: var(--vd-muted);
}
.cs-facts dd {
    margin: 0;
    font-weight: 600;
    color: var(--vd-ink);
}

/* ---------- Knoppen ---------- */
.cs-btn {
    display: inline-block;
    text-align: center;
    background: var(--vd-brand);
    color: #fff;
    padding: 14px 24px;
    border: 2px solid var(--vd-brand);
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.cs-btn:hover,
.cs-btn:focus-visible {
    background: var(--vd-brand-dark);
    border-color: var(--vd-brand-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(61, 64, 119, 0.28);
}
.cs-link {
    color: var(--vd-brand);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}
.cs-link:hover,
.cs-link:focus-visible {
    color: var(--vd-brand-dark);
}

/* ---------- Mockups: laptop breed, telefoon even hoog ---------- */
.cs-shots {
    display: grid;
    grid-template-columns: minmax(0, 2.45fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}
.cs-shot {
    position: relative;
    margin: 0;
    min-height: 0;
    border-radius: 16px;
    box-shadow: 0 22px 44px -26px rgba(43, 46, 94, 0.55);
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
    will-change: transform;
}
.cs-shot:hover {
    box-shadow: 0 30px 52px -26px rgba(43, 46, 94, 0.6);
}
.cs-shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}
.cs-shot--laptop img {
    aspect-ratio: 1200 / 672;
    object-fit: cover;
}
/* De telefoonfoto vult de hoogte van de rij, zonder de rij zelf hoger te maken */
.cs-shot--phone img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cs-glare {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease-out;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.3), transparent 55%);
}
.cs-shot:hover .cs-glare {
    opacity: 1;
}

/* ---------- Video + uitleg ---------- */
.cs-split {
    display: grid;
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
    margin-top: 96px;
}
.cs-video {
    position: sticky;
    top: 120px;
    margin: 0;
}
.cs-video-frame {
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 48px -26px rgba(43, 46, 94, 0.6);
}
.cs-video video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 620px;
    object-fit: contain;
}
.cs-video figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: left;
    color: var(--vd-muted);
}

/* Werkwijze: een echte volgorde, dus genummerd */
.cs-steps {
    list-style: none;
    margin: 0 0 64px;
    padding: 0;
    counter-reset: step;
}
.cs-steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 2.75rem 1fr;
    gap: 0 0.75rem;
    padding: 1.4rem 0;
    border-top: 1px solid var(--vd-line);
}
.cs-steps li:last-child {
    border-bottom: 1px solid var(--vd-line);
}
.cs-steps li::before {
    content: counter(step);
    grid-row: span 2;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--vd-brand);
}
.cs-steps h3,
.cs-why h3 {
    margin: 0 0 0.3rem;
    font-size: 1.15rem;
    text-align: left;
    color: var(--vd-ink);
}
.cs-steps p,
.cs-why p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
    color: #444a5e;
}

/* Waarom het werkt */
.cs-why {
    list-style: none;
    display: grid;
    gap: 28px;
    margin: 0;
    padding: 0;
}
.cs-why li {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0 16px;
    align-items: start;
}
.cs-why i,
.cs-why .cs-icon {
    grid-row: span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--vd-soft);
    color: var(--vd-brand);
    font-size: 1.15rem;
}

/* ---------- Slotactie ---------- */
.cs-cta {
    max-width: 1100px;
    margin: 96px auto 0;
    padding: 56px 24px;
    text-align: center;
    background: var(--vd-soft);
    border-radius: 16px;
}
.cs-cta h2 {
    display: block;
    text-align: center;
    margin: 0 0 0.75rem;
}
.cs-cta h2::after {
    display: none;
}
.cs-cta p {
    max-width: 52ch;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
    text-align: center;
}

/* ---------- Toegankelijkheid ---------- */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--vd-brand);
    outline-offset: 3px;
}

/* ---------- Laadmoment: alleen kop, inleiding, knoppen en gegevens ---------- */
@keyframes cs-reveal {
    from {
        clip-path: inset(0 0 100% 0);
        transform: translateY(24px);
    }
    to {
        clip-path: inset(-10% -5% -10% -5%);
        transform: none;
    }
}
@keyframes cs-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Responsief ---------- */
@media (max-width: 900px) {
    .cs-hero {
        grid-template-columns: 1fr;
        gap: 32px;
        align-items: start;
    }
    .cs-shots {
        grid-template-columns: 1fr;
    }
    .cs-shot--phone {
        max-width: 320px;
        margin: 0 auto;
        width: 100%;
    }
    .cs-shot--phone img {
        position: static;
        height: auto;
        aspect-ratio: 848 / 1264;
    }
    .cs-split {
        grid-template-columns: 1fr;
        gap: 48px;
        margin-top: 72px;
    }
    .cs-video {
        position: static;
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
    }
    .cs-cta {
        margin-top: 72px;
    }
}
@media (max-width: 600px) {
    .cs {
        padding-top: 28px;
    }
    .cs-facts div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
    .cs-cta {
        margin: 64px 20px 0;
        padding: 40px 20px;
    }
}

/* Respecteer wie animaties liever uit heeft */
@media (prefers-reduced-motion: reduce) {
    .cs-hero h1,
    .cs-lead,
    .cs-actions,
    .cs-facts,
    .logo img {
        animation: none;
    }
    .cs-shot,
    .cs-glare,
    .cs-btn,
    .logo img {
        transition: none;
    }
}

/* ==========================================================
   Aanvullingen voor pagina's zonder Font Awesome (inline SVG)
   (bijv. Grillhouse)
   ========================================================== */

/* Hamburgerknop als inline SVG (stond eerst in het <style>-blok van de pagina) */
.menu-toggle svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* Pijltje bij "Alle projecten" als inline SVG */
.cs-back svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Icoon in "Waarom het werkt" als inline SVG */
.cs-icon svg {
    width: 1.3rem;
    height: 1.3rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}




/* ==========================================================
   Grillhouse: liggende video op normaal formaat
   ========================================================== */

/* Liggende video: breder kolom (normaal formaat) en geen zwarte achtergrond:
   de video heeft zijn eigen achtergrond */
.cs-video--landscape .cs-video-frame {
    background: transparent;
}
/* Ruimte reserveren voordat de video geladen is, zodat de pagina niet verspringt */
.cs-video--landscape video {
    aspect-ratio: auto 4 / 3;
}
@media (min-width: 901px) {
    .cs-split--wide {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        gap: 48px;
    }
}
@media (max-width: 900px) {
    .cs-video--landscape {
        max-width: 560px;
    }
}