/* Paul Justel — site styles */

/* Archivo variable, subset: wght 300-600, wdth 100-125 */
@font-face{font-family:"Archivo";src:url("/fonts/archivo-wdth-latin-var.woff2") format("woff2");
  font-weight:300 600;font-stretch:100% 125%;font-style:normal;font-display:swap}

:root{
  --font:"Archivo",system-ui,sans-serif;

  --black:#000;
  --white:#fff;
  --ash:#a3a3a3;
  --rule:#2b2b2b;

  --gutter:clamp(1.25rem,4vw,4rem);
  --gap:clamp(1rem,2vw,2rem);
  --section:clamp(5rem,12vw,10rem);

  --name-track:.16em;
}

*,*::before,*::after{box-sizing:border-box}
body,h1,h2,h3,p,ul,figure{margin:0}
ul{padding:0}
/* height:auto, or the height attribute overrides aspect-ratio */
img{display:block;max-width:100%;height:auto}
a{color:inherit}
:focus-visible{outline:2px solid var(--white);outline-offset:3px}
button{font:inherit;color:inherit}
b,strong{font-weight:500}

html{background:var(--black);color-scheme:dark}
body{background:var(--black);color:var(--white);
  font-family:var(--font);font-size:1.125rem;line-height:1.55;
  font-variant-numeric:tabular-nums;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  overflow-x:hidden}

main,section,figure{scroll-margin-top:5.5rem}

.skip-link{position:absolute;top:-4rem;left:var(--gutter);z-index:100;
  background:var(--white);color:var(--black);padding:.7rem 1rem;
  font-size:1rem;text-decoration:none}
.skip-link:focus{top:1rem}

.wrap{padding-inline:var(--gutter)}

/* visually hidden */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;
  overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

.grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--gap)}

.quiet{color:var(--ash)}
.caption{color:var(--ash);font-size:.9375rem;line-height:1.45;margin-top:.75rem}

.link{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.22em;
  text-decoration-color:rgba(255,255,255,.45)}
.link:hover{text-decoration-color:var(--white);text-decoration-thickness:2px}

.logotype{font-stretch:125%;font-weight:400;text-transform:uppercase;
  letter-spacing:var(--name-track);text-decoration:none;white-space:nowrap}

.button{display:inline-flex;align-items:center;min-height:3rem;padding:0 1.5rem;
  background:var(--white);color:var(--black);font-size:1rem;font-weight:500;
  text-decoration:none;border:1px solid var(--white)}
.button:hover{background:var(--black);color:var(--white)}

/* Home */

/* Header */
.site-head{position:fixed;top:0;left:0;right:0;height:5.5rem;z-index:60}
.head-bar{position:absolute;top:.75rem;left:.75rem;right:.75rem;
  display:flex;align-items:center;justify-content:space-between;gap:1.5rem;
  padding:1rem clamp(1rem,2.5vw,2rem);border-radius:18px;
  background:linear-gradient(to bottom,rgba(28,28,28,.66),rgba(10,10,10,.56));
  -webkit-backdrop-filter:blur(22px) saturate(150%);
          backdrop-filter:blur(22px) saturate(150%);
  border:1px solid rgba(255,255,255,.14);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14),
             0 18px 44px -16px rgba(0,0,0,.7)}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .head-bar{background:#161616}
}
.head-bar .logotype{font-size:.8125rem;font-weight:500}
.site-nav{display:flex;gap:clamp(1rem,2.4vw,2.25rem)}
.site-nav a{font-size:.9375rem;text-decoration:none;
  text-decoration-thickness:1px;text-underline-offset:.3em}
.site-nav a:hover{text-decoration-line:underline}
/* Hide on scroll; back on hover (mouse), on scroll up (touch), on focus */
@media (hover:hover) and (pointer:fine){
  .site-head.is-armed .head-bar{transform:translateY(-140%)}
  .site-head.is-armed:hover .head-bar,
  .site-head.is-armed:focus-within .head-bar{transform:none}
}
@media (hover:none){
  .site-head{pointer-events:none}
  .head-bar{pointer-events:auto}
  .site-head.is-armed:not(.is-up) .head-bar{transform:translateY(-140%)}
  .site-head.is-armed:focus-within .head-bar{transform:none}
}
@media (max-width:400px){
  .head-bar{left:.5rem;right:.5rem;gap:.75rem;padding-inline:.9rem}
  .head-bar .logotype{letter-spacing:.1em;font-size:.75rem}
  .site-nav{gap:.8rem}
}

