/* noashaish.com v2 — objects and motion. Palette + type are the original site's:
   Antonio (display) + Syne (text); ink / bone / paper / gold. Every image is Noa's own art. */

:root {
  --ink: #07080d;
  --charcoal: #14151b;
  --paper: #f6f2ea;
  --paper-deep: #ece5d7;
  --bone: #f7efe3;
  --gold: #dfbf67;
  --gold-on-paper: #6d5716;
  --crimson: #d5425d;
  --display: "Antonio", "Arial Narrow", sans-serif;
  --text: "Syne", system-ui, sans-serif;
  --gut: clamp(18px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 1rem/1.5 var(--text);
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--bone); color: var(--ink); padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 12px; }

.display {
  font: 400 clamp(3.4rem, 10.5vw, 11rem)/.94 var(--display);
  text-transform: uppercase;
  letter-spacing: -.005em;
  margin: 0;
}

/* nav ------------------------------------------------------------------ */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 15px var(--gut);
  background: var(--ink); color: var(--bone); box-shadow: 0 1px 0 #ffffff1f;
  font: 500 .78rem/1 var(--text); letter-spacing: .14em; text-transform: uppercase;
  transition: translate .5s var(--ease);
}
.bar.is-hidden:not(:focus-within) { translate: 0 -101%; }   /* out of the way of the paintings while you scroll down */
.bar a { text-decoration: none; }
.bar__nav { display: flex; gap: clamp(14px, 2.4vw, 34px); }
.bar__nav a { position: relative; padding-block: 4px; }
.bar__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; scale: 0 1; transform-origin: left; transition: scale .35s var(--ease); }
.bar__nav a:hover::after { scale: 1 1; }
@media (max-width: 720px) { .bar__nav a:not(:last-child) { display: none; } }

/* reveal --------------------------------------------------------------- */
.js [data-reveal] { opacity: 0; translate: 0 26px; transition: opacity .9s var(--ease), translate .9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; translate: none; }   /* none, not 0 0: a live translate would isolate the blend below */
.line { display: block; overflow: clip; padding: .06em 0 .16em; margin-bottom: -.12em; }   /* room so the clip never shaves a baseline */
.line > span { display: block; }
.js .mega .line > span { translate: 0 108%; transition: translate 1.05s var(--ease); }
.js .mega .line:nth-child(2) > span { transition-delay: .09s; }
.js .mega.in .line > span { translate: 0 0; }
.js .mega[data-reveal] { opacity: 1; translate: none; }

/* hero ----------------------------------------------------------------- */
.hero {
  --mx: 0; --my: 0; --sy: 0;
  position: relative; min-height: 100svh; overflow: clip;
  display: grid; grid-template-rows: 1fr auto;
  padding: 0 var(--gut);
  background: var(--ink);
}
.wordmark {
  grid-row: 1; align-self: center; position: relative; z-index: 2;
  margin: 0; padding-top: 6svh;
  font: 400 clamp(6.2rem, 28vw, 42rem)/.9 var(--display);
  text-transform: uppercase; letter-spacing: -.012em; color: var(--bone);
}
.wordmark span { display: block; will-change: translate; }
.wordmark span:first-child { translate: calc(var(--sy) * -13vw) 0; }
.wordmark span:last-child { margin-left: 5vw; translate: calc(var(--sy) * 13vw) 0; }

.prop { position: absolute; z-index: 3; pointer-events: none;
  translate: calc(var(--mx) * var(--dx)) calc(var(--my) * var(--dy) + var(--sy) * var(--ds)); }
.prop img { width: 100%; filter: drop-shadow(0 34px 38px rgba(0, 0, 0, .55)); animation: bob 7s ease-in-out infinite alternate; }
.prop--sword { right: 5vw; top: 9svh; width: min(15vw, 31svh); rotate: 13deg; }
.prop--hat   { left: 6vw; top: 5svh; width: min(28vw, 50svh); rotate: -11deg; }
.prop--hat img { animation-duration: 8.5s; animation-delay: -2s; }
.prop--mask  { z-index: 1; left: 46vw; top: 46svh; width: min(15vw, 30svh); rotate: 6deg; }
.prop--mask img { animation-duration: 9.5s; animation-delay: -4s; }
.prop--sword img { animation-duration: 6.2s; }
@keyframes bob { from { translate: 0 -.9svh; rotate: -.6deg; } to { translate: 0 .9svh; rotate: .6deg; } }

