:root {
  --bg: #070b14;
  --bg-soft: #0e1624;
  --text: #f8fbff;
  --muted: #aebbd0;
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.085);
  --glass-strong: rgba(255, 255, 255, 0.14);
  --cyan: #27d9ff;
  --lime: #9cff6c;
  --amber: #ffd166;
  --rose: #ff5c8a;
  --violet: #9f7cff;
  --ink: #09101b;
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(39, 217, 255, 0.24), transparent 30rem),
    radial-gradient(circle at 82% 18%, rgba(255, 209, 102, 0.15), transparent 28rem),
    radial-gradient(circle at 70% 78%, rgba(156, 255, 108, 0.1), transparent 26rem),
    linear-gradient(135deg, #050710 0%, #0c1522 48%, #11131d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 34%, rgba(255, 255, 255, 0.04) 68%, transparent);
  opacity: 0.28;
}

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

a {
  color: inherit;
}

.page-shell {
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(6, 11, 20, 0.72);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
}

.brand img {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(39, 217, 255, 0.16);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: 0.24s ease;
}

.nav a:hover {
  color: var(--text);
  background: var(--glass-strong);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 54px;
}

.hero::before {
  content: "";
  position: absolute;
  right: 22%;
  top: 12%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(39, 217, 255, 0.16);
  filter: blur(20px);
  animation: drift 8s ease-in-out infinite;
}

.hero__content,
.orbit-stage,
.category-band,
.footer {
  position: relative;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(2.8rem, 5.5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 4.2vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 2rem;
  line-height: 1.05;
}

.hero__lead,
.category-heading p,
.project-card p,
.feature-card p,
.detail-panel p,
.detail-panel li {
  color: var(--muted);
  line-height: 1.72;
}

.hero__lead {
  max-width: 680px;
  font-size: 1.16rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

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

.button--primary {
  color: var(--ink);
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  box-shadow: 0 18px 50px rgba(39, 217, 255, 0.24);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.08);
}

.button--light {
  color: var(--ink);
  background: #fff;
}

.orbit-stage {
  min-height: 560px;
  perspective: 1100px;
}

.orbit-card {
  position: absolute;
  overflow: hidden;
  width: min(56vw, 280px);
  aspect-ratio: 9 / 18.5;
  border: 12px solid #111923;
  border-radius: 42px;
  background: #111923;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5);
}

.orbit-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.orbit-card--one {
  right: 24px;
  top: 8px;
  z-index: 2;
  transform: rotate(-5deg) translateX(calc(var(--px, 0) * 1px)) translateY(calc(var(--py, 0) * 1px));
  animation: float 5.2s ease-in-out infinite;
}

.orbit-card--two {
  left: 26px;
  bottom: 12px;
  opacity: 0.82;
  transform: rotate(8deg) scale(0.9) translateX(calc(var(--px, 0) * 1px)) translateY(calc(var(--py, 0) * 1px));
  animation: float 6.4s ease-in-out infinite reverse;
}

.orbit-chip {
  position: absolute;
  left: 28px;
  top: 90px;
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  font-weight: 900;
}

.orbit-chip--right {
  left: auto;
  right: 0;
  top: 360px;
}

.orbit-chip--bottom {
  left: 50%;
  top: auto;
  bottom: 54px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--amber), var(--lime));
}

.category-band {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.maker-section {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(0, 0.75fr));
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 72px;
}

.maker-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.055)),
    rgba(7, 11, 20, 0.66);
  box-shadow: 0 26px 85px rgba(0, 0, 0, 0.26);
}

.maker-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 28px 28px;
}

.maker-card > * {
  position: relative;
}

.maker-card--intro {
  background:
    radial-gradient(circle at 85% 18%, rgba(39, 217, 255, 0.18), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.055));
}

.maker-card--intro h2 {
  font-size: clamp(2rem, 3.2vw, 3.2rem);
}

.maker-card p {
  color: var(--muted);
  line-height: 1.72;
}

