html{scroll-behavior:smooth}
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:sans-serif;
  line-height:1.7em;
  letter-spacing:.1em;
  font-weight:lighter;
}
h1{font-family:serif;font-size:60px}
h2{font-family:serif;font-size:40px}
p{font-size:15px}
a{font-size:15px;color:black;text-decoration:none}

nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  height:100px;
  margin-bottom:-100px;
  padding-left:10%;
  padding-right:10%;
}
nav img{width:auto;height:60px}
nav a{padding:30px}
.nav-links{display:flex}

.hero{
  display:flex;
  flex-flow:column;
  justify-content:flex-start;
  align-items:center;
  width:100%;
  height:135vh;
  padding:230px 50px 50px;
  text-align:center;
}
/* A fixed layer looks like background-attachment:fixed but scrolls on the GPU without repainting. */
.hero::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background:#78c7ff url(images/header-v2.jpg) center/cover no-repeat;
  will-change:transform;
}
main,footer{position:relative;background:white}
.hero img{width:75px;height:auto}

.section-title{padding:50px;margin-bottom:-5%;text-align:center}

.split{
  display:flex;
  justify-content:center;
  align-items:center;
  height:70vh;
  min-height:700px;
  margin:5%;
}
.split img{width:850px;height:auto}
.split .card{
  width:50%;
  padding:30px;
  background:white;
  box-shadow:0 4px 8px 0 rgba(0,0,0,.1),0 6px 20px 0 rgba(0,0,0,.1);
  z-index:2;
}
.card p+p{margin-top:16px}
.split-intro img{margin-left:-200px}
.split-intro .card{height:500px;margin-top:200px;margin-right:-200px}
.split-about img{margin-right:-200px}
.split-about .card{height:450px;margin-left:-200px}

.offerings{
  display:flex;
  justify-content:center;
  align-items:center;
  height:70vh;
  padding:10%;
  text-align:center;
}
.offerings img{width:auto;height:400px;transition:filter .1s linear}
.offerings a:hover img{filter:grayscale(30%) brightness(80%)}
.offering{padding:40px}

.contact{
  display:flex;
  flex-flow:column;
  justify-content:center;
  align-items:center;
  height:100vh;
  padding:40px;
  text-align:center;
  background:url(images/contact.jpg) center/cover no-repeat scroll;
}
.btn{
  display:flex;
  justify-content:center;
  align-items:center;
  width:200px;
  height:75px;
  margin-top:20px;
  border:2px solid black;
  border-radius:10px;
  font-size:18px;
  text-align:center;
  transition:background-color .1s linear,color .1s linear;
}
.btn:hover{background:black;color:white}

footer{display:flex;justify-content:center;align-items:center;height:100px;text-align:center}

.reveal{opacity:0;transition:opacity 1s ease}
.reveal.active{opacity:1}

@media (max-width:1000px){
  h1{font-size:40px}
  nav{justify-content:center;padding:20px}
  nav a{padding:15px}
  nav img{display:none}
  .hero{position:relative;overflow:hidden}
  .hero::before{position:absolute;will-change:auto}
  .split{height:auto}
  .split-intro{flex-flow:column-reverse}
  .split-about{flex-flow:column}
  .split img{width:90%;margin:0;box-shadow:0 4px 8px 0 rgba(0,0,0,0),0 6px 20px 0 rgba(0,0,0,.1)}
  .split .card{width:90%;height:auto;margin:0;box-shadow:0 4px 8px 0 rgba(0,0,0,.1),0 6px 20px 0 rgba(0,0,0,0)}
  .offerings{flex-flow:column;height:auto}
}

/* Fluid sizing: keeps the same layout but scales it to fit every screen. */
h1{font-size:clamp(34px,6vw,60px);line-height:1.25em}
h2{font-size:clamp(30px,5vw,40px);line-height:1.3em}

@media (min-width:1001px){
  .split{height:auto;min-height:min(700px,56vw)}
  .split img{width:min(850px,62vw)}
  .split .card{height:auto}
  .split-intro img{margin-left:max(-200px,-14vw)}
  .split-intro .card{margin-top:min(200px,14vw);margin-right:max(-200px,-14vw)}
  .split-about img{margin-right:max(-200px,-14vw)}
  .split-about .card{margin-left:max(-200px,-14vw)}
  .offerings{height:auto;padding:5% 8%}
  .offerings img{height:min(400px,28vw)}
  .offering{padding:clamp(16px,2.8vw,40px)}
}

@media (max-width:1000px){
  .hero{height:100vh;height:100svh;min-height:420px;padding:clamp(84px,20svh,190px) 20px 40px}
  .section-title{padding:40px 20px;margin-bottom:0}
  .split{min-height:0;margin:0 5% 24px}
  .split img,.split .card{width:100%}
  .offerings{padding:0 5% 24px;gap:20px}
  .offering{padding:0}
  .offerings img{width:min(100%,300px);height:auto}
  .contact{height:100vh;height:100svh;min-height:420px}
}

@media (min-width:640px) and (max-width:1000px){
  .offerings{flex-flow:row;align-items:flex-start}
  .offering{flex:1}
  .offerings img{width:100%}
}

/* Portrait: show the whole scene at the bottom and extend the photo's sky above it. */
@media (max-width:1000px) and (max-aspect-ratio:1/1){
  .hero::before{background:
    linear-gradient(to bottom,rgb(193,218,243) calc(100% - 96vw),rgba(193,218,243,0) calc(100% - 62vw)),
    url(images/header-v2.jpg) 41% bottom/144vw auto no-repeat,
    rgb(193,218,243)}
}
