Skip to content

A free, open-source framework for cinematic, interactive 3D websites with AI-generated assets (Nano Banana 2 + Meshy 7.1 on fal). 20 example sites.

21.1 KB
Raw Blame
:root {
  --black: #080706;
  --ink: #ece5d8;        /* bone */
  --bone-2: #cfc6b6;
  --muted: #8e8578;
  --faint: rgba(236, 229, 216, .12);
  --brass: #b89b6a;
  --brass-hi: #dcc08a;
  --crimson: #a8453a;
  --serif: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --gut: clamp(18px, 4vw, 56px);
  --ply-h: 50vh;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--black); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font: 400 15px/1.6 var(--sans); background: var(--black); overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: italic; }
::selection { background: var(--brass); color: #120e08; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; touch-action: pan-y; }
/* legibility scrims that follow the section in view */
.grade { position: fixed; inset: 0; z-index: 1; pointer-events: none; transition: opacity 1s ease;
  background:
    linear-gradient(90deg, rgba(8,7,6,var(--gl, .72)) 0%, rgba(8,7,6,0) 46%),
    linear-gradient(270deg, rgba(8,7,6,var(--gr, 0)) 0%, rgba(8,7,6,calc(var(--gr, 0) * .75)) 40%, rgba(8,7,6,0) 62%),
    linear-gradient(0deg, rgba(8,7,6,var(--gb, .55)) 0%, rgba(8,7,6,0) 34%); }

.eyebrow { font: 500 11px/1.2 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--brass); }

/* ── loader ─────────────────────────────────────────────────────────────── */
.loader { position: fixed; inset: 0; z-index: 100; background: var(--black); display: grid; place-content: center; justify-items: center; gap: 26px; }
.tour { width: 168px; height: 168px; overflow: visible; }
.tour-grid rect { fill: rgba(236,229,216,.035); }
.tour-grid rect.d { fill: rgba(236,229,216,.075); }
.tour-line { stroke: var(--brass); stroke-width: .55; stroke-linejoin: round; stroke-linecap: round; }
.tour-knight { fill: var(--brass-hi); filter: drop-shadow(0 0 3px rgba(220,192,138,.8)); }
.loader-brand { font: 400 30px/1 var(--serif); letter-spacing: .42em; text-transform: uppercase; margin-right: -.42em; }
.loader-line { font: 400 italic 15px/1 var(--serif); color: var(--muted); letter-spacing: .02em; }
.loader-pct { font-style: normal; font-variant-numeric: tabular-nums; color: var(--brass); display: inline-block; min-width: 2.2em; text-align: left; }

/* ── nav ────────────────────────────────────────────────────────────────── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 22px var(--gut); pointer-events: none; }
.nav > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; justify-self: start; }
.brand svg { width: 26px; height: 26px; color: var(--brass); }
.brand span { font: 400 17px/1 var(--serif); letter-spacing: .38em; text-transform: uppercase; }
.links { display: flex; gap: 38px; }
.links a { text-decoration: none; font: 400 13px/1 var(--sans); letter-spacing: .02em; color: var(--bone-2); position: relative; padding: 6px 0; transition: color .3s; }
.links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--brass); transform: scaleX(0); transform-origin: right; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.links a:hover { color: var(--ink); }
.links a:hover::after, .links a.on::after { transform: scaleX(1); transform-origin: left; }
.links a.on { color: var(--ink); }
.nav-right { justify-self: end; display: flex; align-items: center; gap: 22px; }
.sound { display: flex; align-items: flex-end; gap: 2px; height: 16px; font: 500 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.sound i { width: 2px; height: 3px; background: currentColor; transition: height .3s; }
.sound span { margin-left: 9px; align-self: center; }
.sound[aria-pressed="true"] { color: var(--brass); }
.sound[aria-pressed="true"] i { animation: eq 1.1s ease-in-out infinite; }
.sound[aria-pressed="true"] i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] i:nth-child(4) { animation-delay: -.8s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 24px; border-radius: 0;
  text-decoration: none; font: 500 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  transition: background .4s, color .4s, box-shadow .4s; }
.btn-ghost { box-shadow: inset 0 0 0 1px rgba(184,155,106,.55); color: var(--ink); background: rgba(8,7,6,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--brass-hi); background: rgba(184,155,106,.14); }
.btn-solid { background: var(--brass); color: #140f08; }
.btn-solid:hover { background: var(--brass-hi); box-shadow: 0 0 48px rgba(184,155,106,.35); }
.link-arrow { font: 400 italic 18px/1 var(--serif); text-decoration: none; color: var(--bone-2); border-bottom: 1px solid rgba(184,155,106,.5); padding-bottom: 5px; transition: color .3s, border-color .3s; }
.link-arrow:hover { color: var(--ink); border-color: var(--brass-hi); }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero { position: relative; z-index: 3; height: 118vh; pointer-events: none; }
.hero-inner { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: flex-start; padding: 15vh var(--gut) 10vh; max-width: 1180px; isolation: isolate; }
/* a soft pool of shadow behind the copy column, so text never sits on lit marble without contrast */
.hero-inner::before { content: ''; position: absolute; z-index: -1; left: 0; top: 0; width: min(1000px, 78vw); height: 92vh; pointer-events: none;
  background: radial-gradient(ellipse 62% 58% at 26% 42%, rgba(8,7,6,.72) 0%, rgba(8,7,6,.5) 45%, rgba(8,7,6,0) 100%); }