/* Hero */
.hero{position:relative;display:grid;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr);
  height:100svh;min-height:36rem;max-height:70rem;overflow:hidden;
  container-type:inline-size}
.hero picture{display:contents}
.hero-img{grid-area:1/1;width:100%;height:100%;object-fit:cover;
  object-position:50% 92%}
.hero-content{grid-area:1/1;z-index:1;align-self:end;
  padding-top:clamp(7rem,22vh,15rem);
  background:linear-gradient(to top,#000 0%,rgba(0,0,0,.86) 48%,rgba(0,0,0,.66) 72%,rgba(0,0,0,0) 100%);
  display:grid;grid-template-areas:"text" "name";grid-template-columns:minmax(0,1fr);
  padding-bottom:clamp(1.25rem,3vw,2.75rem)}

/* Name fills the container: 9.80em = ink width of the name at this tracking */
.name{grid-area:name;font-size:calc((100cqi - 2 * var(--gutter)) / 9.80);
  line-height:.8;font-weight:300;margin-top:clamp(1.5rem,3vw,2.5rem);
  margin-right:-.3em}
.name .w{display:inline-block}
.name .w:first-child{margin-left:-.105em}
.name i{display:inline-block;font-style:normal}

.hero-text{grid-area:text;row-gap:1.5rem;align-items:end}
.hero-lede{grid-column:1 / span 6;font-size:clamp(1.25rem,2vw,1.75rem);
  line-height:1.3;font-weight:400;max-width:34ch;text-wrap:balance}
.hero-side{grid-column:9 / span 4;display:grid;gap:1.25rem;justify-items:start}
.hero-side p{font-size:1rem;color:rgba(255,255,255,.86);max-width:34ch}

@media (max-width:860px){
  .hero-lede,.hero-side{grid-column:1 / -1}
}
@media (max-width:600px){
  .hero{max-height:none}
  .hero-content{padding-top:clamp(9rem,28vh,16rem)}
  .name{font-size:calc((100cqi - 2 * var(--gutter)) / 5.44);line-height:.86}
  .name .w{display:block}
  .name .w:last-child{margin-left:-.03em}
}

/* Sections */
.section{padding-top:var(--section)}
.section-head{margin-bottom:clamp(2.5rem,6vw,5rem);row-gap:1.25rem;align-items:end}
.section-head h2{grid-column:1 / span 8;font-stretch:125%;font-weight:300;
  font-size:clamp(3.25rem,10vw,9rem);line-height:.86;letter-spacing:-.035em;
  margin-left:-.04em}   /* optical margin */
.section-head p{grid-column:9 / span 4;color:var(--ash);font-size:1rem;max-width:34ch}
@media (max-width:860px){
  .section-head h2,.section-head p{grid-column:1 / -1}
}

/* Work */
.case h3{font-stretch:125%;font-weight:300;font-size:clamp(1.75rem,2.8vw,2.625rem);
  line-height:1.05;letter-spacing:-.015em}
.case-role{margin-top:.75rem;font-size:1rem}
.case-role span{display:block;color:var(--ash)}
.case-text{margin-top:1.5rem;max-width:44ch}
.case-text p+p,.case-text p+ul{margin-top:1rem}
.case-text ul{padding-left:1.1em}
.case-text li{margin-top:.5rem}
.case-text li::marker{color:var(--ash)}
.case-links{display:flex;flex-wrap:wrap;gap:.75rem 1.75rem;margin-top:1.75rem;font-size:1rem}

.case--lead{align-items:start;row-gap:2rem}
.case--lead .shot{grid-column:1 / span 7}
.case--lead .shot img{width:100%;outline:1px solid var(--rule)}
.case--lead .case-body{grid-column:9 / span 4}

.case-pair{margin-top:clamp(5rem,10vw,9rem);row-gap:4rem}
.case-pair .case:first-child{grid-column:1 / span 5}
.case-pair .case:last-child{grid-column:7 / span 5;margin-top:clamp(0rem,12vw,11rem)}
.case-pair figure{margin-bottom:1.75rem}
.case-pair figure img{width:100%;aspect-ratio:4/5;object-fit:cover}

@media (max-width:860px){
  .case--lead .shot,.case--lead .case-body,
  .case-pair .case:first-child,.case-pair .case:last-child{grid-column:1 / -1;margin-top:0}
  .case-pair figure img{aspect-ratio:1/1}
}

.also{margin-top:clamp(5rem,10vw,8rem)}
.also h3{grid-column:1 / span 3;font-stretch:125%;font-weight:300;font-size:1.5rem;line-height:1.2}
.also ul{grid-column:4 / -1;list-style:none}
.also li{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,5fr) auto;gap:.25rem var(--gap);
  padding-block:1rem;border-top:1px solid var(--rule)}
