/* richardzeboulon.com
   Idea: a picture editor's light table. Photographs are 35 mm slides in their
   mounts, laid on a lit surface; opening one projects it in a dark room.
   The only loud colour is the red of the grease pencil used to mark a frame. */

:root {
  --table: #e9edef;        /* the lit surface */
  --glow: #f9fbfb;         /* light coming through */
  --mount: #fbfaf5;        /* slide mount card */
  --ink: #14181b;
  --navy: #12304a;         /* Marine nationale, port de la Lune */
  --pencil: #d6281f;       /* grease pencil */
  --spot: #e8ae1a;         /* the thumb spot on a slide mount */
  --dim: #58636b;
  --line: rgba(20, 24, 27, .14);
  --display: 'Bricolage Grotesque', 'Arial Narrow', sans-serif;
  --body: 'Spectral', Georgia, serif;
  --label: 'Courier Prime', 'Courier New', monospace;
  --page: min(1180px, 100% - 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 400 1.14rem/1.62 var(--body);
  background: var(--table) radial-gradient(120% 70% at 50% -10%, var(--glow) 0, transparent 70%) no-repeat;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
img.own { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
a { color: inherit; text-decoration-color: var(--pencil); text-decoration-thickness: 2px; text-underline-offset: .18em; }
a:hover { color: var(--pencil); }
:focus-visible { outline: 3px solid var(--pencil); outline-offset: 3px; border-radius: 2px; }
.wrap { width: var(--page); margin-inline: auto; }
.label { font: 400 .78rem/1.3 var(--label); letter-spacing: .09em; text-transform: uppercase; color: var(--dim); }
h1, h2, h3 { font-family: var(--display); font-stretch: 78%; font-weight: 750; line-height: .96; letter-spacing: -.012em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h3 { font-size: 1.5rem; line-height: 1.05; }

/* ---------- header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; padding-block: 1.05rem .9rem; flex-wrap: wrap; }
.mark { font: 800 1.42rem/1 var(--display); font-stretch: 76%; letter-spacing: -.01em; text-decoration: none; }
.mark i { font-style: normal; color: var(--pencil); }
.top nav { display: flex; gap: clamp(.9rem, 2.2vw, 1.9rem); flex-wrap: wrap; }
.top nav a { font: 400 .82rem/1 var(--label); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; padding-block: .35rem; border-bottom: 2px solid transparent; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); border-bottom-color: var(--pencil); }
.band { background: var(--navy); color: #fff; font: 400 .8rem/1.3 var(--label); letter-spacing: .05em; }
.band .wrap { display: flex; gap: 1rem 1.6rem; justify-content: space-between; padding-block: .5rem; flex-wrap: wrap; }
.band a { color: #fff; }

/* ---------- the slide */
.slide {
  position: relative; display: block; aspect-ratio: 1; container-type: inline-size;
  background: var(--mount); border-radius: 5px; text-decoration: none; color: var(--ink);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(20, 24, 27, .09), 0 14px 26px -16px rgba(18, 48, 74, .55);
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s;
}
.slide__win { position: absolute; inset: 21.5% 8%; background: linear-gradient(#fff, #eef3f4); box-shadow: inset 0 0 0 1px rgba(20, 24, 27, .32); overflow: hidden; border-radius: 1.5px; }
.slide--tall .slide__win { inset: 8% 21.5%; }
.slide__win img { width: 100%; height: 100%; object-fit: cover; }
.slide__top, .slide__foot { position: absolute; left: 8%; right: 8%; display: flex; justify-content: space-between; gap: .5em; font: 400 clamp(7px, 4.1cqw, 13px)/1 var(--label); letter-spacing: .04em; text-transform: uppercase; color: #3b454c; white-space: nowrap; overflow: hidden; }
.slide__top { top: 7.5%; }
.slide__foot { bottom: 7%; }
.slide--tall .slide__top, .slide--tall .slide__foot { display: none; }
.slide--tall .slide__side { position: absolute; top: 8%; bottom: 8%; left: 6%; writing-mode: vertical-rl; transform: rotate(180deg); font: 400 clamp(7px, 4.1cqw, 13px)/1 var(--label); letter-spacing: .04em; text-transform: uppercase; color: #3b454c; overflow: hidden; white-space: nowrap; }
.slide:not(.slide--tall) .slide__side { display: none; }
.slide__top span:first-child, .slide__foot span:first-child { overflow: hidden; text-overflow: ellipsis; }
.slide::after { content: ''; position: absolute; width: 4.2%; aspect-ratio: 1; border-radius: 50%; background: var(--spot); right: 8%; top: 12.6%; }
.slide--tall::after { right: 7%; top: 8%; }
a.slide:hover, a.slide:focus-visible { transform: translateY(-5px) rotate(0deg) !important; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(20, 24, 27, .12), 0 26px 34px -18px rgba(18, 48, 74, .6); color: var(--ink); z-index: 3; }
.slide.is-hidden { opacity: .55; }

.table { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: clamp(.9rem, 2vw, 1.5rem); }
.table > :nth-child(5n+1) { transform: rotate(-.8deg); }
.table > :nth-child(5n+3) { transform: rotate(.7deg); }
.table > :nth-child(7n+5) { transform: rotate(-.4deg); }

/* ---------- home */
.hero { padding-block: clamp(2.2rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(3.6rem, 11.2vw, 10.2rem); font-stretch: 75%; font-weight: 800; line-height: .82; letter-spacing: -.025em; margin: .7rem 0 0 -.04em; }
.hero h1 span { display: block; }
.hero__text { font-size: clamp(1.15rem, 1.7vw, 1.38rem); line-height: 1.5; max-width: 34ch; margin: 1.6rem 0 0; }
.hero__where { margin-top: 1.5rem; display: flex; gap: .6rem 1.4rem; flex-wrap: wrap; align-items: center; }
.btn { display: inline-block; font: 700 .84rem/1 var(--label); letter-spacing: .09em; text-transform: uppercase; text-decoration: none; padding: .85rem 1.1rem .75rem; background: var(--ink); color: #fff; border: 0; border-radius: 3px; cursor: pointer; }
.btn:hover { background: var(--pencil); color: #fff; }
.btn--quiet { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--quiet:hover { background: var(--ink); color: #fff; }
.pile { position: relative; aspect-ratio: 1.08; }
.pile .slide { position: absolute; width: 44%; }
.pile .slide:nth-child(1) { left: 2%; top: 4%; transform: rotate(-7deg); }
.pile .slide:nth-child(2) { left: 46%; top: 0; transform: rotate(4deg); }
.pile .slide:nth-child(3) { left: 27%; top: 29%; transform: rotate(-2deg); z-index: 2; }
.pile .slide:nth-child(4) { left: 0; top: 55%; transform: rotate(5deg); }
.pile .slide:nth-child(5) { left: 55%; top: 52%; transform: rotate(-5deg); }
.pile__ring { position: absolute; left: 21%; top: 23%; width: 56%; z-index: 2; pointer-events: none; overflow: visible; }
.pile__ring path { fill: none; stroke: var(--pencil); stroke-width: 5; stroke-linecap: round; opacity: .9; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 1.1s .5s cubic-bezier(.5, 0, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes drop { from { opacity: 0; translate: 0 -18px; } }
.pile .slide { animation: drop .5s both cubic-bezier(.2, .7, .2, 1); }
.pile .slide:nth-child(2) { animation-delay: .07s; } .pile .slide:nth-child(3) { animation-delay: .14s; }
.pile .slide:nth-child(4) { animation-delay: .21s; } .pile .slide:nth-child(5) { animation-delay: .28s; }

.block { padding-block: clamp(2.4rem, 6vw, 4.6rem); border-top: 1px solid var(--line); }
.block__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: clamp(1.4rem, 3vw, 2.4rem); }
.block__head p { margin: .5rem 0 0; max-width: 52ch; color: var(--dim); }
.more { font: 700 .82rem/1 var(--label); letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }

/* periods: a box of slides */
.periods { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: clamp(1.6rem, 3.5vw, 2.8rem) clamp(1.2rem, 2.6vw, 2.2rem); }
.period { text-decoration: none; display: block; }
.period__stack { position: relative; margin: 0 6% 1.1rem 2%; }
.period__stack::before, .period__stack::after { content: ''; position: absolute; inset: 0; background: var(--mount); border-radius: 5px; box-shadow: 0 0 0 1px rgba(20, 24, 27, .09), 0 10px 18px -14px rgba(18, 48, 74, .5); }
.period__stack::before { transform: rotate(5deg) translate(5%, 1%); }
.period__stack::after { transform: rotate(-3deg) translate(-2%, 1%); }
.period__stack .slide { z-index: 1; }
.period:hover .slide { transform: translateY(-5px); }
.period h3 { margin-top: .2rem; }
.period:hover h3 { color: var(--pencil); }
.period .label { display: block; margin-top: .45rem; }

/* shelf of books */
.shelf { display: flex; align-items: flex-end; gap: 5px; padding: 0 .6rem; border-bottom: 9px solid var(--navy); overflow-x: auto; scrollbar-width: thin; }
.spine { flex: 0 0 auto; width: var(--w, 46px); height: var(--h, 250px); background: var(--c, var(--navy)); color: var(--t, #fff); border-radius: 2px 2px 0 0; padding: .7rem 0 .6rem; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-decoration: none; box-shadow: inset 3px 0 0 rgba(255, 255, 255, .12), inset -3px 0 0 rgba(0, 0, 0, .14); transition: transform .2s; }
.spine:hover { transform: translateY(-10px); color: var(--t, #fff); }
.spine b { writing-mode: vertical-rl; font: 700 .94rem/1.05 var(--display); font-stretch: 78%; overflow: hidden; max-height: 82%; text-align: left; }
.spine small { font: 400 .62rem/1 var(--label); opacity: .85; }
.biblio { list-style: none; padding: 0; margin: 0; }
.biblio li { display: grid; grid-template-columns: 5.2rem 1fr; gap: .2rem 1.2rem; padding: 1rem 0; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.biblio li:target { background: linear-gradient(90deg, rgba(232, 174, 26, .2), transparent 70%); }
.biblio .yr { font: 700 1rem/1.5 var(--label); color: var(--pencil); }
.biblio h3 { font-size: 1.38rem; }
.biblio p { margin: .25rem 0 0; color: var(--dim); font-size: 1.02rem; }
.biblio .cov { float: right; width: 84px; margin: 0 0 .4rem 1rem; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .6); }

/* texts */
.stories { list-style: none; margin: 0; padding: 0; }
.stories li { border-top: 1px solid var(--line); }
.stories a { display: grid; grid-template-columns: 9.5rem 1fr; gap: .3rem 1.5rem; padding: 1.35rem 0; text-decoration: none; }
.stories h3 { font-size: clamp(1.5rem, 2.8vw, 2.05rem); }
.stories a:hover h3 { color: var(--pencil); }
.stories p { margin: .45rem 0 0; color: var(--dim); max-width: 62ch; }
.tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
.tag { font: 700 .68rem/1 var(--label); letter-spacing: .08em; text-transform: uppercase; padding: .32rem .45rem .26rem; border: 1.5px solid currentColor; border-radius: 2px; }
.tag--ear { color: var(--pencil); }
.tag--off { color: var(--dim); border-style: dashed; }

/* reading column */
.read { width: min(41rem, 100% - 2.5rem); margin-inline: auto; padding-block: clamp(2rem, 5vw, 4rem); }
.read > header { margin-bottom: 2rem; }
.read > header h1 { margin: .6rem 0 0; }
.read .chapo { font-size: 1.32rem; line-height: 1.45; margin: 1.2rem 0 0; }
.prose h2 { font-size: 1.9rem; margin: 2.4rem 0 .7rem; }
.prose h3 { font-size: 1.45rem; margin: 2.2rem 0 .5rem; }
.prose p { margin: 0 0 1.05rem; hanging-punctuation: first; }
.prose blockquote { margin: 1.6rem 0; padding-left: 1.2rem; border-left: 4px solid var(--pencil); font-style: italic; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.prose small, .prose .sources { font-size: .93rem; color: var(--dim); }
.inset { margin: 2rem 0; }
.inset img { width: 100%; }
.inset figcaption, .cutting figcaption { font: 400 .8rem/1.4 var(--label); color: var(--dim); margin-top: .5rem; }
.listen { background: var(--navy); color: #fff; padding: 1.1rem 1.2rem 1.2rem; border-radius: 4px; margin: 0 0 2rem; }
.listen .label { color: #b9c8d4; display: block; margin-bottom: .7rem; }
.listen audio { width: 100%; display: block; }
.cutting { margin: 2rem calc(-1 * min(6vw, 5rem)); }
.cutting img { width: 100%; background: #fff; box-shadow: 0 0 0 1px rgba(20, 24, 27, .12), 0 22px 40px -26px rgba(18, 48, 74, .7); }
.cutting figcaption { padding-inline: min(6vw, 5rem); }

/* biography */
.bio { display: grid; grid-template-columns: minmax(0, 41rem) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); width: var(--page); margin-inline: auto; padding-block: clamp(2rem, 5vw, 4rem); align-items: start; }
.bio aside { position: sticky; top: 1.5rem; }
.marks { list-style: none; margin: 1rem 0 0; padding: 0; }
.marks li { display: grid; grid-template-columns: 5.6rem 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); font-size: 1rem; line-height: 1.4; }
.marks b { font: 700 .95rem/1.5 var(--label); color: var(--pencil); }
.portrait { margin: 0 0 2rem; max-width: 300px; }

/* projection room */
body.dark { background: #0b0c0d; color: #e8e5dd; }
body.dark .top { border-color: rgba(255, 255, 255, .12); }
body.dark .top nav a:hover { color: #fff; }
body.dark .label { color: #9aa3a8; }
.screen { width: min(1240px, 100% - 1.5rem); margin: clamp(.8rem, 2vw, 1.6rem) auto 0; text-align: center; }
.screen img { margin-inline: auto; max-height: 78vh; width: auto; box-shadow: 0 0 110px rgba(255, 250, 235, .12); animation: lamp .7s both; }
@keyframes lamp { from { opacity: 0; filter: brightness(1.8) blur(3px); } }
.screen__bar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: start; width: min(1100px, 100% - 2.5rem); margin: 1.2rem auto 3rem; }
.screen__bar .cap { text-align: center; max-width: 60ch; }
.screen__bar .cap strong { font: 700 1.35rem/1.15 var(--display); font-stretch: 80%; display: block; }
.screen__bar .cap p { margin: .4rem 0 0; font-size: 1.02rem; }
.step { font: 700 .85rem/1 var(--label); letter-spacing: .09em; text-transform: uppercase; text-decoration: none; padding: .6rem 0; }
.step--next { text-align: right; }

/* footer */
.foot { background: var(--navy); color: #dfe7ee; margin-top: clamp(2rem, 6vw, 5rem); }
.foot .wrap { display: flex; justify-content: space-between; gap: 1.2rem 3rem; flex-wrap: wrap; padding-block: 2rem; font-size: .98rem; }
.foot p { margin: 0 0 .3rem; max-width: 56ch; }
.foot a { color: #fff; }
.foot .label { color: #9fb3c4; }
body.dark .foot { background: none; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 0; }

.empty { border: 1.5px dashed var(--line); border-radius: 5px; padding: 2rem; color: var(--dim); max-width: 46rem; }
.gatepage { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1.25rem; }
.gate { max-width: 30rem; }
.gate h1 { font-size: clamp(3rem, 12vw, 5.6rem); font-stretch: 75%; font-weight: 800; line-height: .84; margin: .8rem 0 1.4rem; }
.gate p { margin: 0 0 1.3rem; }
.gate .refused { border-left: 4px solid var(--pencil); padding-left: 1rem; }

/* ---------- workshop */
.ws { width: var(--page); margin-inline: auto; padding-block: 1.8rem 4rem; font: 400 1rem/1.5 var(--display); font-stretch: 100%; }
.ws h1 { font-size: 2.4rem; margin-bottom: 1.2rem; }
.ws h2 { font-size: 1.5rem; margin: 2.2rem 0 .8rem; }
.wsnav { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.wsnav a { text-decoration: none; padding: .5rem .8rem; border-radius: 3px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-weight: 600; font-size: .95rem; }
.wsnav a[aria-current], .wsnav a:hover { background: var(--ink); color: #fff; }
.flash { padding: .7rem 1rem; border-radius: 3px; margin-bottom: 1rem; background: #fff; border-left: 5px solid var(--navy); }
.flash.err { border-color: var(--pencil); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.card { background: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 0 0 1px var(--line); text-decoration: none; display: block; }
.card b { display: block; font-size: 2rem; font-weight: 800; font-stretch: 78%; line-height: 1; }
.rows { width: 100%; border-collapse: collapse; background: #fff; box-shadow: 0 0 0 1px var(--line); border-radius: 4px; overflow: hidden; }
.rows td, .rows th { text-align: left; padding: .65rem .9rem; border-top: 1px solid var(--line); vertical-align: top; }
.rows tr:first-child td { border-top: 0; }
.rows td:last-child { text-align: right; white-space: nowrap; }
.rows .off { color: var(--dim); }
form.sheet { background: #fff; padding: clamp(1rem, 3vw, 1.8rem); border-radius: 4px; box-shadow: 0 0 0 1px var(--line); max-width: 54rem; }
.sheet label { display: block; font-weight: 650; margin: 1.1rem 0 .3rem; }
.sheet label:first-of-type { margin-top: 0; }
.sheet .hint { font-weight: 400; color: var(--dim); font-size: .9rem; display: block; margin-top: .15rem; }
.sheet input[type=text], .sheet input[type=number], .sheet input[type=email], .sheet input[type=url], .sheet select, .sheet textarea { width: 100%; font: inherit; padding: .6rem .7rem; border: 1.5px solid #b9c2c8; border-radius: 3px; background: #fff; color: var(--ink); }
.sheet textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
.sheet textarea.long { min-height: 26rem; font: 400 1.02rem/1.6 var(--body); }
.sheet .check { display: flex; gap: .6rem; align-items: center; font-weight: 650; margin-top: 1.1rem; }
.sheet .check input { width: 1.15rem; height: 1.15rem; accent-color: var(--pencil); }
.sheet .actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin-top: 1.6rem; }
.danger { background: none; border: 0; color: var(--pencil); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.drop { border: 2px dashed #9aa6ae; border-radius: 6px; padding: 1.6rem; background: #fff; text-align: center; }
.drop.over { border-color: var(--pencil); background: #fff6f5; }
.drop input[type=file] { margin: .8rem auto; display: block; }
.queue { list-style: none; padding: 0; margin: 1rem 0 0; text-align: left; font-size: .93rem; max-height: 14rem; overflow: auto; }
.queue li { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; border-top: 1px solid var(--line); }
.queue .ok { color: #1c7a3e; } .queue .ko { color: var(--pencil); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; margin-top: 1.2rem; }
.thumbs a { text-decoration: none; font-size: .86rem; line-height: 1.25; display: block; }
.thumbs .slide { margin-bottom: .4rem; }
.preview { max-width: 420px; margin-top: 1rem; box-shadow: 0 0 0 1px var(--line); }
.scanlist { display: flex; gap: .8rem; flex-wrap: wrap; margin: .5rem 0; }
.scanlist label { font-weight: 400; margin: 0; font-size: .88rem; text-align: center; }
.scanlist img { width: 90px; box-shadow: 0 0 0 1px var(--line); margin-bottom: .3rem; }

@media (max-width: 760px) {
  body { font-size: 1.06rem; }
  .hero .wrap { grid-template-columns: 1fr; }
  .pile { max-width: 430px; margin-inline: auto; width: 100%; }
  .bio { grid-template-columns: 1fr; }
  .bio aside { position: static; }
  .stories a { grid-template-columns: 1fr; }
  .biblio li { grid-template-columns: 3.6rem 1fr; }
  .screen__bar { grid-template-columns: 1fr 1fr; }
  .screen__bar .cap { grid-column: 1 / -1; grid-row: 1; }
  .cutting { margin-inline: 0; } .cutting figcaption { padding-inline: 0; }
  .table { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .periods { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
  .period h3 { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pile__ring path { stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}
@media print { .top nav, .band, .foot, .listen { display: none; } body { background: #fff; } }
