/* ================= ROOT ================= */

:root{
  --bg:#f2f2f2;
  --text:#111111;
  --nav-height:110px;
  --max-width:82vw;

  --overlay-width:100vw;

  --intro-bg:#000;
  --intro-text:#fff;
  --caption-opacity:0.72;
  scrollbar-gutter: stable;

  --overlay-fade-ms: 700ms;
  --font-main: 'DIN', sans-serif;
}

*{
  box-sizing:border-box;
  font-family: var(--font-main);
}

html,body{height:100%;}

body{
  margin:0;
  font-family: var(--font-main);
  background:var(--bg);
  color:var(--text);
  overflow-x:hidden;
  transition:opacity 600ms ease;
}

/* ================= INDEX LOCKED FULLSCREEN ================= */

body.index-page{
  height:100vh;
  overflow:hidden;
}

body.index-page main.page{
  height:100vh;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0;
}

/* Center slideshow */

body.index-page .media-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  height:100vh;
}

body.index-page .portrait-frame{
  width:min(82vw,520px);
  aspect-ratio:4 / 5;
  max-height:640px;
  overflow:hidden;
  position:relative;
  background:#f4f4f4;
}

/* ================= NAV ================= */

.nav{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:var(--nav-height);
  padding-top: 65px;

  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  
  /*font-size:clamp(15px,3vw,20px);*/
  /* font-size:clamp(11px,2.5vw,13px); */
  letter-spacing:2.50em;
  font-weight:500;

  background:var(--bg);
  z-index:2000;
}

.nav a{
  text-decoration:none;
  color:var(--text);
  transition:opacity 250ms ease;
  letter-spacing:0.08em;
  font-weight:500;
}

.nav a:hover{color: rgba(0,0,0,0.55);}
.nav a.is-active{opacity:1;}

/* ================= DIN FONT ================= */

