/* Jesse Allan portfolio. Tokens follow ../design-system.md. */
:root {
  --ink: #0B0B0C;
  --bone: #EBEADB;
  --ash: #8C8C86;
  --tally: #E5412D;
  --rule-dark: rgba(235, 234, 219, .18);
  --rule-light: rgba(11, 11, 12, .16);
  --gutter: clamp(16px, 2.6vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  /* the Off / On / X-ray pill wears the palette */
  --ms-accent: #E5412D; --ms-on: #EBEADB; --ms-bg: rgba(11, 11, 12, .8); --ms-fg: #EBEADB; --ms-font: "Archivo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--ink); -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--bone); background: var(--ink); }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, canvas, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--tally); outline-offset: 3px; }

.label { font-family: var(--mono); font-weight: 500; font-size: 12px; line-height: 1.2; letter-spacing: .12em; text-transform: uppercase; }
.title { font-stretch: 125%; font-weight: 900; line-height: .98; letter-spacing: -.01em; }

/* ---------- corners ---------- */
.corner { position: fixed; z-index: 40; mix-blend-mode: difference; color: #fff; }
.corner--tl { top: 18px; left: var(--gutter); }
.corner--tr { top: 18px; right: var(--gutter); display: flex; gap: 22px; }
.corner a { opacity: .9; }
.corner a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 1. the first screen ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--ink); }
.hero__still, .hero__film { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__still { object-fit: cover; transition: opacity .9s var(--ease); }
.hero__film { overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .9s var(--ease); }
.hero__film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__film iframe { position: absolute; top: 50%; left: 50%; width: 100vw; height: 56.25vw; min-height: 100svh; min-width: 177.78svh; transform: translate(-50%, -50%); border: 0; max-width: none; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 11, 12, .82) 0%, rgba(11, 11, 12, .1) 46%, rgba(11, 11, 12, .34) 100%); pointer-events: none; }
.hero__name { position: absolute; left: var(--gutter); right: var(--gutter); top: 50%; transform: translateY(-58%); font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: clamp(72px, 17vw, 300px); line-height: .82; letter-spacing: -.01em; color: var(--bone); mix-blend-mode: normal; pointer-events: none; }
.hero__name span { display: block; }
.hero__role { position: absolute; left: var(--gutter); top: calc(50% + clamp(60px, 13vw, 230px)); color: var(--bone); }
.hero__now { position: absolute; right: var(--gutter); bottom: 92px; text-align: right; max-width: 60vw; }
.hero__now .title { font-size: clamp(22px, 2.6vw, 40px); }
.hero__now .label { color: var(--ash); margin-bottom: 8px; display: block; }
.index { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 26px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 0; border-top: 1px solid var(--rule-dark); }
.index button { position: relative; text-align: left; padding: 14px 0 0; color: var(--ash); transition: color .4s var(--ease); }
.index button:hover, .index button[aria-current="true"] { color: var(--bone); }
.index button i { position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--tally); transform: scaleX(0); transform-origin: left; }
.index button .n { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; }
.index button .b { display: block; margin-top: 4px; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(72px, 9vw, 140px) var(--gutter); }
.section--bone { background: var(--bone); color: var(--ink); }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--rule-dark); margin-bottom: clamp(36px, 5vw, 72px); }
.section--bone .section__head { border-bottom-color: var(--rule-light); }
.section__head h2 { font-stretch: 125%; font-weight: 900; font-size: clamp(30px, 4.4vw, 72px); line-height: .95; letter-spacing: -.01em; }
.section--bone .label { color: #5A5A55; }

/* ---------- 2. selected work ---------- */
.selected { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(48px, 7vw, 120px) var(--gutter); }
.piece { display: block; text-align: left; width: 100%; opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.piece.in { opacity: 1; transform: none; }
.piece:nth-child(4n+1) { grid-column: 1 / span 7; }
.piece:nth-child(4n+2) { grid-column: 8 / span 5; margin-top: clamp(40px, 9vw, 160px); }
.piece:nth-child(4n+3) { grid-column: 2 / span 5; }
.piece:nth-child(4n+4) { grid-column: 7 / span 6; margin-top: clamp(20px, 5vw, 90px); }
.piece__title { font-size: clamp(26px, 3.4vw, 56px); margin-bottom: 12px; text-wrap: balance; }
.piece__frame { position: relative; overflow: hidden; background: var(--ink); }
.piece__frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .9s var(--ease); }
.piece:hover .piece__frame img { transform: scale(1.035); }
.piece__meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; }
.runtime { position: relative; flex: 1; height: 1px; background: var(--rule-light); align-self: center; margin: 0 14px; }
.runtime i { position: absolute; left: 0; top: -1px; height: 3px; background: var(--ink); width: var(--w, 0%); transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease) .25s; }
.piece.in .runtime i { transform: scaleX(1); }

