/* ihsan. — set entirely in Helvetica Now Display and Insan.
   Three weights, one colour, one grid: 12 columns, 8px baseline. */
@font-face{font-family:"Helvetica Now";src:url(fonts/HelveticaNowDisplay-Regular.otf) format("opentype");font-weight:400;font-display:swap}
@font-face{font-family:"Helvetica Now";src:url(fonts/HelveticaNowDisplay-Medium.otf) format("opentype");font-weight:500;font-display:swap}
@font-face{font-family:"Helvetica Now";src:url(fonts/HelveticaNowDisplay-Bold.otf) format("opentype");font-weight:700;font-display:swap}
@font-face{font-family:"Insan";src:url(fonts/Insan-Thin.ttf) format("truetype");font-weight:200;font-display:swap}
@font-face{font-family:"Insan";src:url(fonts/Insan-Regular.ttf) format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Insan";src:url(fonts/Insan-Bold.ttf) format("truetype");font-weight:700;font-display:swap}

:root{
  --ink:#08090b; --paper:#fff; --fire:#ff4a12;
  --gut:clamp(16px,1.67vw,32px);
  --col:calc((100vw - var(--gut)*13)/12);
  --small:clamp(13px,.97vw,16px);
  --text:clamp(17px,1.4vw,24px);
  --lead:clamp(28px,3.9vw,84px);
  --horizon:66%;
}
*{box-sizing:border-box;margin:0;padding:0}
@view-transition{navigation:auto}
html{-webkit-text-size-adjust:100%;background:var(--paper);color:var(--ink);scroll-behavior:smooth}
body{font:400 var(--text)/1.32 "Helvetica Now",Helvetica,Arial,sans-serif;font-kerning:normal;font-feature-settings:"kern","liga","calt";
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;overflow-x:clip;letter-spacing:-.006em}
img{display:block;width:100%;height:auto}
a{color:inherit;text-decoration:none}
[lang=ar]{font-family:"Insan","Helvetica Now",sans-serif;letter-spacing:0;font-feature-settings:normal}
.num{font-feature-settings:"tnum","kern"}
.small{font-size:var(--small);line-height:1.25;font-weight:500;letter-spacing:0}
::selection{background:var(--fire);color:#fff}
:focus-visible{outline:2px solid var(--fire);outline-offset:3px}

/* Stamps: the logo and the menu sit on white, so they read over any page of the work */
.stamp{position:fixed;z-index:50;top:var(--gut);left:var(--gut);width:clamp(52px,4.6vw,76px);background:#fff}
.menu{position:fixed;z-index:50;top:var(--gut);right:var(--gut);display:flex;gap:1px;font-size:var(--small);font-weight:500;line-height:1}
.menu a{background:#fff;padding:.62em .8em .66em;transition:background .15s,color .15s}
.menu a:hover,.menu a[aria-current]{background:var(--ink);color:#fff}

/* Fit: display lines are measured to the exact width of the page, then trimmed to cap height and baseline */
.fit{display:block;white-space:nowrap;font-weight:700;letter-spacing:-.045em;line-height:.8;text-box-trim:trim-both;text-box-edge:cap alphabetic;width:max-content}
.fit-wrap{display:block;width:100%}

/* Hero: after the poster — colour above, paper below, the name standing on the line */
.hero{position:relative;height:100svh;min-height:620px;overflow:hidden;background:linear-gradient(var(--fire) var(--horizon),var(--paper) var(--horizon))}
.hero-name{position:absolute;left:var(--gut);right:var(--gut);bottom:calc(100% - var(--horizon));color:#fff}
.hero-name .fit{text-box-edge:text alphabetic;line-height:1}
.hero-name i{font-style:normal}
.hero-me{position:absolute;bottom:-1px;left:56%;height:86%;width:auto;max-width:none;transform:translateX(-50%);will-change:transform}
.hero-tag{position:absolute;left:var(--gut);top:calc(var(--horizon) + var(--gut));width:calc(var(--col)*4 + var(--gut)*3);font-weight:700;font-size:var(--lead);line-height:.98;letter-spacing:-.035em}
.hero-side{position:absolute;right:var(--gut);bottom:var(--gut);width:calc(var(--col)*3 + var(--gut)*2)}
.hero-ar{display:block;font-weight:700;font-size:clamp(40px,6.4vw,132px);line-height:1;margin-bottom:.16em;text-align:right}
.hero-side p{text-align:right}
.hero-top{position:absolute;top:var(--gut);left:calc(var(--gut)*2 + var(--col));color:var(--ink)}

/* Contents */
.contents{position:relative;background:var(--ink);color:#fff;padding:calc(var(--gut)*5) 0 calc(var(--gut)*2);isolation:isolate}
.contents-head{display:flex;justify-content:space-between;padding:0 var(--gut) var(--gut)}
.contents ol{list-style:none}
.contents li a{position:relative;z-index:1;display:grid;grid-template-columns:calc(var(--col)*2 + var(--gut)) 1fr auto;gap:var(--gut);align-items:baseline;padding:.1em var(--gut) .12em;border-top:1px solid rgb(255 255 255/.28);transition:color .15s}
.contents li:last-child a{border-bottom:1px solid rgb(255 255 255/.28)}
.contents .t{font-weight:700;font-size:clamp(38px,8.3vw,190px);line-height:1.02;letter-spacing:-.045em}
.contents-img{position:absolute;inset:0;z-index:-1;opacity:0;object-fit:cover;width:100%;height:100%;transition:opacity .25s}
.contents-img.on{opacity:.82}

/* Plates: each project is a whole page; the next slides over it like a turned leaf */
.plate{position:sticky;top:0;display:block;height:100svh;min-height:560px;overflow:hidden;background:var(--ink);color:#fff}
.plate.dark-text{color:var(--ink);background:#fff}
.plate img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform 1.4s cubic-bezier(.2,.7,.2,1)}
.plate:hover img{transform:scale(1.025)}
/* Every title is one size, set by the longest of them: the work stays visible */
.plate-title{position:absolute;left:var(--gut);right:var(--gut);bottom:calc(var(--gut)*.5);font-size:inherit;font-weight:700}
.title{display:block;font-size:18.9vw;line-height:1;letter-spacing:-.045em;white-space:nowrap;text-box-trim:trim-both;text-box-edge:cap text}
.plate-meta{position:absolute;left:var(--gut);right:var(--gut);top:calc(var(--gut)*2 + clamp(52px,4.6vw,76px));display:flex;justify-content:space-between}
.plate-ar{position:absolute;right:var(--gut);top:calc(var(--gut)*4 + clamp(52px,4.6vw,76px));font-weight:700;font-size:clamp(72px,12vw,260px);line-height:1}

/* Statement */
.say{padding:calc(var(--gut)*5) var(--gut);position:relative;background:#fff}
.say blockquote{font-weight:700;font-size:clamp(40px,8.3vw,190px);line-height:.96;letter-spacing:-.045em;text-indent:-.42em;padding-left:.42em}
.say cite{display:block;font-style:normal;margin-top:calc(var(--gut)*2)}

/* Specimen */
.spec{position:relative;background:var(--fire);color:var(--ink);padding:var(--gut);overflow:hidden}
.spec-head{display:flex;justify-content:space-between;gap:var(--gut);margin-bottom:calc(var(--gut)*3)}
.spec-pair{position:relative;display:flex;justify-content:space-between;align-items:baseline;gap:.1em;font-size:19.5vw;line-height:1.3;white-space:nowrap}
.spec-pair>span:first-child{font-weight:700;letter-spacing:-.045em}
.spec-pair>span:last-child{font-weight:700;line-height:1}

/* Project opening */
.open{position:relative;height:100svh;min-height:560px;overflow:hidden;background:var(--ink);color:#fff}
.open.dark-text{color:var(--ink);background:#fff}
.open>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

/* Dictionary entry + vertical word */
.entry{position:relative;display:grid;grid-template-columns:repeat(12,1fr);gap:var(--gut);padding:calc(var(--gut)*4) var(--gut);min-height:100svh;background:#fff;align-items:start}
.entry-v{grid-column:1/4;position:sticky;top:calc(var(--gut)*2 + clamp(52px,4.6vw,76px));height:calc(100svh - var(--gut)*3 - clamp(52px,4.6vw,76px));align-self:start;display:flex;gap:var(--gut)}
.entry-v>span{writing-mode:vertical-rl;transform:rotate(180deg);font-weight:700;letter-spacing:-.045em;line-height:.74;white-space:nowrap;display:block;height:max-content;align-self:flex-start}
.entry-body{grid-column:5/13}
.entry-word{font-weight:700;font-size:var(--lead);line-height:1;letter-spacing:-.035em}
.entry-word sup{font-size:.42em;vertical-align:baseline;position:relative;top:-.72em;margin-left:.08em;color:var(--fire);letter-spacing:0}
.entry-pos{font-weight:400;font-size:var(--text);letter-spacing:0;margin:.3em 0 0}
.entry-lead{font-weight:500;font-size:clamp(24px,2.9vw,60px);line-height:1.1;letter-spacing:-.022em;margin:calc(var(--gut)*2) 0 calc(var(--gut)*3);text-wrap:pretty}
.notes{display:grid;grid-template-columns:repeat(2,1fr);gap:calc(var(--gut)*2) var(--gut)}
.note h3{font-size:var(--text);font-weight:700;letter-spacing:-.01em;margin-bottom:.45em}
.note p{text-wrap:pretty;hyphens:manual}
.note p+p{margin-top:.7em}

/* Work: nothing floats. Edge to edge, no gutters */
.leaf{display:block;background:#fff}
.leaf-2{display:grid;grid-template-columns:1fr 1fr}
.leaf figure{position:relative;overflow:hidden}
.leaf figcaption{position:absolute;left:var(--gut);bottom:calc(var(--gut)*.75);background:#fff;padding:.2em .4em;opacity:0;transition:opacity .2s}
.leaf figure:hover figcaption{opacity:1}
.interlude{padding:calc(var(--gut)*5) var(--gut);background:var(--fire);color:var(--ink)}
.interlude p{font-weight:700;font-size:clamp(34px,6.3vw,150px);line-height:.98;letter-spacing:-.04em;text-indent:-.42em;padding-left:.42em;max-width:17em}
.interlude.plain p{text-indent:0;padding-left:0}
.interlude cite{display:block;font-style:normal;margin-top:calc(var(--gut)*2)}

/* Tester */
.tester{padding:calc(var(--gut)*2 + clamp(52px,4.6vw,76px)) var(--gut) var(--gut);background:var(--ink);color:#fff}
.tester-bar{display:flex;gap:1px;justify-content:space-between;align-items:center;margin-bottom:var(--gut)}
.tester-bar div{display:flex;gap:1px}
.tester button{font:500 var(--small)/1 "Helvetica Now",Arial,sans-serif;background:#fff;color:var(--ink);border:0;padding:.62em .8em .66em;cursor:pointer}
.tester button[aria-pressed=true]{background:var(--fire)}
.tester [contenteditable]{font-family:Insan;font-size:clamp(56px,13vw,300px);line-height:1.25;outline:none;min-height:1.25em;overflow-wrap:anywhere;caret-color:var(--fire)}

/* Next */
.next{position:relative;display:block;height:100svh;min-height:520px;overflow:hidden;background:var(--ink);color:#fff}
.next img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.9}
.next.dark-text{color:var(--ink);background:#fff}
.next .small{position:absolute;left:var(--gut);top:calc(var(--gut)*2 + clamp(52px,4.6vw,76px))}
.next .plate-title{z-index:1}

/* About */
.about-open{position:relative;height:100svh;min-height:560px;overflow:hidden;background:#000}
.about-open img{width:100%;height:100%;object-fit:cover;object-position:32% 30%}
.chrono{list-style:none;grid-column:5/13;margin-top:calc(var(--gut)*3)}
.chrono li{display:grid;grid-template-columns:calc((100% - var(--gut)*7)/8*1 + 0px) 1fr;gap:var(--gut);padding:.4em 0 .46em;border-top:1px solid var(--ink)}
.chrono li>:first-child{font-feature-settings:"tnum","kern"}
.chrono li:last-child{border-bottom:1px solid var(--ink)}

/* Foot */
.foot{position:relative;background:var(--fire);color:var(--ink);padding:var(--gut);display:grid;grid-template-columns:repeat(12,1fr);gap:var(--gut);align-items:end}
.foot img{grid-column:1/6}
.foot-a{grid-column:7/10}
.foot-b{grid-column:10/13}
.foot p+p{margin-top:.7em}
.foot a{text-decoration:underline;text-underline-offset:.16em;text-decoration-thickness:1px}
.foot button{all:unset;cursor:pointer;text-decoration:underline;text-underline-offset:.16em}

/* Grid overlay — press G */
.gridlay{position:fixed;inset:0;z-index:40;pointer-events:none;display:none;grid-template-columns:repeat(12,1fr);gap:var(--gut);padding:0 var(--gut);
  background-image:linear-gradient(rgb(255 74 18/.35) 1px,transparent 1px);background-size:100% 8px}
.gridlay i{background:rgb(255 74 18/.12);border-inline:1px solid rgb(255 74 18/.6)}
.grid-on .gridlay{display:grid}

/* Motion */
.js .rv{clip-path:inset(0 0 100% 0);transform:translateY(.12em);transition:clip-path .9s cubic-bezier(.2,.7,.2,1),transform .9s cubic-bezier(.2,.7,.2,1)}
.js .rv.in{clip-path:inset(-20% -5% -20% -5%);transform:none}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}.js .rv{clip-path:none;transform:none}}

@media (max-width:760px){
  :root{--horizon:40%}
  .hero-me{left:70%;height:63%}
  .hero-tag{top:auto;bottom:var(--gut);width:38%;font-size:34px}
  .hero-side{display:none}
  .hero-top{left:calc(var(--gut)*2 + 52px);width:40%}
  .contents li a{grid-template-columns:1fr auto;}
  .contents li a .d{display:none}
  .plate-meta{top:calc(var(--gut)*2 + 52px)}
  .entry{display:block;min-height:0;padding-top:calc(var(--gut)*3 + 52px)}
  .entry-v{display:none}
  .notes{grid-template-columns:1fr}
  .chrono{margin-top:calc(var(--gut)*2)}
  .chrono li{grid-template-columns:4em 1fr}
  .foot{display:block}
  .foot img{width:70%;margin-bottom:calc(var(--gut)*2)}
  .foot-b{margin-top:var(--gut)}
  .spec-pair{font-size:30vw;flex-direction:column;align-items:flex-start;gap:0}
  .spec-pair>span:last-child{align-self:flex-end}
  .leaf-2{grid-template-columns:1fr}
  .leaf figcaption{display:none}
}