.maker-icon {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  font-weight: 950;
}

.category-heading {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 32px;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.project-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 0.75fr) minmax(0, 1fr);
  overflow: hidden;
  min-height: 390px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.055)),
    var(--bg-soft);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.28),
    0 12px 36px rgba(0, 0, 0, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.12);
  transform-style: preserve-3d;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease,
    box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  opacity: 0.18;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(130deg, #000, transparent 74%);
}

.project-card:hover {
  border-color: rgba(39, 217, 255, 0.55);
  box-shadow:
    0 45px 140px rgba(0, 0, 0, 0.4),
    0 20px 60px rgba(0, 0, 0, 0.25),
    0 8px 20px rgba(0, 0, 0, 0.15),
    0 0 80px rgba(39, 217, 255, 0.06);
}

.project-card--wide {
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr);
}

.project-card--cyan {
  --accent: var(--cyan);
}

.project-card--lime {
  --accent: var(--lime);
}

.project-card--amber {
  --accent: var(--amber);
}

.project-card--violet {
  --accent: var(--violet);
}

.project-card--rose {
  --accent: var(--rose);
}

.project-card__media,
.project-card__body {
  position: relative;
}

.project-card__media {
  display: block;
  min-height: 390px;
  background: rgba(0, 0, 0, 0.26);
}

.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 55%, rgba(7, 11, 20, 0.74));
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.project-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 34px;
}

.pill {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--accent), white 25%);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.text-link {
  margin-top: auto;
  color: var(--text);
  font-weight: 900;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.detail-hero {
  padding-bottom: 26px;
}

.category-hero {
  min-height: 560px;
}

.category-showcase {
  position: relative;
  justify-self: center;
  width: min(76vw, 470px);
  min-height: 560px;
  perspective: 1200px;
}

.category-showcase::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, rgba(39, 217, 255, 0.2), transparent 62%),
    rgba(255, 255, 255, 0.04);
  filter: blur(2px);
  opacity: 0.9;
}

.category-showcase--games::before {
  background: radial-gradient(circle, rgba(255, 209, 102, 0.24), transparent 62%);
}

.category-showcase--electronics::before {
  background: radial-gradient(circle, rgba(156, 255, 108, 0.2), transparent 62%);
}

.showcase-phone {
  position: absolute;
  overflow: hidden;
  width: min(58vw, 270px);
  aspect-ratio: 9 / 18.5;
  border: 12px solid #111923;
  border-radius: 42px;
  background: #111923;
  box-shadow: 0 34px 95px rgba(0, 0, 0, 0.48);
}

.showcase-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.showcase-phone--main {
  right: 20px;
  top: 14px;
  z-index: 2;
  transform: rotate(-5deg) translateX(calc(var(--px, 0) * 1px)) translateY(calc(var(--py, 0) * 1px));
  animation: float 5.6s ease-in-out infinite;
}

.showcase-phone--side {
  left: 6px;
  bottom: 22px;
  z-index: 1;
  opacity: 0.82;
  transform: rotate(8deg) scale(0.88) translateX(calc(var(--px, 0) * 1px)) translateY(calc(var(--py, 0) * 1px));
  animation: float 6.8s ease-in-out infinite reverse;
}

.showcase-badge,
.showcase-panel {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 92px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  font-weight: 950;
}

.showcase-panel {
  display: grid;
  gap: 6px;
  min-width: 210px;
}

.showcase-panel small {
  color: var(--muted);
  font-weight: 800;
}

.detail-media {
  position: relative;
  min-height: 540px;
  perspective: 1100px;
}

.device-frame {
  position: absolute;
  right: 34px;
  top: 8px;
  overflow: hidden;
  width: min(56vw, 285px);
  aspect-ratio: 9 / 18.5;
  border: 12px solid #111923;
  border-radius: 42px;
  background: #111923;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5);
  transform: rotate(-5deg);
}