.hero-bottom { margin-top: 34px; }
.hero-title { font: 400 clamp(54px, 7.4vw, 126px)/.94 var(--serif); letter-spacing: -.028em; margin: 26px 0 0; font-optical-sizing: auto; }
.hero-title .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .ln > span { display: block; }
.hero-title em { color: var(--brass-hi); font-weight: 400; }
.hero-sub { max-width: 34em; text-shadow: 0 1px 20px rgba(8,7,6,.9); font: 300 clamp(15px, 1.15vw, 17px)/1.65 var(--sans); color: var(--bone-2); }
.hero-cta { display: flex; align-items: center; gap: 34px; margin-top: 30px; pointer-events: auto; flex-wrap: wrap; }
.scroll-cue { position: fixed; right: var(--gut); bottom: 6vh; z-index: 3; display: flex; align-items: center; gap: 14px; font: 500 10px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); transition: opacity .6s; }
.cue-line { width: 1px; height: 54px; background: rgba(236,229,216,.14); position: relative; overflow: hidden; }
.cue-line i { position: absolute; left: 0; top: 0; width: 1px; height: 18px; background: var(--brass); animation: cue 2.2s cubic-bezier(.6,0,.2,1) infinite; }
@keyframes cue { 0% { transform: translateY(-20px); } 100% { transform: translateY(58px); } }
body:not(.at-top) .scroll-cue { opacity: 0 !important; }

/* ── replay ─────────────────────────────────────────────────────────────── */
.replay { position: relative; z-index: 3; height: calc(100vh + 47 * var(--ply-h)); pointer-events: none; }
.replay-pin { position: sticky; top: 0; height: 100vh; }
.replay-intro { position: absolute; left: var(--gut); top: 20vh; max-width: 25em; opacity: 0; transition: opacity .8s, transform .8s; transform: translateY(14px); }
.replay-intro h2 { font: 400 clamp(38px, 4.4vw, 70px)/1 var(--serif); letter-spacing: -.02em; margin: 18px 0 20px; }
.replay-intro p:last-child { color: var(--bone-2); font-weight: 300; max-width: 27em; }
.show-intro .replay-intro { opacity: 1; transform: none; }

.score { position: absolute; right: var(--gut); top: 96px; bottom: 36px; width: 300px; display: grid; grid-template-rows: auto 1fr auto; pointer-events: auto;
  background: linear-gradient(180deg, rgba(14,12,10,.74), rgba(10,9,8,.6)); backdrop-filter: blur(14px) saturate(1.1); -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: inset 0 0 0 1px rgba(184,155,106,.18), 0 40px 80px -30px rgba(0,0,0,.8);
  opacity: 0; transform: translateX(24px); transition: opacity .8s, transform .9s cubic-bezier(.2,.8,.2,1); }
