/* =========================================================
   REV — portfolio
   Index + video wall. Monochrome + violet.
   Geist / Instrument Serif italic / Geist Mono
   ========================================================= */

:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --bg-3: #18181b;
  --fg: #f2f2ef;
  --fg-2: #b9b9b6;
  --muted: #76767a;
  --line: rgba(242, 242, 239, 0.09);
  --line-2: rgba(242, 242, 239, 0.18);
  --violet: #9b5cff;
  --violet-hi: #c3a0ff;
  --violet-glow: rgba(155, 92, 255, 0.35);

  --f-display: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, monospace;
  --f-serif: 'Instrument Serif', Georgia, serif;

  --side: clamp(300px, 25vw, 380px);   /* width of the fixed index panel */
  --gap: 10px;                         /* gap between wall tiles */
  --mbar: 56px;                        /* phone top bar */
  --ease: cubic-bezier(0.65, 0.05, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--violet); color: #0a0a0b; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- scrollbars ---------- */
/* thin square bar, dim violet at rest, full violet on hover/drag */
:root { --sb-thumb: color-mix(in srgb, var(--violet) 42%, var(--bg)); }
html { scrollbar-gutter: stable; }   /* no layout jump when the drawer or player locks scrolling */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--sb-thumb); border: 3px solid var(--bg); min-height: 48px; }
::-webkit-scrollbar-thumb:hover { background: var(--violet); border-width: 2px; }
::-webkit-scrollbar-thumb:active { background: var(--violet-hi); border-width: 2px; }
::-webkit-scrollbar-corner { background: var(--bg); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.info__panel::-webkit-scrollbar-track { background: var(--bg-2); }
.info__panel::-webkit-scrollbar-thumb { border-color: var(--bg-2); }
/* Firefox only (in Chrome these two properties would switch off the styles above) */
@supports (-moz-appearance: none) {
  html { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) var(--bg); }
  .info__panel { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) var(--bg-2); }
}

/* grain */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { background-position: 0 0; }
  25% { background-position: -40px 30px; }
  50% { background-position: 30px -40px; }
  75% { background-position: -15px 40px; }
  100% { background-position: 0 0; }
}

/* ---------- type ---------- */
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
/* serif italic accent: one or two words per headline */
h1 em, h2 em {
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: 1.08em; letter-spacing: -0.01em; color: var(--violet);
  padding-right: 0.04em;
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  height: 50px; padding: 0 20px 0 22px;
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid var(--line-2);
  overflow: hidden; isolation: isolate;
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease);
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--fg); transform: translateY(101%); transition: transform 0.55s var(--ease);
}
.btn:hover { color: var(--bg); border-color: var(--fg); }
.btn:hover::before { transform: translateY(0); }
.btn .arr { width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.5s var(--ease); }
.btn:hover .arr { transform: translateX(4px) rotate(-45deg); }
.btn--violet { background: var(--violet); color: #0a0a0b; border-color: var(--violet); }
.btn--violet::before { background: var(--fg); }
.btn--violet:hover { color: #0a0a0b; }
.btn--sm { height: 40px; padding: 0 14px 0 16px; font-size: 11.5px; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2);
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 var(--violet-glow); } 70% { box-shadow: 0 0 0 9px rgba(155, 92, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(155, 92, 255, 0); } }

/* ---------- page transition ---------- */
.transition {
  position: fixed; inset: 0; z-index: 150; pointer-events: none;
  background: var(--bg-3); transform: translateY(101%); will-change: transform;
}
.transition::before, .transition::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: var(--violet); box-shadow: 0 0 24px 2px var(--violet-glow); }
.transition::before { top: 0; }
.transition::after { bottom: 0; }
.transition img { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; opacity: 0.9; }
.arriving .transition { transform: none; }

