/* Robloom — brand gradient design v52 */

:root {
  --bg: #090b12;
  --bg-2: #10131c;
  --bg-3: #171b27;
  --ink: #f5f4f0;
  --ink-2: #a7acbb;
  --ink-3: #667084;
  --gold: #ffe19a;
  --sky: #a8e9ff;
  --violet: #b9a7ff;
  --brand-grad: linear-gradient(135deg, var(--gold) 0%, var(--sky) 48%, var(--violet) 100%);
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(255, 255, 255, 0.16);
  --panel: var(--bg-2);
  --font: 'Figtree', system-ui, sans-serif;
  --display: 'Bebas Neue', var(--font);
  --pad: clamp(1.25rem, 5vw, 3.5rem);
  --max-wide: 1200px;
  --topbar-h: 58px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r: 12px;
  --r-lg: 18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 8px); scrollbar-width: thin; scrollbar-color: #333 transparent; }
body.lab-body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
code { font-family: var(--font); font-size: 0.88em; background: var(--bg-3); padding: 0.1em 0.35em; border-radius: 6px; }

/* Ambient orbs — logo colors */
.lab-ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.lab-orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35;
}
.lab-orb--gold { width: 55vw; height: 55vw; top: -15%; left: -10%; background: var(--gold); opacity: 0.12; }
.lab-orb--sky { width: 45vw; height: 45vw; top: 20%; right: -15%; background: var(--sky); opacity: 0.1; }
.lab-orb--violet { width: 40vw; height: 40vw; bottom: 10%; left: 30%; background: var(--violet); opacity: 0.08; }

.reveal { opacity: 0; translate: 0 28px; scale: 0.98; transition: opacity 0.6s var(--ease), translate 0.6s var(--ease), scale 0.6s var(--ease); }
.reveal.is-in { opacity: 1; translate: 0 0; scale: 1; }

/* Panel */
.lab-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}

/* Topbar */
.lab-topbar {
  position: sticky; top: 0; z-index: 200; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(9, 11, 18, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.lab-brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); }
.lab-brand img { filter: drop-shadow(0 0 12px rgba(255, 225, 154, 0.35)); }
.lab-brand__name {
  font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.04em;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lab-nav { display: flex; align-items: center; gap: 0.1rem; }
.lab-nav__link {
  text-decoration: none; color: var(--ink-2); font-size: 0.82rem; font-weight: 500;
  padding: 0.35rem 0.7rem; border-radius: 8px; transition: color 0.15s, background 0.15s;
}
.lab-nav__link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.lab-nav__btn {
  margin-left: 0.5rem; padding: 0.42rem 1.1rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; color: #10131c; border-radius: 8px;
  background: var(--brand-grad);
  transition: opacity 0.15s, transform 0.1s;
}
.lab-nav__btn:hover { opacity: 0.88; }
.lab-nav__btn:active { transform: scale(0.97); }

/* Buttons */
.lab-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.78rem 1.75rem; border-radius: var(--r); border: none; cursor: pointer;
  font-family: var(--font); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em;
  text-decoration: none; text-transform: uppercase; transition: opacity 0.15s, transform 0.1s;
}
.lab-btn:active { transform: scale(0.97); }
.lab-btn--primary {
  background: var(--brand-grad); color: #10131c;
  box-shadow: 0 4px 24px rgba(168, 233, 255, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.lab-btn--primary:hover { opacity: 0.9; }
.lab-btn--ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--border); text-transform: none; font-weight: 500; letter-spacing: 0; }
.lab-btn--ghost:hover { color: var(--ink); border-color: var(--border-hi); }
.lab-btn--block { width: 100%; }
.lab-btn--sm { padding: 0.52rem 1.15rem; font-size: 0.72rem; }

/* Sections */
.lab-section { position: relative; z-index: 1; max-width: var(--max-wide); margin: 0 auto; padding: 5rem var(--pad); }
.lab-section__head { margin-bottom: 2.5rem; max-width: 520px; }
.lab-section__head--center { text-align: center; max-width: 560px; margin-left: auto; margin-right: auto; }
.lab-heading { font-family: var(--display); font-size: clamp(2.8rem, 5vw, 4.5rem); letter-spacing: 0.03em; line-height: 0.95; margin-bottom: 0.6rem; }
.lab-lead { font-size: 0.95rem; color: var(--ink-2); line-height: 1.7; }

