:root {
  --bg: #f8f2ff;
  --text: #24183c;
  --muted: #6f6485;
  --violet: #8e68d8;
  --pink: #e8b8f5;
  --blue: #8fd8ff;
  --line: rgba(78, 54, 120, 0.12);
  --glass: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.28));
  --shadow: 0 24px 60px rgba(92, 60, 150, 0.08);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(232, 184, 245, 0.28), transparent 28rem),
    radial-gradient(circle at 88% 16%, rgba(143, 216, 255, 0.24), transparent 30rem),
    radial-gradient(circle at 68% 86%, rgba(255, 220, 240, 0.2), transparent 30rem),
    linear-gradient(135deg, #fff9fc 0%, #f6efff 30%, #edf8ff 58%, #fff4fb 100%);
  font-family: "Inter", sans-serif;
}

body.menu-open,
body.world-rebuild-active {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  position: relative;
  overflow: hidden;
}

/* HEADER */

.demos-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 28px 6vw;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.18));
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
  transition: 0.35s ease;
}

.demos-header.is-scrolled,
.demos-header.is-open {
  padding-block: 20px;
  background: rgba(255, 250, 255, 0.84);
  box-shadow: 0 18px 42px rgba(88, 60, 140, 0.08);
}

.brand {
  position: relative;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: max-content;
  font-size: 20px;
  letter-spacing: 0.28em;
}

.brand span {
  font-size: 9px;
  letter-spacing: 0.46em;
  opacity: 0.56;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 52px;
}

.main-nav a {
  position: relative;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 1px;
  background: var(--violet);
  transition: 0.35s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.header-actions {
  position: relative;
  z-index: 1002;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: 0.35s ease;
}

.header-button:hover {
  transform: translateY(-2px);
}

.header-button span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.44);
}

/* VIBE SWITCHER */

.vibe-switcher {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 14px 34px rgba(60, 35, 100, 0.08);
}

.vibe-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 32px;
  padding: 0 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.18);
  color: var(--text);
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: 0.35s ease;
}

.vibe-btn span {
  position: relative;
  z-index: 2;
}

.vibe-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.78;
  transition: 0.35s ease;
}

.vibe-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.68);
}

.vibe-violet::before {
  background: linear-gradient(135deg, #dac5ff, #7fcfff, #f29be6);
}

.vibe-bold {
  color: #fdf7ff;
}

.vibe-bold::before {
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #102419, #126d58 58%, #8b6a44);
}

.vibe-nude {
  color: #4d362e;
}

.vibe-nude::before {
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.62), transparent 34%),
    linear-gradient(135deg, #fff7ef, #e4cfc2, #f9f2eb);
}

.mobile-vibe-block {
  display: none;
}

/* BURGER */

.menu-toggle {
  display: none;
  position: relative;
  z-index: 1002;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(160, 110, 255, 0.2);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.62), transparent 30%),
    rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  left: 15px;
  right: 15px;
  height: 1px;
  background: var(--text);
  transition: 0.35s ease;
}

.menu-toggle span:first-child {
  top: 21px;
}

.menu-toggle span:last-child {
  top: 31px;
}

.menu-toggle.is-active span:first-child {
  top: 26px;
  transform: rotate(45deg);
}

.menu-toggle.is-active span:last-child {
  top: 26px;
  transform: rotate(-45deg);
}

.burger-menu {
  position: absolute;
  z-index: 1004;
  top: calc(100% + 14px);
  right: 6vw;
  width: min(430px, calc(100vw - 44px));
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 32px;
  background:
    radial-gradient(circle at 84% 8%, rgba(255, 255, 255, 0.72), transparent 9rem),
    radial-gradient(circle at 8% 18%, rgba(232, 184, 245, 0.42), transparent 12rem),
    radial-gradient(circle at 92% 88%, rgba(143, 216, 255, 0.34), transparent 13rem),
    linear-gradient(135deg, rgba(255, 252, 255, 0.86), rgba(245, 234, 255, 0.66));
  backdrop-filter: blur(34px) saturate(1.2);
  -webkit-backdrop-filter: blur(34px) saturate(1.2);
  box-shadow:
    0 34px 90px rgba(88, 60, 140, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px) scale(0.96);
  transform-origin: top right;
  transition:
    opacity 0.36s ease,
    transform 0.36s ease;
}