.also li:last-child{border-bottom:1px solid var(--rule)}
.also li > span{color:var(--ash)}
.also li > span:last-child{text-align:right;white-space:nowrap}
@media (max-width:860px){
  .also h3,.also ul{grid-column:1 / -1}
  .also h3{margin-bottom:1rem}
}
@media (max-width:600px){
  .also li{grid-template-columns:1fr auto}
  .also li > span:nth-child(2){grid-column:1;grid-row:2}
  .also li > span:last-child{grid-row:1;grid-column:2}
}

/* Photo band */
.band{margin-top:var(--section)}
.band img{width:100%;height:clamp(18rem,62vh,44rem);object-fit:cover;
  object-position:50% var(--band-pos,50%)}
.band .caption{padding-inline:var(--gutter)}

/* About */
.about-top{row-gap:2.5rem;align-items:end}
.about-top figure{grid-column:1 / span 7}
.about-top figure img{width:100%}
.about-text{grid-column:9 / span 4}
.about-text p{max-width:42ch}
.about-text p+p{margin-top:1.1rem}
@media (max-width:860px){
  .about-top figure,.about-text{grid-column:1 / -1}
}

/* --r = width / height */
.r-crosswalk{--r:1.498}
.r-dusk{--r:.891}
.r-square{--r:1}
.sheet{display:flex;gap:var(--gap);margin-top:clamp(4rem,8vw,7rem);align-items:flex-start}
.sheet figure{flex:var(--r) 1 0;min-width:0}
.sheet img{width:100%;aspect-ratio:var(--r);object-fit:cover}
@media (max-width:600px){
  .sheet{flex-direction:column}
  .sheet figure{flex:none;width:100%}
}

.facts{margin-top:clamp(4rem,8vw,7rem);row-gap:3rem}
.facts > div:first-child{grid-column:1 / span 5}
.facts > div:last-child{grid-column:7 / -1}
.facts h3{font-stretch:125%;font-weight:300;font-size:1.5rem;line-height:1.2;margin-bottom:1.25rem}
.facts ul{list-style:none}
.facts li{padding-block:.9rem;border-top:1px solid var(--rule);display:grid;gap:.15rem}
.facts li > span{color:var(--ash);font-size:1rem}
@media (min-width:1100px){
  .facts > div:last-child ul{display:grid;grid-template-columns:1fr 1fr;column-gap:var(--gap)}
}
@media (max-width:860px){
  .facts > div:first-child,.facts > div:last-child{grid-column:1 / -1}
}

/* Contact */
.contact{padding-bottom:clamp(4rem,8vw,7rem)}
.contact-mail{display:flex;flex-wrap:wrap;align-items:baseline;gap:1rem 2rem}
.contact-mail a{font-stretch:125%;font-weight:300;
  font-size:clamp(min(1.9rem,calc((100vw - 2.5rem) / 10.9)),6.4vw,6.25rem);
  line-height:1;letter-spacing:-.03em;text-decoration:underline;
  text-decoration-thickness:.04em;text-underline-offset:.12em;
  text-decoration-color:rgba(255,255,255,.3);overflow-wrap:anywhere}
.contact-mail a:hover{text-decoration-color:var(--white)}
.copy{background:none;border:1px solid rgba(255,255,255,.4);min-height:2.75rem;
  padding:0 1.1rem;font-size:1rem;cursor:pointer}
.copy:hover{border-color:var(--white)}
.contact-list{list-style:none;margin-top:clamp(3rem,6vw,5rem);row-gap:2rem}
.contact-list li{grid-column:span 4}
.contact-list span{display:block;color:var(--ash);font-size:1rem;margin-bottom:.35rem}
.contact-list a{font-size:clamp(1.125rem,1.6vw,1.375rem);text-decoration:none}
.contact-list a:hover{text-decoration:underline;text-underline-offset:.22em;text-decoration-thickness:1px}
@media (max-width:860px){ .contact-list li{grid-column:1 / -1} }

/* Footer */
.site-foot{border-top:1px solid var(--rule)}
.foot-inner{display:flex;flex-wrap:wrap;gap:.75rem 2rem;justify-content:space-between;
  padding-block:1.75rem;color:var(--ash);font-size:.9375rem}
