/* Confirmed desktop homepage rules; mobile styles are deliberately separate. */
@media(min-width:901px){
html body.home #heine-home .hh-wrap,html body.home #heine-home .hh-scp-banner{width:min(1180px,calc(100% - 64px))!important;max-width:1180px!important;margin-left:auto!important;margin-right:auto!important;box-sizing:border-box}
html body.home #heine-home .hh-section{padding:48px 0!important}
html body.home #heine-home .hh-hero h1{font-size:clamp(44px,5.7vw,82px)!important;line-height:1.08!important;white-space:normal!important;text-wrap:balance}
html body.home #heine-home .hh-section h2,html body.home #heine-home .hh-scp-banner h2{font-size:clamp(36px,3.5vw,50px)!important;line-height:1.15!important}
html body.home #heine-home .hh-banner{height:clamp(380px,42.857vw,640px)!important;min-height:0!important;aspect-ratio:21/9!important;border-radius:0!important}
html body.home #heine-home .hh-banner-slide:has(img[src*="hero-schulgarten"]){--hh-banner-y:20%!important;--hh-banner-z:1!important}
html body.home #heine-home .hh-banner-photo{height:100%!important;object-fit:cover!important}
html body.home #heine-home .hh-news-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:24px!important;align-items:stretch!important}
html body.home #heine-home .hh-news-card,html body.home #heine-home .hh-calendar-card{border-radius:20px!important;min-width:0!important;overflow:hidden}
html body.home #heine-home .hh-news-image{height:auto!important;aspect-ratio:4/3!important}
html body.home #heine-home .hh-news-image img{width:100%!important;height:100%!important;object-fit:cover!important}
html body.home #heine-home .hh-news-copy{padding:24px!important}
html body.home #heine-home .hh-news-copy h3,html body.home #heine-home .hh-event-copy h4{font-size:20px!important;line-height:1.25!important}
html body.home #heine-home .hh-news-copy p,html body.home #heine-home .hh-film-copy>p:not(.hh-eyebrow),html body.home #heine-home .hh-scp-banner p:not(.hh-eyebrow){font-size:16px!important;line-height:1.6!important}
html body.home #heine-home .hh-news-copy p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
html body.home #heine-home .hh-calendar-card>h3{font-size:24px!important;line-height:1.25!important}
html body.home #heine-home .hh-film video{aspect-ratio:16/9!important;object-fit:contain}
html body.home #heine-home .hh-desktop-news-more{grid-column:1/3;justify-self:end}
html body.home #heine-home .hh-desktop-events-more{grid-column:3;justify-self:end}
html body.home .footer-compact-row{width:min(1180px,calc(100% - 64px))!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:20px!important}
html body.home .footer-compact-school,html body.home .footer-compact-nav,html body.home .footer-social{white-space:nowrap!important;flex-wrap:nowrap!important}
html body.home .footer-compact-nav{display:flex!important;gap:16px!important;margin-left:auto!important}
html body.home .site-footer-compact{font-size:12px!important}
html body.home .footer-compact-identity{font-size:12px!important}
html body.home .site-footer-compact .social-links{flex-wrap:nowrap!important}
}
@media(min-width:901px) and (max-width:1100px){
html body.home #heine-home .hh-news-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html body.home #heine-home .hh-calendar-card{grid-column:1/-1;grid-row:3}
html body.home #heine-home .hh-desktop-news-more{grid-row:2}
html body.home #heine-home .hh-desktop-events-more{grid-column:1/-1;grid-row:4}
html body.home .footer-compact-row{gap:12px!important}
html body.home .footer-compact-nav{gap:10px!important}
}
@media(min-width:1280px){
html body.home .topbar .header-inner{width:min(1180px,calc(100% - 64px))!important;display:flex!important;gap:12px!important}
html body.home .topbar .brand{flex:0 0 190px!important;width:190px!important}
html body.home .topbar .brand img{width:190px!important}
html body.home .topbar .primary-nav{display:block!important;margin-left:auto!important;min-width:0}
html body.home .topbar .primary-nav .heine-menu{display:flex!important;flex-wrap:nowrap!important;gap:12px!important;padding:0!important;list-style:none}
html body.home .topbar .primary-nav a{font-size:14px!important;white-space:nowrap!important}
html body.home .topbar .new-at-heine{display:inline-flex!important;white-space:nowrap!important;font-size:14px!important;padding:12px 16px!important;background:#2fac81!important;color:#fff!important;border-radius:999px!important}
html body.home .topbar .heine-header-tools{margin-left:0!important;gap:6px!important}
html body.home .topbar .social-links,html body.home .topbar .menu-toggle{display:none!important}
}
@media(min-width:901px){
html body.home #heine-home .hh-wrap .hh-scp-banner{width:100%!important;padding:24px!important}
}
/* Shared priority layer: these declarations still apply exclusively to desktop. */
@layer heine-mobile-rules{@media(min-width:901px){
html body.home #heine-home .hh-event-copy h4{font-size:20px!important;line-height:1.25!important}
html body.home #heine-home .hh-news-copy p{font-size:16px!important;line-height:1.6!important}
}}
.heine-desktop-loop,.heine-desktop-loop-shade,.heine-desktop-loop-control{display:none}
@media(min-width:901px){
html body.home #heine-home .hh-hero.heine-loop-desktop{position:relative;height:clamp(480px,42.857vw,640px)!important;min-height:0!important;padding:0!important;overflow:hidden;isolation:isolate;background:#eef7f2}
html body.home #heine-home .heine-desktop-loop{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:0}
html body.home #heine-home .heine-desktop-loop-shade{display:block;position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(255,255,255,.8) 36%,rgba(255,255,255,.08) 74%);pointer-events:none}
html body.home #heine-home .heine-loop-desktop .hh-hero-layout{position:relative;z-index:2;padding-top:52px!important}
html body.home #heine-home .heine-loop-desktop .hh-banner{display:none!important}
html body.home #heine-home .heine-desktop-loop-control{display:grid;place-items:center;position:absolute;z-index:3;right:max(32px,calc((100% - 1180px)/2));bottom:24px;width:48px;height:48px;background:#fff;color:#17624d;border:1px solid #d4e7dc;border-radius:50%;font-size:20px;cursor:pointer}
html body.home #heine-home .heine-desktop-loop-control:focus-visible{outline:3px solid #17624d;outline-offset:4px}
}

/* Keep heads visible in the garden scene: crop from the bottom. */
@media(min-width:901px){html body.home #heine-home .heine-desktop-loop{object-position:center top}}

/* Static book overlapping the desktop video/philosophy transition. */
@layer heine-mobile-rules{@media(min-width:901px){
html body.home #heine-home .hh-film{background:#fff!important;position:relative!important;overflow:visible!important;padding-top:72px!important}
html body.home #heine-home .hh-film:before{content:""!important;display:block!important;position:absolute!important;top:-52px!important;left:max(32px,calc((100% - 1180px)/2))!important;width:112px!important;height:103px!important;margin:0!important;z-index:3;background:url('../images/heine-logo.png') left center/370.513% 100% no-repeat;-webkit-mask:url('../images/book-outline.svg?v=307') center/100% 100% no-repeat;mask:url('../images/book-outline.svg?v=307') center/100% 100% no-repeat;animation:none!important;transition:none!important;transform:none!important;pointer-events:none}
}}

@layer heine-mobile-rules{@media(min-width:901px){html body.home #heine-home .hh-film{margin-top:0!important}}}

@media(min-width:901px){html body.home #heine-home .heine-desktop-loop-shade{background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(255,255,255,.65) 36%,rgba(255,255,255,.03) 74%)}}

/* 525: expose confirmed contact details on the desktop homepage footer. */
@layer heine-desktop-type{
@media(max-width:900px){html body .heine-home-footer-contact{display:none!important}}
@media(min-width:901px){html body.home .footer-compact-school{flex-direction:column!important;align-items:flex-start!important;gap:4px!important}html body.home .heine-home-footer-contact{display:flex!important;font-style:normal!important;font-size:12px!important;gap:12px!important}}

}

/* 528: align the homepage video bottom with the five photo headers. */
@layer heine-desktop-type{
@media(min-width:901px){html body.home #heine-home .hh-hero.heine-loop-desktop{height:calc(max(500px,calc(clamp(420px,calc(74svh - 160px),calc(42.857vw - 38px)) + 80px)) + 38.1953125px)!important;min-height:0!important;max-height:none!important}}
@media(max-width:900px){html body.home #heine-home .heine-film-hero{height:calc(max(460px,76svh) + 118px)!important;min-height:0!important;max-height:none!important}}
}


/* 2.0.541: Weiße Beschriftung des Desktop-Menübuttons wiederherstellen. */
@layer heine-desktop-type.heine-contrast{
@media(min-width:901px){html body .topbar a.new-at-heine,html body .topbar a.new-at-heine:is(:hover,:focus-visible,:active){color:#fff!important;}}
}