.device-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.floating-panel {
  position: absolute;
  right: 0;
  bottom: 80px;
  max-width: 330px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
}

.contact-hero {
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.82fr);
  min-height: 610px;
}

.contact-panel {
  position: relative;
  overflow: hidden;
  align-self: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.055)),
    rgba(7, 11, 20, 0.72);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.38);
}

.contact-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 28px 28px;
}

.contact-panel::after {
  content: "";
  position: absolute;
  inset: -45%;
  opacity: 0.2;
  background: conic-gradient(from 90deg, transparent, rgba(39, 217, 255, 0.55), transparent 34%);
  animation: contactSpin 9s linear infinite;
}

.contact-panel > * {
  position: relative;
  z-index: 2;
}

.contact-panel__halo {
  position: absolute;
  right: -90px;
  top: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(39, 217, 255, 0.24);
  filter: blur(12px);
}

.contact-panel__scan {
  position: absolute;
  left: -20%;
  top: 0;
  z-index: 1;
  width: 18%;
  height: 100%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  animation: contactScan 4.8s ease-in-out infinite;
}

.signal-dots {
  display: flex;
  gap: 9px;
  margin-bottom: 18px;
}

.signal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 22px rgba(156, 255, 108, 0.9);
  animation: signalPulse 1.8s ease-in-out infinite;
}

.signal-dots span:nth-child(2) {
  background: var(--cyan);
  box-shadow: 0 0 22px rgba(39, 217, 255, 0.9);
  animation-delay: 0.22s;
}

.signal-dots span:nth-child(3) {
  background: var(--amber);
  box-shadow: 0 0 22px rgba(255, 209, 102, 0.9);
  animation-delay: 0.44s;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.visitor-section {
  padding-top: 48px;
}

.visitor-counter {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 50%, rgba(156, 255, 108, 0.18), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.055));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.visitor-counter::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px);
  background-size: 28px 28px;
}

.visitor-counter > * {
  position: relative;
}

.visitor-counter h2 {
  margin: 0;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px rgba(156, 255, 108, 0.28);
}

.visitor-counter p:last-child {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.floating-panel strong {
  display: block;
  margin-bottom: 6px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.detail-panel,
.feature-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.detail-panel {
  padding: 30px;
}

.detail-panel--full {
  grid-column: 1 / -1;
}

.detail-panel ul {
  margin: 18px 0 0;
  padding-left: 19px;
}

.file-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.file-link {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-weight: 900;
  transition: 0.24s ease;
}

.file-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.13);
}

.file-link--disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.78;
}

.file-link--disabled:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.08);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 46px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -18px;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(18px, 22px, 0);
  }
}

@keyframes contactSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes contactScan {
  0%,
  46% {
    left: -28%;
    opacity: 0;
  }
  55% {
    opacity: 0.72;
  }
  78%,
  100% {
    left: 112%;
    opacity: 0;
  }
}

@keyframes signalPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.72;
  }
  50% {
    transform: translateY(-4px) scale(1.18);
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .hero,
  .contact-hero,
  .category-heading,
  .maker-section,
  .project-grid--two,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .orbit-stage,
  .detail-media {
    min-height: 520px;
  }

  .category-showcase {
    min-height: 520px;
  }

  .project-card,
  .project-card--wide {
    grid-template-columns: 1fr;
  }

  .project-card__media::after {
    background: linear-gradient(180deg, transparent 55%, rgba(7, 11, 20, 0.82));
  }
}

@media (max-width: 860px) {
  .site-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }

  .brand {
    font-size: 0.85rem;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .nav a {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
}

@media (max-width: 640px) {
  .site-header,
  .visitor-counter,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 46px;
  }

  h1 {
    font-size: 2.85rem;
  }

  h2 {
    font-size: 2.45rem;
  }

  .orbit-stage,
  .detail-media {
    min-height: 470px;
  }

  .category-showcase {
    min-height: 470px;
  }

  .orbit-card,
  .device-frame,
  .showcase-phone {
    width: min(76vw, 250px);
  }

  .orbit-card--one,
  .device-frame,
  .showcase-phone--main {
    right: 0;
  }

  .orbit-card--two,
  .showcase-phone--side {
    left: 0;
  }

  .orbit-chip--right,
  .floating-panel {
    right: 8px;
  }

  .category-band {
    padding: 56px 0;
  }

  .project-card__media {
    min-height: 300px;
  }

  .project-card__body,
  .detail-panel {
    padding: 24px;
  }
}

