/* Site-owned Sunburst illustrations; original assets and light theme retained. */
html:not([data-theme="light"]) .page-landing .landing-hero::before {
    background-image: url('../assets/images/sunburst-20261029/hero-nibbly-beaver-desk.webp');
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.01);
    mask-image: none;
}
html:not([data-theme="light"]) .page-landing .landing-hero::after {
    background: linear-gradient(90deg, rgba(2,8,18,.58) 0%, rgba(2,8,18,.46) 27%, rgba(2,8,18,.20) 43%, rgba(2,8,18,.03) 60%, transparent 72%);
}
html:not([data-theme="light"]) .page-landing .landing-small-design::before {
    background-image: url('../assets/images/sunburst-20261029/small-by-design-dm.webp');
}
html:not([data-theme="light"]) .page-landing .landing-ready::after {
    background-image: url('../assets/images/sunburst-20261029/ready-to-nibbly-dm.webp');
}
.hero-motion {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    transform: scale(1.01);
    mask-image: none;
    opacity: 0;
}
.hero-motion__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-motion--ready:not(.hero-motion--reduced) .hero-motion { opacity: 1; }
/* Small visible control with a 44px pointer/keyboard target. */
.hero-motion__toggle {
    position: absolute;
    right: max(1rem, env(safe-area-inset-right));
    bottom: 1rem;
    z-index: 10;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #e9fcff;
    font-size: 0;
    cursor: pointer;
}
.hero-motion__toggle::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(233,252,255,.4);
    border-radius: 50%;
    background: rgba(2,8,18,.55);
}
.hero-motion__toggle::before {
    content: '';
    position: absolute;
    z-index: 1;
    top: 16px;
    left: 19px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 9px solid currentColor;
}
.hero-motion__toggle[data-playing="true"]::before {
    left: 17px;
    width: 10px;
    height: 12px;
    border-top: 0;
    border-bottom: 0;
    border-left: 3px solid currentColor;
    border-right: 3px solid currentColor;
}
.hero-motion__toggle:hover::after { background: rgba(2,8,18,.85); border-color: #e9fcff; }
.hero-motion__toggle:focus-visible { outline: 2px solid #72e0ee; outline-offset: 2px; }
.hero-motion__toggle[hidden],
[data-theme="light"] .hero-motion,
[data-theme="light"] .hero-motion__toggle { display: none; }
@media (min-width: 769px) {
    html:not([data-theme="light"]) .page-landing .hero-content { max-width: 560px; }
    html:not([data-theme="light"]) .page-landing .hero-title { font-size: clamp(3rem, 4.6vw, 5.4rem); }
    html[lang="de"]:not([data-theme="light"]) .page-landing .hero-title { font-size: clamp(2.6rem, 3.9vw, 4.8rem); }
}
@media (max-width: 768px) {
    html:not([data-theme="light"]) .page-landing .landing-hero::before {
        width: 100%;
        height: clamp(280px, 76vw, 460px);
        top: var(--header-height);
        bottom: auto;
        background-size: cover;
        background-position: 70% center;
        transform: scale(1.01);
        mask-image: linear-gradient(to bottom, black 70%, transparent);
    }
    html:not([data-theme="light"]) .page-landing .landing-hero::after {
        background: linear-gradient(180deg, transparent 0%, transparent 28%, rgba(2,8,18,.4) 45%, #020812 62%);
    }
    .hero-motion {
        width: 100%;
        height: clamp(280px, 76vw, 460px);
        top: var(--header-height);
        bottom: auto;
        transform: scale(1.01);
        mask-image: linear-gradient(to bottom, black 70%, transparent);
    }
    .hero-motion__video {
        position: absolute;
        width: 100%;
        height: 100%;
        max-width: none;
        left: 0;
        top: 0;
        object-fit: cover;
        object-position: 70% center;
    }
    .hero-motion__toggle { bottom: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-motion, .hero-motion__toggle { display: none; }
}

html:not([data-theme="light"]) .page-landing .vibecoding-visual .feature-theme-image--light { display: none; }

/* Character-sheet refresh: readable German labels and larger narrative scenes. */
.page-landing .landing-features :is(.features-title, .feature-card-copy h3, .features-copy) {
    -webkit-hyphens: auto;
    hyphens: auto;
    word-break: normal;
    overflow-wrap: normal;
}
html:not([data-theme="light"]) .page-landing .vibecoding-image--scene {
    display: block;
    width: 100%;
    max-width: none;
    padding: 0;
    border-radius: 1.4rem;
    box-shadow: 0 24px 72px rgba(0,0,0,.28);
}
html:not([data-theme="light"]) .page-landing .landing-ready::after {
    background-image: url('../assets/images/character-refresh-20261029/ready-to-nibbly.webp');
    background-size: auto 100%;
    background-position: right center;
    opacity: 1;
}
html:not([data-theme="light"]) .page-landing .landing-ready::before {
    background: linear-gradient(90deg, #020812 0%, rgba(2,8,18,.97) 38%, rgba(2,8,18,.65) 52%, rgba(2,8,18,.05) 73%, transparent);
}
@media (min-width: 1000px) {
    html:not([data-theme="light"]) .page-landing .landing-vibecoding .landing-container {
        max-width: 1440px;
        display: grid;
        grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
        column-gap: clamp(2rem, 4vw, 4rem);
        align-items: start;
    }
    html:not([data-theme="light"]) .page-landing .landing-vibecoding .landing-section-header {
        grid-column: 1;
        grid-row: 1;
        margin-bottom: 2.5rem;
    }
    html:not([data-theme="light"]) .page-landing .landing-vibecoding .landing-section-heading {
        font-size: clamp(3rem, 4.4vw, 5rem);
        line-height: .98;
    }
    html:not([data-theme="light"]) .page-landing .vibecoding-layout { display: contents; }
    html:not([data-theme="light"]) .page-landing .vibecoding-accordion { grid-column: 1; grid-row: 2; }
    html:not([data-theme="light"]) .page-landing .vibecoding-visual {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
    }
}
@media (max-width: 999px) {
    html:not([data-theme="light"]) .page-landing .vibecoding-layout { grid-template-columns: 1fr; gap: 2rem; }
    html:not([data-theme="light"]) .page-landing .vibecoding-visual { order: -1; }
    html:not([data-theme="light"]) .page-landing .vibecoding-image--scene { max-width: 680px; margin-inline: auto; }
}
@media (max-width: 768px) {
    html:not([data-theme="light"]) .page-landing :is(.landing-vibecoding .landing-container, .landing-ready-inner) { padding-inline: 24px; }
    html:not([data-theme="light"]) .page-landing .landing-ready::after { background-position: 65% center; background-size: auto 100%; }
    html:not([data-theme="light"]) .page-landing .landing-ready::before {
        background: linear-gradient(180deg, rgba(2,8,18,.96), rgba(2,8,18,.86) 54%, rgba(2,8,18,.65));
    }
}

/* The Vibe scene keeps its editable still as a loading/reduced-motion fallback. */
.page-landing [data-scene-motion] { position: relative; }
html:not([data-theme="light"]) .page-landing [data-scene-motion] {
    width: 100%;
    max-width: 680px;
    margin-inline: auto;
}
.scene-motion {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    border-radius: 1.4rem;
    pointer-events: none;
    opacity: 0;
}
.scene-motion__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.scene-motion--ready:not(.scene-motion--reduced) .scene-motion { opacity: 1; }
[data-theme="light"] .scene-motion { display: none; }
@media (prefers-reduced-motion: reduce) {
    .scene-motion { display: none; }
}

/* German copy determines its own height before the mascot starts. */
@media (min-width: 800px) {
    html[lang="de"] .page-landing .features-showcase {
        grid-template-rows: auto auto minmax(15rem, auto);
    }
    html[lang="de"] .page-landing .features-intro {
        grid-row: 1;
        min-height: auto;
    }
    html[lang="de"] .page-landing .features-mascot {
        grid-row: 2;
        align-self: end;
    }
    html[lang="de"] .page-landing .features-mascot-img {
        position: relative;
        bottom: auto;
        width: min(110%, 26rem);
        margin-bottom: -1rem;
        translate: -10px 0;
    }
    html[lang="de"] .page-landing .features-kicker { margin-bottom: 1.5rem; }
    html[lang="de"] .page-landing .features-copy { margin-top: 1.5rem; }
    html[lang="de"] .page-landing .feature-card-editor {
        grid-row: 1 / 3;
        align-self: start;
        height: clamp(34rem, 43vw, 40rem);
    }
    html[lang="de"] .page-landing :is(.feature-card-multilingual, .feature-card-urls, .feature-card-security) { grid-row: 3; }
}
@media (min-width: 1200px) {
    html[lang="de"] .page-landing .features-showcase {
        grid-template-columns: repeat(2, minmax(0, 1.12fr)) repeat(7, minmax(0, 1fr));
    }
    html[lang="de"] .page-landing .feature-card-backup { grid-row: 1; }
    html[lang="de"] .page-landing .feature-card-media { grid-row: 2; }
}
@media (min-width: 800px) and (max-width: 1199px) {
    html[lang="de"] .page-landing .features-showcase { grid-template-rows: auto auto auto minmax(15rem, auto); }
    html[lang="de"] .page-landing .features-side-stack { grid-row: 3; }
    html[lang="de"] .page-landing :is(.feature-card-multilingual, .feature-card-urls, .feature-card-security) { grid-row: 4; }
}
