/* Architectures Jucker
   Layout: a sheet ruled with 1px black lines into 3 columns (2 on tablets, 1 on phones).
   Some projects take a 2×2 block so the grid has rhythm. Red #90392A is the only accent. */
:root {
  --paper: #fcfcfa;
  --ink: #111111;
  --rule: #111111;
  --muted: #8a8a85;
  --tint: #f1f0ec;
  --red: #90392a;
  --pad: 14px;
  --w: 1px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --text: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 11px/1.45 var(--text); letter-spacing: .02em;
  text-transform: uppercase; -webkit-font-smoothing: antialiased;
  animation: in .5s var(--ease) both;
}
@keyframes in { from { opacity: 0; } }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--red); outline-offset: -4px; }
img { display: block; max-width: 100%; }
p, ul, h1, h2 { margin: 0; }
button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* The ruled sheet */
.sheet { margin: 0 16px 16px; border-left: var(--w) solid var(--rule); }
.row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cell { border-right: var(--w) solid var(--rule); border-bottom: var(--w) solid var(--rule); padding: var(--pad); min-width: 0; }

/* Header: light, tucks away on scroll down, returns on scroll up */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--paper);
  box-shadow: 0 -16px 0 var(--paper); margin-top: 16px;
  transition: transform .35s var(--ease);
}
.top.away { transform: translateY(calc(-100% - 18px)); }
.top .cell { border-top: var(--w) solid var(--rule); display: flex; align-items: center; gap: 18px; min-height: 46px; }
.brand { font-weight: 800; font-size: 14px; letter-spacing: .02em; gap: 10px; }
.brand > * { transition: opacity .35s var(--ease), transform .35s var(--ease); }
.mark { width: 11px; height: 11px; background: var(--red); flex: none; }
/* Home: the brand in the bar waits until the big masthead has scrolled away */
.home .brand { pointer-events: none; }
.home .brand > * { opacity: 0; transform: translateY(6px); }
.home.past .brand { pointer-events: auto; }
.home.past .brand > * { opacity: 1; transform: none; }

/* Masthead: the name set as large as the sheet allows */
.mast { margin: 16px 0 0; font-weight: 800; }
.mast .cell { grid-column: 1 / -1; border-top: var(--w) solid var(--rule); padding: 26px var(--pad) 18px; text-align: center; }
.mast .fit { display: block; white-space: nowrap; font-size: calc((100vw - 64px) / 12.4); line-height: .9; letter-spacing: -.04em; }
.mast .fit > span { display: inline-block; }
.mast + .top { margin-top: 0; box-shadow: none; }
.mast .cell { border-bottom: 0; }
.mast .fit .red { color: var(--red); }
.menu { justify-content: flex-end; flex-wrap: wrap; }
.menu.wide { grid-column: span 2; }
.menu a { position: relative; }
.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.menu a:hover::after, .menu a[aria-current]::after { transform: scaleX(1); }
.menu a[aria-current] { color: var(--red); }
.tools { justify-content: flex-start; }
.views { display: flex; gap: 14px; }
.views button { color: var(--muted); }
.views button[aria-pressed="true"] { color: var(--ink); }
.views button:hover { color: var(--red); }

/* Catalogue grid */
.grid { grid-auto-flow: dense; }
.card { display: flex; flex-direction: column; gap: 14px; position: relative; transition: background-color .3s; }
.card.big { grid-column: span 2; grid-row: span 2; }
.card.big.r { grid-column: 2 / span 2; }
.card.tall { grid-row: span 2; }
.card.tall .fw { height: 100%; }
.card.tall figure .frame { aspect-ratio: auto; height: 100%; min-height: 420px; }
.cap { display: flex; flex-direction: column; gap: 2px; }
.cap .t { font-weight: 500; display: flex; justify-content: space-between; gap: 10px; transition: color .2s; }
.cap .t i { font-style: normal; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .3s var(--ease); }
.card figure { margin: 0; padding: 4% 8% 8%; flex: 1; display: flex; align-items: center; }
.card.big figure { padding: 3% 6% 5%; }
.fw { position: relative; display: block; width: 100%; }
.frame { display: block; width: 100%; overflow: hidden; background: var(--tint); aspect-ratio: 4 / 3; position: relative; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.card figure img.alt { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease), transform .8s var(--ease); }
.card:hover figure img.alt { opacity: 1; }
.card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .6s; }
.card:hover { background: var(--tint); }
.card:hover .t { color: var(--red); }
.card:hover .t i { opacity: 1; transform: none; }
.card:hover figure img { transform: scale(1.04); }
.card.tall figure { align-items: stretch; }

