/* css/robert.css */

/* =========================================
   1. GLOBAL VARIABLES & RESET (SCOPED)
   ========================================= */

.rp-wrapper {
  --rp-z-negative: -1;
  --rp-z-base: 1;
  --rp-z-part3: 2;
  --rp-z-part4: 5;
  --rp-z-part2: 4;
  --rp-z-part1: 5;
  --rp-z-pinned: 100;
  --rp-z-content: 10;

  --rp-cube-size: 164px;
  --rp-cube-half: calc(var(--rp-cube-size) / 2);

  --rp-color-bg: #000000;
  --rp-color-text: #ffcc00;
  --rp-color-text-muted: #cccccc;

  --rp-font-heading: var(--font-primary, "Bebas Neue", sans-serif);
  --rp-font-body:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  width: 100%;
  position: relative;
  isolation: isolate;
  background-color: var(--rp-color-bg);
  color: var(--rp-color-text);
  font-family: var(--rp-font-body);

  overflow: clip;
  box-sizing: border-box;
}

body.layout-mobile .rp-wrapper {
  --rp-cube-size: 100px;
}

.rp-wrapper *,
.rp-wrapper *::before,
.rp-wrapper *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.rp-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  backface-visibility: hidden;
  user-select: none;
}

.rp-wrapper h1,
.rp-wrapper h2,
.rp-wrapper h3 {
  font-family: var(--rp-font-heading);
  font-weight: normal;
  text-transform: uppercase;
  line-height: 1;
  color: var(--rp-color-text);
  margin: 0;
}

.rp-wrapper p,
.rp-wrapper a,
.rp-wrapper li {
  font-family: var(--rp-font-body);
  font-weight: 500;
  color: var(--rp-color-text);
}

/* =========================================
   2. PART 1 STYLES (Scoped)
   ========================================= */
#rp-part1 {
  position: relative;
  z-index: var(--rp-z-part1);
  pointer-events: none;
}
#rp-part1 .rp-container {
  pointer-events: auto;
}

#rp-part1 h1 {
  font-size: clamp(60px, 14vw, 200px);
  letter-spacing: 0px;
}

#rp-part1 section.rp-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.rp-hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
}

#rp-part1 .rp-hero h1 {
  color: #fff;
}

#rp-part1 section.rp-info {
  width: 100%;
  height: 100vh;
  background-color: var(--rp-color-bg);
}
#rp-part1 .rp-header-row {
  width: 100%;
  height: 250px;
  padding: 0 2em;
}
#rp-part1 .rp-header-row:nth-child(1) {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
#rp-part1 .rp-header-row:nth-child(2) {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

#rp-part1 .rp-header-info {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--rp-color-bg);
}
#rp-part1 .rp-header-info p {
  padding: 1em;
  font-size: clamp(24px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--rp-color-text-muted);
}
#rp-part1 .rp-header-images {
  width: 100%;
  height: 250px;
  padding: 1em;
  display: flex;
  gap: 1em;
}
#rp-part1 .rp-img-wrapper {
  width: 100%;
  height: 100%;
}

#rp-part1 section.rp-pinned {
  position: absolute;
  top: 100vh;
  width: 100%;
  height: 250vh;
  z-index: var(--rp-z-pinned);
}
#rp-part1 section.rp-whitespace {
  position: relative;
  width: 100%;
  height: 125vh;
  background-color: transparent;
  z-index: var(--rp-z-negative);
  pointer-events: none;
}
#rp-part1 .rp-revealer {
  position: absolute;
  left: 35%;
  margin-top: 325px;
  width: 120px;
  height: 120px;
  transform: translate(-50%, 0%);
  z-index: var(--rp-z-pinned);
}
#rp-part1 .rp-revealer-1,
#rp-part1 .rp-revealer-2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--rp-color-text);
  clip-path: polygon(45% 0%, 55% 0%, 55% 100%, 45% 100%);
}
#rp-part1 .rp-revealer-2 {
  transform: rotate(90deg);
}

#rp-part1 section.rp-website-content {
  position: relative;
  width: 100%;
  height: 60vh;
  background-color: transparent;
  z-index: var(--rp-z-content);
  visibility: hidden !important;
  opacity: 0 !important;
  color: transparent !important;
  pointer-events: none;
}
#rp-part1 .rp-website-content h1 {
  visibility: hidden !important;
  opacity: 0 !important;
  color: transparent !important;
  font-size: clamp(32px, 5vw, 72px);
  letter-spacing: 0;
  padding: 5%;
}

/* =========================================
   3. PART 2 STYLES (Scoped)
   ========================================= */
#rp-part2 {
  position: relative;
  z-index: var(--rp-z-part2);
  margin-top: -100vh;
}