.burger-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.44), transparent 34%),
    radial-gradient(circle at 42% 30%, rgba(255, 255, 255, 0.28), transparent 11rem);
  opacity: 0.76;
}

.burger-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.burger-menu a {
  position: relative;
  z-index: 2;
  display: block;
  padding: 18px 4px;
  border-bottom: 1px solid rgba(78, 54, 120, 0.12);
  color: var(--text);
  font-family: "Cormorant Garamond", serif;
  font-size: 42px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: 0.3s ease;
}

.burger-menu a:last-of-type {
  border-bottom: 0;
}

.burger-menu a:hover,
.burger-menu a.active {
  color: var(--violet);
  transform: translateX(8px);
}

.mobile-vibe-block {
  position: relative;
  z-index: 2;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 24px;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.62), transparent 6rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.2));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 18px 44px rgba(88, 60, 140, 0.1);
}

.mobile-vibe-block p {
  margin: 0 0 12px;
  color: rgba(36, 24, 60, 0.58);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mobile-vibe-switcher {
  width: 100%;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.32);
}

.mobile-vibe-switcher .vibe-btn {
  flex: 1;
  min-width: 0;
}

/* HERO */

.demos-hero {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  min-height: 680px;
  padding: 160px 6vw 90px;
  overflow: hidden;
}

.hero-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  height: 100%;
}

.hero-rail span {
  font-size: 13px;
  letter-spacing: 0.2em;
  opacity: 0.72;
}

.hero-rail i {
  width: 1px;
  flex: 1;
  background: linear-gradient(to bottom, transparent, rgba(115, 85, 170, 0.24), transparent);
}

.hero-rail b {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.7;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: min(760px, 100%);
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--violet);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(64px, 7vw, 108px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.hero-copy h1 em,
.demos-footer h2 em {
  color: var(--violet);
  font-style: italic;
}

.hero-copy p {
  width: min(430px, 100%);
  margin-top: 32px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.hero-orb {
  position: absolute;
  right: -120px;
  top: 40px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.38), transparent 24%),
    radial-gradient(circle, rgba(240, 178, 255, 0.24), transparent 56%),
    radial-gradient(circle, rgba(143, 216, 255, 0.22), transparent 72%);
  filter: blur(40px);
  pointer-events: none;
}

/* FILTERS */

.filter-bar {
  position: sticky;
  top: 94px;
  z-index: 100;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 6vw 34px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.filter-bar button {
  height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.44);
  box-shadow: 0 10px 26px rgba(100, 70, 160, 0.05);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: 0.35s ease;
}

.filter-bar button:hover {
  transform: translateY(-2px);
}

.filter-bar button.active {
  background: linear-gradient(135deg, rgba(169, 120, 255, 0.22), rgba(255, 255, 255, 0.62));
  border: 1px solid rgba(170, 120, 255, 0.3);
  color: var(--violet);
}

/* GRID */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 28px;
  padding: 10px 6vw 120px;
  align-items: start;
}

.demo-card {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    filter 0.35s ease,
    box-shadow 0.45s ease,
    border-color 0.45s ease;
}

.demo-card:hover {
  transform: translateY(-10px) scale(1.015);
  border-color: rgba(170, 120, 255, 0.26);
  box-shadow: 0 34px 80px rgba(92, 60, 150, 0.14);
}

.demo-card.is-hidden {
  opacity: 0.08;
  transform: scale(0.92);
  filter: blur(10px) saturate(0);
  pointer-events: none;
}

.demo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(24, 16, 40, 0.78), rgba(24, 16, 40, 0.18) 52%, transparent 78%);
}

.demo-info {
  position: absolute;
  z-index: 3;
  left: 28px;
  right: 28px;
  bottom: 28px;
  color: white;
}