.hero__meta {
  position: relative; z-index: 4;
  display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 20px; align-items: end;
  padding: 18px 0 22px; border-top: 1px solid #ffffff2e;
  font: 500 .8rem/1.45 var(--text); letter-spacing: .1em; text-transform: uppercase; color: #f7efe3cc;
}
.hero__meta p { margin: 0; }
.hero__what { text-align: center; }
.hero__cue { text-align: right; }
.hero__cue::after { content: ""; display: inline-block; width: 1px; height: 1.1em; margin-left: 10px; background: var(--gold); vertical-align: -.2em; animation: cue 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { scale: 1 0; } 55% { scale: 1 1; transform-origin: top; } 56% { transform-origin: bottom; } 100% { scale: 1 0; transform-origin: bottom; } }
@media (max-width: 720px) {
  .wordmark { font-size: 35vw; }
  .hero__meta { grid-template-columns: 1fr auto; }
  .hero__what { display: none; }
  .prop--sword { right: 3vw; width: min(22vw, 34svh); }
  .prop--hat { width: 44vw; left: 3vw; }
  .prop--mask { left: 34vw; top: 52svh; width: 26vw; }
}

/* iris: day -> night --------------------------------------------------- */
.iris { position: relative; height: 300svh; background: var(--ink); --e: 0; }
.iris__stage { position: sticky; top: 0; height: 100svh; overflow: clip; }
.iris__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.iris__night { position: absolute; inset: 0; z-index: 2; clip-path: circle(calc(var(--e) * 145%) at 71% 36%); }
.iris__copy { position: absolute; right: var(--gut); bottom: clamp(24px, 6svh, 70px); z-index: 1; max-width: 92vw; text-align: right; }   /* right side: the buddy stands bottom-left */
.iris__word { margin: 0; position: relative; height: 1em; font: 400 clamp(5.5rem, 22vw, 26rem)/1 var(--display); text-transform: uppercase; color: var(--ink); transition: color .5s; }
.iris__word span { position: absolute; right: 0; bottom: 0; transition: translate .8s var(--ease), opacity .5s; }
.iris__word .w-night { translate: 0 60%; opacity: 0; }
.iris__copy--night .iris__word { color: var(--bone); }
.iris.is-night .w-day { translate: 0 -60%; opacity: 0; }
.iris.is-night .w-night { translate: 0 0; opacity: 1; }

/* deck: bestiary ------------------------------------------------------- */
.deck { position: relative; height: 330svh; background: var(--paper); color: var(--ink); --e: 0; }
.deck__pin {
  position: sticky; top: 0; height: 100svh; overflow: clip;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: clamp(70px, 10svh, 104px) var(--gut) 26px;
}
.deck__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 40px; }
.deck__head .display { font-size: clamp(2.6rem, 6.2vw, 6.4rem); }
.deck__cards { --cw: clamp(140px, 17vw, 270px); position: relative; }
.card {
  position: absolute; left: 50%; top: 42%;
  width: var(--cw); aspect-ratio: 754 / 1090;
  margin: calc(var(--cw) * -.72) 0 0 calc(var(--cw) * -.5);
  transform-origin: 50% 250%;
  translate: calc((var(--i) - 5) * 1.6px * (1 - var(--e))) calc((var(--i) - 5) * -.8px * (1 - var(--e)));
  rotate: calc((var(--i) / 10 - .5) * 62deg * var(--e) + var(--j) * 1deg * (1 - var(--e)));
  transition: transform .45s var(--ease), filter .45s;
  box-shadow: 0 1px 0 #0003, 8px 16px 0 -4px #14151b1f, 0 26px 42px #14151b40;
  background: var(--charcoal);
}
.card img { width: 100%; height: 100%; object-fit: cover; }
.card:hover { transform: scale(1.09); z-index: 30; }
.deck__label { margin: 0; text-align: center; min-height: 1.4em; font: 500 .8rem/1.4 var(--text); letter-spacing: .16em; text-transform: uppercase; }
@media (max-width: 760px) {
  .deck { height: auto; }
  .deck__pin { position: static; height: auto; padding-block: 88px 30px; display: block; }
  .deck__head { margin-bottom: 26px; }
  .deck__cards { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--gut) 26px; margin-inline: calc(var(--gut) * -1); }
  .card { position: static; margin: 0; flex: 0 0 64vw; width: auto; translate: none; rotate: none; scroll-snap-align: center; transform: none; }
  .card:hover { transform: none; }
  .deck__label { display: none; }
}

/* games ---------------------------------------------------------------- */
.games { background: var(--ink); padding: clamp(80px, 14svh, 170px) var(--gut) clamp(80px, 12svh, 150px); }
.head { display: grid; gap: 22px; margin-bottom: clamp(30px, 6svh, 70px); }
.games__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(34px, 4.4vw, 68px) clamp(40px, 4.4vw, 68px); align-items: start; }