/* ---------- cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 180; pointer-events: none; display: none; }
.has-cursor .cursor { display: block; }
.cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; border-radius: 50%; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--violet); }
.cursor__ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid rgba(242, 242, 239, 0.45);
  display: grid; place-items: center;
  transition: width 0.45s var(--ease-out), height 0.45s var(--ease-out), margin 0.45s var(--ease-out), background-color 0.35s, border-color 0.35s;
}
.cursor__label {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; color: #0a0a0b; text-transform: uppercase;
  opacity: 0; transform: scale(0.6); transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.cursor.is-label .cursor__ring { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: var(--violet); border-color: var(--violet); }
.cursor.is-label .cursor__label { opacity: 1; transform: scale(1); }
.cursor.is-label .cursor__dot { opacity: 0; }
.cursor.is-hover .cursor__ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: var(--violet); }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

/* =========================================================
   SIDE PANEL (fixed index on the left)
   ========================================================= */
.side {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 20;
  width: var(--side);
  display: flex; flex-direction: column; gap: 30px;
  padding: 24px 26px 22px;
  background: var(--bg); border-right: 1px solid var(--line);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
}
.side::-webkit-scrollbar { display: none; }
.side__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.side__brand img { width: 92px; height: auto; transition: transform 0.8s var(--ease); }
.side__brand:hover img { transform: rotate(-4deg) scale(1.04); }

.side__title {
  margin: 0;
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(26px, 2.1vw, 34px); line-height: 1.05; letter-spacing: -0.04em;
}
.side__lead { margin: 16px 0 0; color: var(--fg-2); font-size: 15px; line-height: 1.55; }
.side__meta { margin: 16px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.side__meta b { color: var(--fg); font-weight: 500; }

/* the index: filters on the work page, section links on the assets page */
.index { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.index__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line);
  text-align: left; font-size: 15px; line-height: 1.3; color: var(--fg-2);
  transition: color 0.3s, padding 0.5s var(--ease);
}
.index__row .lbl { display: inline-flex; align-items: center; gap: 10px; }
.index__row .lbl::before { content: ''; width: 7px; height: 7px; flex-shrink: 0; background: var(--line-2); transition: background-color 0.3s, transform 0.5s var(--ease); }
.index__row .cnt { font-family: var(--f-mono); font-size: 11px; color: var(--muted); transition: color 0.3s; }
.index__row:hover { color: var(--fg); padding-left: 6px; }
.index__row.is-active { color: var(--fg); }
.index__row.is-active .lbl::before { background: var(--violet); transform: rotate(45deg); }
.index__row.is-active .cnt { color: var(--violet); }

.side__links { display: flex; flex-direction: column; }
.side__links a, .side__links button {
  display: flex; justify-content: space-between; align-items: baseline; width: 100%;
  padding: 5px 0; font-size: 15px; color: var(--fg-2); text-align: left; transition: color 0.3s;
}
.side__links span { font-family: var(--f-mono); font-size: 12px; color: var(--muted); transition: transform 0.5s var(--ease), color 0.3s; }
.side__links a:hover, .side__links button:hover { color: var(--fg); }
.side__links a:hover span, .side__links button:hover span { color: var(--violet); transform: translateX(-4px); }

.side__foot { margin-top: auto; display: grid; gap: 14px; }
.side__cta { width: 100%; justify-content: space-between; }
.side__copy { margin: 0; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10.5px; }

/* phone top bar (hidden on desktop) */
.mbar { display: none; }

/* =========================================================
   VIDEO WALL
   ========================================================= */
.wall { margin-left: var(--side); padding: var(--gap); min-height: 100vh; min-height: 100svh; }

