/* Sizes are mostly in vw so the page scales like the Cargo original (measured at a 1512px-wide window). */
:root{
  --text:#ecece6;--bark:#403f3a;--panel:#d9dbc9;--panel-ink:#1f211c;--red:#c8433a;--rule:#a9ab9a;
  --serif:'Newsreader','Iowan Old Style',Georgia,serif;
  --sans:'Inter','Helvetica Neue',Arial,sans-serif;   /* free stand-in for Diatype (no web license) */
  --gut:clamp(1rem,2.5vw,2.5rem);
  --mark:clamp(32px,3.31vw,63px);   /* wordmark size */
  box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);
}
html{scroll-behavior:smooth}
*,*::before,*::after{box-sizing:inherit}
body{margin:0;background:var(--bark);color:var(--text);font:400 clamp(17px,1.5vw,24px)/1.25 var(--sans);letter-spacing:-.01em}
img{display:block;max-width:100%;height:auto}
a{color:inherit}
:focus-visible{outline:2px solid var(--text);outline-offset:3px}
.pad{padding-inline:var(--gut)}
#bg{position:fixed;inset:0;z-index:-1;background:var(--bark)}
#bg canvas{width:100%;height:100%;display:block}

/* ---- wordmark, menu button, menu panel */
.mark{position:fixed;z-index:20;top:calc(env(safe-area-inset-top,0px) + clamp(1rem,2.3vw,2.4rem));left:var(--gut);font:italic 300 var(--mark)/1 var(--serif);letter-spacing:-.02em;text-decoration:none;text-shadow:0 0 24px rgba(0,0,0,.25);transition:opacity .2s}
.burger{position:fixed;z-index:30;top:calc(env(safe-area-inset-top,0px) + 1.7rem);right:.9rem;width:44px;height:44px;background:none;border:0;color:#fff;cursor:pointer;padding:3px;transition:opacity .2s .3s}
.burger svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 0 6px rgba(0,0,0,.35))}
.burger:hover svg{transform:translate(1px,-1px)}
.menu-open .burger{opacity:0;pointer-events:none;transition-delay:0s}
.menu-open .mark{opacity:0;pointer-events:none}
.mark span{display:inline-block;position:relative;will-change:transform,opacity}   /* letters move on scroll (js/main.js) */
/* the red bubble behind each letter once the word has dropped into a column; --pop (0..1) grows it in */
.mark span::before{content:"";position:absolute;left:var(--cx,50%);top:var(--cy,54%);width:1.3em;height:1em;border-radius:1em;background:var(--red);z-index:-1;
  transform:translate(-50%,-50%) scale(var(--pop,0));opacity:min(1,calc(var(--pop,0)*4))}