#rp-part2 section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
#rp-part2 .rp-sticky {
  background-color: var(--rp-color-bg);
  color: var(--rp-color-text);
}

#rp-part2 .rp-logo {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 24px;
  z-index: 2;
}
#rp-part2 .rp-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
#rp-part2 .rp-col:nth-child(2) {
  gap: 26px;
}
#rp-part2 .rp-block {
  width: 35px;
  height: 35px;
  background-color: var(--rp-color-text);
}
#rp-part2 .rp-block-1 {
  transform: rotate(42deg);
  transform-origin: bottom right;
}
#rp-part2 .rp-block-5 {
  transform: rotate(-42deg);
  transform-origin: bottom left;
}
#rp-part2 .rp-cubes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  transform-style: preserve-3d;
  perspective: 10000px;
  visibility: hidden;
}
#rp-part2 .rp-cube {
  position: absolute;
  width: var(--rp-cube-size);
  height: var(--rp-cube-size);
  transform-style: preserve-3d;
}
#rp-part2 .rp-cube > div {
  position: absolute;
  width: var(--rp-cube-size);
  height: var(--rp-cube-size);
  transform-style: preserve-3d;
  padding: 1px;
  background-color: var(--rp-color-bg);
  overflow: hidden;
  backface-visibility: hidden;
}
#rp-part2 .rp-front {
  transform: translateZ(var(--rp-cube-half));
}
#rp-part2 .rp-back {
  transform: translateZ(calc(var(--rp-cube-half) * -1)) rotateY(180deg);
}
#rp-part2 .rp-right {
  transform: translateX(var(--rp-cube-half)) rotateY(90deg);
}
#rp-part2 .rp-left {
  transform: translateX(calc(var(--rp-cube-half) * -1)) rotateY(-90deg);
}
#rp-part2 .rp-top {
  transform: translateY(calc(var(--rp-cube-half) * -1)) rotateX(90deg);
}
#rp-part2 .rp-bottom {
  transform: translateY(var(--rp-cube-half)) rotateX(-90deg);
}

#rp-part2 .rp-header-1,
#rp-part2 .rp-header-2 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--rp-color-text);
}
#rp-part2 .rp-header-1 {
  width: 60%;
}
#rp-part2 .rp-header-1 h1 {
  font-size: 4rem;
}
#rp-part2 .rp-header-2 {
  width: 30%;
  transform: translate(-50%, -50%) scale(0.75);
  opacity: 0;
  filter: blur(10px);
}
#rp-part2 .rp-header-2 h2 {
  font-size: 5.5rem;
  margin-bottom: 0.5rem;
}
#rp-part2 .rp-header-2 p {
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--rp-color-text-muted);
}

body.layout-mobile #rp-part2 .rp-header-2 {
  display: none !important;
}

/* =========================================
   4. PART 3 STYLES (Scoped)
   ========================================= */
#rp-part3 {
  position: relative;
  z-index: var(--rp-z-part3);
  width: 100%;
  background-color: var(--rp-color-bg);
  color: var(--rp-color-text);
}
#rp-part3 p {
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.2;
}
#rp-part3 section {
  width: 100%;
  height: 100vh;
}

#rp-part3 section.rp-marquees {
  height: 200vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--rp-color-bg);
  color: var(--rp-color-text);
}
#rp-part3 .rp-marquee-container {
  position: relative;
  width: 125%;
  height: 250px;
  display: flex;
  margin-bottom: 1em;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}
#rp-part3 .rp-marquee-container.is-ready {
  opacity: 1;
  visibility: visible;
}
#rp-part3 .rp-marquee {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  display: flex;
  gap: 1em;
}

#rp-part3 #rp-marquee-1 .rp-marquee,
#rp-part3 #rp-marquee-3 .rp-marquee,
#rp-part3 #rp-marquee-5 .rp-marquee {
  left: -15%;
}

#rp-part3 .rp-item {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
#rp-part3 .rp-item.with-text {
  flex: 1.5;
}

#rp-part3 .rp-item h1 {
  text-transform: uppercase;
  font-size: 140px;
  font-family: var(--rp-font-heading);
}

#rp-part3 .rp-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

body.layout-mobile #rp-part3 section.rp-marquees {
  height: auto;
  min-height: 100svh;
  padding: 4em 0;
}
body.layout-mobile #rp-part3 .rp-marquee-container {
  width: 250%;
  height: 150px;
}
body.layout-mobile #rp-part3 #rp-marquee-2 .rp-marquee,
body.layout-mobile #rp-part3 #rp-marquee-4 .rp-marquee {
  left: -35%;
}
body.layout-mobile #rp-part3 .rp-item.with-text {
  flex: 1;
}
body.layout-mobile #rp-part3 .rp-item h1 {
  font-size: 45px;
}

/* =========================================
   5. PART 4 STYLES (Scoped)
   ========================================= */