/* reel: black and white at rest, full color on hover (tap on phones) */
.reel { position: relative; aspect-ratio: 16 / 7; margin-bottom: var(--gap); overflow: hidden; background: #050506; }
.reel__clip { position: absolute; inset: 0; overflow: hidden; }
.reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.42) contrast(1.05); transition: filter 0.8s var(--ease); }
.reel:hover video, .reel.is-color video { filter: grayscale(0) brightness(1) contrast(1); }
.reel__clip::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5,5,6,.4), transparent 25%, transparent 70%, rgba(5,5,6,.55)); transition: opacity 0.8s var(--ease); }
.reel:hover .reel__clip::after, .reel.is-color .reel__clip::after { opacity: 0; }
.reel__tag, .reel__hint, .reel__meta {
  position: absolute; z-index: 3; color: #f2f2ef;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}
.reel__tag { left: 18px; top: 16px; display: inline-flex; gap: 10px; align-items: center; }
.reel__tag b { font-weight: 400; color: rgba(242, 242, 239, 0.8); font-variant-numeric: tabular-nums; }
.reel__tag i { width: 7px; height: 7px; background: #ff3b3b; border-radius: 50%; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }
.reel__meta { right: 18px; top: 16px; color: rgba(242, 242, 239, 0.6); }
.reel__hint { left: 18px; bottom: 16px; color: rgba(242, 242, 239, 0.7); transition: opacity 0.6s; }
.reel:hover .reel__hint, .reel.is-color .reel__hint { opacity: 0; }

/* masonry columns are built in JS */
.wall__grid { display: flex; gap: var(--gap); align-items: flex-start; transition: opacity 0.35s var(--ease); }
.wall__grid.is-swapping { opacity: 0; }
.wall__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
/* short filters: rows that fill one screen (row heights and tile widths set in JS) */
.wall__grid.is-fill { flex-direction: column; align-items: stretch; }
.wall__row { display: flex; gap: var(--gap); }
.wall__row .tile { min-width: 0; height: 100%; }
.wall__row .tile__media { aspect-ratio: auto !important; height: 100%; }

.tile { position: relative; display: block; overflow: hidden; background: var(--bg-2); }
.tile__media { position: relative; }
.tile__media img, .tile__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) brightness(0.5) contrast(1.05);
  transition: filter 0.7s var(--ease), transform 1.1s var(--ease);
}
.tile__media video { opacity: 0; }
.tile__media video.is-on { opacity: 1; transition: opacity 0.5s, filter 0.7s var(--ease), transform 1.1s var(--ease); }
.tile:hover .tile__media img, .tile:hover .tile__media video,
.tile:focus-visible .tile__media img, .tile:focus-visible .tile__media video,
.tile.is-lit .tile__media img, .tile.is-lit .tile__media video { filter: none; transform: scale(1.03); }
.tile::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border: 1px solid transparent; transition: border-color 0.4s; }
.tile:hover::after { border-color: var(--violet); }
.tile:focus-visible { outline-offset: -2px; }
.tile__cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  padding: 34px 14px 12px; color: #f2f2ef;
  background: linear-gradient(transparent, rgba(5, 5, 6, 0.82));
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.6s var(--ease);
}
.tile:hover .tile__cap, .tile:focus-visible .tile__cap, .tile.is-lit .tile__cap { opacity: 1; transform: none; }
.tile__t { font-size: 15px; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.tile__c { margin-top: 3px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(242, 242, 239, 0.62); }
.tile__d { font-family: var(--f-mono); font-size: 11px; color: rgba(242, 242, 239, 0.7); font-variant-numeric: tabular-nums; flex-shrink: 0; }

.wall__end { margin: 0; padding: 64px 12px 56px; text-align: center; color: var(--muted); font-size: 15px; }
.wall__end a { color: var(--fg); border-bottom: 1px solid var(--violet); padding-bottom: 2px; transition: color 0.3s; }
.wall__end a:hover { color: var(--violet); }

/* =========================================================
   INFO DRAWER
   ========================================================= */
.info { position: fixed; inset: 0; z-index: 160; visibility: hidden; transition: visibility 0s linear 0.7s; }
.info.is-open { visibility: visible; transition: none; }
.info__scrim { position: absolute; inset: 0; background: rgba(5, 5, 6, 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.6s var(--ease); }
.info.is-open .info__scrim { opacity: 1; }
.info__panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(600px, 100vw);
  padding: 20px 34px 44px; background: var(--bg-2); border-right: 1px solid var(--line-2);
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-102%); transition: transform 0.7s var(--ease);
}
.info.is-open .info__panel { transform: none; }
.info__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.info__bar .mono { color: var(--muted); }
.info__close { width: 44px; height: 44px; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background-color 0.3s, border-color 0.3s, transform 0.5s var(--ease); }
.info__close:hover { background: var(--violet); border-color: var(--violet); color: #0a0a0b; transform: rotate(90deg); }
.info__close svg { width: 18px; height: 18px; }
.info__img { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.info__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; filter: grayscale(1) contrast(1.08); transition: filter 1s var(--ease); }
.info__img:hover img { filter: none; }
.info__title { margin: 28px 0 16px; font-family: var(--f-display); font-weight: 600; font-size: clamp(28px, 3vw, 38px); line-height: 1.05; letter-spacing: -0.04em; }
.info__panel p { margin: 0 0 14px; color: var(--fg-2); font-size: 16px; }
.info__h { margin: 36px 0 12px; color: var(--muted); font-weight: 400; font-size: 11px; }

.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.svc-list button {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 18px; width: 100%;
  padding: 14px 0; border-bottom: 1px solid var(--line); text-align: left;
}
.svc-list b { font-family: var(--f-display); font-weight: 600; font-size: 19px; letter-spacing: -0.03em; line-height: 1.2; transition: color 0.3s; }
.svc-list span { grid-column: 1; color: var(--fg-2); font-size: 14px; line-height: 1.45; }
.svc-list i { grid-column: 2; grid-row: 1 / 3; align-self: center; font-style: normal; font-family: var(--f-mono); color: var(--muted); transition: transform 0.5s var(--ease), color 0.3s; }
.svc-list button:hover b { color: var(--violet); }
.svc-list button:hover i { color: var(--violet); transform: translateX(4px); }

.tools { display: flex; gap: 10px; flex-wrap: wrap; }
.tool { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); background: var(--bg); font-size: 14px; }
.tool b { display: grid; place-items: center; width: 28px; height: 28px; font-family: var(--f-mono); font-size: 11px; font-weight: 500; background: var(--bg-3); color: var(--fg); }
.tool b.v { background: var(--violet); color: #0a0a0b; }
.info__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.info__sig { width: 120px; margin-top: 44px; opacity: 0.85; }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lb {
  position: fixed; inset: 0; z-index: 170; display: grid; grid-template-rows: auto 1fr auto;
  background: rgba(6, 6, 7, 0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  visibility: hidden; opacity: 0; transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s;
  color: #f2f2ef;
}
.lb.is-open { visibility: visible; opacity: 1; transition: opacity 0.45s var(--ease); }
.lb__bar { display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(16px, 3vw, 40px); gap: 20px; }
.lb__count { font-family: var(--f-mono); font-size: 12px; color: #8a8a8e; letter-spacing: 0.08em; }
.lb__count b { color: #f2f2ef; font-weight: 500; }
.lb__close { width: 48px; height: 48px; border: 1px solid rgba(242, 242, 239, 0.2); display: grid; place-items: center; transition: background-color 0.3s, transform 0.5s var(--ease); }
.lb__close:hover { background: var(--violet); border-color: var(--violet); color: #0a0a0b; transform: rotate(90deg); }
.lb__close svg { width: 18px; height: 18px; }
/* sound: every video opens muted; this turns it on */
.lb__acts { display: flex; align-items: center; gap: 10px; }
.lb__sound { height: 48px; padding: 0 16px 0 14px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid rgba(242, 242, 239, 0.2); font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #f2f2ef; transition: background-color 0.3s, border-color 0.3s, color 0.3s; }
.lb__sound svg { width: 18px; height: 18px; flex: none; }
.lb__sound .ico-on, .lb__sound.is-on .ico-off { display: none; }
.lb__sound.is-on .ico-on { display: block; }
.lb__sound:hover:not(:disabled) { border-color: var(--violet); }
.lb__sound.is-on { background: var(--violet); border-color: var(--violet); color: #0a0a0b; }
.lb__sound:disabled { opacity: 0.4; cursor: default; }
.lb__stage { position: relative; display: grid; place-items: center; padding: 0 calc(clamp(16px, 3vw, 40px) + 64px); min-height: 0; }
.lb__video { max-width: 100%; max-height: calc(100vh - 210px); max-height: calc(100svh - 210px); width: auto; height: auto; background: #000; outline: none; }
.lb__nav { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; border: 1px solid rgba(242, 242, 239, 0.2); display: grid; place-items: center; transition: background-color 0.3s, border-color 0.3s; }
.lb__nav:hover { background: var(--violet); border-color: var(--violet); color: #0a0a0b; }
.lb__nav svg { width: 18px; height: 18px; }
.lb__prev { left: clamp(16px, 3vw, 40px); }
.lb__prev svg { transform: rotate(180deg); }
.lb__next { right: clamp(16px, 3vw, 40px); }
.lb__info { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 18px clamp(16px, 3vw, 40px) 22px; flex-wrap: wrap; }
.lb__title { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.04em; font-size: clamp(24px, 3vw, 40px); line-height: 1.05; }
.lb__sub { margin-top: 8px; color: #8a8a8e; }
.lb__links { display: flex; gap: 10px; flex-wrap: wrap; }
.lb .btn { border-color: rgba(242, 242, 239, 0.25); }
.lb .btn--violet { border-color: var(--violet); }
.lb .btn::before { background: #f2f2ef; }
.lb .btn:hover { color: #0a0a0b; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 190; transform: translate(-50%, calc(100% + 40px)); visibility: hidden;
  background: var(--violet); color: #0a0a0b; padding: 12px 18px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  transition: transform 0.6s var(--ease);
}
.toast.is-on { transform: translate(-50%, 0); visibility: visible; }

/* =========================================================
   ASSETS PAGE (content column next to the index)
   ========================================================= */
.content { margin-left: var(--side); padding: 0 clamp(18px, 3vw, 44px); }
.asec { padding: clamp(40px, 5vw, 72px) 0; border-top: 1px solid var(--line); scroll-margin-top: 10px; }
.asec:first-child { border-top: 0; padding-top: 26px; }
.asec__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px 32px; margin-bottom: 26px; flex-wrap: wrap; }
.asec__head h2 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.05; letter-spacing: -0.04em; }
.asec__head p { margin: 0; max-width: 48ch; color: var(--fg-2); font-size: 15px; }
.asec--end { padding-bottom: 80px; }
.asec--end p { margin: 0; color: var(--fg-2); font-size: 17px; }
.asec--end a { color: var(--fg); border-bottom: 1px solid var(--violet); padding-bottom: 2px; }
.asec--end a:hover { color: var(--violet); }

.logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.logo-card { border: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; }
.logo-card__stage {
  position: relative; aspect-ratio: 1 / 0.82; display: grid; place-items: center; padding: 16%;
  background: radial-gradient(closest-side, rgba(242,242,239,0.05), transparent) #0a0a0b; transition: background-color 0.5s var(--ease);
}
.logo-card__stage[data-bg='light'] { background: #f2f2ef; }
.logo-card__stage img { width: 100%; height: auto; max-height: 100%; object-fit: contain; transition: transform 0.8s var(--ease); }
.logo-card:hover .logo-card__stage img { transform: scale(1.05); }
.logo-card__body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.logo-card__body h3 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 22px; letter-spacing: -0.03em; line-height: 1.1; }
.logo-card__body p { margin: 0; color: var(--fg-2); font-size: 14.5px; }
.seg { display: inline-flex; align-self: flex-start; border: 1px solid var(--line-2); }
.seg button { height: 34px; padding: 0 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-2); display: inline-flex; align-items: center; gap: 8px; }
.seg button i { width: 10px; height: 10px; border: 1px solid var(--line-2); }
.seg button.is-on { background: var(--fg); color: var(--bg); }
.dl-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.swatch { border: 1px solid var(--line); background: var(--bg-2); text-align: left; display: flex; flex-direction: column; transition: transform 0.5s var(--ease); }
.swatch:hover { transform: translateY(-6px); }
.swatch__chip { aspect-ratio: 1 / 1.05; position: relative; }
.swatch__chip::after { content: 'Click to copy'; position: absolute; left: 12px; bottom: 12px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0; transition: opacity 0.3s; }
.swatch:hover .swatch__chip::after { opacity: 0.75; }
.swatch__body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.swatch__body b { font-weight: 500; font-size: 15px; }
.swatch__body span { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }

.type { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.type__card { border: 1px solid var(--line); background: var(--bg-2); padding: 24px 22px; display: flex; flex-direction: column; gap: 18px; min-height: 270px; }
.type__sample { font-size: 60px; line-height: 1; }
.type__card p { margin: 0; color: var(--fg-2); font-size: 14.5px; }
.type__card .row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; gap: 12px; flex-wrap: wrap; }

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rules__col { border: 1px solid var(--line); background: var(--bg-2); padding: 26px 24px; }
.rules__col h3 { margin: 0 0 18px; display: flex; align-items: center; gap: 12px; font-family: var(--f-display); font-weight: 600; font-size: 24px; letter-spacing: -0.03em; }
.rules__col h3 i { width: 28px; height: 28px; display: grid; place-items: center; font-style: normal; font-family: var(--f-mono); font-size: 14px; }
.rules__col.do h3 i { background: var(--violet); color: #0a0a0b; }
.rules__col.dont h3 i { border: 1px solid var(--line-2); }
.rules__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.rules__col li { position: relative; padding-left: 24px; color: var(--fg-2); }
.rules__col li::before { content: ''; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; background: var(--line-2); }
.rules__col.do li::before { background: var(--violet); }

/* ---------- reveal defaults (JS adds motion) ---------- */
.js [data-reveal] { opacity: 0; }
.js.reduced [data-reveal] { opacity: 1; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1360px) {
  .logos { grid-template-columns: 1fr 1fr; }
  .swatches { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1180px) {
  .type { grid-template-columns: 1fr; }
  .type__card { min-height: 0; }
  .rules { grid-template-columns: 1fr; }
}

/* phones + small tablets: the panel stacks above the wall */
@media (max-width: 999px) {
  body { padding-top: var(--mbar); }
  .mbar {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--mbar); padding: 0 16px;
    background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .mbar__brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 600; font-size: 18px; letter-spacing: -0.03em; }
  .mbar__brand img { width: 26px; height: 26px; }
  .mbar__links { display: flex; gap: 6px; }
  .mbar__links a, .mbar__links button {
    height: 36px; padding: 0 12px; display: inline-flex; align-items: center; border: 1px solid var(--line-2);
    font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-2);
  }

  .side { position: static; width: auto; border-right: 0; overflow: visible; padding: 26px 16px 18px; gap: 22px; }
  .side__brand, .side__links, .side__copy { display: none; }
  .side__top { justify-content: flex-start; }
  .side__title { font-size: clamp(30px, 8.4vw, 44px); max-width: 16ch; }
  .side__lead { max-width: 52ch; }

  /* index becomes a swipeable row of chips */
  .index { flex-direction: row; gap: 8px; border: 0; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .index::-webkit-scrollbar { display: none; }
  .index__row { width: auto; flex: 0 0 auto; gap: 8px; padding: 9px 12px; border: 1px solid var(--line-2); font-size: 14px; white-space: nowrap; }
  .index__row:hover { padding-left: 12px; }
  .index__row .lbl::before { display: none; }
  .index__row.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
  .index__row.is-active .cnt { color: var(--violet); }

  .side__foot { margin-top: 0; }
  .wall { margin-left: 0; padding: 0 8px 8px; --gap: 8px; }
  .reel { aspect-ratio: 16 / 10; }
  .content { margin-left: 0; padding: 0 16px; }
  .asec { scroll-margin-top: calc(var(--mbar) + 10px); }
  .asec:first-child { border-top: 1px solid var(--line); padding-top: 40px; }

  .lb__stage { padding: 0 16px; }
  .lb__nav { top: auto; bottom: -64px; }
  .lb__info { padding-top: 80px; }
}
@media (max-width: 620px) {
  .logos { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: 1fr 1fr; }
  .reel__meta { display: none; }
  .tile__cap { padding: 26px 10px 9px; }
  .tile__t { font-size: 13px; }
  .tile__d { display: none; }
  .info__panel { padding: 16px 18px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