.in-replay .score { opacity: 1; transform: none; }
.score-head { padding: 22px 24px 18px; border-bottom: 1px solid var(--faint); }
.players { display: grid; gap: 4px; margin-top: 14px; font: 400 19px/1.25 var(--serif); }
.players .vs { display: none; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; vertical-align: 2px; }
.dot.w { background: #efe9dd; } .dot.b { background: #0b0a09; box-shadow: inset 0 0 0 1px #b89b6a; }
.opening { margin-top: 10px; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.score-window { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
.score-list { list-style: none; padding: 30px 14px; will-change: transform; }
.score-list li { display: grid; grid-template-columns: 34px 1fr 1fr; align-items: center; height: 30px; }
.score-list .n { font: 400 12px/1 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; padding-right: 12px; }
.score-list button { text-align: left; padding: 6px 10px; font: 400 16px/1 var(--serif); color: rgba(236,229,216,.42); position: relative; transition: color .35s, background .35s; border-radius: 1px; }
.score-list button:hover { color: var(--ink); }
.score-list button.done { color: var(--bone-2); }
.score-list button.on { color: #140f08; background: var(--brass); }
.score-list button.big { font-style: italic; }
.score-list button.big::after { content: attr(data-mark); position: absolute; top: 3px; margin-left: 2px; font: 500 9px/1 var(--sans); letter-spacing: .05em; color: var(--brass); }
.score-list button.on.big::after { color: #140f08; }
.score-foot { padding: 16px 24px 20px; border-top: 1px solid var(--faint); }
.score-bar { height: 1px; background: var(--faint); position: relative; }
.score-bar i { position: absolute; left: 0; top: -.5px; height: 2px; width: 100%; background: var(--brass); transform-origin: left; transform: scaleX(0); }
.score-foot p { display: flex; justify-content: space-between; margin-top: 12px; font: 500 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.score-count { color: var(--ink); font-variant-numeric: tabular-nums; }

.caption { position: absolute; left: var(--gut); bottom: 11vh; max-width: min(40em, calc(100vw - 420px)); opacity: 0; transition: opacity .6s; }
.in-replay .caption { opacity: 1; }
.caption-san { display: flex; align-items: baseline; gap: 16px; font: 400 clamp(42px, 5vw, 84px)/1 var(--serif); letter-spacing: -.02em; }
.caption-num { font: 400 13px/1 var(--sans); letter-spacing: .2em; color: var(--brass); text-transform: uppercase; }
.caption-text { font-style: italic; }
.caption-note { margin-top: 16px; max-width: 30em; font: 300 17px/1.55 var(--sans); color: var(--bone-2); text-shadow: 0 1px 18px rgba(0,0,0,.9); }
.caption-san, .caption-note { will-change: transform, opacity; }

.tag { position: fixed; left: 0; top: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .45s; display: grid; justify-items: center; }
.tag.on { opacity: 1; }
.tag-san { font: 400 italic 20px/1 var(--serif); color: var(--brass-hi); text-shadow: 0 2px 14px rgba(0,0,0,.85); white-space: nowrap; }
.tag-line { width: 1px; height: 34px; margin-top: 8px; background: linear-gradient(var(--brass-hi), rgba(184,155,106,0)); }

/* ── free play ──────────────────────────────────────────────────────────── */
.free { position: relative; z-index: 3; height: 230vh; pointer-events: none; }
.free-pin { position: sticky; top: 0; height: 100vh; }
.free-copy { position: absolute; left: var(--gut); top: 50%; transform: translateY(-46%); max-width: 400px; opacity: 0; transition: opacity .8s; }
.in-free .free-copy { opacity: 1; }
.free-copy h2 { font: 400 clamp(38px, 3.9vw, 62px)/1.02 var(--serif); letter-spacing: -.02em; margin: 20px 0 22px; }
.free-copy h2 em { color: var(--brass-hi); }
.free-copy > p:not(.eyebrow) { color: var(--bone-2); font-weight: 300; }
.free-actions { display: grid; gap: 10px; margin-top: 30px; justify-items: start; pointer-events: auto; }
.free-hint { position: absolute; left: 50%; bottom: 7vh; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 12px 20px 12px 16px;
  font: 500 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink);
  background: rgba(10,9,8,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(184,155,106,.3);
  opacity: 0; transition: opacity .6s; }
.in-free .free-hint { opacity: 1; }
.has-dragged .free-hint { opacity: 0 !important; }
.hand { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--brass); position: relative; }
.hand::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--brass-hi); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(.6); opacity: .6; } 50% { transform: scale(1.1); opacity: 1; } }

/* ── content panels ─────────────────────────────────────────────────────── */
.panel { position: relative; z-index: 3; padding: 22vh var(--gut); }
.panel h2 { font: 400 clamp(46px, 6vw, 104px)/.96 var(--serif); letter-spacing: -.028em; margin: 22px 0 30px; }
.panel h2 em { color: var(--brass-hi); }
.lede { max-width: 32em; font: 300 clamp(16px, 1.25vw, 19px)/1.62 var(--sans); color: var(--bone-2); }

.set { min-height: 190vh; }
.set-copy { max-width: 540px; position: sticky; top: 14vh; }
.specs { margin-top: 44px; display: grid; border-top: 1px solid var(--faint); }
.specs div { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--faint); }
.specs dt { font: 500 10.5px/1.9 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--brass); }
.specs dd { color: var(--bone-2); font-size: 14.5px; font-weight: 300; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 38px; flex-wrap: wrap; }
.price { font: 400 46px/1 var(--serif); letter-spacing: -.01em; }
.price span { display: block; margin-top: 10px; font: 400 12px/1.4 var(--sans); letter-spacing: .02em; color: var(--muted); max-width: 22em; }
.set-notes { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.note-card { position: absolute; left: 0; top: 0; display: grid; gap: 3px; padding: 14px 18px 15px 20px; min-width: 190px;
  background: rgba(10,9,8,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(184,155,106,.26);
  opacity: 0; transition: opacity .6s; will-change: transform; }
.note-card.on { opacity: 1; }
.note-card::before { content: ''; position: absolute; left: -46px; top: 50%; width: 46px; height: 1px; background: linear-gradient(90deg, rgba(220,192,138,0), var(--brass-hi)); }
.note-card::after { content: ''; position: absolute; left: -50px; top: calc(50% - 3px); width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 1px var(--brass-hi); }
.note-card .nc-k { font: 500 9.5px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--brass); }
.note-card b { font: 400 21px/1.15 var(--serif); margin-top: 6px; }
.note-card span:last-child { font-size: 12px; color: var(--muted); }

.salon { min-height: 170vh; display: flex; justify-content: flex-end; }
.salon-copy { max-width: 560px; position: sticky; top: 12vh; align-self: flex-start; }
.evenings { list-style: none; margin-top: 44px; border-top: 1px solid var(--faint); }
.evenings li { display: grid; grid-template-columns: 112px 1fr auto; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--faint); align-items: baseline; }
.ev-day { font: 500 10.5px/1.6 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--brass); }
.evenings h3 { font: 400 26px/1.1 var(--serif); margin-bottom: 8px; }
.evenings p { color: var(--bone-2); font-size: 14.5px; font-weight: 300; }
.ev-time { font: 400 italic 18px/1 var(--serif); color: var(--muted); }

