@font-face {
  font-family: Manrope;
  src: url('assets/fonts/manrope-latin-variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --edge: clamp(24px, 4vw, 64px);
  --panel-width: clamp(440px, 34vw, 520px);
  --panel-gap: clamp(12px, 1.2vw, 20px);
  --panel-radius: 26px;
  --panel-padding: clamp(32px, 3vw, 48px);
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --duration-entrance: 1000ms;
  --delay-entrance: 250ms;
  --stagger-entrance: 75ms;
  --distance-entrance: 400px;
  --delay-footer-links: 1050ms;
  --stagger-footer-link: 60ms;
  --duration-interaction: 400ms;
  --duration-scene: var(--duration-interaction);
  --duration-hover: 150ms;
  --duration-panel: var(--duration-interaction);
  --ease-interaction: cubic-bezier(.45, 0, .55, 1);
  --ease-soft: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-snap: cubic-bezier(0.175, 0.885, 0.32, 1.1);
  font-family: Manrope, sans-serif;
  font-synthesis: none;
  background: var(--background);
  color: var(--foreground);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, h1, h2, h3, p { margin: 0; }
button { border: 0; background: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--foreground); outline-offset: 8px; }
.has-pointer-focus:focus-visible { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; padding: 14px 20px; background: var(--foreground); color: var(--background); z-index: 10; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.site-shell { overflow: clip; min-height: 100svh; display: flex; flex-direction: column; }
.site-header { position: absolute; inset: 0 0 auto; height: 96px; z-index: 20; pointer-events: none; }
.site-header button { pointer-events: auto; }
.main { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 160px 0 24px; }
.scene { width: 100%; outline: none; }
/* One tight sticker cluster. Each layer owns exactly one kind of motion. */
.constellation {
  --logo-size: clamp(190px, 18vw, 280px);
  --step: calc(var(--logo-size) * .77);
  position: relative;
  width: min(100%, 1200px);
  height: 460px;
  margin: 0 auto;
  isolation: isolate;
}
.project {
  --x: 0px;
  --y: 0px;
  --scale: 1;
  --motion-order: var(--arrival-order, 0);
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--logo-size);
  height: var(--logo-size);
  transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(var(--scale));
  transition: transform var(--duration-scene) var(--ease-interaction), opacity 160ms ease;
}
.project--mocki { --size-ratio: 1.15; --angle: -3deg; z-index: 5; }
.project--epchil { --x: calc(var(--step) * -2); --y: -16px; --angle: -12deg; z-index: 2; }
.project--ustozshop { --x: calc(var(--step) * -1); --y: -36px; --angle: 7deg; z-index: 3; }
.project--chiq { --x: var(--step); --y: 30px; --angle: -8deg; z-index: 4; }
.project--joys { --x: calc(var(--step) * 2); --y: 4px; --angle: 11deg; z-index: 1; }
.about-portrait {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--logo-size);
  height: var(--logo-size);
  pointer-events: none;
  opacity: 0;
  transform: translate(calc(-50% + var(--selected-x, 0px)), calc(-50% + var(--selected-y, 0px) + 18px)) scale(calc(var(--selected-scale, 1) * .86));
  transition: opacity var(--duration-scene) var(--ease-interaction), transform var(--duration-scene) var(--ease-interaction);
}
.about-portrait img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 12%; opacity: 0; transition: opacity 180ms ease; }
.about-portrait img.is-active { opacity: 1; }
body.has-panel.has-about .about-portrait {
  opacity: 1;
  transform: translate(calc(-50% + var(--selected-x)), calc(-50% + var(--selected-y))) scale(var(--selected-scale));
}
@media (max-width: 919px) {
  body.has-panel.has-about .about-portrait { transform: translate(calc(-50% + var(--selected-x) + var(--carousel-drag, 0px)), calc(-50% + var(--selected-y))) scale(var(--selected-scale)); }
  body.has-panel .is-carousel-dragging .about-portrait { transition: none; }
}
.project-entrance { width: 100%; height: 100%; opacity: 0; }
.is-ready .project-entrance {
  --arrival: calc(var(--delay-entrance) + var(--motion-order) * var(--stagger-entrance));
  opacity: 1;
  animation: arrive var(--duration-entrance) var(--ease-soft) var(--arrival) backwards,
    entrance-fade 300ms var(--ease-soft) var(--arrival) backwards;
}
.project-drag { width: 100%; height: 100%; }
.scene:has(.is-sticker-playing) { position: relative; z-index: 21; }
.project.is-sticker-held { z-index: 22; }
.project.is-sticker-returning { z-index: 21; }
.is-sticker-held .project-drag, .is-sticker-returning .project-drag { will-change: transform; }
.project-button {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 4px;
  transform: scale(var(--size-ratio, 1));
  touch-action: manipulation;
  transition: transform var(--duration-hover) var(--ease-soft);
}
.project-art { display: block; width: 100%; height: 100%; transform: rotate(var(--angle)); transition: transform var(--duration-hover) var(--ease-soft); }
.project-target { position: absolute; inset: 4%; border-radius: 50%; pointer-events: auto; }
.project-button:disabled .project-target { pointer-events: none; }
.project-image { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.project-label {
  position: absolute;
  bottom: calc(100% + 24px);
  left: 50%;
  z-index: 2;
  display: block;
  padding: 9px 20px;
  border: 1px solid var(--label-line);
  border-radius: 999px;
  background: var(--label-background);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .012);
  white-space: nowrap;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--foreground);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 120ms ease, transform 150ms var(--ease-soft);
}
@media (min-width: 920px) and (hover: hover) and (pointer: fine) {
  .project-button:hover .project-label { opacity: 1; transform: translate(-50%, 0); }
}
@media (min-width: 920px) {
  .project-button:focus-visible:not(.has-pointer-focus) .project-label { opacity: 1; transform: translate(-50%, 0); }
}
@media (min-width: 920px) and (hover: hover) and (pointer: fine) {
  .project:not(.is-selected):not(.is-returning-home) .project-button:hover .project-art { transform: rotate(var(--angle)) scale(1.04); }
}
@media (min-width: 920px) {
  .project:not(.is-selected):not(.is-returning-home) .project-button:focus-visible:not(.has-pointer-focus) .project-art { transform: rotate(var(--angle)) scale(1.04); }
}
.site-footer { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 24px var(--edge) 32px; transition: opacity 160ms ease; }
.identity { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.wordmark { display: block; width: calc(var(--wordmark-ratio) * 1em); height: 1em; font-size: 30px; line-height: 1; }
.wordmark-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.identity p { color: var(--muted); font-size: 11px; line-height: 1.8; }
.footer-nav { display: flex; align-items: center; align-self: center; gap: 22px; }
.identity, .footer-nav .text-link { opacity: 0; }
.site-shell.is-ready .identity {
  opacity: 1;
  animation: wordmark-reveal 650ms var(--ease-soft) 850ms backwards;
}
.site-shell.is-ready .footer-nav .text-link {
  opacity: 1;
  animation: entrance-fade 300ms var(--ease-soft) calc(var(--delay-footer-links) + var(--footer-order, 0) * var(--stagger-footer-link)) backwards;
}
.footer-nav .text-link:nth-child(2) { --footer-order: 1; }
.footer-nav .text-link:nth-child(3) { --footer-order: 2; }
.footer-nav .text-link:nth-child(4) { --footer-order: 3; }
/* Keep link targets stationary; keyboard focus is always visible immediately. */
.site-shell .footer-nav .text-link:focus-visible { opacity: 1 !important; }
.desktop-break { display: none; }
.text-link { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; color: var(--muted); font-size: 12px; transition: color 180ms; }
.text-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 7px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease-soft); }
.text-link:hover, .text-link:focus-visible { color: var(--foreground); }
.text-link:hover::after { transform: scaleX(1); }
.external-icon { width: 12px; height: 12px; }

