/* =========================================================================
   Home page
   ========================================================================= */

/* ---------- hero ---------- */
.hero{
  position: relative; isolation: isolate; overflow-x: clip;
  min-height: min(calc(100svh - var(--header-h)), 860px);
  display: grid; align-items: center; padding-block: var(--s-8) var(--s-9);
}
/* a soft red light behind the video, mixed in OKLCH so it fades without going grey */
.hero::before{
  content: ""; position: absolute; z-index: -1; inset: -10% -20% auto auto; width: 70%; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(closest-side in oklch, oklch(0.63 0.205 27 / 0.22), oklch(0.63 0.205 27 / 0));
}
.hero-grid{ display: grid; grid-template-columns: minmax(0, 4.6fr) minmax(0, 7.4fr); gap: var(--s-7); align-items: center; }
.hero-copy{ display: grid; gap: var(--s-5); justify-items: start; }
.status{ display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--text-2); }
.status i{ width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 oklch(0.78 0.17 150 / 0.5); animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse{ 70%, 100%{ box-shadow: 0 0 0 7px oklch(0.78 0.17 150 / 0); } }
.hero h1{ font-size: clamp(2.125rem, 1.2rem + 2.5vw, 3.375rem); letter-spacing: -0.03em; }
.hero h1 .accent{ color: var(--accent); }
.hero .lede{ font-size: var(--t-lg); color: var(--text-2); max-width: 46ch; }
.hero .lede b{ color: var(--text); font-weight: 600; }
.cta-row{ display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
@media (max-width: 960px){
  .hero{ min-height: 0; padding-block: var(--s-7) var(--s-8); }
  .hero-grid{ grid-template-columns: 1fr; gap: var(--s-7); }
}
@media (max-width: 420px){ .cta-row .btn{ flex: 1 1 100%; } }

/* ---------- the ROKO bricks ----------
   Each letter is a brick seen slightly from above: a lit top edge, two studs,
   a darker band along the bottom for its side, and a soft contact shadow. */
.bricks{ display: flex; gap: 0.12em; font-size: clamp(44px, 3.4vw + 18px, 68px); margin-bottom: 4px; }
.brick{
  --c: oklch(0.6 0.2 27); --c-top: oklch(0.7 0.18 27); --c-side: oklch(0.46 0.16 27); --ink: oklch(0.99 0 0);
  position: relative; display: grid; place-items: center; width: 1em; height: 0.92em; margin-top: 0.16em;
  border-radius: 0.14em; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  font-weight: 800; font-size: 1em; line-height: 1; color: var(--ink);
  background: linear-gradient(180deg in oklch, var(--c-top), var(--c) 42%);
  box-shadow: inset 0 0.03em 0 oklch(1 0 0 / 0.35), inset 0 -0.1em 0 var(--c-side), 0 0.16em 0.3em -0.08em oklch(0 0 0 / 0.6);
  transform-origin: 50% 100%;
}
.brick span{ font-size: 0.58em; letter-spacing: -0.02em; transform: translateY(-0.04em); text-shadow: 0 0.03em 0 oklch(0 0 0 / 0.2); }
.brick::before, .brick::after{
  content: ""; position: absolute; top: -0.13em; width: 0.28em; height: 0.17em; border-radius: 0.06em 0.06em 0.04em 0.04em;
  background: linear-gradient(180deg in oklch, var(--c-top), var(--c));
  box-shadow: inset 0 0.02em 0 oklch(1 0 0 / 0.4), inset 0 -0.035em 0 var(--c-side);
}
.brick::before{ left: 0.17em; } .brick::after{ right: 0.17em; }
.brick.w{ --c: oklch(0.93 0.005 25); --c-top: oklch(0.99 0 0); --c-side: oklch(0.78 0.01 25); --ink: oklch(0.2 0.01 25); }
.brick.k{ --c: oklch(0.28 0.008 25); --c-top: oklch(0.36 0.008 25); --c-side: oklch(0.2 0.008 25); }
.brick:nth-child(1){ rotate: -3deg; } .brick:nth-child(2){ rotate: 2deg; } .brick:nth-child(3){ rotate: -1.5deg; } .brick:nth-child(4){ rotate: 3deg; }

/* on load each brick falls in an arc, squashes as it lands and settles */
.js .brick{ animation: drop 820ms var(--ease-out) both; animation-delay: calc(120ms + var(--i) * 90ms); }
@keyframes drop{
  0%  { opacity: 0; transform: translate(-0.7em, -2.2em) rotate(-24deg) scale(0.92, 1.08); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  45% { opacity: 1; transform: translate(-0.1em, -0.15em) rotate(-4deg) scale(0.94, 1.08); animation-timing-function: cubic-bezier(.2, .8, .3, 1); }
  58% { transform: translate(0, 0) rotate(0) scale(1.14, 0.84); }
  76% { transform: translate(0, -0.08em) scale(0.97, 1.03); }
  100%{ transform: none; }
}
/* a click winds up, jumps and lands with a squash */
.brick.hop{ animation: hop 620ms both; }
@keyframes hop{
  0%  { transform: none; animation-timing-function: var(--ease-out); }
  16% { transform: scale(1.12, 0.86); animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
  48% { transform: translateY(-0.55em) rotate(var(--spin, 8deg)) scale(0.92, 1.1); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  74% { transform: scale(1.12, 0.86); animation-timing-function: var(--ease-out); }
  88% { transform: translateY(-0.05em) scale(0.98, 1.02); }
  100%{ transform: none; }
}

/* ---------- the Studio window with footage: the biggest thing on the page ---------- */
.window{
  --pad: 6px;
  position: relative; border-radius: var(--r-xl); padding: var(--pad); background: var(--surface-1);
  box-shadow: var(--highlight), inset 0 0 0 1px var(--border), var(--shadow-3);
}
.window-bar{ display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 10px 4px; }
.dots{ display: flex; gap: 6px; }
.dots i{ width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.file{ font: 500 var(--t-xs)/1 var(--mono); color: var(--text-3); }
.file b{ color: var(--text-2); font-weight: 500; }
.screen{
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: oklch(0.1 0.004 25);
  border-radius: calc(var(--r-xl) - var(--pad));
}
.screen video{ width: 100%; height: 100%; object-fit: cover; transition: opacity var(--d-3) ease, filter var(--d-3) ease; }
.screen.swapping video{ opacity: 0.2; filter: blur(6px); }
.tabs{
  --pad: 4px;
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: var(--pad);
  padding: var(--pad); border-radius: calc(var(--r-xl) - 6px); background: var(--bg); box-shadow: inset 0 0 0 1px var(--border);
}
.tabs .pill{
  position: absolute; z-index: 0; top: var(--pad); bottom: var(--pad); left: 0; width: 0; border-radius: calc(var(--r-xl) - 6px - var(--pad));
  background: var(--surface-3); box-shadow: var(--highlight), var(--shadow-1);
  transition: transform var(--d-3) var(--ease-spring), width var(--d-3) var(--ease-out);
}
.tabs button{
  position: relative; z-index: 1; min-height: 44px; border-radius: calc(var(--r-xl) - 6px - var(--pad));
  font-size: var(--t-sm); font-weight: 600; color: var(--text-3); transition: color var(--d-2) ease;
  overflow: hidden;
}
.tabs button:hover{ color: var(--text-2); }
.tabs button[aria-selected="true"]{ color: var(--text); }
/* how far through the clip you are, under the active tab */
.tabs button::after{
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; opacity: 0; transition: opacity var(--d-2) ease;
}
.tabs button[aria-selected="true"]::after{ opacity: 1; }

/* ---------- games ---------- */
.games{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.game{
  --pad: 6px;
  display: grid; gap: 0; padding: var(--pad); border-radius: var(--r-lg); background: var(--surface-1);
  box-shadow: var(--highlight), inset 0 0 0 1px var(--border);
  transition: transform var(--d-3) var(--ease-out), background-color var(--d-2) ease, box-shadow var(--d-3) ease, opacity var(--d-2) ease;
}
.game:hover{ transform: translateY(-3px); background: var(--surface-2); box-shadow: var(--highlight), inset 0 0 0 1px var(--border-strong), var(--shadow-2); }
.game:active{ transform: translateY(-1px) scale(0.985); transition-duration: 80ms; }
.thumb{ aspect-ratio: 16 / 9; border-radius: calc(var(--r-lg) - var(--pad)); }
.thumb img{ width: 100%; height: 100%; object-fit: cover; transition: transform var(--d-4) var(--ease-out), opacity var(--d-3) ease; }
.game:hover .thumb img{ transform: scale(1.04); }
.game-meta{ display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding: 14px 10px 10px; }
.game-meta b{ display: block; color: var(--text); font-weight: 600; line-height: 1.3; }
.game-meta small{ display: block; margin-top: 2px; font-size: var(--t-sm); color: var(--text-3); }
.game-meta .icon{ margin-top: 2px; color: var(--text-3); transition: transform var(--d-2) var(--ease-out), color var(--d-2) ease; }
.game:hover .game-meta .icon{ color: var(--text); transform: translate(2px, -2px); }
/* staging: the card you point at stays bright, the rest step back */
@media (hover: hover){
  .games:has(.game:hover) .game:not(:hover),
  .systems:has(.sys:hover) .sys:not(:hover){ opacity: 0.62; }
}
@media (max-width: 960px){ .games{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px){
  /* a swipe row on phones, with the edges fading out so it reads as scrollable */
  .games{
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--s-3);
    margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 32px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 32px), transparent);
  }
  .games::-webkit-scrollbar{ display: none; }
  .game{ flex: 0 0 78%; scroll-snap-align: start; }
}

/* ---------- systems ---------- */
.sys-top{ display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-6); }
.sys-top .section-head{ margin-bottom: 0; }
.filters{
  --pad: 4px;
  position: relative; display: inline-flex; padding: var(--pad); border-radius: var(--r-md); background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--border); max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.filters::-webkit-scrollbar{ display: none; }
.filters .pill{
  position: absolute; z-index: 0; top: var(--pad); bottom: var(--pad); left: 0; width: 0; border-radius: calc(var(--r-md) - var(--pad));
  background: var(--surface-3); box-shadow: var(--highlight), var(--shadow-1);
  transition: transform var(--d-3) var(--ease-spring), width var(--d-3) var(--ease-out);
}
.filters button{
  position: relative; flex: none; z-index: 1; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border-radius: calc(var(--r-md) - var(--pad)); white-space: nowrap; font-size: var(--t-sm); font-weight: 600; color: var(--text-3); transition: color var(--d-2) ease;
}
.filters button:hover{ color: var(--text-2); }
.filters button[aria-pressed="true"]{ color: var(--text); }
.filters .count{ font-variant-numeric: tabular-nums; font-weight: 500; color: var(--text-3); }

.systems{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.sys .play{ width: 40px; height: 40px; left: 10px; bottom: 10px; }
.sys-body .title{ font-size: var(--t-md); }
.sys-body .desc{ font-size: var(--t-sm); line-height: 1.5; }
.more-wrap{ display: flex; justify-content: center; margin-top: var(--s-6); }
.more-wrap[hidden]{ display: none; }
.more .count{ color: var(--text-3); font-variant-numeric: tabular-nums; }
.more .icon{ transform: rotate(90deg); transition: transform var(--d-2) var(--ease-out); }
.more:hover .icon{ transform: rotate(90deg) translateX(2px); }
@media (max-width: 1080px){ .systems{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sys{
  --pad: 6px;
  position: relative; display: grid; width: 100%; text-align: left; padding: var(--pad); border-radius: var(--r-xl);
  background: var(--surface-1); box-shadow: var(--highlight), inset 0 0 0 1px var(--border);
  transition: transform var(--d-3) var(--ease-out), background-color var(--d-2) ease, box-shadow var(--d-3) ease, opacity var(--d-2) ease;
}
.sys[hidden]{ display: none; }
.sys:hover{ transform: translateY(-3px); background: var(--surface-2); box-shadow: var(--highlight), inset 0 0 0 1px var(--border-strong), var(--shadow-2); }
.sys:active{ transform: translateY(-1px) scale(0.99); transition-duration: 80ms; }
.sys .screen{ border-radius: calc(var(--r-xl) - var(--pad)); }
.sys .screen img, .sys .screen video{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sys .screen video{ opacity: 0; transition: opacity var(--d-3) ease; }
.sys.playing .screen video{ opacity: 1; }
/* darken the bottom of the footage by multiplying, so the play button stays readable on bright frames */
.sys .shade{ position: absolute; inset: 0; background: linear-gradient(180deg in oklch, oklch(1 0 0 / 0) 55%, oklch(0.55 0.02 25 / 1)); mix-blend-mode: multiply; pointer-events: none; }
.play{
  position: absolute; left: 14px; bottom: 14px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: oklch(0.99 0 0 / 0.92); color: oklch(0.18 0.01 25); box-shadow: var(--shadow-2);
  transition: transform var(--d-3) var(--ease-spring), background-color var(--d-2) ease;
}
.play .icon{ width: 18px; height: 18px; fill: currentColor; stroke: none; transform: translateX(1.5px); } /* triangles look off-centre unless nudged right */
.sys:hover .play{ transform: scale(1.1); background: var(--accent); color: var(--on-accent); }
.sys-body{ display: grid; gap: 6px; padding: 16px 12px 12px; }
.sys-body > span{ display: block; }
.sys-body .kind{ font-size: var(--t-sm); color: var(--text-3); }
.sys-body .title{ color: var(--text); font-size: var(--t-lg); font-weight: 650; line-height: 1.3; letter-spacing: -0.012em; text-wrap: balance; }
.sys-body .desc{ color: var(--text-2); text-wrap: pretty; }
.sys.leave{ animation: fadeOut 160ms var(--ease-in-out) forwards; }
.sys.enter{ animation: fadeIn var(--d-4) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes fadeIn{ from{ opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes fadeOut{ to{ opacity: 0; transform: scale(0.98); } }
@media (max-width: 760px){ .systems{ gap: var(--s-3); } .sys-top{ align-items: start; } }
@media (max-width: 560px){
  .sys-body{ padding: 10px 6px 6px; gap: 3px; }
  .sys-body .kind{ font-size: var(--t-xs); }
  .sys-body .title{ font-size: var(--t-sm); line-height: 1.3; }
  .sys-body .desc{ display: none; }
  .sys .play{ width: 32px; height: 32px; left: 8px; bottom: 8px; }
  .sys .play .icon{ width: 14px; height: 14px; }
}
@media (max-width: 440px){
  .filters{ display: flex; width: 100%; }
  .filters button{ flex: 1 1 auto; justify-content: center; padding: 0 10px; gap: 6px; }
}
@media (max-width: 359px){ .filters button{ padding: 0 7px; gap: 4px; font-size: var(--t-xs); } }

/* ---------- reviews: curved carousel ---------- */
.section-head.center{ text-align: center; margin-inline: auto; }
.rv-stage{ position: relative; }
.rv-track{
  --card: clamp(250px, 64vw, 380px);
  display: grid; justify-items: center; column-gap: clamp(14px, 2vw, 28px);
  padding: 40px 0 56px; perspective: 1400px; outline: none; overflow: hidden;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.rv-track:active{ cursor: grabbing; }
.rv-track img{ -webkit-user-drag: none; pointer-events: none; }
.rv{
  grid-area: 1 / 1; width: var(--card); margin: 0;
  /* the red layer peeks out underneath; the card sits on it */
  background: var(--accent); border-radius: var(--r-xl); padding-bottom: 6px;
  transform-origin: 50% 50%; will-change: transform;
  box-shadow: 0 30px 60px -30px oklch(0 0 0 / 0.8);
}
.rv-in{
  display: flex; flex-direction: column; gap: var(--s-5); height: 100%; min-height: clamp(330px, 46vw, 420px);
  padding: clamp(22px, 3vw, 32px); border-radius: calc(var(--r-xl) - 1px);
  background: radial-gradient(120% 80% at 0% 0% in oklch, var(--surface-3), var(--surface-1) 60%);
  box-shadow: var(--highlight), inset 0 0 0 1px var(--border);
}
.rv-mark{ width: 30px; height: 22px; fill: var(--accent); flex: none; }
.rv blockquote{ margin: 0; flex: 1; color: var(--text); font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem); line-height: 1.5; letter-spacing: -0.01em; text-wrap: pretty; }
.rv figcaption{ display: flex; align-items: center; gap: 12px; font-size: var(--t-sm); color: var(--text-3); padding-top: var(--s-4); border-top: 1px solid var(--border); }
.rv figcaption img{ width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 1px var(--border-strong); }
.rv figcaption b{ display: block; color: var(--text); font-weight: 600; font-size: var(--t-md); }
.rv-nav{
  position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; margin-top: -32px;
  border-radius: 50%; color: var(--text); background: oklch(0.2 0.006 25 / 0.7); backdrop-filter: blur(10px);
  box-shadow: var(--highlight), inset 0 0 0 1px var(--border-strong);
  transition: transform var(--d-2) var(--ease-spring), background-color var(--d-2) ease;
}
.rv-nav::before{ content: ""; position: absolute; inset: -8px; } /* bigger hit area */
.rv-nav:hover{ background: var(--surface-3); transform: scale(1.06); }
.rv-nav:active{ transform: scale(0.94); }
.rv-nav.prev{ left: clamp(8px, 3vw, 40px); } .rv-nav.prev .icon{ transform: rotate(180deg); }
.rv-nav.next{ right: clamp(8px, 3vw, 40px); }
@media (max-width: 560px){ .rv-nav{ width: 40px; height: 40px; } .rv-track{ padding-bottom: 40px; } }

/* ---------- process ---------- */
.steps{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); counter-reset: s; }
.step{
  counter-increment: s; display: grid; align-content: start; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-lg);
  background: var(--surface-1); box-shadow: var(--highlight), inset 0 0 0 1px var(--border);
}
.step::before{
  content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-hover); font-weight: 650; font-size: var(--t-sm); font-variant-numeric: tabular-nums;
}
.step h3{ font-size: var(--t-md); line-height: 1.35; letter-spacing: -0.01em; }
.step p{ font-size: var(--t-sm); color: var(--text-2); }
.steps-note{ margin-top: var(--s-5); font-size: var(--t-sm); color: var(--text-3); }
.steps-note a{ color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); transition: color var(--d-2) ease; }
.steps-note a:hover{ color: var(--text); }
@media (max-width: 960px){ .steps{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px){ .steps{ grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact{
  --pad: 8px;
  position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-7);
  padding: var(--s-8); border-radius: 28px; background: var(--surface-1); box-shadow: var(--highlight), inset 0 0 0 1px var(--border);
}
.contact::before{
  content: ""; position: absolute; z-index: -1; inset: -40% -10% auto 40%; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(closest-side in oklch, oklch(0.63 0.205 27 / 0.2), oklch(0.63 0.205 27 / 0));
}
.contact h2{ font-size: var(--t-2xl); margin-bottom: var(--s-3); }
.contact .lead{ font-size: var(--t-lg); margin-bottom: var(--s-6); }
.links{ display: grid; gap: 6px; align-content: center; }
.links a{
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 16px; border-radius: var(--r-md);
  background: var(--surface-2); box-shadow: var(--highlight), inset 0 0 0 1px var(--border); color: var(--text);
  transition: background-color var(--d-2) ease, transform var(--d-2) var(--ease-out);
}
.links a:hover{ background: var(--surface-3); transform: translateX(3px); }
.links a:active{ transform: scale(0.985); }
.links .icon{ color: var(--text-3); }
.links .icon.brand{ width: 18px; height: 18px; color: var(--text-2); transition: color var(--d-2) ease, transform var(--d-2) var(--ease-spring); }
.links a:hover .icon.brand{ color: var(--text); transform: scale(1.08); }
.links a:hover .gmail{ color: oklch(0.63 0.2 27); }
.links span{ flex: 1; font-weight: 600; }
.links small{ font-size: var(--t-sm); color: var(--text-3); font-weight: 400; }
@media (max-width: 860px){ .contact{ grid-template-columns: 1fr; padding: var(--s-6); gap: var(--s-6); } }
@media (max-width: 420px){ .contact{ padding: var(--s-5); border-radius: var(--r-xl); } }

/* ---------- lightbox ---------- */
dialog.lb{
  --pad: 6px;
  width: min(960px, 100% - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: var(--pad); border: 0; border-radius: 24px; overflow: auto;
  background: var(--surface-1); color: var(--text-2); box-shadow: var(--highlight), inset 0 0 0 1px var(--border), var(--shadow-3);
  overscroll-behavior: contain;
}
dialog.lb::backdrop{ background: oklch(0.08 0.004 25 / 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.lb[open]{ animation: lbIn 440ms var(--ease-spring); }
dialog.lb[open]::backdrop{ animation: fade 260ms ease; }
dialog.lb.closing{ animation: lbOut 160ms var(--ease-in-out) forwards; }
dialog.lb.closing::backdrop{ animation: fade 160ms ease reverse forwards; }
@keyframes lbIn{ from{ opacity: 0; transform: translateY(24px) scale(0.94); } }
@keyframes lbOut{ to{ opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes fade{ from{ opacity: 0; } }
.lb .screen{ border-radius: calc(24px - var(--pad)); }
.lb .screen video{ object-fit: contain; background: #000; }
.lb-body{ display: grid; gap: var(--s-4); padding: var(--s-6) var(--s-6) var(--s-5); }
.lb-body h3{ font-size: var(--t-xl); }
.lb-body .kind{ font-size: var(--t-sm); color: var(--text-3); margin-top: -8px; }
.lb-body .lede{ font-size: var(--t-lg); color: var(--text-2); }
.lb-body ul{ margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.lb-body li{ display: flex; gap: 12px; }
.lb-body li .icon{ margin-top: 3px; color: var(--accent-hover); }
.lb details{ border-top: 1px solid var(--border); padding-top: var(--s-4); }
.lb summary{ display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; color: var(--text); }
.lb summary::-webkit-details-marker{ display: none; }
.lb summary .icon{ transition: transform var(--d-3) var(--ease-spring); }
.lb details[open] summary .icon{ transform: rotate(90deg); }
.lb details .dev{ display: grid; gap: var(--s-3); padding-top: var(--s-2); font-size: var(--t-sm); }
.lb-close{
  position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: oklch(0.1 0.004 25 / 0.7); color: var(--text); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background-color var(--d-2) ease, transform var(--d-2) var(--ease-out);
}
.lb-close:hover{ background: oklch(0.1 0.004 25 / 0.9); transform: rotate(90deg); }
.lb-close:active{ transform: rotate(90deg) scale(0.92); }
@media (max-width: 560px){ .lb-body{ padding: var(--s-5) var(--s-4) var(--s-4); } }

@media (prefers-reduced-motion: reduce){
  .js .brick{ animation: none; }
  .status i{ animation: none; }
}