/* ==========================================
   🎨 ANIMACJE — ULEPSZENIA WIZUALNE v2
   ========================================== */

/* --- 1. Gradient animowany w nagłówku --- */
.js .hero h1 {
  background: linear-gradient(135deg, var(--cyan), var(--lime), var(--amber), var(--rose), var(--violet));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- 2. Scroll Reveal --- */
.js .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

.js .reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal-stagger.active > * {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal-stagger.active > *:nth-child(1) { transition-delay: 0s; }
.js .reveal-stagger.active > *:nth-child(2) { transition-delay: 0.1s; }
.js .reveal-stagger.active > *:nth-child(3) { transition-delay: 0.2s; }
.js .reveal-stagger.active > *:nth-child(4) { transition-delay: 0.3s; }
.js .reveal-stagger.active > *:nth-child(5) { transition-delay: 0.4s; }
.js .reveal-stagger.active > *:nth-child(6) { transition-delay: 0.5s; }

/* --- 3. Przycisk pulsująca poświata --- */
.button--primary {
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 18px 50px rgba(39, 217, 255, 0.24);
  }
  50% {
    box-shadow: 0 18px 50px rgba(39, 217, 255, 0.5),
                0 0 80px rgba(39, 217, 255, 0.12);
  }
}

/* --- 4. Cząsteczki tła --- */
.particle {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
}

@keyframes particleFloat {
  0%, 100% {
    opacity: 0;
    transform: translateY(0) translateX(0);
  }
  10% {
    opacity: 0.9;
  }
  90% {
    opacity: 0.9;
  }
  50% {
    transform: translateY(-80px) translateX(15px);
  }
}

/* --- 5. Poświata za kursorem --- */
#glow-follower {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(39, 217, 255, 0.07) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  will-change: transform;
  opacity: 0;
  transition: opacity 1s ease;
}

/* --- 6. Shimmer na kartach --- */
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.04) 44%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.04) 56%,
    transparent 62%
  );
  background-size: 300% 100%;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.project-card:hover::after {
  opacity: 1;
  animation: shimmer 1.6s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- 7. Pasek postępu --- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* --- 8. Poświata w hero --- */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
  animation: heroBreath 6s ease-in-out infinite alternate;
}

@keyframes heroBreath {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* --- 9. Karty maker hover --- */
.maker-card {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
}

.maker-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.35);
}

.maker-card--mini:hover {
  border-color: rgba(39, 217, 255, 0.3);
}

/* --- 10. Oszczędność ruchu --- */
@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .reveal-scale,
  .js .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }

  #glow-follower,
  #scroll-progress {
    display: none;
  }

  .hero::after {
    animation: none;
    opacity: 0.6;
  }

  .button--primary {
    animation: none;
  }

  .project-card::after {
    opacity: 0 !important;
    animation: none !important;
  }
}

/* ==========================================
   3D I GŁĘBIA — ULEPSZENIA v3
   ========================================== */

/* --- 1. Neonowy glow na pill --- */
.pill {
  text-shadow:
    0 0 20px color-mix(in srgb, var(--accent), transparent 60%),
    0 0 40px color-mix(in srgb, var(--accent), transparent 80%);
  transition: text-shadow 0.3s ease;
}

.pill:hover {
  text-shadow:
    0 0 30px color-mix(in srgb, var(--accent), transparent 30%),
    0 0 60px color-mix(in srgb, var(--accent), transparent 50%);
}