#rp-part4 {
  position: relative;
  z-index: var(--rp-z-part4);
  width: 100%;
  background-color: var(--rp-color-bg);
  color: var(--rp-color-text);
  overflow: hidden;
  isolation: isolate;
}
#rp-part4 section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.rp-part4-intro {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--rp-color-bg);
}
.rp-part4-intro h1 {
  font-size: clamp(60px, 10vw, 150px);
  text-transform: uppercase;
  letter-spacing: -2px;
}

#rp-part4 .rp-steps {
  position: relative;
  background-color: var(--rp-color-bg);
  width: 100%;
  height: 100vh;
}
#rp-part4 .rp-cards {
  position: absolute;
  perspective: 1000px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150vw;
  height: 800px;
  z-index: 20;
  pointer-events: none;
}
#rp-part4 .rp-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 500px;
  min-width: 300px;
  height: 550px;
  display: flex;
  flex-direction: column;
  gap: 1em;
  pointer-events: auto;
}
#rp-part4 .rp-card-img {
  flex: 1;
  border-radius: 0.5em;
  overflow: hidden;
  border: 1px solid #333;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
#rp-part4 .rp-card:hover .rp-card-img {
  transform: scale(1.03);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

#rp-part4 .rp-card-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}
#rp-part4 .rp-card-content h3 {
  font-family: var(--rp-font-heading);
  font-size: 28px;
  color: var(--rp-color-text);
  margin: 0;
  text-align: left;
  letter-spacing: 0.5px;
}
#rp-part4 .rp-card-content p {
  text-align: left;
  color: var(--rp-color-text-muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  font-family: var(--rp-font-body);
  margin: 0;
  white-space: normal;
  overflow-wrap: break-word;
}

#rp-part4 .rp-step-counter {
  position: absolute;
  top: 45%;
  left: 5%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 30px;
  z-index: 5;
}
#rp-part4 .rp-counter-title {
  position: relative;
  width: auto;
  height: 150px;
}
#rp-part4 .rp-count {
  position: relative;
  width: 200px;
  height: 150px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
  overflow: hidden;
}
#rp-part4 .rp-count-container {
  position: relative;
}
#rp-part4 .rp-step-counter h1,
#rp-part4 .rp-count-number {
  width: 100%;
  color: var(--rp-color-text);
  text-transform: uppercase;
  font-family: var(--rp-font-heading);
  font-weight: 400;
  font-size: 150px;
  line-height: 150px;
  margin: 0;
}
#rp-part4 .rp-empty {
  opacity: 0;
  visibility: hidden;
}

body.layout-mobile #rp-part4 .rp-card {
  width: 300px;
  height: 400px;
  margin-left: 0;
  margin-top: 0;
}

body.layout-mobile #rp-part4 .rp-step-counter {
  display: none !important;
}

body.layout-mobile #rp-part4 .rp-step-counter h1,
body.layout-mobile #rp-part4 .rp-count-number {
  font-size: 60px;
  line-height: 60px;
}
body.layout-mobile #rp-part4 .rp-counter-title,
body.layout-mobile #rp-part4 .rp-count {
  height: 60px;
}

/* =========================================
   6. PART 5 STYLES (Scoped)
   ========================================= */
#rp-part5 {
  position: relative;
  isolation: isolate;
  z-index: 1;
  background-color: var(--rp-color-bg);
  color: var(--rp-color-text);
  overflow: hidden;
}

#rp-part5 h1 {
  font-size: 5rem;
  letter-spacing: -0.1rem;
  line-height: 0.9;
  text-transform: uppercase;
}

#rp-part5 section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 2rem;
  overflow: hidden;
}

#rp-part5 .rp-spotlight {
  background-color: var(--rp-color-bg);
  color: var(--rp-color-text);
  z-index: 1;
  contain: layout paint;
}

#rp-part5 .rp-spotlight-images,
#rp-part5 .rp-spotlight-cover-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  perspective: 2000px;
  pointer-events: none;
}

#rp-part5 .rp-spotlight-item {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 350px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#rp-part5 .rp-spotlight-cover-img {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#rp-part5 .rp-spotlight-intro-header,
#rp-part5 .rp-spotlight-outro-header {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 50%;
}
#rp-part5 .rp-spotlight-intro-header {
  z-index: 1;
}
#rp-part5 .rp-spotlight-outro-header {
  z-index: 10;
}

#rp-part5 .rp-outro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5em;
  background-color: #111;
  color: var(--rp-color-text);
  padding: 2em;
}
#rp-part5 .rp-outro h1 {
  width: 50%;
  text-align: center;
  margin: 0;
}

#rp-part5 .rp-outro p {
  width: 50%;
  text-align: center;
  color: var(--rp-color-text-muted);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 500;
  line-height: 1.5;
  font-family: var(--rp-font-body);
  margin: 0;
}