/* Photos fade up as they arrive (only once the script has marked them) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.seen { opacity: 1; transform: none; }

/* Drawing-board hover: crop marks open around the photo, and inside it the
   cursor becomes a fine red CAD crosshair with a small coordinate tag. */
.marks {
  position: absolute; inset: -2px; pointer-events: none; opacity: 0;
  background:
    linear-gradient(var(--red), var(--red)) left top / 14px 1px no-repeat, linear-gradient(var(--red), var(--red)) left top / 1px 14px no-repeat,
    linear-gradient(var(--red), var(--red)) right top / 14px 1px no-repeat, linear-gradient(var(--red), var(--red)) right top / 1px 14px no-repeat,
    linear-gradient(var(--red), var(--red)) left bottom / 14px 1px no-repeat, linear-gradient(var(--red), var(--red)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--red), var(--red)) right bottom / 14px 1px no-repeat, linear-gradient(var(--red), var(--red)) right bottom / 1px 14px no-repeat;
  transition: inset .45s var(--ease), opacity .3s;
}
.card:hover .marks, a.shot:hover .marks { inset: -10px; opacity: 1; }
.xh { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 2; }
.frame:hover .xh { opacity: 1; }
.xh::before, .xh::after { content: ""; position: absolute; background: var(--red); }
.xh::before { left: 0; right: 0; height: 1px; top: var(--y, 50%); }
.xh::after { top: 0; bottom: 0; width: 1px; left: var(--x, 50%); }
.xh b {
  position: absolute; left: var(--x, 50%); top: var(--y, 50%); white-space: nowrap;
  transform: translate(var(--tx, 8px), var(--ty, 8px));
  background: var(--red); color: #fff; padding: 4px 7px 3px; font-weight: 700; font-size: 10px; letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}
.xh b small { font-size: inherit; font-weight: 400; opacity: .8; margin-left: 8px; }
.js-hover .frame { cursor: none; }
body.leave { opacity: 0; transition: opacity .25s ease; }

/* Index list view */
.index { border-right: var(--w) solid var(--rule); }
.li {
  display: grid; grid-template-columns: 70px minmax(0, 2fr) minmax(0, 1.4fr) 60px 20px; gap: 12px; align-items: baseline;
  padding: 13px var(--pad); border-bottom: var(--w) solid var(--rule);
  transition: background-color .2s, padding-left .3s var(--ease);
}
.li .t { font-weight: 500; }
.li .go { opacity: 0; transition: opacity .2s; text-align: right; }
.li:hover { background: var(--tint); padding-left: calc(var(--pad) + 8px); }
.li:hover .go { opacity: 1; }
.peek {
  position: fixed; left: 0; top: 0; width: 280px; aspect-ratio: 4 / 3; object-fit: cover; z-index: 30;
  pointer-events: none; opacity: 0; transform: scale(.96); transition: opacity .2s, transform .25s var(--ease);
}
.peek.on { opacity: 1; transform: scale(1); }

/* Project, atelier and emploi pages */
.project .pinfo { display: flex; flex-direction: column; gap: 18px; padding-bottom: 28px; }
.name { font-size: clamp(22px, 2.6vw, 34px); line-height: 1.05; font-weight: 700; color: var(--red); text-wrap: balance; letter-spacing: 0; }
.num { color: var(--muted); }
.back { color: var(--muted); }
.pinfo ul { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.pinfo li { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.lead { text-transform: none; font-size: 15px; line-height: 1.45; letter-spacing: 0; max-width: 46ch; }
.lead a, .cv a { color: var(--red); }
.shot { display: flex; align-items: center; justify-content: center; padding: 6%; overflow: hidden; }
.shot .fw { max-width: 100%; }
div.lead-shot img { width: auto; max-width: 100%; max-height: min(78vh, 760px); object-fit: contain; }
.shot img { transition: transform .8s var(--ease); }
a.shot { cursor: zoom-in; }
a.shot:hover img { transform: scale(1.03); }
.lead-shot { grid-column: span 2; }
.gallery .shot { padding: 8%; }
.gallery .shot:nth-child(5n+1) { grid-column: span 2; grid-row: span 2; padding: 5%; }
.gallery { grid-auto-flow: dense; }
.pnav { grid-template-columns: 1fr 1fr; }
.pnav .cell { display: flex; flex-direction: column; gap: 4px; padding-block: 22px; transition: background-color .25s; }
.pnav .cell:hover { background: var(--tint); }
.pnav .r { text-align: right; align-items: flex-end; }
.pnav .cell span:last-child { font-size: 15px; font-weight: 700; }
.offer .cell { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 14px; padding-top: 34px; }
.offer .num { font-size: 11px; }
.cv h2 { font-size: 11px; font-weight: 700; margin-bottom: 10px; }
.cv ul + h2 { margin-top: 26px; }
.cv ul { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.cv li { padding: 7px 0; border-bottom: 1px solid var(--rule); text-transform: none; font-size: 13px; letter-spacing: 0; }
.cv p { text-transform: none; font-size: 13px; letter-spacing: 0; margin-bottom: 10px; }

/* Footer: one centered cell */
.foot { grid-template-columns: 1fr; }
.foot .cell { text-align: center; padding: 34px var(--pad); display: flex; flex-direction: column; gap: 6px; align-items: center; }

/* Lightbox: full-screen gallery */
.lb { position: fixed; inset: 0; z-index: 50; background: var(--paper); display: flex; align-items: center; justify-content: center; padding: 56px 64px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.lb.open { opacity: 1; visibility: visible; }
.lb img { max-height: 100%; max-width: 100%; object-fit: contain; transition: opacity .25s; }
.lb .bar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 18px 20px; }
.lb .nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 22px; padding: 16px; }
.lb .prev { left: 6px; } .lb .next { right: 6px; }
.lb button:hover { color: var(--red); }

/* Tablets: two columns */
@media (max-width: 900px) {
  .grid, .gallery, .cv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.big, .card.big.r { grid-column: 1 / -1; grid-row: auto; }
  .project { grid-template-columns: 1fr; }
  .lead-shot { grid-column: auto; }
  .top { grid-template-columns: 1fr 1fr; }
  .top .brand { grid-column: 1 / -1; }
  .menu.wide { grid-column: span 2; justify-content: flex-start; }
  .tools + .menu { justify-content: flex-end; }
  .li { grid-template-columns: 54px minmax(0, 2fr) minmax(0, 1.2fr) 44px; }
  .li .go { display: none; }
  .peek { display: none; }
}
/* Phones: one column */
@media (max-width: 560px) {
  .sheet { margin: 0 10px 10px; }
  .top { margin-top: 10px; box-shadow: 0 -10px 0 var(--paper); }
  .row, .grid, .gallery, .cv { grid-template-columns: minmax(0, 1fr); }
  .top { grid-template-columns: 1fr; }
  .top .cell { min-height: 42px; }
  .mast { margin-top: 10px; }
  .mast .fit { white-space: normal; font-size: calc((100vw - 52px) / 8.6); line-height: .84; }
  .mast .fit > span { display: block; white-space: nowrap; }
  .card.tall { grid-row: auto; }
  .card.tall figure .frame { aspect-ratio: 4 / 3; height: auto; min-height: 0; }
  .menu, .tools + .menu { justify-content: flex-start; grid-column: auto; }
  .menu.wide { grid-column: auto; }
  .gallery .shot:nth-child(5n+1) { grid-column: auto; grid-row: auto; padding: 8%; }
  .filler { display: none; }
  .card figure, .card.big figure { padding: 2% 4% 4%; }
  .li { grid-template-columns: 44px minmax(0, 1fr) 40px; }
  .li .pl { display: none; }
  .pnav { grid-template-columns: 1fr 1fr; }
  .lb { padding: 56px 12px; }
  .lb .nav { top: auto; bottom: 10px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