/* --- 2. Głębia tekstu w hero --- */
.hero h1 {
  text-shadow:
    0 2px 40px rgba(39, 217, 255, 0.08),
    0 0 80px rgba(39, 217, 255, 0.04);
}

/* --- 3. Cień na maker-kartach --- */
.maker-card:hover {
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.35),
    0 12px 40px rgba(0, 0, 0, 0.2);
}

/* --- 4. Oszczędność ruchu dla 3D --- */
@media (prefers-reduced-motion: reduce) {
  .pill {
    text-shadow: none;
  }

  .hero h1 {
    text-shadow: none;
  }

  .project-card:hover {
    transform: none;
  }
}

/* --- 5. Ulepszenia strony Kontakt --- */

/* Głębszy cień panelu */
.contact-panel {
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.38),
    0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Linki kontaktowe z glow */
.file-link {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease,
              background 0.3s ease;
}

.file-link:hover {
  box-shadow:
    0 0 30px rgba(39, 217, 255, 0.15),
    0 0 60px rgba(39, 217, 255, 0.06);
}

/* Pulsujący glow licznika */
.visitor-counter h2 {
  animation: counterPulse 2.5s ease-in-out infinite;
}

@keyframes counterPulse {
  0%, 100% {
    text-shadow: 0 0 30px rgba(156, 255, 108, 0.28);
  }
  50% {
    text-shadow: 0 0 50px rgba(156, 255, 108, 0.5),
                 0 0 80px rgba(156, 255, 108, 0.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .visitor-counter h2 {
    animation: none;
  }
}

/* ==========================================
   EFEKT RIPPLE — woda pod kursorem
   ========================================== */
.ripple {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  border-radius: 50%;
  width: 3px;
  height: 3px;
  background: rgba(39, 217, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 6px rgba(39, 217, 255, 0.06),
    inset 0 0 4px rgba(255, 255, 255, 0.04);
  transform: translate(-50%, -50%);
  animation: rippleWave 1.4s ease-out forwards;
}

@keyframes rippleWave {
  0% {
    width: 3px;
    height: 3px;
    opacity: 0.8;
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.25);
  }
  60% {
    border-color: rgba(39, 217, 255, 0.12);
  }
  100% {
    width: 240px;
    height: 240px;
    opacity: 0;
    border-width: 0.5px;
    border-color: rgba(39, 217, 255, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ripple {
    display: none !important;
  }
}

/* ==========================================
   🔝 ULEPSZENIA v6 — NAV, BACK-TO-TOP, FOOTER
   ========================================== */

/* --- 1. Aktywna nawigacja --- */
.nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

/* --- 2. Logo hover glow --- */
.brand img {
  transition: box-shadow 0.4s ease;
}

.brand:hover img {
  box-shadow: 0 12px 40px rgba(39, 217, 255, 0.35);
}

/* --- 3. Przycisk do góry --- */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9997;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(6, 11, 20, 0.8);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  pointer-events: none;
  line-height: 1;
  font-family: inherit;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#back-to-top:hover {
  box-shadow: 0 0 30px rgba(39, 217, 255, 0.2);
  border-color: rgba(39, 217, 255, 0.4);
}

/* --- 4. Wejście strony (fade-in) --- */
.js .page-shell {
  animation: pageEnter 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pageEnter {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- 5. Stopka z nawigacją --- */
.footer__nav {
  display: flex;
  gap: 12px;
}

.footer__nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  transition: color 0.24s ease;
}

.footer__nav a:hover {
  color: var(--text);
}

.footer__brand {
  font-weight: 900;
}

@media (max-width: 640px) {
  .footer__nav {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* --- 6. Oszczędność ruchu dla nowych elementów --- */
@media (prefers-reduced-motion: reduce) {
  .js .page-shell {
    animation: none;
  }

  #back-to-top {
    display: none;
  }

  .brand img {
    transition: none;
  }

  .brand:hover img {
    box-shadow: 0 12px 30px rgba(39, 217, 255, 0.16);
  }
}

/* ==========================================
   🍪 COOKIE CONSENT BANNER
   ========================================== */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(700px, calc(100% - 32px));
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(6, 11, 20, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  font-size: 0.85rem;
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

#cookie-banner.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

#cookie-banner p {
  margin: 0;
  flex: 1;
  color: var(--muted);
  line-height: 1.5;
}

#cookie-banner a {
  color: var(--cyan);
  text-decoration: underline;
  transition: color 0.2s ease;
}

#cookie-banner a:hover {
  color: var(--lime);
}

#cookie-banner button {
  flex-shrink: 0;
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  color: var(--ink);
  font-weight: 900;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#cookie-banner button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(39, 217, 255, 0.2);
}

@media (max-width: 640px) {
  #cookie-banner {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cookie-banner {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition: none;
  }
}

/* ==========================================
   🎠 CAROUSEL — przewijanie projektów
   ========================================== */
.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel__track {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 390px;
}

.carousel__slide {
  display: none;
  width: 100%;
}

.carousel__slide.active {
  display: grid;
  animation: carouselIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes carouselIn {
  0% { opacity: 0; transform: translateX(24px); }
  100% { opacity: 1; transform: translateX(0); }
}

.carousel__btn {
  flex-shrink: 0;
  width: 56px;
  height: 64px;
  border: none;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease, filter 0.3s ease;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  font-family: inherit;
  padding: 0;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.5));
  transform: scale(1);
}

