/* design.bhupathi.dev: the contact sheet.
   Darkroom (default): the room under a red safelight. Lightbox: the same sheet on a daylight lightbox.
   The work always sits in black film so its own colours stay true.
   Edge print (dot-matrix) is the machine; the grease pencil (circle, cross, underline) is the person deciding. */
:root{
  --paper:#2A0C0A; --white:#351210; --ink:#F7E4D8; --muted:#C49A8C; --rule:#4A1E19;
  --edge:#FF9F45; --note:#E7C9B8; --film:#0B0605; --filmline:rgba(255,159,69,.18); --frame:#351210;
  --pencil:#FFB224; --keyline:#0B0605; --dev0:#5A1712; --lamp:#FF8A70;
  --gutter:32px; --max:1240px; color-scheme:dark;
}
:root[data-theme=light]{
  --paper:#F2F4F3; --white:#FFFFFF; --ink:#0E0F10; --muted:#55595B; --rule:#D9DCDB;
  --edge:#FF8A1F; --note:#D7D9DA; --film:#111214; --filmline:rgba(0,0,0,.1); --frame:#2B2C30;
  --pencil:#D0103A; --keyline:#F7F7F5; --dev0:#DDE1E0; --lamp:transparent; color-scheme:light;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{background:var(--paper);color:var(--ink);font-family:Archivo,system-ui,sans-serif;font-variation-settings:'wdth' 100;-webkit-font-smoothing:antialiased;line-height:1.55;font-size:17px}
img,video{display:block;max-width:100%;height:auto}
a{color:inherit}
:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
.wrap{max-width:var(--max);margin:0 auto;padding:0 var(--gutter)}
.skip{position:absolute;left:-9999px}.skip:focus{left:16px;top:12px;background:var(--white);color:var(--ink);padding:8px 12px;z-index:10}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* nav */
.nav{display:flex;align-items:center;gap:28px;padding:22px 0;font-size:15px}
.nav .name{font-weight:640;font-variation-settings:'wdth' 82;font-size:18px;text-decoration:none;margin-right:auto}
.nav a,.nav button{white-space:nowrap;text-decoration:none;font:inherit;background:none;border:0;color:inherit;cursor:pointer}
.nav a:hover,.nav button:hover{text-decoration:underline;text-decoration-color:var(--pencil);text-underline-offset:5px;text-decoration-thickness:2px}
.theme{font-size:14px}
.theme::before{content:'';display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--pencil);margin-right:7px;vertical-align:1px}

/* edge print: the film rebate across the top of the page */
.rebate{background:var(--film);color:var(--edge);font-family:Doto,monospace;font-weight:800;font-size:clamp(18px,3.2vw,46px);letter-spacing:.04em;line-height:1;white-space:nowrap;overflow:hidden;padding:13px 0}
.rebate-in{max-width:var(--max);margin:0 auto;padding:0 var(--gutter);display:flex;gap:1.1em}
.rebate .a{color:var(--pencil)}

/* hero */
.hero{padding:56px 0 24px}
.hero h1{font-size:clamp(40px,6.4vw,84px);line-height:.98;font-weight:640;font-variation-settings:'wdth' 82;letter-spacing:-.025em;max-width:19ch}
.hero h1 .w{display:inline-block}
/* the one moment of motion: the headline develops like a print in the tray */
.develop .w{animation:develop 2.8s cubic-bezier(.3,0,.2,1) calc(var(--i) * .11s) both}
@keyframes develop{0%{color:var(--dev0);filter:blur(7px);opacity:0}35%{filter:blur(3px);opacity:.85}100%{color:var(--ink);filter:blur(0);opacity:1}}
.hero p{margin-top:22px;font-size:18px;color:var(--muted);max-width:56ch}

/* section heads */
.sec{padding:72px 0 0}
.sec-h{display:flex;align-items:baseline;justify-content:space-between;gap:16px;border-top:1px solid var(--ink);padding-top:12px}
.sec-h h2{font-size:15px;font-weight:600}
.sec-h p{font-size:14px;color:var(--muted)}