/* Hero */
.lab-hero {
  position: relative; z-index: 1;
  min-height: calc(100dvh - var(--topbar-h));
  display: flex; align-items: center;
  padding: clamp(2.5rem, 6vh, 5rem) var(--pad);
}
.lab-hero__grid {
  width: 100%; max-width: var(--max-wide); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 5vw, 4.5rem);
}
.lab-hero__title { margin-bottom: 1.25rem; }
.lab-hero__line {
  display: block; font-family: var(--display);
  font-size: clamp(4.5rem, 10vw, 9.5rem); line-height: 0.92; letter-spacing: 0.02em;
}
.lab-hero__line--grad {
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lab-hero__desc { font-size: 0.95rem; color: var(--ink-2); line-height: 1.75; max-width: 420px; margin-bottom: 1.75rem; }
.lab-hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 2.25rem; }

.lab-hero__stats { display: flex; align-items: center; gap: 1.35rem; flex-wrap: wrap; }
.lab-stat { display: flex; flex-direction: column; gap: 0.1rem; }
.lab-stat__n { font-family: var(--display); font-size: 1.6rem; letter-spacing: 0.04em; line-height: 1; color: var(--ink); }
.lab-stat__l { font-size: 0.68rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.lab-stat__div { width: 1px; height: 28px; background: var(--border); }

.lab-hero__visual { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 0.65rem; }
.lab-hero__glow {
  position: absolute; inset: 10% 0 18% 10%;
  background: var(--brand-grad); border-radius: 50%; filter: blur(60px); opacity: 0.28; z-index: 0;
  pointer-events: none;
}
.lab-hero-slideshow {
  position: relative; z-index: 1;
  width: clamp(280px, 42vw, 520px); aspect-ratio: 16/10;
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--border);
}
.lab-hero-slideshow img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.1s var(--ease);
}
.lab-hero-slideshow img.is-active { opacity: 1; z-index: 1; }
.lab-hero-slideshow__dots {
  position: relative; z-index: 2;
  display: flex; gap: 0.4rem; justify-content: center;
  width: clamp(280px, 42vw, 520px);
}
.lab-hero-slideshow__dot {
  width: 7px; height: 7px; padding: 0; border: none; border-radius: 50%;
  background: var(--border-hi); cursor: pointer;
  transition: background 0.25s, transform 0.2s;
}
.lab-hero-slideshow__dot.is-active {
  background: var(--sky);
  box-shadow: 0 0 10px rgba(168, 233, 255, 0.5);
  transform: scale(1.15);
}

/* Effects grid */
.lab-feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.lab-feat-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; transition: border-color 0.2s, transform 0.25s var(--ease);
}
.lab-feat-card:hover { border-color: var(--border-hi); transform: translateY(-4px); }
.lab-feat-card__img { aspect-ratio: 16/10; overflow: hidden; }
.lab-feat-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.lab-feat-card:hover .lab-feat-card__img img { transform: scale(1.05); }
.lab-feat-card__body { padding: 1.1rem 1.2rem 1.35rem; }
.lab-feat-card__tag {
  display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 0.45rem; padding: 0.2rem 0.55rem; border-radius: 20px;
}
.lab-feat-card__tag--gold { color: var(--gold); background: rgba(255, 225, 154, 0.12); border: 1px solid rgba(255, 225, 154, 0.25); }
.lab-feat-card__tag--sky { color: var(--sky); background: rgba(168, 233, 255, 0.1); border: 1px solid rgba(168, 233, 255, 0.22); }
.lab-feat-card__tag--violet { color: var(--violet); background: rgba(185, 167, 255, 0.1); border: 1px solid rgba(185, 167, 255, 0.22); }
.lab-feat-card__body h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; }
.lab-feat-card__body p { font-size: 0.82rem; color: var(--ink-2); line-height: 1.6; }

/* Compare */
.lab-compare__monitor {
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 80px rgba(168, 233, 255, 0.06);
}
.ba-wrap { position: relative; width: 100%; aspect-ratio: 16/9; cursor: col-resize; user-select: none; touch-action: none; overflow: hidden; }
.ba-img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-after-clip { position: absolute; inset: 0; width: 50%; overflow: hidden; }
.ba-after-clip .ba-img { position: absolute; left: 0; top: 0; height: 100%; min-width: 100%; object-fit: cover; object-position: left top; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; translate: -50% 0; width: 36px; z-index: 3; pointer-events: none; }
.ba-handle-line { position: absolute; top: 0; bottom: 0; left: 50%; translate: -50% 0; width: 2px; background: var(--sky); box-shadow: 0 0 16px var(--sky); }
.ba-handle-grip {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--sky);
  box-shadow: 0 0 20px rgba(168, 233, 255, 0.4);
}
.lab-compare__tag {
  position: absolute; top: 0.85rem; z-index: 4; pointer-events: none;
  font-size: 0.75rem; font-weight: 600; padding: 0.3rem 0.65rem;
  background: rgba(9, 11, 18, 0.75); backdrop-filter: blur(8px);
  border-radius: 8px; border: 1px solid var(--border);
}
.lab-compare__tag--off { left: 0.85rem; }
.lab-compare__tag--on { right: 0.85rem; color: var(--gold); border-color: rgba(255, 225, 154, 0.3); }