.carousel__btn--prev {
  clip-path: polygon(15% 50%, 100% 0, 100% 100%);
}

.carousel__btn--next {
  clip-path: polygon(0 0, 85% 50%, 0 100%);
}

.carousel__btn:hover {
  transform: scale(1.18);
  background: rgba(39, 217, 255, 0.2);
  filter: drop-shadow(0 6px 30px rgba(39, 217, 255, 0.2)) drop-shadow(0 4px 24px rgba(0, 0, 0, 0.5));
}

.carousel__btn:active {
  transform: scale(0.92);
  transition-duration: 0.08s;
}

.carousel__btn--pulse {
  animation: carouselPulse 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes carouselPulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.25); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.carousel__indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  padding: 0;
}

.carousel__dot.active {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(39, 217, 255, 0.35);
}

@media (max-width: 640px) {
  .carousel {
    gap: 6px;
  }

  .carousel__btn {
    width: 40px;
    height: 48px;
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel__slide.active {
    animation: none;
  }
}

/* ==========================================
   PROGRAMY — interaktywny prostopadłościan 3D
   ========================================== */
.programs-cuboid-section {
  overflow: visible;
}

.program-cuboid-widget {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: 48px;
  align-items: center;
  min-height: 600px;
}

.cuboid-copy {
  max-width: 520px;
}

.cuboid-copy h2 {
  font-size: clamp(2.2rem, 4vw, 4.4rem);
}

.cuboid-copy p {
  color: var(--muted);
  line-height: 1.72;
}

.cuboid-stage {
  --cuboid-w: 270px;
  --cuboid-h: 560px;
  --cuboid-d: 270px;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  perspective: 1200px;
  cursor: default;
  touch-action: none;
}

.cuboid-stage::before {
  content: "";
  position: absolute;
  width: min(72vw, 480px);
  height: min(72vw, 480px);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(39, 217, 255, 0.18), transparent 58%),
    radial-gradient(circle at 70% 70%, rgba(156, 255, 108, 0.1), transparent 48%);
  filter: blur(4px);
}

.cuboid-stage::after {
  content: "";
  position: absolute;
  bottom: 34px;
  width: min(78vw, 480px);
  height: 70px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(18px);
  transform: rotateX(64deg);
}

.cuboid-stage.is-dragging {
  cursor: grabbing;
}