.foot-inner a{text-underline-offset:.22em}
.foot-inner a:hover{color:var(--white)}

/* Other pages */
.top{display:flex;align-items:baseline;justify-content:space-between;gap:1.5rem;
  padding-block:1.5rem}
.top .logotype{font-size:.9375rem}
.top a:not(.logotype){font-size:1rem;color:var(--ash);text-decoration:none}
.top a:not(.logotype):hover{color:var(--white)}

.doc{padding-block:clamp(3rem,9vw,7rem) clamp(4rem,9vw,7rem)}
.doc h1{font-stretch:125%;font-weight:300;font-size:clamp(2.75rem,8vw,7rem);
  line-height:.9;letter-spacing:-.035em;max-width:14ch;margin-left:-.03em}
.doc .lead{font-size:clamp(1.25rem,2vw,1.625rem);line-height:1.35;max-width:36ch;
  margin-top:clamp(2rem,4vw,3rem)}
.doc .lead + .quiet{margin-top:1.25rem;font-size:1rem}
.doc-body{max-width:40rem;margin-top:clamp(3rem,6vw,5rem)}
.doc h2{font-stretch:125%;font-weight:300;font-size:clamp(1.5rem,2.4vw,2rem);
  line-height:1.1;letter-spacing:-.01em;margin-top:3.25rem;margin-bottom:1rem}
.doc h2:first-child{margin-top:0}
.doc-body p+p,.doc-body ul+p{margin-top:1rem}
.doc-body ul{padding-left:1.1em}
.doc-body li{margin-top:.75rem}
.doc-body li::marker{color:var(--ash)}
.doc-body li b{font-weight:500}
.doc-body a:not(.button){text-decoration:underline;text-decoration-thickness:1px;
  text-underline-offset:.22em;text-decoration-color:rgba(255,255,255,.45)}
.doc-body a:not(.button):hover{text-decoration-color:var(--white)}
.doc-body .button{margin-top:1.5rem}
.doc-shot{margin-top:clamp(3rem,6vw,5rem);max-width:72rem}
.doc-shot img{width:100%;outline:1px solid var(--rule)}

/* 404 */
.page-404{min-height:100svh;display:flex;flex-direction:column}
.lost{flex:1;align-items:end;row-gap:3rem;padding-block:clamp(2rem,6vw,5rem)}
.lost > div{grid-column:1 / span 6;align-self:center}
.lost figure{grid-column:8 / -1}
.lost h1{font-stretch:125%;font-weight:300;font-size:clamp(3rem,9vw,8rem);
  line-height:.88;letter-spacing:-.035em;margin-bottom:1.5rem}
.lost p{max-width:32ch;margin-bottom:2rem}
.lost figure img{width:100%;aspect-ratio:4/5;object-fit:cover}
@media (max-width:860px){
  .lost > div,.lost figure{grid-column:1 / -1}
}

/* Motion */
@media (prefers-reduced-motion:no-preference){
  html{scroll-behavior:smooth}
  /* Letters slide into place, transform only */
  .name i{animation:spread 1.6s cubic-bezier(.16,1,.3,1) .15s both}
  @keyframes spread{from{transform:translateX(calc(var(--k,0) * -.14em))}}
  .name .w:first-child i:nth-child(2){--k:1}
  .name .w:first-child i:nth-child(3){--k:2}
  .name .w:first-child i:nth-child(4){--k:3}
  .name .w:last-child i:nth-child(1){--k:5}
  .name .w:last-child i:nth-child(2){--k:6}
  .name .w:last-child i:nth-child(3){--k:7}
  .name .w:last-child i:nth-child(4){--k:8}
  .name .w:last-child i:nth-child(5){--k:9}
  .name .w:last-child i:nth-child(6){--k:10}
  @media (max-width:600px){
    .name .w:last-child i:nth-child(1){--k:0}
    .name .w:last-child i:nth-child(2){--k:1}
    .name .w:last-child i:nth-child(3){--k:2}
    .name .w:last-child i:nth-child(4){--k:3}
    .name .w:last-child i:nth-child(5){--k:4}
    .name .w:last-child i:nth-child(6){--k:5}
  }
  .head-bar{transition:transform .45s cubic-bezier(.2,.7,.2,1)}
  .button,.copy,.link,.site-nav a,.contact-mail a{transition:background-color .2s ease,color .2s ease,
    border-color .2s ease,text-decoration-color .2s ease}
}