/* the white outline that grows from the box's front face to the edges of the panel (js/main.js) */
.frame{position:fixed;z-index:27;border:1.5px solid #fff;pointer-events:none;transition:opacity .25s}
.frame.gone{opacity:0}   /* the outline fades once the menu is open */
.frame.anim{transition:left .45s cubic-bezier(.6,0,.2,1),top .45s cubic-bezier(.6,0,.2,1),width .45s cubic-bezier(.6,0,.2,1),height .45s cubic-bezier(.6,0,.2,1)}
.panel{position:fixed;z-index:25;top:0;right:0;bottom:0;width:min(30vw,520px);min-width:280px;background:var(--panel);color:var(--panel-ink);padding:calc(env(safe-area-inset-top,0px) + 1.4rem) 1.25rem calc(env(safe-area-inset-bottom,0px) + 1.6rem);line-height:1.3;opacity:0;visibility:hidden;transition:opacity .2s,visibility 0s .2s}
.menu-open .panel{opacity:1;visibility:visible;transition:opacity .3s .35s,visibility 0s .35s}
.panel .close{position:absolute;top:calc(env(safe-area-inset-top,0px) + 1.1rem);right:1rem;width:36px;height:36px;background:none;border:0;cursor:pointer;color:inherit}
.panel .close::before,.panel .close::after{content:"";position:absolute;left:5px;top:17px;width:26px;height:1.5px;background:currentColor;transform:rotate(45deg)}
.panel .close::after{transform:rotate(-45deg)}
.panel .close:hover{color:var(--red)}
.panel h2{margin:0 0 .7rem;font:500 1em/1.3 var(--sans);color:var(--red)}   /* "stops", "reach" */
.panel h2.title{margin:0 0 2.6rem;font-size:1em;line-height:1.1;color:inherit;padding-right:2.5rem}   /* "find your way" */
.panel nav{border-top:1px solid var(--rule);padding-top:.7rem;display:flex;flex-direction:column}
.panel nav a{text-decoration:none;width:max-content}
.panel nav a:hover{color:var(--red)}
.panel .g{color:var(--red);margin:1.8rem 0 .7rem}
.panel{display:flex;flex-direction:column}
.panel .last{margin-top:auto}   /* "good people, good things" pinned to the very bottom of the panel */
.scrim{position:fixed;inset:0;z-index:22;display:none}
.menu-open .scrim{display:block}

/* ---- home */
h1,h2{font-family:var(--sans)}
.hero{padding-top:max(7rem,9vw)}
.hero h1{margin:0 0 2.8vw}
.hero h1,.hero p,.foot .place{font:500 clamp(22px,1.9vw,40px)/1.15 var(--sans);letter-spacing:-.02em}
.hero p{margin:0 0 6vw;max-width:40ch}

/* ---- collages: every photo and doodle sits in the same grid cell, placed by its own
   --x (left), --y (top) and --w (width), all % of the collage width; see js/content.js */
.shots{display:grid;grid-template-columns:100%}
.shots>*{grid-area:1/1;margin:var(--y,0) 0 0 var(--x,0);width:var(--w,30%)}
.shots figure img,.shots figure video{display:block;width:100%;height:auto}
.framed img{outline:3.3px solid var(--red);outline-offset:12px}
.doodle{z-index:2;pointer-events:none}

/* ---- projects */
.project{min-height:100vh;padding-top:max(7rem,8.3vw);padding-bottom:12.3vw}
.project .head{display:grid;grid-template-columns:repeat(12,1fr);column-gap:1.5%}
.project .head{margin-bottom:1.5vw}
.project .head>div{grid-column:1/7}
.project h2{margin:0 0 1.6rem;font:500 1em/1.1 var(--sans)}
.project .sub{font-size:.65em;line-height:1.2}.project .sub p{margin:0 0 1.2em}
.project .quote{grid-column:7/13;margin:0;font-size:.65em;line-height:1.2}
.project .quote em{display:block}

/* ---- good people: a grid of zines (js/main.js). Each is a cover with the back page peeking out
   below and to the right of it (the "lip"), so it reads as a thin book. */
.good{padding-top:max(7rem,8.3vw);padding-bottom:10vw;min-height:100vh}
.good h1{margin:0 0 4vw;font:500 1em/1.1 var(--sans)}
.zines{display:grid;grid-template-columns:repeat(4,1fr);gap:4vw 3vw;max-width:68rem;margin-inline:auto}
.zine{display:block;aspect-ratio:148/210;text-decoration:none;color:#151515;position:relative}
.zine:focus-visible{outline:2px solid #fff;outline-offset:10px}
.book{position:absolute;inset:0;display:block;transform:rotate(var(--tilt));transition:transform .25s}
.zine:hover .book{transform:rotate(var(--tilt)) translateY(-3px)}
.lip,.front{position:absolute;inset:0;display:block;background:var(--paper)}
.lip{transform:translate(2.2%,1.6%);filter:brightness(.88);box-shadow:0 6px 18px rgba(0,0,0,.35)}   /* the back page */
.front{overflow:hidden;container-type:inline-size;box-shadow:1px 1px 0 rgba(0,0,0,.18),inset 5px 0 6px -4px rgba(0,0,0,.3)}   /* inset = the spine */
.front img{width:100%;height:100%;object-fit:cover}
/* placeholder cover until the drawn ones arrive: the name, big, under a fading halftone */
.ph{position:absolute;inset:0;padding:10%;display:flex;align-items:flex-end;font:500 9.5cqi/.95 var(--sans);text-transform:uppercase;letter-spacing:-.01em;
  hyphens:auto;-webkit-hyphens:auto;overflow-wrap:anywhere;
  background:linear-gradient(170deg,transparent 15%,var(--paper) 62%),radial-gradient(rgba(0,0,0,.32) .9px,transparent 1.3px) 0 0/5px 5px}

/* ---- store: products stack in 4 columns at their own heights; dark text over the pink-on-olive background.
   The left padding keeps them clear of the wordmark's column of bubbles. */
.store{padding-top:max(7rem,8vw);padding-bottom:6rem;min-height:100vh;padding-left:calc(var(--gut) + var(--mark) * 1.25)}
.products{columns:4 15rem;column-gap:1.4vw}
.product{break-inside:avoid;margin:0 0 2.2vw;color:#1c1c18}
.product .shot{display:block;width:100%;padding:0;border:0;background:none;cursor:zoom-in}
.product img{width:100%}
.product h3{margin:.9rem 0 0;font:500 1em/1.2 var(--sans)}
.product p{margin:0}
.product .note{opacity:.75}
.buy{display:inline-block;margin-top:.8rem;padding:.35em 1em;border-radius:2em;background:rgba(30,30,25,.28);color:#1c1c18;text-decoration:none}
.buy:hover{background:var(--red);color:#fff}

/* product pop-up: a small centred card. The gallery's width comes from the product's first picture (--ar, set in
   js/main.js) at a fixed height; the details sit below it, wrapped to the same width. */
.pm{--h:min(60dvh,34rem);padding:0;border:0;background:var(--panel);color:var(--panel-ink);width:fit-content;max-width:calc(100vw - 2rem);max-height:calc(100dvh - 2rem);font-size:clamp(15px,1.05vw,18px);line-height:1.35}
.pm::backdrop{background:rgba(20,20,18,.55)}
.pm .in{position:relative;outline:none}
.pm .gal{position:relative;background:#1c1c18}
.pm .strip{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;height:var(--h);width:min(calc(var(--h) * var(--ar,.8)),calc(100vw - 2rem))}
.pm .strip::-webkit-scrollbar{display:none}
.pm .strip img{flex:0 0 100%;width:100%;height:100%;object-fit:contain;scroll-snap-align:start}
.pm .prev,.pm .next{position:absolute;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:50%;background:rgba(236,236,230,.8);color:#1c1c18;font-size:16px;cursor:pointer}
.pm .prev{left:.6rem}.pm .next{right:.6rem}
.pm .prev:hover,.pm .next:hover{background:var(--red);color:#fff}
.pm .count{position:absolute;left:50%;bottom:.6rem;transform:translateX(-50%);color:#ecece6;font-size:.8em;text-shadow:0 0 6px rgba(0,0,0,.6)}
.pm.single .prev,.pm.single .next,.pm.single .count{display:none}
.pm .txt{width:0;min-width:100%;padding:1rem 1.1rem 1.2rem}   /* width:0 + min-width: wrap to the gallery, never widen the card */
.pm .head{display:flex;justify-content:space-between;gap:1rem;align-items:baseline}
.pm h2{margin:0;font:500 1.1em/1.2 var(--sans)}
.pm .price{margin:0;white-space:nowrap}
.pm .desc{margin:.7rem 0 0}
.pm .buy{margin-top:1rem}
.pm .x{position:absolute;z-index:2;top:.5rem;right:.5rem;width:34px;height:34px;background:none;border:0;cursor:pointer;color:#ecece6;filter:drop-shadow(0 0 3px rgba(0,0,0,.6))}
.pm .x::before,.pm .x::after{content:"";position:absolute;left:5px;top:16px;width:24px;height:1.5px;background:currentColor;transform:rotate(45deg)}
.pm .x::after{transform:rotate(-45deg)}
.pm .order{margin:1rem 0 0;font-size:.85em}
.pm .order a{color:inherit;text-underline-offset:.15em}
.pm .order a:hover{color:var(--red)}
.pm .order span{opacity:.7}
.mail .about-msg{margin:-1.6rem 0 1.6rem;font-size:.8em;opacity:.7}

/* ---- footer (js/main.js): on home, the centred location block; then the information band (inquiries / people / about) */
.foot .place{padding-block:max(5rem,9vw);padding-left:calc(var(--gut) + 50%)}   /* right of centre */
.foot .place p{margin:0 0 1em;max-width:28ch}
.foot .place a{text-decoration:none}
.foot .place a:hover{text-decoration:underline;text-underline-offset:.15em}
.info{background:rgba(24,24,22,.92);color:#c9c9c2;display:grid;grid-template-columns:repeat(12,1fr);column-gap:1.5%;padding-block:1.6rem 1.4rem;font-size:clamp(14px,.95vw,17px);line-height:1.2}
.info a{color:inherit;text-underline-offset:.12em}
.info a:hover{color:#fff}
.info .reach{grid-column:1/7}
.info .reach p{margin:0 0 .9em;overflow-wrap:anywhere}
.info .people{grid-column:7/10}
.info .reach+.about{grid-column:7/13;max-width:36rem}   /* when people is hidden */
.info .about{grid-column:10/13}
.info h3{margin:0;font:inherit;font-weight:500}
.info .people p{margin:0}
.info .about p{margin:0 0 .9em}
.info .rights{grid-column:1/7;margin:0;opacity:.7}   /* sits under inquiries / follow */

/* ---- phones: one column, photos stacked in content order, doodles floated over them */
@media (max-width:760px){
  .panel{width:78vw}
  .shots{display:flex;flex-direction:column;gap:1.4rem;position:relative}
  .shots>*{margin:0;width:100%}
  .framed img{outline-offset:8px;margin:0 8px;width:calc(100% - 16px)}
  .doodle{position:absolute;width:55%!important;top:22%;left:-4%}
  .doodle+.doodle{top:62%;left:auto;right:-4%}
  .project .doodle{top:40%;left:auto;right:-4%}
  .project .head{display:flex;flex-direction:column;gap:1rem}
  .zines{grid-template-columns:repeat(2,1fr);gap:2.5rem 1.5rem}
  .foot .place{padding-left:var(--gut)}

  .info{display:flex;flex-direction:column;gap:2.5rem}
  .info .rights{margin-top:1rem}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.book{transition:none}.panel,.menu-open .panel,.mark,.burger,.frame.anim{transition:none}}

/* ---- email pop-up (opened from "email" in the menu) */
.mail{padding:0;border:0;background:var(--panel);color:var(--panel-ink);width:min(26rem,calc(100vw - 2rem));max-width:none;font-size:clamp(17px,1.5vw,22px);line-height:1.3}
.mail::backdrop{background:rgba(20,20,18,.45)}
.mail .in{position:relative;padding:1.4rem 1.25rem 1.6rem}
.mail .in:focus{outline:none}   /* the pop-up focuses its box on open (not the ×), with no ring */
.mail h2{margin:0 0 2.4rem;font:500 1em/1.3 var(--sans)}
.mail .addr{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;margin:0 0 1.4rem;padding-bottom:.7rem;border-bottom:1px solid var(--rule);overflow-wrap:anywhere}
.mail nav{display:flex;flex-direction:column}
.mail a{text-decoration:none;width:max-content}
.mail a:hover,.mail #copy:hover{color:var(--red)}
.mail #copy{font:inherit;color:var(--red);background:none;border:0;padding:0;cursor:pointer}
.mail .x{position:absolute;top:1rem;right:1rem;width:32px;height:32px;background:none;border:0;cursor:pointer;color:inherit}
.mail .x::before,.mail .x::after{content:"";position:absolute;left:4px;top:15px;width:24px;height:1.5px;background:currentColor;transform:rotate(45deg)}
.mail .x::after{transform:rotate(-45deg)}