.program-cuboid {
  position: relative;
  z-index: 2;
  width: var(--cuboid-w);
  height: var(--cuboid-h);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, -13deg)) rotateY(var(--ry, -24deg));
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cuboid-stage.is-dragging .program-cuboid {
  transition: none;
}

.cuboid-controls {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(calc(var(--cuboid-w) + 220px), 100%);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.cuboid-control {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #ffffff;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.55), transparent 18px),
    conic-gradient(from 210deg, rgba(39, 217, 255, 0.72), rgba(156, 255, 108, 0.28), rgba(159, 124, 255, 0.48), rgba(39, 217, 255, 0.72)),
    rgba(8, 14, 25, 0.86);
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.46),
    0 0 30px rgba(39, 217, 255, 0.22),
    inset 0 0 0 9px rgba(5, 9, 17, 0.62),
    inset 0 0 28px rgba(255, 255, 255, 0.16);
  cursor: pointer;
  font-size: 0;
  pointer-events: auto;
  transform: translateY(0) rotateX(0deg) rotateZ(0deg);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.cuboid-control::before,
.cuboid-control::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.cuboid-control::before {
  inset: -8px;
  border: 1px solid rgba(39, 217, 255, 0.22);
  border-radius: inherit;
  z-index: -1;
  box-shadow: 0 0 34px rgba(39, 217, 255, 0.2);
}

.cuboid-control::after {
  z-index: 1;
  width: 24px;
  height: 24px;
  border-top: 7px solid rgba(255, 255, 255, 0.9);
  border-right: 7px solid rgba(255, 255, 255, 0.9);
  filter:
    drop-shadow(0 0 3px rgba(255, 255, 255, 0.66))
    drop-shadow(0 0 12px rgba(39, 217, 255, 0.74));
  opacity: 0.92;
}

.cuboid-control--prev::after {
  transform: translateX(4px) rotate(-135deg);
}

.cuboid-control--next::after {
  transform: translateX(-4px) rotate(45deg);
}

.cuboid-control--prev {
  transform: translateX(-40px) rotateY(-14deg);
}

.cuboid-control--next {
  transform: translateX(8px) rotateY(14deg);
}

.cuboid-control:hover,
.cuboid-control:focus-visible {
  border-color: rgba(39, 217, 255, 0.72);
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.64), transparent 18px),
    conic-gradient(from 210deg, rgba(39, 217, 255, 0.9), rgba(156, 255, 108, 0.42), rgba(159, 124, 255, 0.7), rgba(39, 217, 255, 0.9)),
    rgba(9, 19, 34, 0.94);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.44),
    0 0 44px rgba(39, 217, 255, 0.34),
    inset 0 0 0 9px rgba(5, 9, 17, 0.58),
    inset 0 0 30px rgba(255, 255, 255, 0.18);
  outline: none;
}

.cuboid-control:hover::after,
.cuboid-control:focus-visible::after {
  border-color: rgba(255, 255, 255, 0.98);
  opacity: 1;
  filter:
    drop-shadow(0 0 4px rgba(255, 255, 255, 0.86))
    drop-shadow(0 0 18px rgba(39, 217, 255, 0.94));
}

.cuboid-control--prev:hover,
.cuboid-control--prev:focus-visible {
  transform: translate(-52px, -2px) rotateY(-24deg) scale(1.05);
}

.cuboid-control--next:hover,
.cuboid-control--next:focus-visible {
  transform: translate(14px, -2px) rotateY(24deg) scale(1.05);
}

.cuboid-control:active {
  transform: translateY(1px) scale(0.96);
}

.cuboid-control--prev:active {
  transform: translate(-40px, 1px) rotateY(-14deg) scale(0.96);
}

.cuboid-control--next:active {
  transform: translate(8px, 1px) rotateY(14deg) scale(0.96);
}

.cuboid-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  color: var(--text);
  text-decoration: none;
  background:
    radial-gradient(circle at 82% 16%, color-mix(in srgb, var(--face-accent, var(--cyan)), transparent 62%), transparent 13rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.055)),
    rgba(7, 11, 20, 0.92);
  backface-visibility: hidden;
  box-shadow: inset 0 0 34px rgba(255, 255, 255, 0.05);
}