@font-face {
  font-family: 'DIN';
  src: url('/fonts/DIN-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DIN';
  src: url('/fonts/DIN-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DIN';
  src: url('/fonts/DIN-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DIN';
  src: url('/fonts/DIN-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ================= PAGE ================= */

.page{
  padding-top:calc(var(--nav-height) + 70px);
  padding-bottom:80px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:35px;
}

/* ================= INDEX SLIDES ================= */

.media-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
}

.portrait-frame{
  width:min(82vw,520px);
  aspect-ratio:4 / 5;
  max-height:640px;
  overflow:hidden;
  position:relative;
  background:#f4f4f4;
}

.slide{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  opacity:0;
  transition:opacity 900ms ease;
}

.slide.is-active{opacity:0;}
body.is-revealed .slide.is-active{opacity:1;}

.caption{
  margin-top:18px;
  text-align:center;
  font-size:8px;
  font-weight:300;
  letter-spacing:0.12em;
  text-transform:uppercase;
  opacity:var(--caption-opacity);
}

/* ================= INTRO ================= */

.intro{
  position:fixed;
  inset:0;
  background:var(--intro-bg);
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding-left:6vw;
  z-index:9999;
  transition:opacity 1100ms ease;
}

.intro.is-hidden{
  opacity:0;
  pointer-events:none;
}

.intro-inner{
  display:flex;
  align-items:baseline;
  gap:10px;
}

.intro-name{
  color:var(--intro-text);
  font-size:clamp(15px,3vw,20px);
  font-weight:500;
  letter-spacing:0.08em;
  opacity:0;
  transition:opacity 1100ms ease;
}

.intro-name.is-in{opacity:1;}
.intro-name.is-out{opacity:0;}

.intro-role{
  color:var(--intro-text);
  font-size:clamp(13px,3vw,18px);
  font-weight:300;
  letter-spacing:0.14em;
  opacity:0;
  transition:opacity 900ms ease;
}

.intro-role.is-in{opacity:0.65;}
.intro-role.is-out{opacity:0;}

/* ================= PORTFOLIO VIDEO ================= */

.video-frame{
  width:min(var(--max-width),980px);
  position:relative;
  overflow:hidden;
  background:#000;
}

.video-frame::before{
  content:"";
  display:block;
  padding-top:56.25%;
}

.video-frame iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

.video-overlay{
  position:absolute;
  inset:0;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:opacity 400ms ease;
}

.video-overlay img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* ================= OVERLAY ================= */

.info-overlay{
  position:fixed;
  inset:0;
  z-index:9998;
  pointer-events:none;
  visibility:hidden;
}

.info-panel{
  position:absolute;
  top:0;
  right:0;
  height:100%;
  width:100vw;
  background:rgba(0, 0, 0, 0.94);
  color:#fff;

  opacity:0;
  transition:opacity var(--overlay-fade-ms) ease;

  overflow-y:auto;
  padding:80px 60px 120px 60px;
  -webkit-overflow-scrolling: touch;
}

.info-overlay.is-open .info-panel{
  opacity:1;
  pointer-events:auto;
  visibility:visible;
}

.info-inner{
  max-width:1400px;
  margin:0 auto;
  width:100%;
  font-size:clamp(7px,1.5vw,9px);
  font-weight:400;

  display:grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap:140px;

  opacity:0;
  transition:opacity 900ms ease 150ms;
}

.info-overlay.is-open .info-inner{
  opacity:1;
}

body.overlay-active main{
  opacity:0.35;
  transform:scale(0.98);
  transition:
    opacity 900ms ease,
    transform 1200ms cubic-bezier(.16,1,.3,1);
}

/* ================= CONTENT STYLES ================= */

.info-close{
  position:absolute;
  top:32px;
  right:40px;
  background:none;
  border:none;
  color:#fff;
  font-size:17px;
  letter-spacing:1px;
  cursor:pointer;
  padding:0;
}

.info-close:hover,
.info-close:focus{
  text-decoration:underline;
  background:none !important;
  color:#fff;
}

.info-close:active{
  background:none !important;
  color:#fff;
}

.bio{
  font-size:17px;
  line-height:1.7;
  margin-bottom:0;
  text-align:justify;
}

.bio-image{
  float:right;
  width:280px;
  height:380px;
  margin:0 0 20px 40px;
  overflow:hidden;
}

.bio-image img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.bio p{margin-bottom:26px;}

.clients-title,
.contact-title{
  font-size:14px;
  letter-spacing:1px;
  opacity:0.6;
  margin-bottom:20px;
}

.clients-list{
  font-size:16px;
  line-height:1.8;
  margin-bottom:0;
}

input,textarea{
  width:100%;
  background:transparent;
  border:none;
  border-bottom:1px solid rgba(255,255,255,0.4);
  padding:14px 0;
  margin-bottom:40px;
  color:#fff;
  font-family: var(--font-main);
}

input:focus,textarea:focus{
  outline:none;
  border-bottom:1px solid #fff;
}

textarea{
  resize:none;
  height:120px;
}

button{
  background:transparent;
  border:1px solid #fff;
  color:#fff;
  padding:12px 28px;
  font-size:13px;
  letter-spacing:2px;
  cursor:pointer;
  font-family: var(--font-main);
}

button:hover{
  background:#fff;
  color:#000;
}

.message{margin-top:20px;font-size:14px;}
.success{color:#7CFC00;}
.error{color:#ff4d4d;}

/* ================= OVERLAY LINKS ================= */

.info-panel a{
  color:#fff;
  text-decoration:none;
  letter-spacing:1px;
  transition:opacity 200ms ease;
}

.info-panel a:hover,
.info-panel a:focus{
  text-decoration:underline;
  opacity:0.85;
}

.info-panel a:active{
  opacity:0.7;
}

/* ================= MOBILE ================= */

@media (max-width:768px){

  .info-inner{
        font-size: 7px;
  grid-template-columns: 1fr;
  gap:60px;
  overflow: hidden;
}

  body.index-page main.page{
    height:calc(100svh - var(--nav-height));
    padding-top:var(--nav-height);
    display:flex;
    align-items:center;
    justify-content:center;
  }

  body.index-page .portrait-frame{
    width:88vw;
    aspect-ratio:4 / 5;
    max-width:520px;
    max-height:640px;
  }

  body.overlay-active main{
    transform:scale(0.97);
  }

  .info-panel{
    padding:60px 24px 80px 24px;
  }

  .clients-list{
    font-size:14px;
    line-height:1.6;
  }

  .bio{
    font-size:15px;
    line-height:1.6;
  }

  .clients-title,
  .contact-title{
    font-size:12px;
  }

  .info-close{
    font-size:12px;
  }
}

/* ================= REDUCED MOTION ================= */

@media (prefers-reduced-motion: reduce){
  .info-panel,
  .info-inner{
    transition:none !important;
    opacity:1 !important;
  }
}