.foot { min-height: 100vh; display: grid; align-content: end; padding-bottom: 7vh;
  background: linear-gradient(180deg, rgba(8,7,6,0) 0%, rgba(8,7,6,.55) 45%, rgba(8,7,6,.94) 100%); }
.foot-title { font-size: clamp(88px, 15vw, 260px) !important; line-height: .86 !important; margin: 0 0 40px !important; }
.foot-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 12vh; padding-top: 30px; border-top: 1px solid var(--faint); color: var(--bone-2); font-size: 14px; font-weight: 300; line-height: 1.8; }
.foot-cols .k { display: block; font: 500 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--brass); margin-bottom: 14px; }
.fine { margin-top: 44px; font-size: 11.5px; color: var(--muted); padding-left: 150px; }

/* ── states ─────────────────────────────────────────────────────────────── */
.dragging, .dragging * { user-select: none; }

@media (max-width: 1100px) {
  .caption { max-width: calc(100vw - 380px); }
  .score { width: 270px; }
}
@media (max-width: 760px) {
  :root { --ply-h: 42vh; }
  .links, .sound span { display: none; }
  .nav { grid-template-columns: 1fr auto; padding: 16px 18px; }
  .nav .btn { height: 38px; padding: 0 14px; font-size: 10.5px; }
  .nav-right { gap: 14px; }
  .brand span { font-size: 15px; letter-spacing: .3em; }
  .hero-inner { padding: 12vh 18px 10vh; }
  .hero-inner::before { width: 100%; height: 78vh; background: linear-gradient(180deg, rgba(8,7,6,.9) 0%, rgba(8,7,6,.82) 55%, rgba(8,7,6,.4) 80%, rgba(8,7,6,0) 100%); }
  .hero-bottom { margin-top: 20px; }
  .hero-cta { margin-top: 22px; }
  .hero-title { font-size: clamp(46px, 13.2vw, 64px); }
  .hero-sub { font-size: 14.5px; text-shadow: 0 1px 16px rgba(0,0,0,.95), 0 0 2px rgba(0,0,0,.6); }
  .hero-cta { gap: 22px; }
  .scroll-cue { display: none; }
  .replay-intro { top: 13vh; right: var(--gut); }
  .replay-intro p:last-child { display: none; }
  .score { top: 70px; bottom: auto; left: 18px; right: 18px; width: auto; height: auto; grid-template-rows: auto; }
  .score-head, .score-window { display: none; }
  .score-foot { padding: 10px 14px 12px; border-top: 0; }
  .score-foot p { margin-top: 9px; }
  .replay-intro { top: 150px; }
  .caption { left: 18px; right: 18px; bottom: 64px; max-width: none; }
  .caption-san { font-size: 40px; }
  .caption-note { font-size: 14px; margin-top: 10px; }
  .tag { display: none; }
  .free-copy { top: 12vh; transform: none; right: 18px; max-width: none; }
  .free-copy h2 { font-size: 34px; margin: 12px 0 12px; }
  .free-copy > p:not(.eyebrow) { display: none; }
  .free-actions { grid-auto-flow: column; margin-top: 16px; }
  .free-actions .btn { height: 38px; padding: 0 12px; font-size: 9.5px; letter-spacing: .1em; }
  .free-hint { bottom: 12vh; white-space: nowrap; font-size: 9.5px; }
  .panel { padding: 16vh 18px; }
  .set-copy, .salon-copy { position: relative; top: 0; }
  .set, .salon { background: linear-gradient(180deg, rgba(8,7,6,.35), rgba(8,7,6,.78) 30%, rgba(8,7,6,.78) 70%, rgba(8,7,6,.35)); }
  .set, .salon { min-height: 0; }
  .specs div { grid-template-columns: 1fr; gap: 4px; }
  .note-card { display: none; }
  .evenings li { grid-template-columns: 1fr auto; }
  .evenings li > div { grid-column: 1 / -1; grid-row: 2; }
  .foot-cols { grid-template-columns: 1fr; gap: 24px; }
  .fine { padding-left: 0; }
  .price { font-size: 38px; }
}

/* the replay's opening card gets the same pool of shadow as the hero copy */
.replay-intro { isolation: isolate; }
.replay-intro::before { content: ''; position: absolute; z-index: -1; inset: -12vh -14vw -10vh -8vw; pointer-events: none;
  background: radial-gradient(ellipse 55% 55% at 40% 48%, rgba(8,7,6,.72) 0%, rgba(8,7,6,.45) 50%, rgba(8,7,6,0) 100%); }
.replay-intro p:last-child { text-shadow: 0 1px 18px rgba(8,7,6,.9); }