.cuboid-face::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 24px 24px;
}

.cuboid-face__image,
.cuboid-face__content {
  position: relative;
  z-index: 2;
}

.cuboid-face__image {
  overflow: hidden;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.24);
}

.cuboid-face__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.cuboid-face__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 178px;
}

.cuboid-face__content h3 {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
}

.cuboid-face__content p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.cuboid-face__tag {
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--face-accent, var(--cyan)), white 28%);
  border-radius: 999px;
  color: var(--face-accent, var(--cyan));
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cuboid-face__cta {
  color: var(--text);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: var(--face-accent, var(--cyan));
  text-underline-offset: 5px;
}

.cuboid-face--front {
  transform: translateZ(calc(var(--cuboid-d) / 2));
}

.cuboid-face--back {
  transform: rotateY(180deg) translateZ(calc(var(--cuboid-d) / 2));
}

.cuboid-face--right {
  width: var(--cuboid-d);
  left: calc((var(--cuboid-w) - var(--cuboid-d)) / 2);
  transform: rotateY(90deg) translateZ(calc(var(--cuboid-w) / 2));
}

.cuboid-face--left {
  width: var(--cuboid-d);
  left: calc((var(--cuboid-w) - var(--cuboid-d)) / 2);
  transform: rotateY(-90deg) translateZ(calc(var(--cuboid-w) / 2));
}

.cuboid-face--top {
  height: var(--cuboid-d);
  top: calc((var(--cuboid-h) - var(--cuboid-d)) / 2);
  transform: rotateX(90deg) translateZ(calc(var(--cuboid-h) / 2));
}

.cuboid-face--bottom {
  height: var(--cuboid-d);
  top: calc((var(--cuboid-h) - var(--cuboid-d)) / 2);
  transform: rotateX(-90deg) translateZ(calc(var(--cuboid-h) / 2));
}

.cuboid-face--right,
.cuboid-face--left,
.cuboid-face--top,
.cuboid-face--bottom {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
}

.cuboid-face--right .cuboid-face__image,
.cuboid-face--left .cuboid-face__image,
.cuboid-face--top .cuboid-face__image,
.cuboid-face--bottom .cuboid-face__image {
  min-height: 0;
}

@media (max-width: 980px) {
  .program-cuboid-widget {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .cuboid-copy {
    max-width: 760px;
  }

}

@media (max-width: 640px) {
  .cuboid-stage {
    --cuboid-w: 230px;
    --cuboid-h: 475px;
    --cuboid-d: 230px;
    min-height: 520px;
  }

  .cuboid-face {
    padding: 14px;
    gap: 10px;
  }

  .cuboid-face__content p {
    display: none;
  }

  .cuboid-face__content {
    min-height: 120px;
  }

  .cuboid-controls {
    width: min(calc(var(--cuboid-w) + 118px), 100%);
  }

  .cuboid-control {
    width: 50px;
    height: 50px;
    box-shadow:
      0 18px 38px rgba(0, 0, 0, 0.42),
      0 0 20px rgba(39, 217, 255, 0.2),
      inset 0 0 0 7px rgba(5, 9, 17, 0.62),
      inset 0 0 20px rgba(255, 255, 255, 0.14);
  }

  .cuboid-control::after {
    width: 19px;
    height: 19px;
    border-top-width: 6px;
    border-right-width: 6px;
  }

  .cuboid-control--prev {
    transform: translateX(-22px) rotateY(-14deg);
  }

  .cuboid-control--prev:hover,
  .cuboid-control--prev:focus-visible {
    transform: translate(-28px, -2px) rotateY(-24deg) scale(1.05);
  }

  .cuboid-control--prev:active {
    transform: translate(-22px, 1px) rotateY(-14deg) scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .program-cuboid {
    transition: none;
  }
}
