* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}

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

::selection {
  background: rgba(236, 72, 153, 0.25);
  color: #111827;
}

.rp-video-section {
  padding: clamp(22px, 4vw, 48px) 20px;
  background:
    radial-gradient(circle at 15% 20%, rgba(236, 72, 153, 0.28), transparent 34%),
    radial-gradient(circle at 85% 15%, rgba(34, 211, 238, 0.18), transparent 32%),
    #05070b;
}

.rp-video-shell {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 24px;
  background: #0a0a0a;
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.45);
}

.rp-video-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0a0a0a;
  pointer-events: none;
}

.hero-motion-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(236, 72, 153, 0.55), transparent 25%),
    radial-gradient(circle at 82% 16%, rgba(129, 140, 248, 0.46), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(34, 211, 238, 0.18), transparent 40%),
    linear-gradient(135deg, #02050b 0%, #0f172a 45%, #111827 100%);
  overflow: hidden;
  transform: scale(1.04);
  animation: hero-breathe 8s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-motion-bg::before,
.hero-motion-bg::after {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
}

.hero-motion-bg::before {
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.28) 32%, transparent 72%);
  transform: translateX(-16%) translateY(0);
  animation: hero-shift 8s ease-in-out infinite alternate;
}

.hero-motion-bg::after {
  background-image: linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.95), transparent 94%);
  opacity: 0.85;
  animation: hero-pan 10s linear infinite;
  will-change: transform;
}

.hero-ring {
  position: absolute;
  right: -10%;
  top: 16%;
  width: min(32vw, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  box-shadow: inset 0 0 90px rgba(255,255,255,0.05), 0 0 80px rgba(244, 114, 182, 0.2);
  animation: hero-spin 14s linear infinite;
  will-change: transform;
}

.hero-ring::before,
.hero-ring::after {
  content: "";
  position: absolute;
  border-radius: inherit;
}

.hero-ring::before {
  inset: 13%;
  border: 1px dashed rgba(255,255,255,0.22);
}

.hero-ring::after {
  top: 7%;
  left: 50%;
  width: 14px;
  height: 14px;
  background: #f472b6;
  box-shadow: 0 0 28px rgba(244, 114, 182, 0.8);
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.9;
  animation: hero-float 7s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-orb.one {
  width: 190px;
  height: 190px;
  left: 8%;
  bottom: 6%;
  background: rgba(236, 72, 153, 0.34);
}

.hero-orb.two {
  width: 240px;
  height: 240px;
  right: 12%;
  bottom: -6%;
  background: rgba(129, 140, 248, 0.28);
  animation-delay: -4s;
}

.hero-content-grid {
  animation: hero-fade-up 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-panel {
  position: relative;
  z-index: 1;
  animation: hero-fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-panel-main {
  animation-delay: 0.08s;
}

.hero-panel-side {
  animation-delay: 0.16s;
}

@keyframes hero-breathe {
  0% { transform: scale(1.02) translate3d(-1%, 0, 0); }
  100% { transform: scale(1.08) translate3d(2%, -2%, 0); }
}

@keyframes hero-shift {
  0% { transform: translateX(-22%) translateY(0); }
  100% { transform: translateX(22%) translateY(-10%); }
}

@keyframes hero-pan {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-84px, 84px, 0); }
}

@keyframes hero-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes hero-float {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-16px); }
}

@keyframes hero-fade-up {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.rp-work-section {
  padding: 72px 20px 88px;
  background: linear-gradient(135deg, #111827 0%, #0f172a 48%, #1e293b 100%);
  color: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rp-work-header {
  max-width: 1180px;
  margin: 0 auto 28px;
  text-align: center;
}

.rp-work-header p {
  margin: 0 0 8px;
  opacity: 0.74;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.rp-work-header h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.rp-carousel {
  max-width: 1180px;
  margin: 0 auto;
  overflow-x: auto;
  padding: 8px 4px 24px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.35) transparent;
  scroll-behavior: smooth;
}

.rp-carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 20px;
  width: max-content;
}

.rp-carousel.is-marquee {
  position: relative;
  overflow: hidden;
  padding-right: 0;
  padding-left: 0;
  scroll-snap-type: none;
  scrollbar-width: none;
}

.rp-carousel.is-marquee::-webkit-scrollbar {
  display: none;
}

.rp-carousel.is-marquee::before,
.rp-carousel.is-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 16px;
  z-index: 4;
  width: min(12vw, 96px);
  pointer-events: none;
}

.rp-carousel.is-marquee::before {
  left: 0;
  background: linear-gradient(90deg, #111827, rgba(17,24,39,0));
}

.rp-carousel.is-marquee::after {
  right: 0;
  background: linear-gradient(270deg, #1e293b, rgba(30,41,59,0));
}

.rp-carousel.is-marquee .rp-carousel-track {
  display: flex;
  gap: 20px;
  animation: rp-carousel-marquee var(--carousel-duration, 52s) linear infinite;
  will-change: transform;
}

.rp-carousel.is-paused .rp-carousel-track,
.rp-carousel.is-marquee:hover .rp-carousel-track,
.rp-carousel.is-marquee:focus-within .rp-carousel-track {
  animation-play-state: paused;
}

.rp-carousel::-webkit-scrollbar {
  height: 8px;
}

.rp-carousel::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.28);
  border-radius: 999px;
}

.rp-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  border-radius: 24px;
  overflow: hidden;
  scroll-snap-align: start;
  background: #151515;
  box-shadow: 0 18px 42px rgba(0,0,0,0.35);
  text-decoration: none;
  isolation: isolate;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.rp-carousel.is-marquee .rp-card {
  flex: 0 0 clamp(260px, 28vw, 320px);
  scroll-snap-align: none;
}

.rp-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.55s ease, filter 0.55s ease;
}

.rp-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.7));
  z-index: 1;
}

.rp-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-18deg);
  z-index: 2;
  transition: left 0.7s ease;
}

.rp-card:hover,
.rp-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(0,0,0,0.5);
}

.rp-card:hover img,
.rp-card:focus-visible img {
  transform: scale(1.08);
  filter: contrast(1.05) saturate(1.05);
}

.rp-card:hover::before,
.rp-card:focus-visible::before {
  left: 125%;
}

.rp-card-label {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 3;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  transform: translateY(6px);
  transition: transform 0.35s ease;
}

.rp-card-label small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.82;
}

.rp-card:hover .rp-card-label,
.rp-card:focus-visible .rp-card-label {
  transform: translateY(0);
}

@keyframes rp-carousel-marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(calc(var(--carousel-distance, 0px) * -1), 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-motion-bg,
  .hero-motion-bg::before,
  .hero-motion-bg::after,
  .hero-ring,
  .hero-orb,
  .hero-content-grid,
  .hero-panel,
  .rp-carousel-track {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .rp-video-section {
    padding: 14px 12px;
  }

  .rp-video-shell {
    border-radius: 18px;
  }

  .rp-work-section {
    padding: 56px 14px 72px;
  }

  .rp-carousel-track {
    grid-auto-columns: minmax(84%, 84%);
    gap: 14px;
  }

  .rp-carousel.is-marquee .rp-carousel-track {
    gap: 14px;
  }

  .rp-carousel.is-marquee .rp-card {
    flex-basis: 84vw;
  }
}