body.layout-mobile #rp-part5 h1,
body.layout-mobile #rp-part5 .rp-outro h1 {
  font-size: 3rem;
  width: 100%;
}
body.layout-mobile #rp-part5 .rp-spotlight-intro-header,
body.layout-mobile #rp-part5 .rp-spotlight-outro-header {
  width: 100%;
  padding: 2rem;
}
body.layout-mobile #rp-part5 .rp-spotlight-item {
  width: 250px;
  height: 444px;
}

/* =========================================
   7. MOBILE ARCHITECTURE: VIEWPORT & SAFE AREAS
   JS-DRIVEN: body.layout-mobile
   ========================================= */

/* Define OS Safe Area Variables */
body.layout-mobile .rp-wrapper {
  --rp-safe-top: env(safe-area-inset-top, 0px);
  --rp-safe-bottom: env(safe-area-inset-bottom, 0px);
  --rp-safe-left: env(safe-area-inset-left, 0px);
  --rp-safe-right: env(safe-area-inset-right, 0px);
}

body.layout-mobile #rp-part1 section.rp-hero,
body.layout-mobile #rp-part1 section.rp-info,
body.layout-mobile #rp-part1 .rp-header-info,
body.layout-mobile #rp-part2 section,
body.layout-mobile #rp-part3 section,
body.layout-mobile #rp-part4 section,
body.layout-mobile .rp-part4-intro,
body.layout-mobile #rp-part4 .rp-steps,
body.layout-mobile #rp-part5 section {
  padding-top: var(--rp-safe-top);
  padding-bottom: var(--rp-safe-bottom);
  padding-left: var(--rp-safe-left);
  padding-right: var(--rp-safe-right);
}

body.layout-mobile #rp-part1 section.rp-hero,
body.layout-mobile #rp-part1 section.rp-info,
body.layout-mobile #rp-part1 .rp-header-info {
  height: 100svh;
}
body.layout-mobile #rp-part1 section.rp-pinned {
  height: 250svh;
}
body.layout-mobile #rp-part1 section.rp-whitespace {
  height: 125svh;
}
body.layout-mobile #rp-part1 section.rp-website-content {
  height: 60svh;
}

body.layout-mobile #rp-part2 {
  margin-top: -100svh;
}
body.layout-mobile #rp-part2 section,
body.layout-mobile #rp-part2 .rp-cubes {
  height: 100svh;
}

body.layout-mobile #rp-part2 .rp-logo {
  top: 23%;
}

body.layout-mobile #rp-part3 section {
  height: 100svh;
}

body.layout-mobile #rp-part4 section,
body.layout-mobile .rp-part4-intro,
body.layout-mobile #rp-part4 .rp-steps {
  height: 100svh;
}

body.layout-mobile #rp-part5 section {
  min-height: 100svh;
}

/* =========================================
   8. LANDSCAPE TABLETS & SMALL LAPTOPS
   (The "In-Between" Desktop Replica)
   JS-DRIVEN: body.layout-landscape-tablet
   ========================================= */

body.layout-landscape-tablet .rp-wrapper {
  --rp-cube-size: 120px;
}
body.layout-landscape-tablet #rp-part2 .rp-header-1 h1 {
  font-size: 3rem;
}
body.layout-landscape-tablet #rp-part2 .rp-header-2 h2 {
  font-size: 4rem;
}
body.layout-landscape-tablet #rp-part2 .rp-header-2 p {
  font-size: 1.3rem;
}

body.layout-landscape-tablet #rp-part3 .rp-item h1 {
  font-size: 100px;
}

body.layout-landscape-tablet #rp-part4 .rp-step-counter h1,
body.layout-landscape-tablet #rp-part4 .rp-count-number {
  font-size: 100px;
  line-height: 100px;
}
body.layout-landscape-tablet #rp-part4 .rp-counter-title,
body.layout-landscape-tablet #rp-part4 .rp-count {
  height: 100px;
}

body.layout-landscape-tablet #rp-part1 .rp-revealer {
  width: 90px;
  height: 90px;
  margin-top: 250px;
}

body.layout-landscape-tablet #rp-part3 .rp-marquee-container {
  height: 160px;
}

body.layout-landscape-tablet #rp-part4 .rp-cards {
  height: 600px;
}
body.layout-landscape-tablet #rp-part4 .rp-card {
  height: 400px;
  max-width: 380px;
}

body.layout-landscape-tablet #rp-part4 .rp-step-counter {
  display: none !important;
}

body.layout-landscape-tablet #rp-part5 h1 {
  font-size: 4rem;
}
body.layout-landscape-tablet #rp-part5 .rp-spotlight-item {
  width: 380px;
  height: 266px;
}