/* Stats strip */
.lab-stats-strip { position: relative; z-index: 1; padding: 0 var(--pad) 1rem; max-width: var(--max-wide); margin: 0 auto; }
.lab-stats-strip__inner {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  padding: 1.5rem 1.75rem; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(255, 225, 154, 0.06), rgba(168, 233, 255, 0.05), rgba(185, 167, 255, 0.06));
  border: 1px solid var(--border);
}
.lab-stats-strip__item { text-align: center; }
.lab-stats-strip__val { display: block; font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.03em; margin-bottom: 0.2rem; }
.lab-stats-strip__key { font-size: 0.72rem; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* Gallery */
.lab-frames__strip { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.75rem; }
.lab-frame { flex: 0 0 clamp(260px, 30vw, 340px); scroll-snap-align: start; }
.lab-frame__cell {
  aspect-ratio: 3/2; overflow: hidden; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: #000;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lab-frame__cell:hover { border-color: var(--border-hi); box-shadow: 0 8px 32px rgba(168, 233, 255, 0.08); }
.lab-frame__cell:hover .lab-frame__img { transform: scale(1.04); }
.lab-frame__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s var(--ease); }
.lab-frame__cap { font-size: 0.82rem; color: var(--ink-2); margin-top: 0.5rem; }

/* Reviews */
.lab-signal__layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.25rem; align-items: start; }
.lab-signal__featured { overflow: hidden; }
.lab-signal__shot { height: 200px; overflow: hidden; }
.lab-signal__shot img { width: 100%; height: 100%; object-fit: cover; }
.lab-signal__body { padding: 1.25rem; }
.lab-signal__stars { color: var(--gold); font-size: 0.9rem; margin-bottom: 0.55rem; }
.lab-signal__quote { font-size: 0.92rem; line-height: 1.65; margin-bottom: 1rem; }
.lab-signal__author { display: flex; align-items: center; gap: 0.55rem; }
.lab-signal__avatar { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.lab-signal__name { font-weight: 600; font-size: 0.85rem; flex: 1; }
.lab-signal__like {
  display: flex; align-items: center; gap: 0.3rem; padding: 0.35rem 0.7rem;
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  color: var(--ink-3); font-size: 0.75rem; cursor: pointer;
}
.lab-signal__like.liked { color: var(--gold); border-color: rgba(255, 225, 154, 0.35); }
.lab-signal__feed { display: flex; flex-direction: column; gap: 0.75rem; }
.lab-signal__card { padding: 1rem 1.1rem; }
.lab-signal__text { font-size: 0.86rem; line-height: 1.6; color: var(--ink-2); margin-bottom: 0.7rem; }
.lab-signal__meta { display: flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 600; }
.lab-signal__meta img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }

/* Install */
.lab-protocol__grid { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
.lab-protocol__steps { list-style: none; border-left: 2px solid var(--border); }
.lab-protocol__step { display: flex; gap: 1rem; padding: 1.15rem 0 1.15rem 1.25rem; position: relative; }
.lab-protocol__step::before {
  content: ''; position: absolute; left: -5px; top: 1.45rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand-grad);
}
.lab-protocol__num { font-family: var(--display); font-size: 1.2rem; color: var(--sky); flex-shrink: 0; width: 1.5rem; line-height: 1; }
.lab-protocol__step h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.lab-protocol__step p { font-size: 0.85rem; color: var(--ink-2); line-height: 1.6; }