.plate { position: relative; }
.plate img { width: 100%; box-shadow: 0 26px 60px #000a; }
.plate::before, .pal::before {   /* crop marks, like a proof sheet */
  content: ""; position: absolute; inset: -14px; pointer-events: none; z-index: 2;
  background:
    linear-gradient(var(--gold), var(--gold)) 0 0 / 20px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 0 0 / 1px 20px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 100% 0 / 20px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 100% 0 / 1px 20px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 0 100% / 20px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 0 100% / 1px 20px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 100% 100% / 20px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 100% 100% / 1px 20px no-repeat;
}
.plate figcaption { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; margin-top: 22px; font: 400 .88rem/1.4 var(--text); color: #f7efe3d0; }
.plate figcaption b { font: 400 1.7rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em; color: var(--bone); }
.plate--big { grid-column: 1 / span 8; }
.plate--side { grid-column: 9 / span 4; margin-top: clamp(30px, 9vw, 150px); }
.plate--side img { aspect-ratio: 3 / 1.1; object-fit: cover; }
.reel { grid-column: 1 / -1; }
.reel video { width: 100%; box-shadow: 0 26px 60px #000a; }

.pals { grid-column: 1 / -1; margin-top: clamp(10px, 4svh, 60px); }
.pals__title { margin: 0 0 30px; padding-top: 14px; border-top: 1px solid #ffffff2e; font: 500 .78rem/1.4 var(--text); letter-spacing: .14em; text-transform: uppercase; color: #f7efe3b0; }
.pals__row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 44px clamp(44px, 6vw, 96px); }
.pal { --k: 8; position: relative; width: calc(36px * var(--k) + 80px); outline: none; }
.pal__stage { display: grid; place-items: end center; padding: 40px 40px 34px; background: var(--paper); }
.sprite { width: calc(36px * var(--k)); height: calc(40px * var(--k)); background-image: var(--sheet); background-repeat: no-repeat; background-size: calc(288px * var(--k)) calc(120px * var(--k)); background-position: calc(var(--c, 0) * -36px * var(--k)) calc(var(--r, 0) * -40px * var(--k)); image-rendering: pixelated; }   /* whole-number scale only: pixels stay square */
.pal:focus-visible .pal__stage { outline: 2px solid var(--gold); outline-offset: 4px; }
.pal figcaption { display: grid; gap: 5px; margin-top: 24px; }
.pal figcaption b { font: 400 1.7rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em; color: var(--bone); }
@media (min-width: 901px) and (max-height: 760px) { .pal { --k: 6; } }   /* shorter windows: the pair and captions fit in one view */
@media (max-width: 900px) { .pal { --k: 5; } }
@media (max-width: 480px) { .pal { --k: 3; width: calc(36px * var(--k) + 36px); } .pal__stage { padding: 22px 18px 20px; } .pals__row { gap: 40px 34px; } }
.buddy { --k: 1.1; position: fixed; left: clamp(6px, 2vw, 30px); bottom: env(safe-area-inset-bottom, 0px);   /* feet keep their few pixels of margin: never clipped by the window edge */ z-index: 40; width: calc(144px * var(--k)); height: calc(208px * var(--k)); padding: 0; border: 0; background: none; cursor: pointer; pointer-events: none; -webkit-tap-highlight-color: transparent; translate: 0 108%; transition: translate .8s var(--ease); }
.buddy.is-here { translate: 0 0; }
.buddy canvas { display: block; width: 100%; height: 100%; }
.buddy__hit { position: absolute; inset: 12% 12% 0 12%; pointer-events: auto; border-radius: 45% 45% 0 0 / 30% 30% 0 0; }   /* only the character is clickable, not the whole box */
.buddy:focus-visible { outline: 2px solid var(--gold); outline-offset: -6px; }
@media (max-width: 720px) { .iris__copy { max-width: calc(100vw - 132px); } .buddy { --k: .64; } .contact { padding-bottom: calc(208px * .64 + 26px); } }
@media print { .buddy { display: none; } }
@media (max-width: 860px) {
  .games__grid { grid-template-columns: minmax(0, 1fr); }
  .plate--big, .plate--side, .pals { grid-column: auto; margin-top: 0; }
}

/* sketchbook ----------------------------------------------------------- */
.desk { background: var(--paper-deep); color: var(--ink); padding: clamp(80px, 14svh, 170px) var(--gut) clamp(60px, 10svh, 120px); }
.desk__table { position: relative; height: clamp(560px, 96svh, 980px); margin-inline: calc(var(--gut) * -.4); }
.obj {
  --dx: 0px; --dy: 0px;
  position: absolute; left: var(--x); top: var(--y); width: var(--w); z-index: 1;
  rotate: var(--r); translate: var(--dx) var(--dy);
  transition: rotate .4s var(--ease), scale .4s var(--ease), box-shadow .4s, filter .4s;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.obj img { width: 100%; pointer-events: none; }
.obj--page { background: #fff; padding: clamp(6px, 1vw, 14px); box-shadow: 0 1px 0 #07080d1a, 6px 9px 0 -2px #14151b14, 0 18px 34px #14151b2e; }
.obj--cut img { filter: drop-shadow(0 12px 14px #14151b40); }
.obj.lift { cursor: grabbing; rotate: calc(var(--r) * .35); scale: 1.035; }
.obj--page.lift { box-shadow: 0 1px 0 #07080d1a, 10px 16px 0 -2px #14151b12, 0 34px 60px #14151b48; }
.obj--cut.lift img { filter: drop-shadow(0 26px 24px #14151b55); }
@media (pointer: coarse), (max-width: 760px) {
  .desk__table { height: auto; display: grid; gap: 26px; margin-inline: 0; padding-block: 8px; }
  .obj { position: relative; left: auto; top: auto; width: min(100%, 520px); touch-action: auto; cursor: default; }
  .obj:nth-child(even) { margin-left: auto; }
  .obj--cut { width: 34%; }
}

/* contact -------------------------------------------------------------- */
.contact { background: var(--ink); padding: clamp(90px, 16svh, 190px) var(--gut) calc(208px * 1.1 + 26px); }   /* empty floor at the end of the page for the buddy */
.mega { margin: 0; font: 400 clamp(4.4rem, 21vw, 30rem)/.9 var(--display); text-transform: uppercase; letter-spacing: -.01em; }
.mega a { text-decoration: none; color: var(--bone); display: block; transition: color .4s; }
.mega a:hover { color: var(--gold); }
.contact__cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 5vw, 90px); align-items: start; margin-top: clamp(50px, 10svh, 120px); }
.offers { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.offers li { display: grid; gap: 6px; padding: 22px 0; border-top: 1px solid #ffffff2e; }
.offers li:last-child { border-bottom: 1px solid #ffffff2e; }
.offers b { font: 400 clamp(1.7rem, 3.6vw, 3rem)/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.portrait { justify-self: end; width: min(100%, 380px); rotate: 2.2deg; }
.portrait img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 30% 40%; box-shadow: 0 24px 50px #000a; }
.portrait figcaption { margin-top: 12px; font: 500 .74rem/1.4 var(--text); letter-spacing: .16em; text-transform: uppercase; color: #f7efe390; }
.avail { margin: clamp(40px, 8svh, 90px) 0 0; font: 500 .82rem/1.5 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 30px; margin-top: 26px; padding-top: 18px; border-top: 1px solid #ffffff2e; font: 500 .8rem/1.4 var(--text); letter-spacing: .08em; color: #f7efe3b0; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--gold); }
@media (max-width: 760px) { .contact__cols { grid-template-columns: 1fr; } .portrait { justify-self: start; width: 70%; } }

/* reduced motion: everything readable, nothing moving ------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .prop img, .hero__cue::after { animation: none; }
  .wordmark span, .prop { translate: none; }
  .js [data-reveal], .js .mega .line > span { opacity: 1; translate: none; transition: none; }
  .iris { height: auto; }
  .iris__stage { position: relative; height: auto; display: grid; }
  .iris__img { position: relative; height: 70svh; }
  .iris__night { position: relative; clip-path: none; }
  .iris__copy { position: relative; left: auto; right: auto; bottom: auto; padding: 24px var(--gut); }
  .iris__copy--night { display: none; }
  .iris__word { height: auto; color: var(--bone); }
  .iris__word span { position: static; display: inline; opacity: 1 !important; translate: none !important; }
  .iris__word .w-day::after { content: " / "; }
  .iris__copy { background: var(--ink); }
  .deck { height: auto; }
  .deck__pin { position: static; height: auto; display: block; padding-block: 88px 30px; }
  .deck__cards { display: flex; gap: 14px; overflow-x: auto; padding: 8px 0 26px; }
  .card { position: static; margin: 0; flex: 0 0 min(64vw, 260px); width: auto; translate: none; rotate: none; transition: none; }
  .deck__label { display: none; }
}