/* Scene placement, float, hover and press each own a transform layer. */
.project.is-selected { opacity: 1; }
/* Keep the cluster's stacking order throughout the round trip. Raising the
   selected logo makes overlapping edges pop when its return layer is removed. */
.project.is-returning-home { opacity: 1; }
.is-panel-motion .project { transition-duration: var(--duration-scene); }
.is-panel-motion .project-art { transition: transform var(--duration-scene) var(--ease-interaction); }
.is-returning-home .project-label { opacity: 0; }
body.has-panel:not(.has-project) .project { opacity: 0; transition-property: none; }
/* Restore the cluster only after the portrait has completely faded out. */
body.is-about-closing .project { opacity: 0; visibility: hidden; transition-property: none; }
@media (min-width: 920px) {
  body.has-panel.has-project .project:not(.is-selected) {
    --x: calc(var(--selected-x) + var(--detail-offset) * var(--detail-step));
    --y: var(--selected-y);
    --scale: var(--neighbor-scale);
    opacity: .18;
  }
}
@media (max-width: 919px) {
  body.has-panel.has-project .project:not(.is-selected) {
    --x: calc(var(--selected-x) + var(--carousel-offset) * var(--carousel-step) + var(--carousel-drag, 0px));
    --y: var(--selected-y);
    --scale: var(--neighbor-scale);
    opacity: 0;
  }
  body.has-panel.has-project .project.is-carousel-neighbor { opacity: .22; }
  body.has-panel.has-project .project.is-selected { --x: calc(var(--selected-x) + var(--carousel-drag, 0px)); }
  body.has-panel .is-carousel-dragging .project { transition: none; }
}
body.has-panel { overflow: hidden; }
body.has-panel .project.is-selected { --x: var(--selected-x); --y: var(--selected-y); --scale: var(--selected-scale); opacity: 1; }
body.has-panel .project-button { transform: scale(var(--size-ratio, 1)); }
body.has-panel .project.is-selected .project-art { transform: rotate(0deg); }
body.has-panel .site-footer { opacity: 0; transition: none; }
body.has-panel .project-label { opacity: 0; }
.page-hidden .project-entrance, .page-hidden .identity, .page-hidden .footer-nav .text-link { animation-play-state: paused; }