.lab-download-card { position: sticky; top: calc(var(--topbar-h) + 1.25rem); }
.lab-download-card__glow {
  position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: var(--brand-grad); opacity: 0.45; z-index: 0;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude; -webkit-mask-composite: xor;
  pointer-events: none;
}
.lab-terminal__body { position: relative; z-index: 1; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
.lab-terminal__icon img { width: 44px; height: 44px; filter: drop-shadow(0 0 14px rgba(255, 225, 154, 0.4)); }
.lab-terminal__name { font-weight: 600; font-size: 0.95rem; display: block; margin-bottom: 0.25rem; }
.lab-terminal__meta { font-size: 0.8rem; color: var(--ink-2); }

/* FAQ */
.lab-kb__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
.lab-kb__item { border-bottom: 1px solid var(--border); }
.lab-kb__q {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 0; cursor: pointer; font-size: 0.9rem; font-weight: 500; list-style: none;
}
.lab-kb__q::-webkit-details-marker { display: none; }
.lab-kb__icon {
  width: 20px; height: 20px; flex-shrink: 0; position: relative;
  border: 1px solid var(--border); border-radius: 6px;
}
.lab-kb__icon::before, .lab-kb__icon::after {
  content: ''; position: absolute; top: 50%; left: 50%; background: var(--ink-3); translate: -50% -50%;
}
.lab-kb__icon::before { width: 8px; height: 1.5px; }
.lab-kb__icon::after { width: 1.5px; height: 8px; transition: transform 0.2s var(--ease); }
.lab-kb__item[open] .lab-kb__icon::after { transform: rotate(90deg); opacity: 0; }
.lab-kb__a { font-size: 0.86rem; color: var(--ink-2); line-height: 1.65; padding-bottom: 1.1rem; }

/* Footer */
.lab-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 1.75rem var(--pad) 2.25rem; margin-top: 1rem; }
.lab-footer__inner {
  max-width: var(--max-wide); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.lab-footer__name {
  font-size: 1.6rem; display: block; line-height: 1;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lab-footer__domain { font-size: 0.8rem; color: var(--ink-3); }
.lab-footer__links { display: flex; gap: 1.25rem; font-size: 0.82rem; }
.lab-footer__links a { text-decoration: none; color: var(--ink-3); transition: color 0.15s; }
.lab-footer__links a:hover { color: var(--ink); }
.lab-footer__socials { display: flex; gap: 0.85rem; }
.lab-footer__socials a { color: var(--ink-3); transition: color 0.15s; }
.lab-footer__socials a:hover { color: var(--sky); }

/* Lightbox */
.lb[hidden] { display: none !important; }
.lb { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.28s ease; }
.lb.lb--open { opacity: 1; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.92); backdrop-filter: blur(10px); }
.lb-close, .lb-arrow {
  position: absolute; z-index: 2; background: var(--bg-2); border: 1px solid var(--border);
  color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.lb-close { top: 1rem; right: 1rem; width: 2.5rem; height: 2.5rem; }
.lb-arrow { top: 50%; translate: 0 -50%; width: 2.75rem; height: 2.75rem; }
.lb-prev { left: 1rem; } .lb-next { right: 1rem; }
.lb-img-wrap { position: relative; z-index: 1; max-width: min(92vw, 1100px); max-height: 88vh; }
.lb-img { max-width: 100%; max-height: 88vh; object-fit: contain; border-radius: var(--r-lg); border: 1px solid var(--border); }
.lb-counter { position: absolute; bottom: 1.25rem; left: 50%; translate: -50% 0; z-index: 2; font-size: 0.78rem; color: var(--ink-3); }

/* Dock */
.lab-dock {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 8000;
  translate: 0 110%; transition: translate 0.35s var(--ease); pointer-events: none;
}
.lab-dock--show { translate: 0 0; pointer-events: auto; }
.lab-dock__inner {
  max-width: 640px; margin: 0 auto 1rem; padding: 0.7rem 1.1rem;
  display: flex; align-items: center; gap: 0.75rem;
  background: rgba(16, 19, 28, 0.92); backdrop-filter: blur(16px);
  border: 1px solid var(--border-hi); border-radius: var(--r-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(168, 233, 255, 0.06);
}
.lab-dock__label { flex: 1; font-size: 0.85rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Responsive */
@media (max-width: 1024px) {
  .lab-feat-grid { grid-template-columns: repeat(2, 1fr); }
  .lab-hero__grid { grid-template-columns: 1fr; text-align: center; }
  .lab-hero__desc { margin-left: auto; margin-right: auto; }
  .lab-hero__actions { justify-content: center; }
  .lab-hero__stats { justify-content: center; }
  .lab-hero__visual { align-items: center; margin-top: 1rem; }
  .lab-hero-slideshow__dots { width: 100%; max-width: 520px; }
}
@media (max-width: 960px) {
  .lab-signal__layout { grid-template-columns: 1fr; }
  .lab-protocol__grid { grid-template-columns: 1fr; }
  .lab-download-card { position: static; }
  .lab-kb__grid { grid-template-columns: 1fr; }
  .lab-stats-strip__inner { grid-template-columns: 1fr; gap: 1.25rem; }
}
@media (max-width: 680px) {
  .lab-nav__link { display: none; }
  .lab-nav__btn { margin-left: 0; }
  .lab-feat-grid { grid-template-columns: 1fr; }
  .lab-hero__actions { flex-direction: column; width: 100%; }
  .lab-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; translate: 0 0; scale: 1; }
}