/* contact strip: each cell is a piece of film, its note printed in the rebate */
a.strip{display:block;margin-top:52px;color:inherit;text-decoration:none}
a.strip:first-of-type{margin-top:32px}
.strip-head{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap}
.strip-head h3{font-size:32px;font-weight:640;font-variation-settings:'wdth' 82;letter-spacing:-.015em;position:relative;line-height:1.1}
.ul{position:absolute;left:-2px;bottom:-7px;width:calc(100% + 4px);height:10px;overflow:visible}
.ul path{fill:none;stroke:var(--pencil);stroke-width:2.4;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;opacity:0;transition:stroke-dashoffset .45s ease-out}
a.strip:hover .ul path,a.strip:focus-visible .ul path{stroke-dashoffset:0;opacity:1}
a.strip:focus-visible{outline:2px solid var(--ink);outline-offset:8px}
.tags{font-size:13.5px;color:var(--muted)}
.open{margin-left:auto;font-size:14px;font-weight:600}
.desc{color:var(--muted);font-size:16.5px;margin:6px 0 14px;max-width:62ch}
.film{display:grid;grid-template-columns:1fr 1fr 1fr 2.2fr;background:var(--film);box-shadow:0 0 0 1px var(--filmline);border-radius:3px;padding:0 6px;position:relative}
.film::before{content:attr(data-edge);position:absolute;top:5px;left:12px;right:12px;font-family:Doto,monospace;font-size:13px;font-weight:800;letter-spacing:.08em;color:var(--edge);white-space:pre;overflow:hidden}
.cell{padding:24px 6px 12px;display:flex;flex-direction:column}
.frame{position:relative;flex:1;min-height:0}
.cell:not(.pick) .frame{aspect-ratio:1/1;flex:none}
.frame .m{position:absolute;inset:0;overflow:hidden;background:var(--frame)}
.frame img,.frame video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:top left}
.frame video{opacity:0;transition:opacity .25s}
.frame video.on{opacity:1}
.note{margin-top:9px;font-size:12.5px;line-height:1.35;color:var(--note)}
.note b{font-weight:600;color:#fff}
.note i{font-style:normal;font-family:Doto,monospace;font-weight:800;font-size:14px;letter-spacing:.04em;margin-right:7px;color:var(--edge)}
.mark{position:absolute;left:-9px;top:-8px;width:calc(100% + 18px);height:calc(100% + 16px);z-index:2;pointer-events:none;overflow:visible}
.mark path{fill:none;stroke:var(--pencil);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.mark path.k{stroke:var(--keyline);stroke-width:4.4}
.draw path{stroke-dasharray:1;stroke-dashoffset:1;opacity:0;transition:stroke-dashoffset .9s cubic-bezier(.6,.05,.2,1)}
.draw.on path{stroke-dashoffset:0;opacity:1}

/* small things */
.also{display:grid;grid-template-columns:1.2fr 1fr;gap:32px;align-items:center;margin-top:28px}
.also h3{font-size:24px;font-weight:640;font-variation-settings:'wdth' 82}
.also p{color:var(--muted);font-size:16px;margin-top:6px}
.also a.more{display:inline-block;margin-top:12px;font-weight:600;font-size:15px}
.also video{width:100%;aspect-ratio:4/3;border-radius:3px;background:#F1EDE3}

/* about + contact */
.about{display:grid;grid-template-columns:300px 1fr;gap:48px;margin-top:28px;align-items:start}
.print{margin:0}
.print-film{position:relative;background:var(--film);box-shadow:0 0 0 1px var(--filmline);border-radius:3px;padding:26px 10px 38px}
.print-film::before{content:attr(data-edge);position:absolute;top:6px;left:12px;font-family:Doto,monospace;font-size:13px;font-weight:800;letter-spacing:.08em;color:var(--edge);white-space:pre}
.print-img{position:relative;overflow:hidden}
.print-img img{width:100%;aspect-ratio:8/9;object-fit:cover;display:block}
/* under the safelight the print takes the room's red; on the lightbox it is plain silver */
.print-img::after{content:'';position:absolute;inset:0;background:var(--lamp);mix-blend-mode:multiply;opacity:.45;pointer-events:none}
/* the portrait is a darkroom test strip: five exposure bands, the right one circled; hover shows the final print */
.print-img .final{position:absolute;inset:0;height:100%;opacity:0;transition:opacity .6s ease}
.print:hover .final,.print:focus-visible .final{opacity:1}
.print:focus-visible{outline:2px solid var(--ink);outline-offset:6px}
.steps{position:absolute;left:10px;right:10px;bottom:8px;display:grid;grid-template-columns:repeat(5,1fr);text-align:center;font-family:Doto,monospace;font-weight:800;font-size:15px;color:var(--edge)}
.steps span{position:relative;justify-self:center;padding:2px 7px}
.steps .pick{color:#fff}
.steps .mark{left:-6px;top:-7px;width:calc(100% + 12px);height:calc(100% + 14px)}
.print figcaption{margin-top:9px;font-size:12.5px;color:var(--muted)}
.print figcaption i{font-style:normal;font-family:Doto,monospace;font-weight:800;font-size:14px;color:var(--edge);margin-right:7px}
.about p{font-size:19px;line-height:1.55;max-width:58ch;margin-bottom:16px}
.about p.muted{color:var(--muted);font-size:16.5px}
.contact{padding-bottom:16px}
.contact .big{margin-top:28px}
.contact .big{font-family:inherit;font-size:clamp(34px,5.4vw,72px);line-height:1;font-weight:640;font-variation-settings:'wdth' 82;letter-spacing:-.025em;background:none;border:0;color:inherit;cursor:pointer;text-align:left;position:relative}
.contact .big .ul{bottom:-12px;height:14px}
.contact .big:hover .ul path,.contact .big:focus-visible .ul path{stroke-dashoffset:0;opacity:1}
.contact .row{display:flex;gap:24px;flex-wrap:wrap;margin-top:28px;font-size:16px;color:var(--muted)}
footer{border-top:1px solid var(--rule);padding:22px 0 40px;font-size:14px;color:var(--muted);display:flex;gap:20px;flex-wrap:wrap}
footer a,footer button{text-decoration:none;background:none;border:0;font:inherit;color:inherit;cursor:pointer}footer a:hover,footer button:hover{color:var(--ink)}
main + footer{margin-top:80px}
footer span{margin-right:auto}

/* case page */
.case-top{padding:40px 0 0}
.back{font-size:14px;color:var(--muted);text-decoration:none}.back:hover{color:var(--ink)}
.case-top h1{margin-top:20px;font-size:clamp(44px,7vw,96px);line-height:.95;font-weight:640;font-variation-settings:'wdth' 82;letter-spacing:-.03em}
.claim{margin-top:14px;font-size:clamp(19px,2vw,24px);color:var(--muted);max-width:44ch;line-height:1.35}
.spec{display:grid;grid-template-columns:repeat(5,1fr);gap:16px;border-top:1px solid var(--ink);padding-top:14px;margin-top:32px;font-size:14.5px}
.spec dt{color:var(--muted);font-size:12.5px}.spec dd{font-weight:500}
.cover{margin-top:32px;background:var(--film);border-radius:3px;overflow:hidden}
.cover video{width:100%}
.prose{display:grid;grid-template-columns:240px 1fr;gap:40px;padding:56px 0 0}
.prose h2{font-size:15px;font-weight:600;border-top:1px solid var(--ink);padding-top:10px;align-self:start}
.prose .t{min-width:0}
.prose .t > p,.prose .t > .dec{max-width:64ch}
.prose .board,.prose .t > .film{margin-left:-280px;width:calc(100% + 280px)}
.prose .t p{margin-bottom:14px}
.prose .t p.lead{font-size:21px;line-height:1.45}
.board{margin-top:28px}
.prose .t p.gap{margin-top:28px}
.film.two{grid-template-columns:1fr 1fr}.film.three{grid-template-columns:repeat(3,1fr)}
.prose .film.two,.prose .film.three{margin-top:18px;margin-bottom:8px}
.board img,.board video{width:100%;border-radius:3px;background:var(--white)}
.board figcaption{font-size:14px;color:var(--muted);margin-top:8px;max-width:70ch}
.dec{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin-top:24px}
.dec h3{font-size:18px;font-weight:620;margin-bottom:6px}
.dec p{color:var(--muted);font-size:16px}
.next{margin:88px 0 0;border-top:1px solid var(--ink);padding-top:14px}
.next a{text-decoration:none;display:inline-block}
.next small{display:block;font-size:14px;color:var(--muted)}
.next .big{font-size:clamp(34px,5vw,64px);font-weight:640;font-variation-settings:'wdth' 82;letter-spacing:-.025em;position:relative;line-height:1.05}
.next a:hover .ul path{stroke-dashoffset:0;opacity:1}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .draw path,.ul path{transition:none}.develop .w{animation:none}.draw path{stroke-dashoffset:0;opacity:1}
}
@media (max-width:760px){
  :root{--gutter:16px}
  body{font-size:16px}
  .nav{gap:16px;font-size:14px}.nav .hide-s,.nav .fs{display:none}
  .hero{padding-top:28px}
  /* phone: the final frame first, earlier frames follow as a swipe */
  .film{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:44%;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
  .film::-webkit-scrollbar{display:none}
  .cell{scroll-snap-align:start}
  .cell.pick{order:-1;grid-column:span 2}
  .cell.pick .frame{aspect-ratio:4/3;flex:none}
  .open{display:none}
  .also,.about{grid-template-columns:1fr}
  .about .print{max-width:300px}
  .spec{grid-template-columns:1fr 1fr}
  .prose{grid-template-columns:1fr;gap:12px;padding-top:40px}
  .prose .board,.prose .t > .film{margin-left:0;width:100%}
  .dec{grid-template-columns:1fr}
  .prose .t p.lead{font-size:18px}
  .film.two,.film.three{grid-template-columns:none}
}