/* The modal owns the focus boundary; the visible surface is only its right
   column (desktop) or the sheet after the native scroll spacer (mobile). */
.detail-panel {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--foreground);
  background: transparent;
  overflow: hidden;
  overflow-anchor: none;
  outline: none;
}
.detail-panel.is-closing { display: block; z-index: 30; pointer-events: none; }
.detail-panel::backdrop { background: transparent; }
.sheet-spacer { display: none; }
.sheet-viewport { display: contents; }
.panel-surface {
  position: absolute;
  z-index: 1;
  inset: var(--panel-gap) var(--panel-gap) var(--panel-gap) auto;
  display: flex;
  flex-direction: column;
  width: var(--panel-width);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  contain: layout paint;
  will-change: opacity;
  opacity: 0;
  transition: opacity var(--duration-panel) var(--ease-interaction);
}
.is-visible .panel-surface { opacity: 1; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--control); transition: background 180ms, color 180ms, transform 200ms var(--ease-snap); }
.icon-button:hover { background: var(--control-hover); color: var(--foreground); }
.icon-button:active { transform: scale(.9); }
.icon-button svg { width: 20px; height: 20px; }
.close-button { position: absolute; z-index: 2; top: 16px; right: 16px; border-color: transparent; }
.panel-scroll { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent; }
.panel-content { display: flex; flex-direction: column; min-height: 100%; padding: clamp(56px, 7vh, 72px) var(--panel-padding) var(--panel-padding); }
#panel-title { padding-right: 12px; font-size: clamp(44px, 3.6vw, 56px); font-weight: 400; letter-spacing: -2px; line-height: 1.15; overflow-wrap: anywhere; }
.project-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; line-height: 1.5; color: var(--status-text); border: 1px solid var(--status-line); border-radius: 8px; padding: 4px 8px; }
.project-status::before { content: ''; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.panel-description { margin-top: 24px; color: var(--body-text); font-size: clamp(19px, 1.4vw, 21px); line-height: 1.65; }
.about-copy { margin-bottom: 36px; }
.about-copy p + p { margin-top: 1.25em; }
.about-copy strong { color: var(--foreground); font-weight: 600; }
.about-copy em { font-style: italic; font-synthesis: style; }
.has-biography .close-button { background: var(--background); }
.panel-meta { margin: 48px 0 24px; font-size: 14px; line-height: 1.6; }
.panel-meta-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-block: 20px; }
.panel-meta-row + .panel-meta-row { border-top: 1px solid var(--line); }
.panel-meta dt { color: var(--muted); }
.panel-meta dd { margin: 0; max-width: 66%; text-align: right; overflow-wrap: anywhere; }
.project-details { display: grid; gap: 12px; margin: 0 0 36px; padding: 0; list-style: none; color: var(--detail-text); font-size: 15px; line-height: 1.7; }
.project-details:empty { display: none; }
.project-details li { position: relative; padding-left: 18px; }
.project-details li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); position: absolute; top: .8em; left: 0; }
.visit-link { margin-top: auto; display: flex; min-height: 58px; flex-shrink: 0; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); font-size: 14px; transition: color 180ms; }
.visit-link svg { width: 19px; height: 19px; transition: transform 250ms var(--ease-soft); }
.visit-link:hover svg { transform: translate(3px, -3px); }
.project-navigation { position: fixed; left: calc((100% - var(--panel-width) - var(--panel-gap)) * .545); bottom: 40px; display: flex; align-items: center; gap: 0; padding: 2px 6px; border: 1px solid var(--line); border-radius: 40px; background: var(--panel-raised); opacity: 0; transform: translate(-50%, 12px); transition: opacity 160ms ease, transform var(--duration-panel) var(--ease-interaction); pointer-events: none; }
.is-visible .project-navigation { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.project-navigation .icon-button { width: 44px; height: 44px; border: 0; }
.photo-position { min-width: 48px; text-align: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.noscript-message { padding: 24px; line-height: 1.8; }
.noscript-message a { text-decoration: underline; }

@keyframes arrive {
  from { transform: translate3d(0, var(--distance-entrance), 0) scale(.5) rotate(calc(var(--angle) * -1)); }
  to { transform: translate3d(0, 0, 0) scale(1) rotate(0); }
}
@keyframes entrance-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes wordmark-reveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 919px) {
  :root { --edge: 28px; }

  .main { padding: 88px 0 0; }
  /* Two aligned pairs, then Mocki centered below. The shared row/column
     rhythm keeps the five stickers close without covering their targets. */
  .constellation {
    --logo-size: clamp(112px, 38vw, 176px);
    --column-step: calc(var(--logo-size) * .55);
    --row-step: calc(var(--logo-size) * .94);
    width: min(100%, 440px);
    height: calc(var(--logo-size) * 2.9 + 24px);
  }
  .project { --angle: 0deg; }
  .project-button {
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
    transform: scale(var(--size-ratio, 1)) rotate(var(--drag-angle, 0deg)) scale(var(--drag-scale, 1));
    transition-duration: 100ms;
  }
  .project--epchil { --x: calc(-1 * var(--column-step)); --y: calc(-1 * var(--row-step)); --motion-order: 0; }
  .project--ustozshop { --x: var(--column-step); --y: calc(-1 * var(--row-step)); --motion-order: 1; }
  .project--chiq { --x: calc(-1 * var(--column-step)); --y: 0px; --size-ratio: .94; --motion-order: 2; }
  .project--joys { --x: var(--column-step); --y: 0px; --motion-order: 3; }
  .project--mocki { --x: 0px; --y: var(--row-step); --motion-order: 4; }
  .project-label { display: none; }
  .site-footer { padding: 24px var(--edge) 28px; }
  .identity { gap: 12px; }
  .wordmark { font-size: 26px; }
  .footer-nav { gap: 20px; }
  .detail-panel { --sheet-peek: 70svh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .detail-panel::-webkit-scrollbar { display: none; }
  .sheet-spacer { display: block; height: var(--sheet-peek); touch-action: pan-y pinch-zoom; }
  /* Keep the fading sheet inside the native scroller's layout box. */
  .sheet-viewport { display: flow-root; contain: paint; }
  .panel-surface { position: relative; inset: auto; width: calc(100% - 12px); min-height: calc(100svh - 12px); margin: 0 6px 6px; border-radius: 22px; background: var(--panel-sheet); backdrop-filter: none; }
  .panel-scroll { flex: none; overflow: visible; }
  .panel-content { max-width: 660px; margin-inline: auto; padding: 30px 30px max(40px, env(safe-area-inset-bottom)); }
  .close-button { top: 18px; right: 16px; }
  .has-biography .close-button { position: sticky; top: 16px; align-self: flex-end; margin: 16px 16px -64px 0; }
  #panel-title { padding-right: 42px; font-size: 38px; }
  .panel-description { margin-top: 20px; font-size: clamp(17px, 4.6vw, 20px); }
  .project-navigation { position: absolute; top: calc(var(--sheet-peek) - 64px); bottom: auto; left: 50%; }
  .detail-panel .sound-toggle { z-index: 0; }
  .detail-panel.covers-sound > .sound-toggle { visibility: hidden; }

}

@media (max-width: 540px) {
  .identity p { font-size: 11px; }
  .text-link { font-size: 12px; }
}
@media (max-width: 340px) {
  :root { --edge: 20px; }
}
@media (min-width: 920px) and (max-height: 740px) {
  .constellation { --logo-size: clamp(174px, 17vw, 234px); height: 350px; }
  .main { padding-top: 48px; padding-bottom: 0; }
  .site-footer { padding-top: 18px; padding-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 120ms !important; transition-delay: 0ms !important; }
  .project, .project-art, .panel-surface { will-change: auto; }
  .project-entrance, .project-art, .project-target, .project-button, .project-label, .panel-surface, .panel-content { transform: none !important; }
  .project-label { transform: translateX(-50%) !important; }
  .project, .about-portrait { transition-property: opacity; }
  .is-ready .project-entrance { animation: entrance-fade 120ms linear backwards !important; }
  .site-shell.is-ready .identity, .site-shell.is-ready .footer-nav .text-link { animation: entrance-fade 120ms linear backwards !important; transform: none !important; }
}

.sound-toggle { visibility: visible; position: fixed; z-index: 5; top: max(8px, env(safe-area-inset-top)); left: max(8px, env(safe-area-inset-left)); width: 48px; height: 48px; display: grid; place-items: center; color: var(--muted); transition: color 180ms, transform 180ms var(--ease-snap); }
.sound-toggle svg { width: 28px; height: 28px; }
.sound-toggle:hover { color: var(--foreground); }
.sound-toggle:active { transform: scale(.85); }
.sound-toggle .sound-slash, .sound-toggle[data-muted="true"] .sound-waves { display: none; }
.sound-toggle[data-muted="true"] .sound-slash { display: block; }
