:root {
  --bg: #0f0c25;
  --bg-2: #161131;
  --bg-3: #221a47;
  --line: #37295a;
  --ink: #fbf3e8;
  --ink-2: #cdc0da;
  --ink-3: #9485ad;
  --accent: #ffcf4a;
  --ember: #f58a4c;
  --plate: #ffffff;
  --head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, Consolas, monospace;
  --pixel: "Pixelify Sans", "DM Mono", monospace;
  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 44px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--accent); color: #111; padding: 10px 14px; border-radius: 6px; }
.skip:focus { top: 12px; }

.bar { position: fixed; inset: 14px 0 auto 0; z-index: 30; display: flex; justify-content: center; pointer-events: none; }
.glass {
  pointer-events: auto; position: relative; isolation: isolate; display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -10px 18px -12px rgba(255, 255, 255, 0.2), 0 16px 40px -16px rgba(0, 0, 0, 0.75);
  animation: glass-in 0.8s var(--ease) 0.15s both;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: rgba(32, 37, 48, 0.92); } }
.glass::before {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 58%) no-repeat;
  background-size: 250% 100%; background-position: 160% 0;
  animation: glass-sheen 7s ease-in-out 2s infinite;
}
.glass-blob {
  position: absolute; z-index: 0; left: 0; top: 6px; bottom: 6px; width: 70px; border-radius: 999px; will-change: transform, width;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 16px -8px rgba(0, 0, 0, 0.6);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.glass a { position: relative; z-index: 1; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.78); text-decoration: none; transition: color 0.2s; }