.demo-info span {
  display: inline-block;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.demo-info h2 {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(40px, 4vw, 50px);
  font-weight: 400;
  line-height: 0.95;
}

.demo-info p {
  width: min(390px, 100%);
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  line-height: 1.75;
}

.demo-info a {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.demo-info b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* FOOTER */

.demos-footer {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 80px;
  padding: 100px 6vw 90px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(170, 120, 255, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(143, 216, 255, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.22));
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.demos-footer h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(52px, 6vw, 88px);
  font-weight: 400;
  line-height: 0.92;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-links a {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer-bottom {
  position: absolute;
  left: 6vw;
  right: 6vw;
  bottom: 28px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* WORLD REBUILD TRANSITION */

.world-rebuild {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  color: #fff9ff;
  background:
    radial-gradient(circle at 50% 50%, rgba(185, 162, 255, 0.5), transparent 20rem),
    rgba(7, 4, 18, 0.92);
  transition: opacity 0.45s ease;
}

.world-rebuild.is-active {
  opacity: 1;
}

.world-rebuild::before,
.world-rebuild::after {
  content: "";
  position: absolute;
  inset: -12%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(900px) rotateX(62deg) scale(1.4);
  opacity: 0;
  animation: rebuildGrid 3.4s ease forwards;
}

.world-rebuild::after {
  background-size: 28px 28px;
  filter: blur(1px);
  animation-delay: 0.2s;
}

.world-rebuild__panel {
  position: relative;
  z-index: 4;
  width: min(560px, calc(100% - 44px));
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 255, 255, 0.16), transparent 12rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(34px) scale(0.94);
  opacity: 0;
  animation: rebuildPanel 3.4s ease forwards;
}

.world-rebuild__kicker {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.world-rebuild__title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(48px, 7vw, 82px);
  font-weight: 400;
  line-height: 0.92;
}

.world-rebuild__title em {
  color: #b9a2ff;
  font-style: italic;
}

.world-rebuild__line {
  position: relative;
  height: 1px;
  margin: 28px 0 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}

.world-rebuild__line span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #b9a2ff, #8fd8ff, transparent);
  transform: translateX(-100%);
  animation: rebuildLine 2.5s ease 0.35s forwards;
}

.world-rebuild__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.world-rebuild__pieces {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.world-rebuild__pieces span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: rgba(185, 162, 255, 0.72);
  box-shadow: 0 0 22px rgba(185, 162, 255, 0.5);
  opacity: 0;
  animation: rebuildPiece 3.2s ease forwards;
}

.world-rebuild__pieces span:nth-child(1) { left: 10%; top: 18%; animation-delay: 0.1s; }
.world-rebuild__pieces span:nth-child(2) { left: 22%; top: 72%; animation-delay: 0.24s; }
.world-rebuild__pieces span:nth-child(3) { left: 36%; top: 28%; animation-delay: 0.38s; }
.world-rebuild__pieces span:nth-child(4) { left: 52%; top: 78%; animation-delay: 0.52s; }
.world-rebuild__pieces span:nth-child(5) { left: 68%; top: 18%; animation-delay: 0.66s; }
.world-rebuild__pieces span:nth-child(6) { left: 84%; top: 64%; animation-delay: 0.8s; }
.world-rebuild__pieces span:nth-child(7) { left: 14%; top: 48%; animation-delay: 0.94s; }
.world-rebuild__pieces span:nth-child(8) { left: 74%; top: 42%; animation-delay: 1.08s; }

.world-rebuild.to-bold {
  background:
    radial-gradient(circle at 70% 40%, rgba(0, 255, 185, 0.16), transparent 22rem),
    radial-gradient(circle at 30% 60%, rgba(185, 118, 48, 0.16), transparent 24rem),
    rgba(2, 8, 6, 0.96);
}

.world-rebuild.to-bold .world-rebuild__title em {
  color: #20ffc0;
}

.world-rebuild.to-bold .world-rebuild__line span,
.world-rebuild.to-bold .world-rebuild__pieces span {
  background: linear-gradient(90deg, #13b782, #d4a04f);
  box-shadow: 0 0 24px rgba(24, 255, 185, 0.46);
}

.world-rebuild.to-nude {
  color: #2f241f;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.72), transparent 18rem),
    radial-gradient(circle at 70% 75%, rgba(199, 142, 130, 0.28), transparent 24rem),
    rgba(246, 229, 218, 0.94);
}

.world-rebuild.to-nude .world-rebuild__panel {
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 255, 255, 0.5), transparent 12rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.24));
  border-color: rgba(255, 255, 255, 0.78);
}

.world-rebuild.to-nude .world-rebuild__kicker,
.world-rebuild.to-nude .world-rebuild__text {
  color: rgba(47, 36, 31, 0.66);
}

.world-rebuild.to-nude .world-rebuild__title em {
  color: #c78e82;
}

.world-rebuild.to-nude .world-rebuild__line span,
.world-rebuild.to-nude .world-rebuild__pieces span {
  background: linear-gradient(90deg, #f2d8c9, #c78e82);
  box-shadow: 0 0 24px rgba(199, 142, 130, 0.42);
}

@keyframes rebuildGrid {
  0% {
    opacity: 0;
    transform: perspective(900px) rotateX(68deg) translateY(120px) scale(1.65);
  }

  35% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: perspective(900px) rotateX(54deg) translateY(-160px) scale(1.05);
  }
}

@keyframes rebuildPanel {
  0% {
    opacity: 0;
    transform: translateY(34px) scale(0.94);
    filter: blur(12px);
  }

  24%,
  78% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-26px) scale(1.03);
    filter: blur(10px);
  }
}

