@import url('fonts.css');
@import url('lottiehover.css');

html {
    height: 100%;
}

:root{
    --header-h: 140px;
    --max-w: 1200px;
    --stage-max-w: 1600px;
    --slide-text-w: 55ch;
    --gutter: 30px;
    --stage-pad: 30px;
    --radius: 18px;
}

*{ box-sizing: border-box; }
a { color: rgb(155, 93, 162); text-decoration: none; }
a:hover { text-decoration: underline; }
a.whiteLink { color: #fff; }

body{
    margin:0;
    /* make the page a column flex container so the footer can stick */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'BundesSerifWeb-Regular', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color:#111;
    background:#fff;
}

header,
footer {
    /* don't allow header/footer to grow or shrink unexpectedly */
    flex-shrink: 0;
}

main {
    /* fill available space between header and footer */
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

header {
    background:#fff;
}
.header-inner{
    width: var(--max-w);
    max-width: 100%;
    height: var(--header-h);
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin: 0 auto;
    padding: 0 var(--gutter);
    position: relative;
    z-index: 5;
    /* border-bottom: 1px solid rgba(0,0,0,.06); */
}
header img{
    display: block;
    min-width: 0;
}
header img.logo-dlr{ 
    width: 200px;
    max-width: 100%;
    height: auto !important; 
}
header img.logo-bmvi{ 
    width: 350px;
    max-width: 100%;
    height: auto !important; 
}

.hero{
    /* hero normally fills viewport; on home page header sits on top so
       min-height can remain 100vh without pushing content */
    min-height: 100vh;
    position: relative;
    display:flex;
    align-items:center;
    justify-content:center;
    padding: calc(var(--gutter) * 2);
    overflow:hidden;
}

/* home page tweaks: header overlays hero */
body.home header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    background: #fff; /* keep underlying hero visible */
}

body.home .hero {
    /* ensure hero content isn't hidden behind header */
    padding-top: var(--header-h);
}
.hero::before{
    content:"";
    position:absolute; inset:0;
    background: url("../img/hero.jpg") center/cover no-repeat;
    transform: scale(1.02);
}
/*
.hero::after{
    content:"";
    position:absolute; inset:0;
    background: rgba(0,0,0,.35);
}
*/
.hero .content{
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align:center;
    color:#fff;
}
.hero h1{ font-family: 'BundesSerifWeb-Regular'; font-weight: 300; margin:0 0 20px; font-size: clamp(34px, 8vw, 75px); line-height: 1.05; }
.hero h2{ font-family: 'BundesSerifWeb-Regular'; font-weight: 300; margin:0 0 40px; font-size: clamp(18px, 4vw, 35px); line-height: 1.05; }
.hero p{ margin:0; font-size: 18px; line-height: 1.5; }

/* Scrollytelling */
.scrolly{ position: relative; background:#fff; }

.stage{
    position: sticky;
    top: 0;
    height: 100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding: var(--stage-pad);
    background: #fff;
}

.stage-menu-toggle{
    position: absolute;
    top: var(--stage-pad);
    right: var(--stage-pad);
    width: 50px;
    height: 50px;
    border: 1px solid rgba(0,0,0,1);
    border-radius: 999px;
    background: #fff;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    z-index: 40;
}
.stage-menu-toggle span{
    width: 16px;
    height: 2px;
    background: #111;
    border-radius: 999px;
}
.stage-menu-overlay{
    position: absolute;
    inset: 0;
    background: rgba(10,8,12,.45);
    display: flex;
    justify-content: flex-end;
    z-index: 45;
}
.stage-menu-overlay[hidden]{
    display: none !important;
}
.stage-menu-panel{
    width: min(440px, 100%);
    height: 100%;
    background: #fff;
    padding: 24px;
    overflow: auto;
}
.stage-menu-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.stage-menu-head h4{
    margin: 0;
    font-family: 'BundesSansWeb-Regular';
    font-weight: 300;
    font-size: 24px;
}
.stage-menu-close{
    width: 50px;
    height: 50px;
    border: 1px solid rgba(0,0,0,1);
    border-radius: 999px;
    background: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.stage-menu-nav ul{
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.stage-menu-nav a{
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.12);
    color: #111;
    text-decoration: none;
}
.stage-menu-nav a:hover{
    background: rgba(155,93,162,.08);
}
.stage-menu-nav a.is-active{
    border-color: rgb(155,93,162);
    background: rgba(155,93,162,.12);
}
.stage-menu-legal{
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(0,0,0,.12);
}
.stage-menu-legal h5{
    margin: 0 0 10px;
    font-family: 'BundesSansWeb-Regular';
    font-weight: 300;
    font-size: 16px;
}
.stage-menu-legal a{
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #111;
    text-decoration: none;
}
.stage-menu-legal a:hover{
    background: rgba(155,93,162,.08);
}

.stage-inner{
    width: min(var(--stage-max-w), 100%);
    display:grid;
    grid-template-columns: minmax(0, var(--slide-text-w)) minmax(0, 1fr);
    gap: 48px;
    align-items:center;
    position: relative;
}

.slide-text{
    width: 100%;
    max-width: var(--slide-text-w);
}

/* Progress indicator */
.progress{
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-12px);
    font-size: 14px;
    opacity: .7;
    letter-spacing: .06em;
    -webkit-user-select:none;
    user-select:none;
}

.slide-text h3{
    font-family: 'BundesSansWeb-Regular';
    font-weight: 300;
    margin:20px 0 25px;
    font-size: clamp(30px, 2.2vw, 50px);
    line-height: 1.4;
}
.slide-text .slide-copy{
    font-size: 20px;
    line-height: 1.55;
    max-width: var(--slide-text-w);
    margin-bottom: 40px;
}
.slide-nav-btn{
    width: 50px;
    height: 50px;
    border: 1px solid rgba(0,0,0,1);
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}
.slide-nav-btn:hover{
    border-color: rgba(0,0,0,.5);
}
.slide-nav-btn:disabled{
    opacity: .35;
    cursor: not-allowed;
}
.slide-source{
    max-width: 72ch;
}
.slide-source-toggle{
    color: #999;
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    text-underline-offset: 2px;
    cursor: pointer;
}
.slide-source-toggle:hover{
    text-decoration: underline;
}
.slide-source-body{
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(17,17,17,.78);
    white-space: pre-line;
}
.stage-bottom-nav{
    position: absolute;
    left: var(--stage-pad);
    right: var(--stage-pad);
    bottom: calc(max(12px, calc(var(--stage-pad) * 0.5)) + 26px);
    min-height: 50px;
    z-index: 20;
    pointer-events: none;
}
.stage-bottom-nav-center{
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}
.stage-back-link{
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    pointer-events: auto;
}
.stage-skip-link{
    pointer-events: auto;
}
.stage-bottom-nav-right{
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    pointer-events: auto;
}
.stage-legal{
    position: relative;
    display: inline-flex;
    align-items: center;
}
.stage-legal-toggle{
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: rgb(155, 93, 162);
    font: inherit;
    cursor: pointer;
}
.stage-legal-toggle:hover,
.stage-legal-toggle[aria-expanded="true"]{
    text-decoration: underline;
}
.stage-legal-symbol{
    display: none;
}
.stage-legal-menu{
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: min(280px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid rgba(0,0,0,.16);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(0,0,0,.16);
    z-index: 35;
}
.stage-legal-menu[hidden]{
    display: none !important;
}
.stage-legal-menu a{
    display: block;
    padding: 9px 10px;
    border-radius: 8px;
    color: #111;
    text-decoration: none;
    line-height: 1.35;
}
.stage-legal-menu a:hover{
    background: rgba(155,93,162,.08);
}

.lottie-wrap{
    width: 100%;
    /* max-width: 520px; */
    /* margin-left:auto; */
    aspect-ratio: 1 / 1;
    /* background: #f6f6f6; */
    /* border-radius: var(--radius); */
    overflow:hidden;
    position: relative;
}

.lottie-player{
  width:100%;
  height:100%;
  opacity: 1;
  will-change: opacity;
}

.track{ height: 100vh; } /* set by JS */

.stage-progress{
    position: absolute;
    left: var(--stage-pad);
    right: var(--stage-pad);
    bottom: max(12px, calc(var(--stage-pad) * 0.5));
    pointer-events: none;
}
.stage-progress-track{
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: rgba(0,0,0,.14);
    overflow: hidden;
}
.stage-progress-fill{
    position: absolute;
    inset: 0 auto 0 0;
    width: 100%;
    background: rgb(155, 93, 162);
    transform-origin: left center;
    transform: scaleX(0);
}
.stage-progress-steps{
    position: absolute;
    inset: 0;
}
.stage-progress-steps .step{
    position: absolute;
    top: 50%;
    width: 2px;
    height: 10px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,.85);
    opacity: .8;
}

.outro {
    width: 100%;
    margin: 0 auto;
    padding: 50px var(--gutter); 
    color: white;
    background-color: #441944;
}
.outro-content {
    margin: 0 auto;
    max-width: var(--max-w);
}
.outro h3{ 
    font-family: 'BundesSansWeb-Regular';
    font-weight: 300;
    margin:0 0 40px;
    font-size: 28px;
}
.outro p { margin:0 0 16px; line-height:1.6; }
.outro .copy {      
    width: min(var(--max-w), 100%);
    display:grid;
    grid-template-columns: 1.0fr 0.6fr;
    gap: 48px;
    align-items:top;
    position: relative;
}

.responsive-img{
    width: 100%;
    height: auto;
}
.border-img {
    border: 1px solid rgba(255,255,255,0.25) !important;
}
.caption{
    font-size: 14px;
    padding: 6px 0 24px;
}

footer{
    padding: 24px var(--gutter);
    text-align: center;
}

.page { 
    margin: 0 auto;
    padding: 50px var(--gutter); 
    max-width: var(--max-w);
    /* allow pages to stretch if they are the only content inside main */
    flex: 1 0 auto;
}
.page h2{ font-family: 'BundesSerifWeb-Regular'; font-weight: 300; margin:0 0 40px; font-size: clamp(18px, 4vw, 35px); line-height: 1.05; }
.page p{ margin:0 0 16px; line-height: 1.6; }

/* Mobile tweaks */
@media (max-width: 900px){
    :root{ --header-h: 96px; --stage-pad: 16px; }
    header{
    /* padding: 0 16px; */
    /* gap: 10px; */
    }
    header img.logo-dlr{
    width: min(40vw, 170px);
    }
    header img.logo-bmvi{
    width: min(50vw, 210px);
    }
    .stage{ height: 100svh; } /* better on mobile browser UI */
    .stage-menu-toggle{
    top: 12px;
    right: 16px;
    width: 38px;
    height: 38px;
    }
    .stage-menu-panel{
    width: 100%;
    padding: 20px 16px;
    }
    .stage-inner{
    grid-template-columns: 1fr;
    gap: 18px;
    }
    .slide-text{
    max-width: 100%;
    }
    .progress{
    right: auto;
    left: 0;
    transform: translateY(-10px);
    }
    .lottie-wrap{
    max-width: 100%;
    margin: 0;
    /* border-radius: 16px; */
    }
    .slide-nav-btn{
    width: 34px;
    height: 34px;
    font-size: 16px;
    }
    .stage-bottom-nav{
    left: 16px;
    right: 16px;
    bottom: 28px;
    min-height: 34px;
    }
    .stage-bottom-nav-right{
    gap: 10px;
    }
    .stage-legal-menu{
    bottom: calc(100% + 8px);
    }
    .stage-progress{
    left: 16px;
    right: 16px;
    bottom: 10px;
    }
    .slide-text .slide-copy{ font-size: 16px; max-width: 100%; }
    .outro .copy { grid-template-columns: 1.0fr; }
}

@media (max-width: 600px){
    .stage-bottom-nav{
    min-height: 72px;
    }
    .stage-back-link{
    top: 0;
    transform: none;
    }
    .stage-bottom-nav-center{
    top: 0;
    }
    .stage-bottom-nav-right{
    top: auto;
    bottom: 0;
    transform: none;
    }
    .stage-legal-label{
    display: none;
    }
    .stage-legal-symbol{
    display: inline;
    }
    .stage-legal-toggle{
    width: 34px;
    height: 34px;
    border: 1px solid rgba(0,0,0,1);
    border-radius: 999px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    }
    .stage-legal-toggle:hover,
    .stage-legal-toggle[aria-expanded="true"]{
    text-decoration: none;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
    .lottie-layer{ transition: none; }
    .hero::before{ transform:none; }
}