.glass a:hover, .glass a.on { color: #fff; }
.lang { position: relative; z-index: 1; display: flex; gap: 2px; margin-left: 4px; padding: 4px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font: 500 12px/1 var(--sans); color: rgba(255, 255, 255, 0.6); transition: background-color 0.2s; }
.lang:hover { background: rgba(255, 255, 255, 0.16); }
.lang span { padding: 7px 8px; border-radius: 999px; transition: background-color 0.2s, color 0.2s; }
.lang span.on { background: rgba(255, 255, 255, 0.9); color: #1b1436; }
.motion { position: relative; z-index: 1; width: 38px; height: 38px; margin-left: 2px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.8); font: 400 10px/1 var(--mono); transition: background-color 0.2s, color 0.2s; }
.motion:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: grid; place-items: center; padding: 110px var(--gut) 90px;
  background:
    radial-gradient(120% 80% at 50% 112%, #4a2456 0%, rgba(74, 36, 86, 0) 62%),
    linear-gradient(180deg, #0b0920 0%, #140f31 58%, #1c1440 100%);
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(180deg, rgba(22, 17, 49, 0), var(--bg-2)); pointer-events: none; }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.floaters { position: absolute; inset: 0; pointer-events: none; }
.fl { position: absolute; left: var(--x); top: var(--y); width: var(--w); will-change: transform; animation: fl-in 1.25s var(--spring) var(--delay) both; }
.fl img { width: 100%; height: auto; animation: bob var(--dur) ease-in-out calc(var(--delay) * -6) infinite; }

.hero-center { position: relative; z-index: 2; width: min(100%, 940px); text-align: center; will-change: transform, opacity; }
.kicker { font-size: clamp(15px, 1.5vw, 19px); color: var(--ink-2); animation: rise 0.8s var(--ease) 0.9s both; }
.title { position: relative; margin: 26px auto 0; width: min(100%, 900px); animation: title-in 1s var(--spring) 0.25s both; }
#logo { display: block; width: 100%; height: auto; image-rendering: pixelated; transform: perspective(900px) rotateX(16deg); transform-origin: 50% 100%; animation: title-float 6s ease-in-out 1.3s infinite; }
.splash {
  position: absolute; right: -1%; bottom: -4%; transform-origin: 50% 50%; rotate: -16deg;
  font: 600 clamp(14px, 2.2vw, 25px)/1 var(--pixel); color: var(--accent); white-space: nowrap;
  text-shadow: 2px 2px 0 #3f3500;
  animation: splash-in 0.5s var(--spring) 1.3s both, splash-pulse 0.62s ease-in-out 1.8s infinite alternate;
}
.sub { margin-top: clamp(20px, 3.4vw, 40px); display: flex; justify-content: center; gap: clamp(8px, 2.2vw, 30px); font: 500 clamp(20px, 3.6vw, 44px)/1 var(--pixel); color: var(--ink); }
.sub span { display: inline-block; animation: letter-in 0.6s var(--spring) both; }
.sub span:nth-child(1) { animation-delay: 1.00s; } .sub span:nth-child(2) { animation-delay: 1.06s; } .sub span:nth-child(3) { animation-delay: 1.12s; }
.sub span:nth-child(4) { animation-delay: 1.18s; } .sub span:nth-child(5) { animation-delay: 1.24s; } .sub span:nth-child(6) { animation-delay: 1.30s; }
.sub span:nth-child(7) { animation-delay: 1.36s; } .sub span:nth-child(8) { animation-delay: 1.42s; } .sub span:nth-child(9) { animation-delay: 1.48s; }
.hero-cta { margin-top: clamp(28px, 4vw, 44px); display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; animation: rise 0.8s var(--ease) 1.6s both; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 14px 22px;
  border: 1px solid #4a3a78; border-radius: 12px; background: rgba(34, 26, 71, 0.85);
  font-weight: 500; text-decoration: none; color: var(--ink);
  transition: transform 0.2s var(--spring), border-color 0.2s, background-color 0.2s;
}
.btn:hover { transform: translateY(-3px); border-color: var(--ink-2); }
.btn-main { background: var(--accent); border-color: var(--accent); color: #17130a; }
.btn-main:hover { background: #ffe07a; border-color: #ffe07a; }

.work { position: relative; background: var(--bg-2); scroll-margin-top: -76px; }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 84px 0 26px; overflow: hidden; }
.pin > .wrap { width: 100%; }
.hand { flex: none; display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: clamp(4px, 1.4vh, 16px); opacity: 0; translate: 0 16px; visibility: hidden; transition: opacity 0.45s var(--ease), translate 0.45s var(--ease), visibility 0s 0.45s; }
.hand p { font-size: 14px; color: var(--ink-2); }
.work.hand-on .hand { opacity: 1; translate: 0 0; visibility: visible; transition-delay: 0s; }
h2 { margin-top: 14px; font: 700 clamp(36px, 5.4vw, 68px)/1 var(--head); letter-spacing: -0.02em; }
.arrow { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid #4a3a78; border-radius: 10px; background: var(--bg-3); transition: transform 0.2s var(--spring), border-color 0.2s, background-color 0.2s; }
.arrow:hover { transform: scale(1.08); border-color: var(--accent); }
.arrow:active { transform: scale(0.94); }
.arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.arc {
  --card: min(max(34vw, min(74vw, 300px)), 500px, calc(100vh - 290px));
  position: relative; flex: none; margin-top: clamp(18px, 3.4vh, 48px); height: calc(var(--card) + 78px);
  perspective: 1500px; perspective-origin: 50% 46%;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.arc.dragging { cursor: grabbing; }
.arc-track { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 45%; }
.card { position: absolute; left: 50%; top: 10px; width: var(--card); margin-left: calc(var(--card) / -2); will-change: transform; }
.card button { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: inherit; }
.card .shot { display: block; position: relative; aspect-ratio: 1; background: var(--plate); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.9); transition: box-shadow 0.3s; }
.card .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.card.is-center .shot { box-shadow: 0 0 0 3px var(--accent), 0 30px 50px -30px rgba(0, 0, 0, 0.9); }
.card .cap { display: flex; align-items: baseline; gap: 10px; padding: 14px 4px 0; }
.card .no { font: 400 13px/1 var(--mono); color: var(--accent); }
.card .name { font: 500 16px/1.25 var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .set { margin-left: auto; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.card:not(.is-center) .name { color: var(--ink-2); }

.contact {
  position: relative; overflow: hidden; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #161131 0%, #261a48 34%, #55275a 60%, #a8473f 80%, #ee9c4a 100%);
}
.scene { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.contact-in { position: relative; z-index: 2; width: 100%; padding-block: clamp(64px, 9vw, 120px); padding-left: calc(var(--gut) + clamp(190px, 30vw, 470px)); }
.lean { position: relative; }
.lean h2 { transform-origin: 100% 100%; will-change: transform; }
.contact h2 { max-width: 13ch; }
[data-reveal="words"] { opacity: 1; transform: none; }
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.w > span { display: inline-block; transform: translateY(112%) rotate(7deg); transform-origin: 0 100%; transition: transform 0.9s var(--spring); transition-delay: calc(var(--i) * 75ms); }
[data-reveal="words"].in .w > span { transform: none; }
.lede { margin-top: 20px; max-width: 46ch; font-size: clamp(16px, 1.5vw, 18px); color: var(--ink-2); }
.contact-row { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.handle { position: relative; overflow: hidden; display: flex; align-items: baseline; gap: 14px; padding: 15px 20px; border: 1px solid #4a3a78; border-radius: 12px; background: var(--bg-3); }
.handle-label { font-size: 14px; color: var(--ink-3); }
.handle-name { position: relative; display: inline-block; font: 600 24px/1 var(--pixel); white-space: nowrap; }
.handle-name .ghost { visibility: hidden; padding-right: 0.7em; }
.handle-name .typed { position: absolute; left: 0; top: 0; }
.caret { display: inline-block; width: 0.55em; height: 0.13em; margin-left: 0.12em; background: var(--accent); animation: blink 0.9s steps(1) infinite; }
.copy { border-radius: 12px; }
.px { position: fixed; z-index: 80; pointer-events: none; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 20px var(--gut); border-top: 1px solid var(--line); color: var(--ink-3); font: 400 12px/1.5 var(--mono); }
.foot a { text-decoration: none; } .foot a:hover { color: var(--ink); }

.pl-rig, .pl-body, .pl-joint, .pl-box { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.pl-rig { transform: rotateX(-7deg) rotateY(20deg); }
.pl-body { transform-origin: 0 calc(var(--u) * 32); }
.pl-face { position: absolute; left: 0; top: 0; background-image: var(--skin); background-size: calc(var(--u) * 64) calc(var(--u) * 64); background-repeat: no-repeat; image-rendering: pixelated; backface-visibility: hidden; }
.pl-right, .pl-left { filter: brightness(0.8); } .pl-back { filter: brightness(0.7); } .pl-bottom { filter: brightness(0.6); } .pl-top { filter: brightness(1.08); }
.pl-lid { position: absolute; opacity: 0; background: linear-gradient(#edc3a1 55%, #c2977a 55%); }

.sitter { --u: clamp(7px, 0.95vw, 14px); position: absolute; z-index: 1; right: calc(100% + var(--u) * 17.5); top: calc(50% - var(--u) * 14); width: 0; height: 0; perspective: 1400px; pointer-events: none; }
.sit-rig { transform: rotateX(-12deg) rotateY(30deg); }
.sh-face { position: absolute; left: 0; top: 0; backface-visibility: hidden; background-color: #a47a45; }
.sh-plank .sh-top { background-color: #c39a5f; background-image: repeating-linear-gradient(0deg, rgba(60, 36, 12, 0.34) 0 calc(var(--u) * 0.3), rgba(0, 0, 0, 0) calc(var(--u) * 0.3) calc(var(--u) * 3.6)), repeating-linear-gradient(90deg, rgba(60, 36, 12, 0.2) 0 calc(var(--u) * 0.3), rgba(0, 0, 0, 0) calc(var(--u) * 0.3) calc(var(--u) * 12)); }
.sh-plank .sh-front { background-color: #9c723f; background-image: repeating-linear-gradient(90deg, rgba(50, 30, 10, 0.3) 0 calc(var(--u) * 0.3), rgba(0, 0, 0, 0) calc(var(--u) * 0.3) calc(var(--u) * 12)); }
.sh-plank .sh-left, .sh-plank .sh-right { background-color: #84602f; }
.sh-plank .sh-bottom, .sh-plank .sh-back { background-color: #6b4c24; }
.sh-bracket .sh-face { background-color: #4a3419; }
.sh-bracket .sh-front { background-color: #5c4222; }

[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
.arc { opacity: 0; transition: opacity 0.9s var(--ease) 0.15s; }
.arc.in { opacity: 1; }

.viewer { width: min(980px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #4a3a78; border-radius: 16px; overflow: hidden; background: var(--bg-2); color: var(--ink); }
.viewer[open] { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr); animation: pop 0.35s var(--spring); }
.viewer::backdrop { background: rgba(8, 6, 22, 0.84); }
.v-stage { background: var(--plate); display: grid; place-items: center; }
.v-stage img { width: 100%; max-height: calc(100dvh - 34px); object-fit: contain; aspect-ratio: 1; }
.v-side { display: flex; flex-direction: column; padding: 28px 26px 22px; }
.v-no { font: 400 12px/1 var(--mono); letter-spacing: 0.08em; color: var(--accent); }
.v-side h3 { margin-top: 14px; font: 700 clamp(26px, 3vw, 38px)/1.05 var(--head); letter-spacing: -0.015em; }
.v-set { margin-top: 8px; color: var(--ink-2); }
.v-cubes { margin-top: 18px; color: var(--ink-2); }
.v-nav { margin-top: auto; padding-top: 24px; display: flex; gap: 8px; }
.v-nav button { min-width: 46px; height: 46px; padding: 0 14px; background: var(--bg-3); border: 1px solid #4a3a78; border-radius: 10px; transition: border-color 0.15s; }
.v-nav button:hover { border-color: var(--accent); }
.v-nav .v-close { margin-left: auto; background: var(--accent); border-color: var(--accent); color: #17130a; font-weight: 500; }

@keyframes rise { from { opacity: 0; translate: 0 22px; } }
@keyframes title-in { 0% { opacity: 0; scale: 1.5; translate: 0 -60px; } 60% { opacity: 1; } 100% { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes title-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }
@keyframes splash-in { from { opacity: 0; scale: 0; } }
@keyframes splash-pulse { from { scale: 1; } to { scale: 1.1; } }
@keyframes letter-in { from { opacity: 0; translate: 0 26px; rotate: 12deg; } }
@keyframes fl-in { from { opacity: 0; scale: 0.2; translate: calc(var(--side, 1) * 26vw) 12vh; rotate: 40deg; } }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 calc(var(--amp) * -1); rotate: var(--rot); } }
@keyframes glass-sheen { 0%, 60% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
@keyframes glass-in { from { transform: translateY(-170%); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pop { from { opacity: 0; scale: 0.92; } }

html.still *, html.still *::before, html.still *::after { animation: none !important; transition: none !important; }
html.still [data-reveal], html.still .arc { opacity: 1; transform: none; }
html.still .w > span { transform: none; }
html.still { scroll-behavior: auto; }

@media (max-width: 760px) {
  .glass a { padding: 10px 11px; }
  .lang span { padding: 7px 6px; }
  .fl-sm { display: none; }
  .contact-in { padding-left: var(--gut); }
  .lean { padding-top: 204px; }
  .sitter { --u: 6.5px; right: auto; left: calc(var(--u) * 16.5); top: 6px; }
  .hero { padding-top: 96px; }
  .viewer[open] { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .v-stage img { max-height: 52dvh; }
  .card .set { display: none; }
}
