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.

20.8 KB
Raw Blame
:root {
  /* Theme channels are driven by the sun (main.js writes them every frame). */
  --ink-rgb: 17 17 16;
  --paper-rgb: 236 235 230;
  --accent-rgb: 232 140 44;
  --ink: rgb(var(--ink-rgb));
  --ink-2: rgb(var(--ink-rgb) / .72);
  --ink-3: rgb(var(--ink-rgb) / .5);
  --line: rgb(var(--ink-rgb) / .16);
  --accent: rgb(var(--accent-rgb));
  --sans: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'IBM Plex Serif', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --pad: clamp(16px, 3.4vw, 56px);
  --gut: clamp(12px, 1.6vw, 24px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: #ecebe6; color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html.lenis, html.lenis body { height: auto; }
body { font: 400 16px/1.55 var(--sans); overflow-x: hidden; background: transparent; }
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 300; letter-spacing: -.01em; }
.mono { font-family: var(--mono); font-size: 11px; line-height: 1.5; letter-spacing: .06em; text-transform: uppercase; font-weight: 400; }
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; touch-action: pan-y; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); padding: 0 var(--pad); }

/* ─── Loader ─────────────────────────────────────────────── */
.loader { position: fixed; inset: 0; z-index: 100; background: #070a13; color: #d9dbe2; display: grid; place-content: center; justify-items: center; gap: 22px; }
.loader-dial { width: 240px; overflow: visible; }
.loader-arc { fill: none; stroke: rgba(217,219,226,.28); stroke-width: 1; stroke-dasharray: 2 4; }
.loader-horizon { stroke: rgba(217,219,226,.5); stroke-width: 1; }
.loader-ticks line { stroke: rgba(217,219,226,.45); stroke-width: 1; }
.loader-sun { fill: #ffb45c; filter: drop-shadow(0 0 8px rgba(255,170,80,.9)); }
.loader-line { display: flex; gap: 16px; align-items: baseline; font: 300 22px/1 var(--sans); letter-spacing: -.01em; }
.loader-pct { font: 400 12px/1 var(--mono); letter-spacing: .08em; color: #ffb45c; font-variant-numeric: tabular-nums; }
.loader-meta { color: rgba(217,219,226,.45); }

/* ─── 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(--pad); pointer-events: none; color: var(--ink); }
.nav > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; font: 600 15px/1 var(--sans); letter-spacing: -.01em; justify-self: start; }
.brand-mark { width: 9px; height: 22px; background: var(--ink); display: block; box-shadow: 4px 0 0 -1px rgb(var(--accent-rgb) / .0); transition: box-shadow .4s; }
.brand:hover .brand-mark { box-shadow: 5px 0 0 0 var(--accent); }
.links { display: flex; gap: clamp(18px, 2.4vw, 40px); }
.links a { font: 500 13px/1 var(--sans); color: var(--ink-2); display: inline-flex; gap: 8px; align-items: baseline; transition: color .3s; }
.links a .mono { font-size: 9.5px; color: var(--ink-3); }
.links a:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 12px; height: 44px; padding: 0 20px; border-radius: 0; font: 500 13px/1 var(--sans);
  letter-spacing: .005em; white-space: nowrap; transition: background .35s, color .35s, box-shadow .35s; }
.nav .btn { justify-self: end; }
.btn-line { box-shadow: inset 0 0 0 1px rgb(var(--ink-rgb) / .35); color: var(--ink); }
.btn-line:hover { box-shadow: inset 0 0 0 1px var(--ink); background: rgb(var(--ink-rgb) / .06); }
.btn-solid { background: var(--accent); color: #140d05; }
.btn-solid:hover { background: rgb(var(--ink-rgb)); color: rgb(var(--paper-rgb)); }

/* ─── Sun tag & HUD ──────────────────────────────────────── */
.sun-tag { position: fixed; left: 0; top: 0; z-index: 12; pointer-events: none; display: flex; align-items: center; gap: 10px;
  transform: translate3d(-999px, 0, 0); will-change: transform; color: var(--ink); opacity: 0; transition: opacity .6s; }
.sun-tag.on { opacity: 1; }
.sun-tag-time { font: 500 11px/1 var(--mono); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.sun-tag-hint { font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; color: #140d05; background: var(--accent);
  transition: opacity .5s, transform .5s; }
.has-dragged .sun-tag-hint { opacity: 0; transform: translateX(-6px); }
.sun-tag::before { content: ''; width: 22px; height: 1px; background: var(--ink); opacity: .5; }
.sun-tag.flip { flex-direction: row-reverse; }

.hud { position: fixed; left: var(--pad); right: calc(var(--pad) + 150px); bottom: 22px; z-index: 12; display: flex; align-items: flex-end; gap: clamp(20px, 3vw, 48px);
  pointer-events: none; color: var(--ink); }
.hud-read { min-width: 190px; }
.hud-time { font: 300 clamp(40px, 4.4vw, 64px)/.9 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hud-meta { display: flex; gap: 14px; margin-top: 10px; color: var(--ink-2); font-size: 10px; }
.hud-meta b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.hud-phase { color: var(--accent); }
.play { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px 0 10px; margin-bottom: 4px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgb(var(--ink-rgb) / .3); transition: box-shadow .3s, background .3s; flex: none; }
.play:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.play svg { width: 14px; height: 14px; fill: var(--accent); }
.play .i-pause { display: none; } .play.on .i-pause { display: block; } .play.on .i-play { display: none; }
.play .mono { font-size: 9.5px; }
.hud-time { transform-origin: 0 100%; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.hud-compact .hud-time { transform: scale(.52); margin-top: -.9em; }
.hud-compact .hud-read { min-width: 150px; }
.daybar { position: relative; flex: 1; max-width: 620px; height: 44px; pointer-events: auto; cursor: ew-resize; touch-action: none; outline: none; }
.daybar-sky { position: absolute; left: 0; right: 0; bottom: 18px; height: 4px; background: linear-gradient(90deg, #0b1222, #e1a794 5%, #ecebe6 16%, #ecebe6 70%, #f2cc98 84%, #cf846f 89%, #1f2b4d 93%, #04060c);
  box-shadow: 0 0 0 1px rgb(var(--ink-rgb) / .15); }
.daybar-ticks { position: absolute; inset: 0; }
.daybar-ticks span { position: absolute; bottom: 0; transform: translateX(-50%); font: 400 9.5px/1 var(--mono); letter-spacing: .04em; color: var(--ink-3); }
.daybar-ticks i { position: absolute; bottom: 24px; width: 1px; height: 5px; background: var(--ink-3); }
.daybar-ticks i.major { height: 9px; background: var(--ink-2); }
.daybar-ticks .ev { color: var(--accent); bottom: 32px; }
.daybar-knob { position: absolute; bottom: 12px; left: 0; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / .22), 0 0 18px rgb(var(--accent-rgb) / .7); }
.daybar-knob i { position: absolute; left: 50%; bottom: 16px; width: 1px; height: 14px; background: var(--ink-2); }
.daybar:focus-visible .daybar-knob { box-shadow: 0 0 0 2px rgb(var(--paper-rgb)), 0 0 0 4px var(--ink); }

/* ─── Hero ───────────────────────────────────────────────── */
main { position: relative; z-index: 2; pointer-events: none; }
main a, main button, main .work, main .daybar, main img { pointer-events: auto; }
section, footer { position: relative; }
.hero { height: 118vh; }
.hero .grid { position: sticky; top: 0; height: 100vh; align-content: start; padding-top: 96px; }
.hero-meta { grid-row: 1; color: var(--ink-2); }
.col-a { grid-column: 1 / span 3; } .col-b { grid-column: 4 / span 3; }
.hero-title, h2, .r-num, .stats b, .foot-mark { text-shadow: var(--type-shadow, none); }
.hero-title { grid-column: 1 / span 8; grid-row: 2; margin-top: clamp(34px, 7.5vh, 90px); font: 500 clamp(52px, 7.9vw, 146px)/.9 var(--sans); letter-spacing: -.055em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero-title .line > span { display: block; }
.hero-title em { font-weight: 300; letter-spacing: -.035em; color: var(--ink); }
.hero-sub { grid-column: 1 / span 4; grid-row: 3; margin-top: clamp(22px, 4vh, 40px); max-width: 30em; font: 400 clamp(15px, 1.1vw, 17px)/1.5 var(--sans); color: var(--ink-2); }
.scroll-cue { position: absolute; right: var(--pad); top: 96px; display: flex; align-items: center; gap: 10px; color: var(--ink-3); }
.scroll-cue i { width: 1px; height: 28px; background: currentColor; transform-origin: top; animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ─── Section heads ──────────────────────────────────────── */
.sec-head { grid-column: 1 / span 6; }
.sec-num { color: var(--ink-2); display: flex; gap: 10px; align-items: center; }
.sec-num::before { content: ''; width: 8px; height: 8px; background: var(--accent); }
h2 { font: 500 clamp(38px, 4.6vw, 80px)/.96 var(--sans); letter-spacing: -.045em; margin-top: 22px; }
h2 em { font-weight: 300; }
h3 { font: 500 clamp(24px, 2.1vw, 34px)/1.04 var(--sans); letter-spacing: -.03em; }

/* ─── Works ──────────────────────────────────────────────── */
.works { padding: 22vh 0 26vh; }
.works .sec-head { grid-column: 1 / span 6; }
.work-list { grid-column: 1 / span 7; list-style: none; margin-top: 8vh; border-top: 1px solid var(--line); }
.work { display: grid; grid-template-columns: 44px 1.35fr 1fr 1.25fr 52px; gap: 14px; align-items: baseline; padding: 20px 0 19px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: opacity .4s, padding .5s cubic-bezier(.2,.8,.2,1); }
.w-num, .w-year { color: var(--ink-3); }
.w-year { text-align: right; }
.w-name { font: 500 clamp(19px, 1.6vw, 26px)/1.1 var(--sans); letter-spacing: -.025em; }
.w-place { color: var(--ink-2); font-size: 14px; }
.w-light { color: var(--ink-3); font-size: 9.5px; }
.work-list:hover .work { opacity: .35; }
.work-list .work:hover { opacity: 1; padding-left: 14px; }
.work:hover .w-light { color: var(--accent); }
.wl-b { display: none; } .work[data-self]:hover .wl-a { display: none; } .work[data-self]:hover .wl-b { display: inline; }
.works-note { grid-column: 1 / span 7; margin-top: 18px; color: var(--ink-3); }
.work-reveal { position: fixed; left: 0; top: 0; z-index: 14; width: clamp(220px, 19vw, 320px); aspect-ratio: 4 / 5; pointer-events: none; will-change: transform; }
.work-reveal-in { position: absolute; inset: 0; background-size: cover; background-position: center; clip-path: inset(50% 50% 50% 50%);
  transform: scale(1.12); transition: clip-path .6s cubic-bezier(.2,.8,.2,1), transform 1.1s cubic-bezier(.2,.8,.2,1); box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }
.work-reveal.on .work-reveal-in { clip-path: inset(0 0 0 0); transform: scale(1); }
.work-reveal figcaption { position: absolute; left: 0; top: calc(100% + 10px); color: var(--ink); white-space: nowrap; opacity: 0; transform: translateY(-6px); transition: opacity .4s, transform .5s; }
.work-reveal.on figcaption { opacity: 1; transform: none; transition-delay: .15s; }

/* ─── Cliff case study ───────────────────────────────────── */
.cliff-intro { padding: 16vh 0 10vh; min-height: 100vh; }
.cliff-intro .sec-head { grid-column: 1 / span 6; }
.facts { grid-column: 1 / span 5; grid-row: 2; margin-top: 7vh; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.facts dt { color: var(--ink-3); }
.facts dd { font-size: 15px; }
.step { min-height: 150vh; position: relative; }
.step-card { position: sticky; top: 24vh; width: min(420px, calc(100vw - 2 * var(--pad))); margin-left: var(--pad); padding: 30px 30px 32px;
  background: rgb(var(--paper-rgb) / .72); backdrop-filter: blur(14px) saturate(1.1); -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: inset 0 0 0 1px var(--line); }
.step-section .step-card { margin-left: auto; margin-right: var(--pad); }
.step-num { color: var(--accent); }
.step-card h3 { margin: 16px 0 14px; }
.step-card p { color: var(--ink-2); font-size: 15px; }
.step-card .step-note { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 10px; }

/* anchors projected from 3D */
.anchors { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.tag { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; color: var(--ink); opacity: 0; transition: opacity .5s; will-change: transform; white-space: nowrap; }
.tag.on { opacity: 1; }
.tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .25); flex: none; }
.tag i { display: block; width: 26px; height: 1px; background: var(--ink); opacity: .45; }
.tag span { font: 500 10.5px/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 5px 7px; background: rgb(var(--paper-rgb) / .75); backdrop-filter: blur(6px); }
.tag span b { color: var(--accent); font-weight: 500; margin-right: 6px; }
.level { position: absolute; left: 0; top: 0; height: 1px; display: flex; align-items: center; opacity: 0; transition: opacity .5s; will-change: transform, width; }
.level.on { opacity: 1; }
.level::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 10px); opacity: .45; }
.level span { position: absolute; right: 0; bottom: 4px; font: 500 10.5px/1 var(--mono); letter-spacing: .05em; white-space: nowrap; color: var(--ink); padding: 4px 7px 3px 4px; margin-left: -4px; background: rgb(var(--paper-rgb) / .82); }
.level span::before { content: '▽ '; color: var(--accent); }

/* ─── Principles ─────────────────────────────────────────── */
.principles { padding: 26vh 0 24vh; }
.principles .sec-head { grid-column: 6 / span 7; }
.rules { grid-column: 6 / span 7; list-style: none; margin-top: 9vh; border-top: 1px solid var(--line); }
.rules li { display: grid; grid-template-columns: clamp(80px, 9vw, 150px) 1fr; gap: 20px; padding: 30px 0 34px; border-bottom: 1px solid var(--line); }
.r-num { font: 300 clamp(56px, 6.2vw, 108px)/.8 var(--sans); letter-spacing: -.06em; color: var(--ink); font-variant-numeric: tabular-nums; }
.rules h3 { margin-bottom: 10px; }
.rules p { color: var(--ink-2); max-width: 32em; font-size: 15.5px; }

/* ─── Studio ─────────────────────────────────────────────── */
.studio { padding: 22vh 0 22vh; }
.studio .sec-head { grid-column: 6 / span 7; }
.studio-lede { grid-column: 6 / span 4; margin-top: 5vh; font: 400 clamp(16px, 1.25vw, 20px)/1.5 var(--sans); color: var(--ink-2); }
.studio-img { grid-column: 10 / span 3; grid-row: 2; margin-top: 5vh; align-self: start; }
.studio-img img { width: 100%; display: block; aspect-ratio: 4 / 5; object-fit: cover; }
.studio-img figcaption { margin-top: 10px; color: var(--ink-3); font-size: 9.5px; }
.stats { grid-column: 6 / span 7; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gut); margin-top: 10vh; border-top: 1px solid var(--line); }
.stats div { padding-top: 22px; }
.stats b { display: block; font: 300 clamp(56px, 6.4vw, 118px)/.8 var(--sans); letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: 16px; color: var(--ink-2); font-size: 10px; }
.awards { grid-column: 6 / span 7; list-style: none; margin-top: 10vh; border-top: 1px solid var(--line); }
.awards li { display: grid; grid-template-columns: 56px 1fr 1.7fr; gap: var(--gut); padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; font-size: 14.5px; }
.awards li span:nth-child(2) { font-weight: 500; }
.awards li span:nth-child(3) { color: var(--ink-2); }
.awards li .mono { color: var(--ink-3); }

/* ─── Contact & footer ───────────────────────────────────── */
.contact { padding: 22vh 0 58vh; }
.contact .sec-num { grid-column: 1 / span 12; }
.contact-title { grid-column: 1 / span 10; font-size: clamp(46px, 7vw, 128px); }
.contact-lede { grid-column: 1 / span 5; margin-top: 4vh; color: var(--ink-2); font-size: clamp(16px, 1.2vw, 19px); }
.contact-cta { grid-column: 1 / span 12; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 5vh; }
.contact-cta .btn { height: 52px; padding: 0 26px; font-size: 14px; }
.foot { padding: 120px 0 118px; background: linear-gradient(rgb(var(--paper-rgb) / 0), rgb(var(--paper-rgb) / .92) 90px, rgb(var(--paper-rgb)) 200px); }
.foot .grid { border-top: 1px solid var(--line); padding-top: 34px; }
.foot .grid { row-gap: 40px; }
.foot-office { grid-column: span 3; display: grid; gap: 8px; color: var(--ink-2); font-size: 14px; }
.foot-office .mono { color: var(--ink-3); }
.foot-office .foot-clock { color: var(--accent); font-variant-numeric: tabular-nums; }
.foot-links { grid-column: 8 / span 5; display: flex; flex-wrap: wrap; gap: 10px 26px; align-content: start; justify-content: flex-end; font-size: 14px; }
.foot-links a { color: var(--ink-2); } .foot-links a:hover { color: var(--ink); }
.foot-mark { grid-column: 1 / span 12; font: 600 clamp(72px, 15.5vw, 290px)/.78 var(--sans); letter-spacing: -.075em; margin-top: 18px; }
.foot-legal { grid-column: 1 / span 12; color: var(--ink-3); }

/* ─── Mobile ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .links { display: none; }
  .nav { grid-template-columns: 1fr auto; padding: 16px var(--pad); }
  .nav .btn { height: 38px; padding: 0 14px; font-size: 12px; }
  .col-a { grid-column: 1 / span 2; } .col-b { grid-column: 3 / span 2; }
  .hero .grid { padding-top: 76px; }
  .hero-title { grid-column: 1 / -1; font-size: clamp(44px, 12.4vw, 80px); margin-top: 28px; }
  .hero-sub { grid-column: 1 / -1; font-size: 14px; max-width: 26em; }
  .scroll-cue { display: none; }
  .sec-head, .works .sec-head, .cliff-intro .sec-head, .principles .sec-head, .studio .sec-head { grid-column: 1 / -1; }
  .work-list, .works-note, .facts, .rules, .studio-lede, .studio-img, .contact-title, .contact-lede, .stats, .awards { grid-column: 1 / -1; }
  .studio-img { grid-row: auto; margin-top: 5vh; }
  .work { grid-template-columns: 30px 1fr auto; row-gap: 4px; }
  .w-place { grid-column: 2; grid-row: 2; font-size: 13px; }
  .w-light { display: none; }
  .w-year { grid-column: 3; grid-row: 1; }
  .rules li { grid-template-columns: 64px 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
  .awards li { grid-template-columns: 48px 1fr; }
  .awards li span:nth-child(3) { grid-column: 2; }
  .foot-office { grid-column: span 2; }
  .foot-links { grid-column: 1 / -1; justify-content: flex-start; }
  .step-card { top: auto; bottom: 120px; position: sticky; margin: 0 var(--pad) !important; width: auto; padding: 20px; }
  .step { display: flex; align-items: flex-end; }
  .step-card p { font-size: 14px; }
  .hud { right: var(--pad); bottom: 60px; gap: 16px; }
  .hud-read { min-width: 0; }
  .hud-time { font-size: 34px; }
  .hud-meta { gap: 8px; font-size: 9px; }
  .hud-meta span:nth-child(3), .hud-shw { display: none; }
  .play .mono { display: none; } .play { padding: 0 10px; height: 30px; }
  .hud-compact .hud-time { transform: scale(.7); }
  .daybar-ticks span:not(.ev) { display: none; }
  .tag span { font-size: 9px; }
  .work-list { background: rgb(var(--paper-rgb) / .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .rules, .stats, .awards, .facts { background: rgb(var(--paper-rgb) / .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .step-card h3 { font-size: 22px; margin: 10px 0 8px; }
  .step-card .step-note { display: none; }
}