@keyframes rebuildLine {
  0% {
    transform: translateX(-100%);
  }

  62%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes rebuildPiece {
  0% {
    opacity: 0;
    transform: translate3d(0, 80px, 0) rotate(0deg) scale(0.2);
  }

  24% {
    opacity: 1;
  }

  72% {
    opacity: 0.95;
  }

  100% {
    opacity: 0;
    transform: translate3d(0, -160px, 0) rotate(260deg) scale(1.4);
  }
}

/* REVEAL */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */

@media (max-width: 1180px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }

  .demo-card {
    min-height: 380px;
  }

  .demos-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .demos-header {
    grid-template-columns: auto auto;
  }

  .main-nav,
  .header-button,
  .desktop-vibe-switcher {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-vibe-block {
    display: block;
  }

  .demos-hero {
    grid-template-columns: 1fr;
  }

  .hero-rail {
    display: none;
  }

  .hero-copy h1 {
    font-size: 74px;
  }

  .hero-orb {
    width: 520px;
    height: 520px;
  }
}

@media (max-width: 640px) {
  .demos-header {
    padding: 22px;
  }

  .brand {
    font-size: 16px;
  }

  .burger-menu {
    right: 22px;
    width: min(370px, calc(100vw - 44px));
    padding: 26px;
  }

  .burger-menu a {
    font-size: 50px;
  }

  .mobile-vibe-block {
    padding: 16px;
  }

  .mobile-vibe-switcher {
    gap: 6px;
  }

  .mobile-vibe-switcher .vibe-btn {
    height: 34px;
    padding-inline: 8px;
    font-size: 8px;
  }

  .demos-hero {
    padding: 140px 22px 76px;
    min-height: 620px;
  }

  .hero-copy h1 {
    font-size: clamp(56px, 16vw, 74px);
  }

  .filter-bar {
    top: 82px;
    padding: 0 22px 30px;
  }

  .filter-bar button {
    height: 44px;
    padding: 0 16px;
    font-size: 9px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    padding: 0 22px 100px;
    gap: 24px;
  }

  .demo-card {
    min-height: 360px;
  }

  .demo-info {
    left: 24px;
    right: 24px;
    bottom: 24px;
  }

  .demo-info h2 {
    font-size: 40px;
  }

  .demo-info p {
    font-size: 13px;
  }

  .demos-footer {
    padding: 84px 22px 100px;
  }

  .footer-bottom {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 50px;
    flex-direction: column;
    gap: 16px;
  }
}