<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Letter Window</title>
<style>
:root{--ground:#F3EEE2;--ink:#1E1F15;--muted:#5A5E3B;--font:"Geist",system-ui,-apple-system,sans-serif;}
@font-face{font-family:"Geist";src:url("/fonts-geist/Geist-Regular-latin.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap;}
@font-face{font-family:"Geist";src:url("/fonts-geist/Geist-Medium-latin.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap;}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:var(--ground);color:var(--ink);font-family:var(--font);-webkit-font-smoothing:antialiased}
svg.stage{position:fixed;inset:0;width:100%;height:100%;display:block}
.caption{position:fixed;left:50%;bottom:11vh;transform:translateX(-50%);margin:0;font-size:11px;font-weight:500;letter-spacing:.22em;text-transform:uppercase;color:var(--ink);opacity:0;white-space:nowrap;pointer-events:none}
</style>
</head>
<body>
<svg class="stage" id="svg" aria-label="Linen">
<defs>
<mask id="m" maskUnits="userSpaceOnUse">
<rect id="bg" width="100%" height="100%" fill="#000"/>
<text id="word" text-anchor="middle" dominant-baseline="middle" fill="#fff" font-family="Geist, system-ui, sans-serif" font-weight="500" letter-spacing="-0.06em">LINEN</text>
</mask>
</defs>
<image id="pic" href="/images/webp/ix-silk-nap.webp" preserveAspectRatio="xMidYMid slice" mask="url(#m)"></image>
</svg>
<p class="caption" id="caption">Held in the type</p>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/gsap.min.js"></script>
<script>
(function(){
const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
const svg = document.getElementById("svg");
const pic = document.getElementById("pic");
const word = document.getElementById("word");
const caption = document.getElementById("caption");
function layout(){
const w = window.innerWidth, h = window.innerHeight;
svg.setAttribute("viewBox", "0 0 " + w + " " + h);
pic.setAttribute("width", w);
pic.setAttribute("height", h);
word.setAttribute("x", w/2);
word.setAttribute("y", h/2);
const size = Math.min(w * 0.165, h * 0.28, 236);
word.setAttribute("font-size", size);
}
layout();
window.addEventListener("resize", layout);
const ready = (document.fonts && document.fonts.ready) ? document.fonts.ready : Promise.resolve();
ready.then(() => {
layout();
if (reduce){ caption.style.opacity = "1"; return; }
const st = { track: -0.08, y: 36, op: 0 };
word.setAttribute("letter-spacing", "-0.08em");
gsap.set(word, {y: 36, opacity: 0});
gsap.set(caption, {opacity:0, y:10});
gsap.timeline({defaults:{ease:"expo.out"}})
.to(word, {y:0, opacity:1, duration:1.15}, 0.08)
.to(st, {track:-0.04, duration:1.05, ease:"power3.inOut", onUpdate(){ word.setAttribute("letter-spacing", st.track + "em"); }}, 0.45)
.to(caption, {opacity:1, y:0, duration:0.7, ease:"power3.out"}, 0.9);
});
})();
</script>
</body>
</html>
Build a single self-contained HTML file (vanilla CSS and JavaScript; GSAP 3.13+ from jsDelivr, plus ScrollTrigger or Flip only if required) for “Letter Window”.
The word is a window. The still sits inside the type, then a caption settles.
Use the Olive & Moss palette: ground #F3EEE2, card #E6E3CE, ink #1E1F15, deep #0F100A, lift #3D4128, muted #5A5E3B, soft #C9C8A6, accent #86914C. Amber #FFA51F is not used as type. Images use object-fit: cover (or equivalent cover mapping in a shader) and must be undistorted at rest. Easing: expo.out / power3.inOut, no bounce or elastic. Respect prefers-reduced-motion. One file.