/* ---------- 3. the award band ---------- */
.award { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: var(--gutter); align-items: end; }
.award h2 { font-stretch: 125%; font-weight: 900; font-size: clamp(34px, 5.6vw, 96px); line-height: .94; letter-spacing: -.015em; text-wrap: balance; }
.award .piece { opacity: 1; transform: none; }
.award .piece__title { font-size: clamp(18px, 1.6vw, 24px); }
.marquee { margin: clamp(56px, 8vw, 120px) calc(var(--gutter) * -1) 0; overflow: hidden; border-top: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark); padding: 18px 0; }
.marquee__track { display: flex; width: max-content; animation: slide 46s linear infinite; }
.marquee span { font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: clamp(34px, 5vw, 80px); line-height: 1; padding: 0 .38em; white-space: nowrap; }
.marquee span:nth-child(odd) { color: var(--ash); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- 4. the archive ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filters button { padding: 9px 14px; border: 1px solid var(--rule-dark); color: var(--ash); transition: color .4s, border-color .4s, background .4s; }
.filters button:hover { color: var(--bone); border-color: var(--bone); }
.filters button[aria-pressed="true"] { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.filters sup { font-size: 10px; margin-left: 6px; }
.rows { border-top: 1px solid var(--rule-dark); }
.row { display: grid; grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1.6fr) 140px 64px; gap: 16px; align-items: baseline; width: 100%; text-align: left; padding: 15px 0; border-bottom: 1px solid var(--rule-dark); transition: padding .4s var(--ease), color .4s; }
.row:hover { padding-left: 14px; color: var(--bone); }
.row .n, .row .k, .row .l { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ash); }
.row .l { text-align: right; }
.row .b { font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t { font-size: 18px; color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row:hover .t { color: var(--bone); }
.row[hidden] { display: none; }
.peek { position: fixed; z-index: 30; left: 0; top: 0; width: 320px; aspect-ratio: 16 / 9; object-fit: cover; pointer-events: none; opacity: 0; transition: opacity .4s var(--ease); will-change: transform; }
.peek.on { opacity: 1; }

/* ---------- 5. contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--gutter); align-items: end; }
.contact a.mail { display: block; font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: clamp(40px, 8.6vw, 160px); line-height: .86; letter-spacing: -.005em; overflow-wrap: anywhere; }
.contact a.mail:hover { color: var(--tally); }
.contact .phone { font-size: 20px; font-weight: 600; margin-top: 22px; display: inline-block; }
.leader { width: clamp(120px, 16vw, 220px); aspect-ratio: 1; }
.footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px var(--gutter) 84px; background: var(--bone); color: #5A5A55; border-top: 1px solid var(--rule-light); }

/* ---------- player ---------- */
.player { position: fixed; inset: 0; z-index: 60; background: rgba(11, 11, 12, .96); display: none; align-items: center; justify-content: center; padding: 64px var(--gutter); }
.player.open { display: flex; }
.player__box { width: min(100%, calc((100svh - 160px) * var(--ar, 1.778))); }
.player__frame { position: relative; width: 100%; aspect-ratio: var(--ar, 1.778); background: #000; }
.player__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__bar { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; margin-top: 14px; }
.player__bar .title { font-size: clamp(18px, 2vw, 28px); }
.player__close { position: absolute; top: 18px; right: var(--gutter); color: var(--bone); }
.player__close:hover { color: var(--tally); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .index { grid-template-columns: repeat(4, 1fr); row-gap: 6px; }
  .index button .b { display: none; }
  .hero__now { bottom: 118px; left: var(--gutter); right: var(--gutter); text-align: left; max-width: none; }
  .hero__role { top: auto; bottom: 200px; }
  .hero__name { top: 40%; }
  .selected { display: block; }
  .piece { margin: 0 0 56px !important; }
  .award, .contact { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: 34px minmax(0, 1fr) 52px; row-gap: 2px; }
  .row .t { grid-column: 2; grid-row: 2; font-size: 15px; }
  .row .k { display: none; }
  .row .l { grid-column: 3; grid-row: 1; }
  .peek { display: none; }
  .section__head { flex-direction: column; gap: 10px; }
}

/* The Off / On / X-ray review pill is hidden on the live site. Add ?review to the address to bring it back. */
html:not(.review) .ms-pill, html:not(.review) .ms-sum, html:not(.review) .ms-layer { display: none !important; }
