/* Vazirmatn loads async from HTML — don't block first paint with @import */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 100 900;
  font-display: optional;
  src: local('Vazirmatn'), local('Vazirmatn Regular');
}

html {
  overflow: hidden;
  overflow-x: hidden;
  height: 100%;
  max-width: 100%;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge legacy */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

body {
  overflow: hidden;
  overflow-x: hidden;
  height: 100vh;
  height: 100dvh;
  max-width: 100%;
  background: #010204;
  margin: 0;
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Keep scroll working where needed, but never show the bar */
.phase-ui,
#phase4-ui,
#phase5-ui,
.constellation-block,
.blog-slider__formula {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* سحابی سبک فول‌اسکرین — فقط CSS؛ رنگ‌ها با progress فاز عوض می‌شوند */
#blue-nebula-bg {
  --neb-base-mid: #0a1528;
  --neb-base-deep: #050b16;
  --neb-a: rgba(64, 130, 178, 0.34);
  --neb-b: rgba(78, 88, 158, 0.22);
  --neb-c: rgba(48, 160, 175, 0.14);
  --neb-d: rgba(96, 78, 168, 0.12);
  --neb-haze-a: rgba(120, 175, 220, 0.07);
  --neb-haze-b: rgba(90, 140, 200, 0.06);
  --neb-a-pos: 26% 30%;
  --neb-b-pos: 76% 58%;
  --neb-c-pos: 52% 52%;
  --neb-d-pos: 64% 26%;
  --neb-haze-a-pos: 42% 58%;
  --neb-haze-b-pos: 62% 38%;
  --neb-base-pos: 50% 48%;
  position: fixed;
  top: -6vh;
  left: -6vw;
  width: 112vw;
  height: 112vh;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 55% at var(--neb-base-pos), var(--neb-base-mid) 0%, var(--neb-base-deep) 42%, #010204 100%);
}

#blue-nebula-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 46% 34% at var(--neb-a-pos), var(--neb-a) 0%, transparent 70%),
    radial-gradient(ellipse 40% 32% at var(--neb-b-pos), var(--neb-b) 0%, transparent 68%),
    radial-gradient(ellipse 55% 26% at var(--neb-c-pos), var(--neb-c) 0%, transparent 72%),
    radial-gradient(ellipse 34% 40% at var(--neb-d-pos), var(--neb-d) 0%, transparent 66%);
  animation: nebulaDriftA 48s ease-in-out infinite alternate;
}

#blue-nebula-bg::after {
  content: '';
  position: absolute;
  inset: -5%;
  background:
    radial-gradient(ellipse 95% 32% at var(--neb-haze-a-pos), var(--neb-haze-a) 0%, transparent 58%),
    radial-gradient(ellipse 70% 48% at var(--neb-haze-b-pos), var(--neb-haze-b) 0%, transparent 62%),
    radial-gradient(circle at 50% 50%, transparent 40%, rgba(1, 2, 6, 0.35) 100%);
  animation: nebulaDriftB 64s ease-in-out infinite alternate;
}

@keyframes nebulaDriftA {
  from { transform: translate3d(-1.2%, -0.6%, 0) scale(1); }
  to   { transform: translate3d(1.4%, 0.8%, 0) scale(1.03); }
}

@keyframes nebulaDriftB {
  from { transform: translate3d(0.8%, 0.5%, 0) rotate(-2deg); }
  to   { transform: translate3d(-1%, -0.7%, 0) rotate(2deg); }
}

#gold-nebula-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(ellipse 65% 50% at 48% 42%, rgba(110, 72, 32, 0.4) 0%, transparent 58%),
    radial-gradient(circle at center, #3d230d 0%, #201106 35%, #0d0602 65%, #000000 100%);
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  pointer-events: none;
  z-index: -1;
}

/* Custom neon cursor — فقط وقتی نشانگر واقعی موس هست (نه تاچ موبایل) */
@media (hover: hover) and (pointer: fine) {
  html,
  body,
  *,
  *::before,
  *::after {
    cursor: url('/MCursor/cursor-arrow.png') 4 2, auto !important;
  }

  /* لینک‌ها، دکمه‌ها و درگاه‌های ارتباطی — Hand Pointer */
  a,
  a *,
  button,
  button *,
  [role="button"],
  [role="button"] *,
  .contact-pill-card:not(.contact-pill-static),
  .contact-pill-card:not(.contact-pill-static) *,
  .capability-selector-card,
  .capability-selector-card *,
  .swiper-pagination-bullet,
  .swiper-pagination-bullet *,
  .blog-slider__pagination,
  .blog-slider__pagination *,
  input[type="submit"],
  input[type="button"],
  label[for],
  summary {
    cursor: url('/MCursor/cursor-hand.png') 20 3, pointer !important;
  }
}

.space {
  width: 100%;
  width: 100vw;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  position: absolute;
  top: 0;
  left: 0;
  isolation: isolate;
  object-fit: contain;
  /* جلوگیری از جابجایی ناخواسته SVG ها */
  display: flex;
  align-items: center;
  justify-content: center;
}

#Ring {
  mix-blend-mode: difference;
}

#explosionCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10;
  object-fit: contain;
  will-change: transform;
}

.Scene, .mamboleoo, #Grid, #Inner, #Particles {
  will-change: transform, opacity;
}

.mamboleoo {
  opacity: 0;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: opacity 1s ease-in-out;
  will-change: opacity, transform;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.25;
    box-shadow: 0 0 2px #C5A880;
  }
  50% {
    opacity: 1.0;
    box-shadow: 0 0 12px #C5A880, 0 0 20px #C5A880;
  }
}

#intro-overlay {
  position: absolute;
  bottom: 10vh;
  left: 0;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 20;
  direction: rtl;
  transition: opacity 0.5s ease;
}

#tagline {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.25rem;
  color: #ffffff;
  text-align: center;
  font-weight: 300;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  text-shadow: 0 0 10px rgba(197, 168, 128, 0.35);
  margin-bottom: 28px;
}

#scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.scroll-line {
  width: 2px;
  height: 25px;
  background: #C5A880;
  animation: pulseGlow 4s infinite ease-in-out;
}

@media (max-width: 768px) {
  #intro-overlay {
    bottom: 6vh;
  }
  #tagline {
    font-size: 1.0rem;
    max-width: 90%;
    margin-bottom: 10px;
  }
  .scroll-line {
    height: 18px;
  }
}

/* --- 3D SPACE FLIGHT JOURNEY MODULE STYLING --- */
#journey-ui-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: 100%;
  overflow-x: hidden;
  pointer-events: none;
  z-index: 25;
  color: white;
  direction: rtl;
}

.phase-ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  /* Keep visibility:visible so logo-anchor getBoundingClientRect stays valid for the flight engine */
  visibility: visible;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
              transform 1.0s cubic-bezier(0.25, 1, 0.5, 1);
  transform: translateY(24px);
}

/* فرزندان با pointer-events:auto نباید روی فاز غیرفعال کلیک/سلکت بگیرند */
.phase-ui:not(.active),
.phase-ui:not(.active) *,
#phase1-ui:not(.active),
#phase1-ui:not(.active) *,
#phase2-ui:not(.active),
#phase2-ui:not(.active) *,
#phase3-ui:not(.active),
#phase3-ui:not(.active) *,
#phase4-ui:not(.active),
#phase4-ui:not(.active) *,
#phase5-ui:not(.active),
#phase5-ui:not(.active) * {
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.phase-ui.active {
  opacity: 1;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
              transform 1.0s cubic-bezier(0.25, 1, 0.5, 1);
}



#phase4-ui {
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 1024px) {
  #phase4-ui {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}

@media (max-width: 640px) {
  #phase4-ui {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* Phase 1: Stabilization after explosion */
.tagline-large {
  font-size: clamp(1.05rem, 2.4vw, 1.55rem);
  font-weight: 300;
  text-align: center;
  text-shadow: 0 0 25px rgba(197, 168, 128, 0.4);
  line-height: 1.55;
  white-space: nowrap;
  max-width: none;
  padding: 0 16px;
  box-sizing: border-box;
  animation: floatText 4.5s ease-in-out infinite;
  color: #ffffff;
}

@keyframes floatText {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.scroll-indicator {
  position: absolute;
  bottom: 7vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #C5A880;
  /* ثابت — بدون حرکت مکانی */
  transform: none;
}

.scroll-cue-chevron {
  width: 56px;
  height: 20px;
  margin-top: -6px;
  color: rgba(197, 168, 128, 0.28);
  animation: scrollCueTone 2.2s ease-in-out infinite;
}

.scroll-cue-chevron:first-child {
  margin-top: 0;
}

.scroll-cue-chevron-low {
  animation-delay: 0.4s;
}

/* فقط تغییر شدت رنگ از بالا به پایین — حس جهت، بدون جابه‌جایی */
@keyframes scrollCueTone {
  0%, 100% {
    color: rgba(197, 168, 128, 0.22);
  }
  40% {
    color: rgba(197, 168, 128, 0.95);
  }
}

/* legacy */
.glow-dot {
  width: 8px;
  height: 8px;
  background: #C5A880;
  border-radius: 50%;
  box-shadow: 0 0 10px #C5A880, 0 0 20px #C5A880;
  animation: blinkDot 2.2s infinite ease-in-out;
}

@keyframes blinkDot {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1.0; transform: scale(1.2); }
}

.scroll-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 300;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

/* Phase 2: Penetrating the Depths */
.text-block {
  max-width: 600px;
  line-height: 2.1;
  font-size: calc(1.1rem + 0.45vw);
  font-weight: 300;
  text-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
}

#phase2-ui .text-block {
  position: absolute;
  left: 8%;
  right: auto;
  top: 38%;
  transform: translateY(-50%);
  text-align: right;
  direction: rtl;
  width: min(35vw, 550px);
  max-width: 550px;
  min-width: 0;
}

.text-right {
  position: absolute;
  right: 12%;
  text-align: right;
}

.text-left {
  position: absolute;
  left: 12%;
  right: auto;
  text-align: right;
}

.highlight-text {
  color: #C5A880;
  font-weight: 400;
  text-shadow: 0 0 12px rgba(197, 168, 128, 0.35);
}

/* Style defined in bottom section with dynamic bar */

/* Phase 3: Changing Angle */
.constellation-block {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: flex-start; /* Aligns to the RIGHT in RTL */
  padding-right: 12%;
}

.constellation-steps {
  display: flex;
  flex-direction: column;
  gap: calc(20px + 1.25vw);
  position: relative;
  text-align: right;
}

.constellation-steps::before {
  content: '';
  position: absolute;
  top: 28px;
  right: 22px; /* Aligns with the center of the step-num */
  width: 1px;
  height: calc(100% - 56px);
  background: linear-gradient(to bottom, transparent, rgba(197, 168, 128, 0.3) 15%, rgba(197, 168, 128, 0.3) 85%, transparent);
  box-shadow: 0 0 8px rgba(197, 168, 128, 0.4);
  z-index: 1;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 1.0s cubic-bezier(0.16, 1, 0.3, 1), transform 1.0s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
  direction: rtl;
  width: min(38vw, 650px);
  max-width: 650px;
  min-width: 0;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}

.step-description {
  font-size: calc(0.8rem + 0.1vw);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 300;
  margin: 0;
  text-align: justify;
}

.step.visible {
  opacity: 1;
  transform: translateX(0);
}

#step-1 {
  transition-delay: 0.15s;
}

#step-2 {
  transition-delay: 0.5s;
}

#step-3 {
  transition-delay: 0.85s;
}

.step-num {
  font-size: 1.35rem;
  font-family: 'Vazirmatn', sans-serif;
  font-weight: 700;
  color: #C5A880;
  border: 1px solid rgba(197, 168, 128, 0.45);
  padding: 5px 14px;
  border-radius: 8px;
  background: rgba(6, 12, 28, 0.95);
  box-shadow: 0 0 15px rgba(197, 168, 128, 0.25);
}

.step-label {
  font-size: calc(1.15rem + 0.55vw);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

/* Phase 4: Stability & Form - Modern Asymmetric Grid & Floating Panels */
.secure-header-badge-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  transform: translateY(20px);
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.phase-ui.active .secure-header-badge-wrapper {
  transform: translateY(0);
}

.secure-header-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(197, 168, 128, 0.04);
  border: 1px solid rgba(197, 168, 128, 0.22);
  border-radius: 50px; /* Fully rounded pill! */
  padding: 10px 24px;
  text-align: center;
  direction: rtl;
  box-shadow: 0 0 20px rgba(197, 168, 128, 0.08);
}

.secure-lock-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #C5A880;
  filter: drop-shadow(0 0 5px rgba(197, 168, 128, 0.4));
}

.secure-badge-text {
  font-size: 0.9rem;
  font-weight: 400;
  color: #bbf7f0;
  text-shadow: 0 0 8px rgba(197, 168, 128, 0.15);
}

.phase4-layout-grid {
  display: flex;
  gap: 40px;
  width: 90%;
  max-width: 1160px;
  margin: 0 auto;
  direction: rtl;
  align-items: flex-start; /* Asymmetric top alignment */
}

.form-box-card {
  flex: 1.25;
  background: rgba(6, 12, 26, 0.42);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(197, 168, 128, 0.16);
  border-radius: 18px;
  padding: 36px;
  box-shadow: 
    0 30px 70px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(35px);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.phase-ui.active .form-box-card {
  transform: translateY(0);
}

.contact-box-card {
  flex: 0.95;
  background: rgba(6, 12, 26, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(55px); /* Elegant stagger start */
  transition: transform 1.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.phase-ui.active .contact-box-card {
  transform: translateY(0);
}

.form-title {
  font-size: 1.45rem;
  font-weight: 300;
  margin-bottom: 32px;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.glass-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 300;
}

.glass-form textarea,
.glass-form input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 14px 16px;
  color: white;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  direction: rtl;
}

.glass-form textarea {
  min-height: 110px;
  resize: none;
}

.glass-form textarea:focus,
.glass-form input:focus {
  outline: none;
  border-color: rgba(197, 168, 128, 0.55);
  box-shadow: 0 0 12px rgba(197, 168, 128, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.submit-btn {
  position: relative;
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.25) 0%, rgba(0, 128, 128, 0.45) 100%);
  border: 1px solid rgba(197, 168, 128, 0.6);
  border-radius: 12px;
  padding: 16px;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(197, 168, 128, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  letter-spacing: 0.03em;
}

.submit-btn:hover {
  border-color: #C5A880;
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.4) 0%, rgba(0, 128, 128, 0.6) 100%);
  box-shadow: 0 6px 20px rgba(197, 168, 128, 0.35), 0 0 35px rgba(197, 168, 128, 0.15);
  transform: translateY(-2px);
}

.submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(197, 168, 128, 0.2);
}

.submit-btn span {
  position: relative;
  z-index: 2;
  text-shadow: 0 0 8px rgba(197, 168, 128, 0.5);
}

.btn-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(197, 168, 128, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: 1;
}

.submit-btn:hover .btn-glow {
  transform: translateX(100%);
}

.form-message {
  font-size: 0.95rem;
  text-align: center;
  min-height: 22px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  font-weight: 300;
}

.form-message.success {
  color: #C5A880;
  text-shadow: 0 0 8px rgba(197, 168, 128, 0.35);
}

.form-message.error {
  color: #ff6b6b;
  text-shadow: 0 0 8px rgba(255, 107, 107, 0.25);
}

.luxury-footer {
  position: relative;
  margin-top: 50px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 300;
  letter-spacing: 0.03em;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  width: 100%;
}

.footer-dot {
  color: rgba(197, 168, 128, 0.5);
  font-size: 0.6rem;
}

/* RESPONSIVE LAYOUT SCALING */
@media (max-width: 1024px) {
  .text-left {
    left: 8%;
  }
}

@media (max-width: 768px) {
  .tagline-large {
    font-size: 0.8rem;
    white-space: nowrap;
    max-width: none;
    line-height: 1.4;
    padding: 0 10px;
  }
  
  .text-block {
    font-size: 1.15rem;
    max-width: 85%;
    line-height: 1.9;
  }
  
  .text-left {
    left: 7.5%;
    right: 7.5%;
    text-align: right;
  }
  
  .emphasis-text {
    font-size: 1.35rem;
    padding-right: 14px;
    margin-top: 14px;
  }
  
  .constellation-block {
    justify-content: center;
    padding-left: 0;
    width: 90%;
    margin: 0 auto;
  }
  
  .constellation-steps {
    gap: 36px;
  }
  
  .constellation-steps::before {
    right: 14px;
    top: 18px;
    height: calc(100% - 36px);
  }
  
  .step {
    gap: 14px;
  }
  
  .step-num {
    font-size: 0.95rem;
    padding: 3px 8px;
  }
  
  .step-label {
    font-size: 1.35rem;
  }
  
  .phase4-layout-grid {
    flex-direction: column-reverse;
    gap: 28px;
    width: 95%;
  }

  .form-box-card {
    padding: 24px;
    border-radius: 14px;
    width: 100%;
  }
  
  .form-title {
    font-size: 1.15rem;
    margin-bottom: 24px;
  }
  
  .glass-form {
    gap: 18px;
  }
  
  .glass-form textarea {
    min-height: 90px;
  }
  
  .luxury-footer {
    flex-direction: column;
    gap: 8px;
    margin-top: 32px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.75rem;
  }
  
  .footer-dot {
    display: none;
  }
}

/* --- MODERN CENTRALIZED BRANDING & REGISTRATION PORTAL --- */

#phase4-ui {
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
  align-items: center;
  display: flex;
  flex-direction: column;
}

#phase4-ui::-webkit-scrollbar {
  width: 6px;
}

#phase4-ui::-webkit-scrollbar-track {
  background: transparent;
}

#phase4-ui::-webkit-scrollbar-thumb {
  background: rgba(197, 168, 128, 0.25);
  border-radius: 10px;
}

#phase4-ui::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 168, 128, 0.45);
}

.phase4-layout-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1550px;
  gap: 40px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 20px 40px;
  box-sizing: border-box;
  height: 100%;
  pointer-events: auto;
  transition: all 0.5s ease;
}

.phase5-layout-container {
  display: flex;
  flex-direction: row;
  width: 90%;
  max-width: 1520px;
  gap: 100px;
  align-items: center;
  justify-content: center;
  margin: auto;
  pointer-events: auto;
  transition: all 0.5s ease;
}

.brand-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  max-width: 580px;
  pointer-events: auto;
}

.brand-column .brand-logo-presentation {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 8px;
}

@keyframes logoPulseGlow {
  0% {
    filter: drop-shadow(0 0 16px rgba(197, 168, 128, 0.35));
    transform: translateY(0);
  }
  50% {
    filter: drop-shadow(0 0 28px rgba(197, 168, 128, 0.65));
    transform: translateY(-3px);
  }
  100% {
    filter: drop-shadow(0 0 16px rgba(197, 168, 128, 0.35));
    transform: translateY(0);
  }
}

.brand-column .brand-title-logotype {
  width: 100%;
  max-width: min(330px, 88vw);
  margin-top: 10px;
  margin-bottom: 14px;
  pointer-events: auto;
}

@keyframes p5AmbientBreath {
  0% {
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
  }
  50% {
    transform: scale(1.022) translateY(-1.5px);
    filter: drop-shadow(0 4px 12px rgba(197, 168, 128, 0.28)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
  }
  100% {
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
  }
}

.brand-column .brand-title-logotype .phase4-svg-logotype {
  width: 100%;
  height: auto;
  fill: #ffffff;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.brand-column .brand-title-logotype .phase4-svg-logotype.ambient-active {
  animation: p5AmbientBreath 11s ease-in-out infinite;
  will-change: transform, filter;
}

.brand-column:hover .brand-title-logotype .phase4-svg-logotype {
  animation-play-state: paused;
  transform: scale(1.035) translateY(-2.5px) !important;
  filter: drop-shadow(0 6px 16px rgba(197, 168, 128, 0.45)) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.55)) !important;
}

.brand-column .brand-subtitle-text {
  font-size: 0.95rem;
  font-weight: 400;
  color: #C5A880;
  line-height: 1.5;
  text-shadow: 0 0 8px rgba(197, 168, 128, 0.15);
  margin-bottom: 24px;
}

.brand-column .brand-paragraph-desc {
  font-size: 0.88rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 300;
  text-align: justify;
  margin-bottom: 0;
  border-right: 2.5px solid rgba(197, 168, 128, 0.45);
  padding-right: 18px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.capabilities-column {
  flex: 1.25;
  display: flex;
  flex-direction: column;
  gap: 24px;
  pointer-events: auto;
  width: 100%;
}

/* Capabilities Bento Grid */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
}

.capability-card {
  background: rgba(10, 22, 44, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 165px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.capability-card:hover {
  transform: translateY(-4px);
  background: rgba(15, 30, 58, 0.5);
  border-color: rgba(197, 168, 128, 0.4);
  box-shadow: 0 12px 30px rgba(197, 168, 128, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cap-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cap-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(197, 168, 128, 0.08);
  border: 1px solid rgba(197, 168, 128, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C5A880;
  transition: all 0.3s ease;
}

.capability-card:hover .cap-icon-box {
  background: #C5A880;
  color: #030712;
  box-shadow: 0 0 12px rgba(197, 168, 128, 0.4);
}

.cap-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.3px;
}

.cap-desc {
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 12px;
  font-weight: 300;
  text-align: justify;
}

.capability-card:hover .cap-desc {
  color: rgba(255, 255, 255, 0.8);
}

.cap-coordinate {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: rgba(197, 168, 128, 0.5);
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  padding-top: 8px;
  margin-top: auto;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.capability-card:hover .cap-coordinate {
  color: rgba(197, 168, 128, 0.95);
}





.brand-paragraph-desc {
  font-size: 0.92rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 300;
  text-align: justify;
  margin-bottom: 24px;
  border-right: 2px solid rgba(197, 168, 128, 0.3);
  padding-right: 14px;
}

.direct-pills-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.social-pills-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.pill-handle {
  display: none;
}

.pill-icon-brand {
  background: transparent !important;
  border: none !important;
  overflow: hidden;
}

.pill-icon-brand svg {
  width: 100% !important;
  height: 100% !important;
  color: unset !important;
}

/* لوگوی بله بیرون‌زدگی گوشه دارد؛ نباید با دایره بریده شود */
.bale-pill {
  overflow: visible;
}

.bale-pill .pill-icon-box,
.bale-pill .pill-icon-bale {
  overflow: visible !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
}

.bale-pill .bale-brand-svg {
  overflow: visible !important;
  display: block;
}

.telegram-pill .pill-icon-brand,
.email-pill:not(.contact-pill-static) .pill-icon-brand {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.bale-pill .pill-icon-brand {
  width: 40px;
  height: 40px;
  border-radius: 0;
}

.telegram-pill:hover .pill-icon-brand,
.bale-pill:hover .pill-icon-brand,
.email-pill:not(.contact-pill-static):hover .pill-icon-brand {
  background: transparent !important;
  box-shadow: none !important;
  transform: scale(1.06);
}

.telegram-pill:hover .pill-icon-brand svg,
.bale-pill:hover .pill-icon-brand svg,
.email-pill:not(.contact-pill-static):hover .pill-icon-brand svg {
  color: unset !important;
  filter: none !important;
}

.contact-pill-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-icon-box svg {
  width: 18px;
  height: 18px;
  color: #ffffff;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  direction: rtl;
}

.pill-title {
  font-size: 0.92rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.3s ease;
}

.pill-badge {
  font-size: 0.72rem;
  font-weight: 300;
  padding: 4px 12px;
  border-radius: 50px;
  color: #ffffff;
  transition: all 0.4s ease;
}

/* Telegram Pill */
.telegram-pill .pill-icon-box {
  background: rgba(36, 161, 222, 0.1);
  border: 1px solid rgba(36, 161, 222, 0.25);
}
.telegram-pill .pill-icon-box svg {
  color: #24A1DE;
}
.telegram-pill .pill-badge {
  background: rgba(36, 161, 222, 0.08);
  border: 1px solid rgba(36, 161, 222, 0.2);
  color: #90caf9;
}
.telegram-pill:hover {
  background: rgba(36, 161, 222, 0.04);
  border-color: rgba(36, 161, 222, 0.3);
  box-shadow: 0 8px 20px rgba(36, 161, 222, 0.12);
  transform: translateX(-4px);
}
.telegram-pill:hover .pill-icon-box {
  background: #24A1DE;
  box-shadow: 0 0 10px rgba(36, 161, 222, 0.4);
}
.telegram-pill:hover .pill-icon-box svg {
  color: #ffffff;
  transform: scale(1.1) rotate(-8deg);
}
.telegram-pill:hover .pill-title {
  color: #24A1DE;
}

/* Bale Pill */
.bale-pill .pill-icon-box {
  background: rgba(1, 183, 148, 0.1);
  border: 1px solid rgba(1, 183, 148, 0.25);
}
.bale-pill .pill-icon-box svg {
  color: #01b794;
}
.bale-pill .pill-badge {
  background: rgba(1, 183, 148, 0.08);
  border: 1px solid rgba(1, 183, 148, 0.2);
  color: #7ee0c9;
}
.bale-pill:hover {
  background: rgba(1, 183, 148, 0.04);
  border-color: rgba(1, 183, 148, 0.3);
  box-shadow: 0 8px 20px rgba(1, 183, 148, 0.12);
  transform: translateX(-4px);
}
.bale-pill:hover .pill-icon-box {
  background: #01b794;
  box-shadow: 0 0 10px rgba(1, 183, 148, 0.4);
}
.bale-pill:hover .pill-icon-box svg {
  color: #ffffff;
  transform: scale(1.1);
}
.bale-pill:hover .pill-title {
  color: #01b794;
}

/* Email Pill */
.email-pill .pill-icon-box {
  background: rgba(197, 168, 128, 0.1);
  border: 1px solid rgba(197, 168, 128, 0.25);
}
.email-pill .pill-icon-box svg {
  color: #C5A880;
}
.email-pill .pill-badge {
  background: rgba(197, 168, 128, 0.08);
  border: 1px solid rgba(197, 168, 128, 0.2);
  color: #a7ffeb;
}
.email-pill:hover {
  background: rgba(197, 168, 128, 0.04);
  border-color: rgba(197, 168, 128, 0.3);
  box-shadow: 0 8px 20px rgba(197, 168, 128, 0.12);
  transform: translateX(-4px);
}
.email-pill:hover .pill-icon-box {
  background: #C5A880;
  box-shadow: 0 0 10px rgba(197, 168, 128, 0.4);
}
.email-pill:hover .pill-icon-box svg {
  color: #ffffff;
  transform: scale(1.1);
}
.email-pill:hover .pill-title {
  color: #C5A880;
}

.input-row-split {
  display: flex;
  gap: 16px;
  width: 100%;
}

.input-row-split .input-group {
  flex: 1;
}

.form-bottom-actions {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  width: 100%;
  margin-top: 4px;
}

@media (max-width: 1200px) {
  #phase4-ui {
    justify-content: center !important;
  }
  
  .phase4-layout-container, .phase5-layout-container {
    flex-direction: column !important;
    gap: 14px !important;
    width: 94% !important;
    max-width: 520px !important;
  }
  
  .brand-column {
    align-items: center !important;
    text-align: center !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .brand-column .brand-logo-presentation {
    justify-content: center !important;
    width: 100%;
  }
  
  .brand-column .brand-paragraph-desc {
    border-right: none !important;
    border-bottom: 1.5px solid rgba(197, 168, 128, 0.25) !important;
    padding-right: 0 !important;
    padding-bottom: 18px !important;
    text-align: justify !important;
  }
}

@media (max-width: 640px) {
  .capabilities-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  .capability-card {
    padding: 18px !important;
  }
}

@media (max-width: 768px) {
  .tagline-large {
    font-size: clamp(0.62rem, 3.05vw, 0.82rem) !important;
    white-space: nowrap !important;
    max-width: 96% !important;
    width: auto !important;
    line-height: 1.4 !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Keep text in normal document flow under the logo (do NOT re-absolutely position) */
  .text-right, .text-left {
    position: static !important;
    max-width: 100% !important;
    width: 100% !important;
    text-align: center !important;
    margin-top: 0 !important;
    padding: 0 !important;
  }
  
  .emphasis-text {
    font-size: 1.15rem !important;
    border-right: none !important;
    border-bottom: 2px solid rgba(197, 168, 128, 0.45);
    padding-right: 0 !important;
    padding-bottom: 10px !important;
    margin-top: 12px !important;
    justify-content: center !important;
  }
  
  .constellation-block {
    justify-content: center !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .constellation-steps {
    align-items: stretch !important;
    text-align: right !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
  }

  .constellation-steps::before {
    display: none !important;
  }
  
  .step {
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 14px !important;
    white-space: normal !important;
    text-align: right !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    transform: none !important;
  }

  .step.visible {
    transform: none !important;
  }

  .step-label {
    font-size: 1.05rem !important;
  }

  .step-description {
    font-size: 0.82rem !important;
    line-height: 1.65 !important;
  }

  .step-num {
    font-size: 1.1rem !important;
    padding: 4px 11px !important;
    flex-shrink: 0 !important;
  }
}

/* --- BRAND TITLE & UNIFIED LOGO STYLING --- */
.phase4-unified-logo {
  width: 100%;
  max-width: 88px;
  height: auto;
  margin-bottom: 18px;
  pointer-events: auto;
  overflow: visible;
}

.brand-column .phase4-svg-emblem {
  transform-origin: 48px 26px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.15));
}

.brand-column:hover .phase4-svg-emblem {
  transform: scale(1.06) translateY(-2px);
  filter: drop-shadow(0 4px 18px rgba(255, 255, 255, 0.45));
}



/* --- TYPEWRITER ACCENT STYLING & CURSOR --- */
@keyframes typewriterCursorBlink {
  0%, 100% { opacity: 1; text-shadow: 0 0 8px rgba(197, 168, 128, 0.8); }
  50% { opacity: 0.15; text-shadow: none; }
}

#p2-line1, #p2-line2 {
  width: 100%;
  text-align: right;
  direction: rtl;
  display: block;
  min-height: 1.6em;
  white-space: normal;
  position: relative;
}

#p2-line1.typing-active::after,
#p2-line2.typing-active::after {
  content: '▋';
  color: #C5A880;
  margin-right: 6px;
  display: inline-block;
  font-weight: 300;
  vertical-align: middle;
  line-height: 1;
  font-size: 0.95em;
  animation: typewriterCursorBlink 0.5s infinite steps(2, start);
}

.emphasis-text {
  font-size: calc(1.2rem + 0.55vw);
  font-weight: 400;
  position: relative;
  padding-right: 0;
  margin-top: 18px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  direction: rtl;
}

/* Elegant Golden Vertical Bar that animates into view */
.emphasis-text::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background-color: #C5A880;
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(197, 168, 128, 0.6);
}

.emphasis-text.bar-active::before {
  transform: scaleY(1); /* Smooth elegant expansion */
}

.reveal-wrapper {
  display: inline-block;
  overflow: hidden;
  opacity: 0;
  vertical-align: middle;
  direction: rtl;
  text-align: right;
  margin-right: 12px; /* Elegant spacing to the left of the golden vertical bar slit */
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-wrapper.revealed {
  opacity: 1;
}

.reveal-text {
  display: inline-block;
  white-space: normal;
  transform: translateX(100%); /* Positioned fully behind the vertical bar on the right */
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-wrapper.revealed .reveal-text {
  transform: translateX(0); /* Slides smoothly to the left, revealing the dot and 'است.' first */
}

/* --- RESPONSIVE ADJUSTMENTS FOR PHASE 2 TEXT BLOCK --- */
@media (max-width: 1024px) {
  #phase2-ui .text-block {
    left: 8% !important;
    right: auto !important;
    max-width: 480px !important;
    top: 40% !important;
  }
}

@media (max-width: 768px) {
  #phase2-ui .text-block {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
    margin: 0 auto !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
  }

  #phase2-ui .text-block p {
    text-align: center !important;
    white-space: normal !important;
  }

  #phase2-ui .emphasis-text {
    border-right: none !important;
    border-bottom: 2px solid rgba(197, 168, 128, 0.45) !important;
    padding-right: 0 !important;
    padding-bottom: 10px !important;
    margin: 14px auto 0 auto !important;
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
    justify-content: center !important;
    text-shadow: 0 0 8px rgba(197, 168, 128, 0.2) !important;
  }

  #phase2-ui .emphasis-text::before {
    display: none !important;
  }

  #phase2-ui .reveal-wrapper {
    margin-right: 0 !important;
  }

  #phase2-ui .reveal-text {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    white-space: normal !important;
  }
}

/* ==========================================================================
   PHASE 4 & PHASE 5 - HIGH-END MODERN "CODEPEN" VISUAL RECONSTRUCTION
   ========================================================================== */

/* 1. Base Overlays */
#phase5-ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: none; /* Hide standard scrollbar */
  -ms-overflow-style: none;
  opacity: 0;
  visibility: visible; /* keep layout measurable for logo landing coords */
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  transform: none !important;
  transition: opacity 0.22s ease-in;
}

#phase5-ui.active {
  opacity: 1;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

#phase4-ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden; /* Disable standard scrollbar completely */
  scrollbar-width: none;
  -ms-overflow-style: none;
  opacity: 0;
  visibility: visible; /* keep layout measurable for logo anchors */
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  transform: none !important;
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

#phase4-ui.active {
  opacity: 1;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

#phase4-ui {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Keep flexbox centered layout for all heights to prevent coordinate breakage */
@media (max-height: 750px) {
  #phase4-ui {
    display: flex;
  }
}

#phase4-ui::-webkit-scrollbar, #phase5-ui::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

/* 2. Capability Card v2 (Sophisticated Neon Cyber Cards) */
.capability-card-v2 {
  background: rgba(13, 20, 38, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4),
              inset 0 1px 1px rgba(255, 255, 255, 0.03);
}

/* Subtle glowing light sweep effect inside cards */
.capability-card-v2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.035), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.capability-card-v2:hover {
  transform: translateY(-8px);
  border-color: rgba(64, 224, 208, 0.25);
  box-shadow: 0 12px 40px rgba(64, 224, 208, 0.08),
              inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

.capability-card-v2:hover::before {
  opacity: 1;
}

/* Accent Card Borders & Corners */
.capability-card-v2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #40E0D0 0%, #8B5CF6 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.capability-card-v2:hover::after {
  transform: scaleX(1);
}

/* Card Icons with dynamic glowing circles */
.card-icon-container-v2 {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.capability-card-v2:hover .card-icon-container-v2 {
  background: rgba(64, 224, 208, 0.08);
  border-color: rgba(64, 224, 208, 0.3);
  box-shadow: 0 0 20px rgba(64, 224, 208, 0.2),
              inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* 3. Golden-Brown Nebula Phase 5 Luxury styling */
.brand-identity-column {
  border-right: 1px solid rgba(197, 168, 128, 0.12);
  padding-right: 48px;
}

/* Neon Golden Contacts card styling */
.contact-interactive-card {
  background: rgba(30, 18, 8, 0.72);
  border: 1px solid rgba(197, 168, 128, 0.12);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 35px rgba(0, 0, 0, 0.5),
              inset 0 1px 1px rgba(197, 168, 128, 0.05);
}

.contact-interactive-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #C5A880 0%, #E6C89E 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-interactive-card:hover {
  transform: translateY(-6px);
  border-color: rgba(197, 168, 128, 0.35);
  box-shadow: 0 16px 45px rgba(197, 168, 128, 0.08),
              inset 0 1px 2px rgba(255, 255, 255, 0.04);
}

.contact-interactive-card:hover::after {
  transform: scaleX(1);
}

/* Interactive Input Fields */
.cosmic-input-v2 {
  background: rgba(15, 10, 5, 0.4);
  border: 1px solid rgba(197, 168, 128, 0.18);
  border-radius: 8px;
  color: #ffffff;
  padding: 14px 18px;
  outline: none;
  width: 100%;
  transition: all 0.3s ease;
  font-family: inherit;
  direction: rtl;
  text-align: right;
}

.cosmic-input-v2:focus {
  border-color: #C5A880;
  box-shadow: 0 0 12px rgba(197, 168, 128, 0.25),
              inset 0 1px 2px rgba(0, 0, 0, 0.4);
  background: rgba(15, 10, 5, 0.65);
}

/* Luxurious Golden Action Button */
.gold-glow-button {
  background: linear-gradient(135deg, #1e1105 0%, #2e1c0b 100%);
  border: 1px solid #C5A880;
  color: #E6C89E;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.gold-glow-button:hover {
  background: linear-gradient(135deg, #C5A880 0%, #E6C89E 100%);
  color: #1a0f05;
  box-shadow: 0 0 25px rgba(197, 168, 128, 0.45);
  transform: translateY(-2px);
}

.gold-glow-button:active {
  transform: translateY(0);
}

/* Custom interactive item */
.interactive-item-v2 {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
  text-decoration: none;
}

.interactive-item-v2:hover {
  background: rgba(197, 168, 128, 0.06);
  border-color: rgba(197, 168, 128, 0.15);
  transform: translateX(-4px);
}

/* 4. Luxury Scroll Indicators */
.scroll-indicator-v2 {
  opacity: 0.75;
  animation: floatUpDown 2s infinite ease-in-out;
}

.p4-scroll-indicator {
  position: relative !important;
  bottom: auto !important;
  margin-top: 48px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@keyframes floatUpDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* 5. Responsive Adapters for Phase 5 Split Screen */
@media (max-width: 1024px) {
  .brand-identity-column {
    border-right: none;
    border-bottom: 1px solid rgba(197, 168, 128, 0.12);
    padding-right: 0;
    padding-bottom: 32px;
    margin-bottom: 32px;
    text-align: center;
  }
}

/* ==========================================================================
   RAFEAR SIMULATOR & INTERACTIVE SHOWCASE STYLING (PHASE 4)
   ========================================================================== */

/* Phase 4 Integrated Branding Header Styling */
.p4-integrated-branding {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

#phase4-ui.active .p4-integrated-branding {
  opacity: 1;
  transform: translateY(0);
}

.p4-brand-emblem-svg {
  animation: p4LogoPulseGlow 6s infinite ease-in-out;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.p4-integrated-branding:hover .p4-brand-emblem-svg {
  transform: scale(1.05) rotate(-2deg);
}

@keyframes p4LogoPulseGlow {
  0% {
    filter: drop-shadow(0 0 12px rgba(197, 168, 128, 0.2)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 24px rgba(197, 168, 128, 0.55)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  }
  100% {
    filter: drop-shadow(0 0 12px rgba(197, 168, 128, 0.2)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  }
}

.phase4-split-container {
  display: flex;
  flex-direction: row-reverse;
  direction: ltr !important;
  gap: 80px; /* Safer, larger gap on desktop to prevent overlap and push logo right */
  width: 100%;
  max-width: 1520px; /* Increased from 1280px to allow larger slider and wider logo spacing */
  margin: 0 auto;
  align-items: center;
  pointer-events: auto;
  transition: all 0.5s ease;
  position: relative;
  z-index: 5;
}

.p4-brand-visual-anchor {
  flex: 0.8; /* Reduced from 1 to push the logo further to the right edge */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  pointer-events: none;
  transition: all 0.5s ease;
}

.capabilities-display-panel {
  flex: 1.6; /* Increased from 1.45 to support the larger width of the slider and push the logo right */
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  z-index: 10;
}

/* Responsive Overrides for Phase 4 Layout are consolidated at the end of this stylesheet */

.capability-selector-card {
  background: rgba(13, 22, 44, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 13px 18px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-align: right;
  direction: rtl;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25),
              inset 0 1px 1px rgba(255, 255, 255, 0.02);
}

/* Subtle gold side accent line for semantic coherence and visual anchoring */
.capability-selector-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, rgba(197, 168, 128, 0.45), #C5A880);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(197, 168, 128, 0.5);
}

.capability-selector-card:hover {
  background: rgba(13, 22, 44, 0.45);
  border-color: rgba(197, 168, 128, 0.28);
  transform: translateX(-4px);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35),
              inset 0 1px 1px rgba(255, 255, 255, 0.04);
}

.capability-selector-card.active {
  background: rgba(197, 168, 128, 0.065);
  border-color: rgba(197, 168, 128, 0.48);
  box-shadow: 0 10px 35px rgba(197, 168, 128, 0.08),
              0 4px 20px rgba(0, 0, 0, 0.35),
              inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.capability-selector-card.active::after {
  transform: scaleY(1);
}

.selector-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.selector-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(197, 168, 128, 0.06);
  border: 1px solid rgba(197, 168, 128, 0.15);
  color: #C5A880;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.selector-icon-box svg {
  width: 16px;
  height: 16px;
}

.capability-selector-card.active .selector-icon-box {
  background: #C5A880;
  color: #0d1424;
  box-shadow: 0 0 12px rgba(197, 168, 128, 0.5);
  border-color: #C5A880;
}

.selector-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  transition: color 0.3s ease;
}

.capability-selector-card.active .selector-title {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.selector-brief {
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
  transition: color 0.3s ease;
}

.capability-selector-card.active .selector-brief {
  color: rgba(255, 255, 255, 0.7);
}

.selector-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.03);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.capability-selector-card.active .selector-progress-track {
  opacity: 1;
}

.selector-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(197, 168, 128, 0.45), #C5A880);
  box-shadow: none;
}

/* ==========================================================================
   GLOWING NEON BLOG SLIDER FOR PROCESS SIMULATION (PHASE 4)
   ========================================================================== */

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.blog-slider-container {
  position: relative;
  width: 100%;
  max-width: 1240px; /* Increased by 15% from 1080px for a larger, more prominent layout */
  margin: auto;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px) translate3d(0, 0, 0);
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.6s step-end;
}

.blog-slider-container.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) translate3d(0, 0, 0);
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0s step-start;
}

/* Hide slides until container is active - smoothly transitioning without !important */
.blog-slider-container:not(.active) .blog-slider__item {
  opacity: 0;
  visibility: hidden;
  filter: blur(12px);
  pointer-events: none;
}

/* 2. هاله نوری همگام (والد تارکننده برای رفع هرگونه لبه تیز) */
.blog-slider-glow {
  position: absolute;
  inset: -15px; 
  filter: blur(12px); /* پخش ملایم نور به بیرون کادر */
  pointer-events: none;
  z-index: 0;
  transform: translate3d(0, 0, 0);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.blog-slider-container.active .blog-slider-glow {
  opacity: 1;
}

/* همزاد نوار باریک مرزی در لایه هاله نور (ساعت‌گرد می‌چرخد) */
.blog-slider-glow__inner {
  position: absolute;
  inset: 15px; /* تراز دقیق با لبه‌های اسلایدر */
  border-radius: 25px;
  padding: 1.5px; /* ضخامت نازک هسته نور برای جلوگیری از هدر رفتن شفافیت شیشه */
  
  /* گرادیان مخروطی که زاویه شروع آن مدام تغییر می‌کند */
  background: conic-gradient(from var(--angle), #C5A880, #e9ddcb, #1d335c, #e9ddcb, #C5A880);
  animation: spin-clockwise 4s linear infinite;
  opacity: 0.6;
  
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* اسلایدر گلس‌مورفیسم */
.blog-slider {
  width: 100%;
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: none; 
  padding: 28px 36px; /* Increased from 22px 28px */
  border-radius: 20px;
  height: auto;
  min-height: 414px; /* Increased by 15% from 360px */
  transition: min-height 0.35s ease, opacity 0.3s;
  overflow: visible;
  z-index: 1;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  direction: ltr; /* Ensure flex elements layout in stable LTR mode, content itself stays RTL */
}

/* 3. نوار باریک مرزی اصلی با چرخش هماهنگ ساعت‌گرد رنگ‌ها */
.blog-slider::before {
  content: '';
  position: absolute;
  inset: -1.5px; 
  border-radius: 21.5px; 
  padding: 1.5px; 
  
  background: conic-gradient(from var(--angle), #C5A880, #e9ddcb, #1d335c, #e9ddcb, #C5A880);
  animation: spin-clockwise 4s linear infinite;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  
  pointer-events: none;
  z-index: 2;
  transform: translate3d(0, 0, 0);
}

.blog-slider-container.active .blog-slider::before {
  opacity: 0.9;
}

/* انیمیشن چرخش زاویه به صورت ساعت‌گرد */
@keyframes spin-clockwise {
  to {
    --angle: 360deg;
  }
}

/* Performance Optimizations for Weak/Low-end Systems */
body.low-perf .blog-slider-glow__inner {
  animation: none !important;
  background: linear-gradient(135deg, #C5A880, #1d335c) !important;
  opacity: 0.3 !important;
}

body.low-perf .blog-slider::before {
  animation: none !important;
  background: linear-gradient(135deg, #C5A880, #1d335c) !important;
}

/* ── Compact / Low-perf: keep the look, cut GPU paint ── */
body.compact-perf #blue-nebula-bg::before,
body.compact-perf #blue-nebula-bg::after,
body.low-perf #blue-nebula-bg::before,
body.low-perf #blue-nebula-bg::after {
  animation: none !important;
}

body.low-perf #blue-nebula-bg::after {
  display: none !important;
}

body.compact-perf .form-box-card,
body.low-perf .form-box-card {
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

body.compact-perf .contact-box-card,
body.low-perf .contact-box-card {
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

body.compact-perf .capability-card,
body.compact-perf .capability-selector-card,
body.low-perf .capability-card,
body.low-perf .capability-selector-card {
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

body.low-perf .capability-card,
body.low-perf .capability-selector-card,
body.low-perf .form-box-card,
body.low-perf .contact-box-card,
body.low-perf .blog-slider,
body.low-perf .contact-pill-card,
body.low-perf .brand-column,
body.low-perf .capabilities-column,
body.low-perf #phase5-ui .brand-column,
body.low-perf #phase5-ui .capabilities-column {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background-color: rgba(8, 16, 32, 0.88) !important;
}

body.compact-perf #phase5-ui .brand-column,
body.compact-perf #phase5-ui .capabilities-column,
body.compact-perf .blog-slider {
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

body.compact-perf .p5-logo-wrapper,
body.low-perf .p5-logo-wrapper {
  animation: none !important;
  will-change: auto !important;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45)) !important;
}

body.compact-perf .p4-integrated-branding,
body.low-perf .p4-integrated-branding {
  animation: none !important;
}

body.low-perf .blog-slider-glow,
body.low-perf .blog-slider-glow__inner {
  display: none !important;
}

@media (max-width: 1200px) {
  .form-box-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .contact-box-card {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .capability-selector-card,
  .capability-card {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }
  .blog-slider-container.active .blog-slider-glow {
    opacity: 0.55;
  }
  #blue-nebula-bg::before,
  #blue-nebula-bg::after {
    animation-duration: 90s, 110s;
  }
  .p5-logo-wrapper {
    animation: none;
    will-change: auto;
  }
}

/* Wrapper */
.blog-slider__wrp {
  position: relative;
  height: 368px; /* Force stable, non-collapsing height of 368px on desktop (Increased by 15% from 320px) */
  min-height: 368px;
  width: 100%;
  z-index: 3;
  transform: translate3d(0, 0, 0);
}

/* Slide Items */
.blog-slider__item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  opacity: 0;
  z-index: 1;
  visibility: hidden;
  pointer-events: none;
  
  /* Super smooth cross-fade of slides, completely eliminating any sudden layout jumps or blinking */
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.8s step-end;
  will-change: opacity, visibility;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Genuinely active slide state - beautifully fades on top, fully visible and interactive */
.blog-slider__item.swiper-slide-active {
  position: absolute;
  height: 100%;
  opacity: 1 !important;
  z-index: 10 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.8s step-start !important;
}

/* Smooth internal transition parameters for content blocks - stable and solid fade without translation */
.blog-slider__content > * {
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: opacity;
}

/* 1. SWIPER-SLIDE-ACTIVE: Centered and perfectly static */
.blog-slider__item.swiper-slide-active .blog-slider__img {
  transform: none !important;
  opacity: 1 !important;
  filter: none !important;
}

/* Active slide SVG transitions in with a premium high-tech fade, completely solid and beautiful */
.blog-slider__item.swiper-slide-active .blog-slider__img svg {
  opacity: 1 !important;
  animation: spaceConsoleFadeIn 0.5s ease both;
}

.blog-slider__item.swiper-slide-active .blog-slider__content > * {
  transform: none !important;
  opacity: 1 !important;
  transition: none !important;
  transition-delay: 0s !important;
}


/* 2. SWIPER-SLIDE-PREV: Cross-fade beautifully to background during active swap */
.blog-slider__item.swiper-slide-prev {
  opacity: 0 !important;
  visibility: hidden !important;
  z-index: 1 !important;
  pointer-events: none !important;
  transition: opacity 0.5s ease,
              visibility 0.5s step-end !important;
}

.blog-slider__item.swiper-slide-prev .blog-slider__img {
  transform: none !important;
  opacity: 0 !important;
  filter: none !important;
}

.blog-slider__item.swiper-slide-prev .blog-slider__img svg {
  opacity: 0 !important;
  animation: none !important;
}

.blog-slider__item.swiper-slide-prev .blog-slider__content > * {
  transform: none !important;
  opacity: 0 !important;
}


/* 3. SWIPER-SLIDE-NEXT: Cross-fade beautifully to background during active swap */
.blog-slider__item.swiper-slide-next {
  opacity: 0 !important;
  visibility: hidden !important;
  z-index: 1 !important;
  pointer-events: none !important;
  transition: opacity 0.5s ease,
              visibility 0.5s step-end !important;
}

.blog-slider__item.swiper-slide-next .blog-slider__img {
  transform: none !important;
  opacity: 0 !important;
  filter: none !important;
}

.blog-slider__item.swiper-slide-next .blog-slider__img svg {
  opacity: 0 !important;
  animation: none !important;
}

.blog-slider__item.swiper-slide-next .blog-slider__content > * {
  transform: none !important;
  opacity: 0 !important;
}

/* Image container - Transparent to allow the rock-solid background backdrop underneath to show */
.blog-slider__img {
  position: relative;
  width: 368px; /* Increased by 15% from 320px */
  flex-shrink: 0;
  height: 368px; /* Increased by 15% from 320px */
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 16px;
  overflow: hidden;
  
  /* Stable presentation, absolutely no independent motion or scale/blur transitions */
  transform: none !important;
  filter: none !important;
  
  /* Keep container rock-solid without any opacity transitions to prevent blinking */
  transition: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  will-change: transform;
  
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  direction: ltr; /* Stable icon presentation */
}

/* Static Frame Backdrop - This element never fades or moves, completely eliminating layout flicker */
.blog-slider__img-backdrop {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 368px; /* Increased by 15% from 320px */
  height: 368px; /* Increased by 15% from 320px */
  background-image: linear-gradient(147deg, #0d1424 0%, #17243f 74%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(197, 168, 128, 0.15);
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  opacity: 1 !important;
  visibility: visible !important;
  
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.blog-slider__img-backdrop::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(147deg, #C5A880 0%, #0d1424 74%);
  border-radius: 16px;
  opacity: 0.15;
  z-index: 2;
  pointer-events: none;
}

.blog-slider__img svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0 !important; /* Default to hidden */
  border-radius: 16px;
  position: relative;
  z-index: 1;
  
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* PREMIUM SPACE CONSOLE PURE FADE ANIMATION */
@keyframes spaceConsoleFadeIn {
  0% {
    opacity: 0 !important;
    transform: none !important;
  }
  100% {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* SCI-FI GLOWING LASER RADAR SWEEP ANIMATION */
@keyframes spaceRadarSweep {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(368px);
    opacity: 0;
  }
}

/* High-tech scanning line overlay inside the active image container */
.blog-slider__img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #C5A880 30%, #ffffff 50%, #C5A880 70%, transparent);
  box-shadow: 0 0 10px #C5A880, 0 0 20px rgba(197, 168, 128, 0.6);
  opacity: 0;
  z-index: 10;
  pointer-events: none;
  transform: translateY(-100%);
}

/* Trigger laser sweep on active slide entrance */
.blog-slider__item.swiper-slide-active .blog-slider__img::after {
  animation: spaceRadarSweep 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Prevent any blinking/glitching from JS class additions */
.blog-slider__img.glitch-active svg {
  animation: none !important;
}

/* Content */
.blog-slider__content {
  padding-right: 28px;
  padding-left: 12px;
  flex: 1;
  min-width: 0;
  direction: rtl;
  text-align: right;
}

.blog-slider__content>* {
  opacity: 0;
  transform: none !important;
  filter: none !important;
  transition: opacity 0.5s ease;
  will-change: opacity;
}

.blog-slider__code {
  color: rgba(197, 168, 128, 0.9) !important;
  margin-bottom: 6px !important;
  display: block !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important; /* 15% Larger than 0.78rem */
  font-family: 'JetBrains Mono', monospace !important;
  letter-spacing: 0.5px !important;
}

.blog-slider__title {
  font-size: 1.52rem !important; /* 15% Larger than 1.32rem */
  font-weight: 700 !important;
  color: #ffffff !important;
  margin-bottom: 12px !important;
  font-family: 'Vazirmatn', sans-serif !important;
}

.blog-slider__formula {
  margin-bottom: 12px !important;
  font-size: 1.05rem !important; /* 15% Larger than 0.92rem */
}

.blog-slider__text {
  color: rgba(255, 255, 255, 0.82) !important;
  margin-bottom: 24px !important;
  line-height: 1.7 !important;
  font-weight: 300 !important;
  font-size: 1.0rem !important; /* 15% Larger than 0.88rem */
  font-family: 'Vazirmatn', sans-serif !important;
  text-align: justify !important;
}

/* Glass Button */
.blog-slider__button {
  display: inline-flex !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  padding: 10px 26px !important; /* Increased by 15% from 8px 22px */
  border-radius: 50px !important;
  color: #fff !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  justify-content: center !important;
  text-align: center !important;
  letter-spacing: 0.5px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-size: 0.98rem !important; /* 15% Larger than 0.85rem */
}

.blog-slider__button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 12px 35px 0 rgba(197, 168, 128, 0.25);
}

/* Pagination */
.blog-slider__pagination {
  position: absolute;
  z-index: 21;
  left: -30px !important;
  width: 12px !important;
  text-align: center;
  right: auto !important;
  top: 50%;
  bottom: auto !important;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.blog-slider-container.active .blog-slider__pagination {
  opacity: 1;
  pointer-events: auto;
}

.blog-slider__pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  transition: height 0.3s, background 0.3s;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.blog-slider__pagination .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.25);
}

.blog-slider__pagination .swiper-pagination-bullet-active {
  background: rgba(255, 255, 255, 0.15);
  height: 32px;
  box-shadow: 0px 0px 15px rgba(197, 168, 128, 0.15);
}

.blog-slider__pagination .bullet-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, rgba(197, 168, 128, 0.4), #C5A880);
  box-shadow: 0 0 10px rgba(197, 168, 128, 0.7);
  border-radius: inherit;
  transition: height 0.1s linear;
}

/* Responsive Custom Setup */
@media (max-width: 1200px) {
  .phase4-split-container {
    flex-direction: column !important;
    gap: clamp(18px, 3.5vh, 32px) !important;
    width: 100% !important;
  }
  .capabilities-display-panel {
    order: 1 !important;
    width: 100% !important;
  }
  .capabilities-selectors {
    order: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
  }
  .selector-brief {
    display: none !important;
  }
  .capability-selector-card {
    padding: 12px 14px !important;
    border-radius: 12px !important;
    transform: none !important;
  }
  .capability-selector-card:hover {
    transform: none !important;
    background: rgba(197, 168, 128, 0.04) !important;
  }
  .selector-card-header {
    margin-bottom: 0 !important;
    gap: 10px !important;
  }
  .selector-title {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
  }
  .selector-icon-box {
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
  }
  .selector-icon-box svg {
    width: 13px !important;
    height: 13px !important;
  }
}

/* Compact styling for medium desktops/laptops to prevent text wrapping or overflow */
@media (min-width: 1201px) and (max-width: 1400px) {
  .phase4-split-container {
    gap: 40px !important; /* Smaller gap on laptop screens to prevent overflow */
  }
  .blog-slider {
    padding: 24px !important;
    min-height: 334px !important; /* Increased by 15% from 290px */
    max-width: 900px !important; /* Increased by 15% from 780px */
  }
  .blog-slider__img,
  .blog-slider__img-backdrop {
    width: 276px !important; /* Increased by 15% from 240px */
    height: 276px !important;
  }
  .blog-slider__wrp {
    height: 300px !important; /* Increased by 15% from 260px */
    min-height: 300px !important;
  }
  .blog-slider__content {
    padding-right: 20px !important;
    padding-left: 10px !important;
  }
  .blog-slider__title {
    font-size: 1.15rem !important;
    margin-bottom: 8px !important;
  }
  .blog-slider__formula {
    font-size: 0.8rem !important;
    margin-bottom: 8px !important;
  }
  .blog-slider__text {
    font-size: 0.82rem !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
  }
  .blog-slider__button {
    font-size: 0.78rem !important;
    padding: 10px 22px !important;
  }
}

/* Genuinely Bulletproof Mathematical Formulas (Preventing layout breaking under any width) */
.blog-slider__formula {
  overflow-x: auto !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  scrollbar-width: none !important; /* Hide scrollbars for absolute clean aesthetics */
  -ms-overflow-style: none !important;
}
.blog-slider__formula::-webkit-scrollbar {
  display: none !important; /* Hide scrollbars on Webkit browsers */
}

/* Intermediate Tablet / Small Desktop scale-down for pristine responsiveness */
@media (min-width: 769px) and (max-width: 1024px) {
  .blog-slider {
    padding: 20px 24px !important;
    min-height: 334px !important; /* Increased by 15% from 290px */
  }
  .blog-slider__img,
  .blog-slider__img-backdrop {
    width: 265px !important; /* Increased by 15% from 230px */
    height: 265px !important;
  }
  .blog-slider__wrp {
    height: 288px !important; /* Increased by 15% from 250px */
    min-height: 288px !important;
  }
  .blog-slider__content {
    padding-right: 20px !important;
    padding-left: 10px !important;
  }
  .blog-slider__title {
    font-size: 1.15rem !important;
    margin-bottom: 6px !important;
  }
  .blog-slider__formula {
    font-size: 0.8rem !important;
    margin-bottom: 6px !important;
  }
  .blog-slider__text {
    font-size: 0.84rem !important;
    line-height: 1.55 !important;
    margin-bottom: 12px !important;
  }
  .blog-slider__button {
    font-size: 0.76rem !important;
    padding: 8px 18px !important;
  }
  .blog-slider__pagination {
    bottom: 15px !important;
  }
}

@media (max-width: 850px) {
  .blog-slider {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 18px 16px 28px !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .blog-slider__wrp {
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
    width: 100% !important;
    aspect-ratio: auto !important;
  }
  .blog-slider__item {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    flex-direction: column !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: scale(0.98) !important;
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s ease !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding-bottom: 8px !important;
    box-sizing: border-box !important;
  }
  .blog-slider__item.swiper-slide-active {
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: scale(1) !important;
    height: auto !important;
  }
  .blog-slider__img {
    transform: translate3d(0, 0, 0) !important;
    width: min(100%, 220px) !important;
    height: min(42vw, 200px) !important;
    margin: 0 auto 14px auto !important;
    flex-shrink: 0 !important;
    border-radius: 14px !important;
  }
  .blog-slider__img-backdrop {
    width: min(100%, 220px) !important;
    height: min(42vw, 200px) !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-radius: 14px !important;
  }
  .blog-slider__content {
    padding: 0 4px !important;
    text-align: center !important;
    width: 100% !important;
    direction: rtl !important;
    box-sizing: border-box !important;
  }
  .blog-slider__content > * {
    text-align: center !important;
  }
  .blog-slider__title {
    font-size: clamp(1.05rem, 4.2vw, 1.25rem) !important;
    margin-bottom: 10px !important;
    line-height: 1.45 !important;
  }
  .blog-slider__code {
    font-size: 0.68rem !important;
  }
  .blog-slider__formula {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 8px !important;
    font-size: 0.72rem !important;
  }
  .blog-slider__text {
    margin-bottom: 8px !important;
    font-size: 0.82rem !important;
    line-height: 1.65 !important;
    text-align: justify !important;
  }
  .blog-slider__pagination {
    transform: translateX(-50%) !important;
    left: 50% !important;
    top: auto !important;
    bottom: -6px !important;
    width: auto !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .blog-slider__pagination .swiper-pagination-bullet-active {
    height: 10px !important;
    width: 28px !important;
  }
  .blog-slider__pagination .bullet-progress {
    width: 0% !important;
    height: 100% !important;
    background: linear-gradient(90deg, rgba(197, 168, 128, 0.4), #C5A880) !important;
    transition: width 0.1s linear !important;
  }
}

/* ==========================================================================
   DESKTOP SCALE-TO-FIT SYSTEM (Preventing Layout Collisions on Smaller Resizes)
   ========================================================================== */
@media (min-width: 1251px) and (max-width: 1450px) {
  .constellation-block,
  .phase4-split-container,
  .phase5-layout-container {
    transform: scale(0.85);
    transform-origin: center center;
    transition: transform 0.3s ease;
  }
}

/* --- Cinematic, High-End Phase 5 Entrance Animation (Performant & GPU-Accelerated) --- */
#phase5-ui .brand-subtitle-text,
#phase5-ui .brand-paragraph-desc,
#phase5-ui .channels-header,
#phase5-ui .contact-pill-card,
#phase5-ui .luxury-footer-v2 {
  opacity: 0;
  transform: translateY(12px) scale(1.02);
  filter: blur(12px) brightness(1.4);
  /* Default leaving state: fast and snappy without delays */
  transition: transform 0.22s ease-in, 
              opacity 0.22s ease-in,
              filter 0.22s ease-in;
}

body.compact-perf #phase5-ui .brand-subtitle-text,
body.compact-perf #phase5-ui .brand-paragraph-desc,
body.compact-perf #phase5-ui .channels-header,
body.compact-perf #phase5-ui .contact-pill-card,
body.compact-perf #phase5-ui .luxury-footer-v2,
body.low-perf #phase5-ui .brand-subtitle-text,
body.low-perf #phase5-ui .brand-paragraph-desc,
body.low-perf #phase5-ui .channels-header,
body.low-perf #phase5-ui .contact-pill-card,
body.low-perf #phase5-ui .luxury-footer-v2 {
  filter: none;
  transform: translateY(10px);
  transition: transform 0.22s ease-in, opacity 0.22s ease-in;
}

#phase5-ui.active .brand-subtitle-text,
#phase5-ui.active .brand-paragraph-desc,
#phase5-ui.active .channels-header,
#phase5-ui.active .contact-pill-card,
#phase5-ui.active .luxury-footer-v2 {
  /* Elegant slow entrance transition when active */
  transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1),
              filter 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Staggered triggers when #phase5-ui gets the active class from scroll manager */
#phase5-ui.active .brand-subtitle-text {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px) brightness(1);
  transition-delay: 0.8s;
}

#phase5-ui.active .brand-paragraph-desc {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px) brightness(1);
  transition-delay: 1.0s;
}

#phase5-ui.active .channels-header {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px) brightness(1);
  transition-delay: 1.2s;
}

/* Elegant staggered cards */
#phase5-ui.active .contact-pill-address {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px) brightness(1);
  transition-delay: 1.4s;
}

#phase5-ui.active .social-pills-row .telegram-pill {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px) brightness(1);
  transition-delay: 1.5s;
}

#phase5-ui.active .social-pills-row .bale-pill {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px) brightness(1);
  transition-delay: 1.6s;
}

#phase5-ui.active .social-pills-row .email-pill {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px) brightness(1);
  transition-delay: 1.7s;
}

/* High-end footer copyright */
#phase5-ui.active .luxury-footer-v2 {
  opacity: 0.4;
  transform: translateY(0) scale(1);
  filter: blur(0px) brightness(1);
  transition-delay: 2.0s;
}

/* Luxurious floating panels for Phase 5 — readable without heavy fullscreen backdrop blur */
#phase5-ui .brand-column {
  background: rgba(4, 9, 21, 0.82) !important;
  border: 1px solid rgba(197, 168, 128, 0.22) !important;
  border-radius: 24px !important;
  padding: 42px !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  transition: opacity 0.22s ease-in, transform 0.22s ease-in !important;
}

#phase5-ui.active .brand-column {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#phase5-ui .brand-column:hover {
  border-color: rgba(197, 168, 128, 0.35) !important;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.7),
              0 0 30px rgba(197, 168, 128, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-4px) !important;
}

#phase5-ui .capabilities-column {
  background: rgba(4, 9, 21, 0.82) !important;
  border: 1px solid rgba(197, 168, 128, 0.22) !important;
  border-radius: 24px !important;
  padding: 42px !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  transition: opacity 0.22s ease-in, transform 0.22s ease-in !important;
}

#phase5-ui.active .capabilities-column {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#phase5-ui .capabilities-column:hover {
  border-color: rgba(197, 168, 128, 0.35) !important;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.7),
              0 0 30px rgba(197, 168, 128, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-4px) !important;
}

/* Adjust mobile sizing and remove translateY on hover for mobile */
@media (max-width: 1200px) {
  #phase5-ui .brand-column,
  #phase5-ui .capabilities-column {
    padding: 18px 16px !important;
    border-radius: 16px !important;
  }
  #phase5-ui .brand-column:hover,
  #phase5-ui .capabilities-column:hover {
    transform: none !important;
  }
}

/* --- UNIVERSAL RESPONSIVE LOGO ANCHORS & CONTAINERS FOR FLUID ALIGNMENT --- */
.phase2-layout-container,
.phase3-layout-container {
  display: flex;
  width: 90%;
  max-width: 1520px;
  height: 100%;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  pointer-events: none;
}

/* Phase 2: Logo on Right, Text on Left */
.phase2-layout-container {
  flex-direction: row; /* RTL puts 1st child (logo anchor) on right, 2nd child (text) on left */
}

/* Phase 3: Logo on Left, Steps on Right */
.phase3-layout-container {
  flex-direction: row-reverse; /* RTL row-reverse puts 1st child (logo anchor) on left, 2nd child (steps) on right */
}

.p1-logo-anchor,
.p2-logo-anchor,
.p3-logo-anchor {
  width: 280px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  flex-shrink: 0;
  transition: all 0.5s ease;
}

/* Phase 1 Center Alignment */
#phase1-ui {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.p1-logo-anchor {
  margin-bottom: 28px;
}

/* ==========================================================================
   MOBILE / TABLET — ONE composition (logo+name + gap + text)
   The whole stack is one unit, centered in the viewport.
   SVG logo tracks the same anchor that sits above the text — they move together.
   ========================================================================== */
@media (max-width: 1200px) {
  #journey-ui-container {
    width: 100% !important;
    height: 100dvh !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .phase-ui {
    display: flex !important;
    flex-direction: column !important;
    justify-content: safe center !important; /* equal air; if stack is taller, pin from top */
    align-items: center !important;
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding-top: max(3dvh, env(safe-area-inset-top, 0px)) !important;
    padding-bottom: max(3dvh, env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Logo lockup box: height set by journey.js to emblem+name (+ pad) */
  #phase1-ui .p1-logo-anchor,
  .p2-logo-anchor,
  .p3-logo-anchor,
  .p4-brand-visual-anchor {
    flex: 0 0 auto !important;
    width: min(72vw, 300px) !important;
    height: auto !important;
    min-height: 140px !important;
    max-height: none !important;
    margin: 0 !important;
  }

  /* ---- Phase 1: logo → gap → tagline (one centered stack) ---- */
  #phase1-ui {
    justify-content: safe center !important;
    align-items: center !important;
    gap: clamp(24px, 5dvh, 44px) !important;
  }

  #phase1-ui .tagline-large {
    flex: 0 0 auto !important;
    display: block !important;
    width: auto !important;
    max-width: 94% !important;
    margin: 0 !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    font-size: clamp(0.68rem, 0.55rem + 1.6vw, 0.95rem) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-align: center !important;
  }

  /* ---- Phase 2 / 3: same idea — stack grows with content, phase centers it ---- */
  .phase2-layout-container,
  .phase3-layout-container {
    flex: 0 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: min(94vw, 560px) !important;
    max-width: 560px !important;
    height: auto !important;
    max-height: calc(100dvh - 8dvh) !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    gap: clamp(24px, 5dvh, 44px) !important; /* breathing room logo box ↔ text */
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  #phase2-ui .text-block {
    flex: 0 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: clamp(10px, 2dvh, 16px) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    position: static !important;
    transform: none !important;
    text-align: center !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    font-size: clamp(0.86rem, 0.7rem + 1.2vw, 1.08rem) !important;
    line-height: 1.65 !important;
    overflow: hidden !important;
  }

  .constellation-block {
    flex: 0 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 560px !important;
    min-height: 0 !important;
    max-height: 100% !important;
    position: static !important;
    transform: none !important;
    padding: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .constellation-steps {
    width: 100% !important;
    max-width: 560px !important;
    gap: clamp(12px, 2.2dvh, 20px) !important;
    margin: 0 auto !important;
  }

  .step {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .step-label {
    font-size: clamp(0.88rem, 0.72rem + 1vw, 1.02rem) !important;
  }

  .step-description {
    font-size: clamp(0.7rem, 0.6rem + 0.8vw, 0.84rem) !important;
    line-height: 1.5 !important;
  }

  /* ---- Phase 4: tight logo → glass card stack ---- */
  #phase4-ui {
    justify-content: safe center !important;
    align-items: center !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .phase4-layout-container {
    flex: 0 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: min(94vw, 640px) !important;
    max-width: 640px !important;
    height: auto !important;
    max-height: calc(100dvh - 6dvh) !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    gap: 0 !important;
    box-sizing: border-box !important;
  }

  .p4-brand-visual-anchor {
    display: flex !important;
    order: -1 !important;
    flex: 0 0 auto !important;
    min-height: 0 !important; /* kill desktop 250px reserve on phone */
    width: min(56vw, 220px) !important;
  }

  .phase4-split-container {
    flex: 0 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important; /* logo lockup ↔ glass card — tight but safe */
    width: 100% !important;
    min-height: 0 !important;
  }

  .capabilities-display-panel {
    width: 100% !important;
    flex: 0 1 auto !important;
  }

  .blog-slider-container {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Description fields: fixed box, typewriter fills inside */
  #phase4-ui .blog-slider__title,
  #phase4-ui .blog-slider__text {
    box-sizing: border-box !important;
  }

  #phase4-ui .blog-slider__text {
    min-height: 4.8em !important; /* fallback before JS locks exact px */
  }

  /* ---- Phase 5: fixed viewport fit — no page scroll on phone ---- */
  #phase5-ui {
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }

  .phase5-layout-container {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    gap: clamp(6px, 1.2dvh, 14px) !important;
    width: min(94vw, 520px) !important;
    max-width: 520px !important;
    height: 100% !important;
    max-height: calc(100dvh - 6dvh) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
    overflow: hidden !important;
    transform-origin: center top;
  }

  #phase5-ui .luxury-footer-v2 {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: clamp(4px, 0.8dvh, 10px) !important;
    padding: 0 6px !important;
    flex-wrap: wrap !important;
    gap: 2px 6px !important;
    font-size: clamp(0.58rem, 1.4dvh, 0.68rem) !important;
    line-height: 1.35 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
  }

  #phase5-ui .brand-column,
  #phase5-ui .capabilities-column {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: clamp(8px, 1.4dvh, 14px) clamp(10px, 2.5vw, 14px) !important;
    border-radius: 14px !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #phase5-ui .brand-column {
    flex: 0 1 auto !important;
  }

  #phase5-ui .capabilities-column {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }

  #phase5-ui .brand-logo-presentation {
    justify-content: center !important;
    margin-bottom: clamp(2px, 0.6dvh, 8px) !important;
  }

  #phase5-ui .brand-title-logotype {
    max-width: min(220px, 70vw) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: clamp(2px, 0.5dvh, 8px) !important;
    margin-bottom: clamp(4px, 0.8dvh, 10px) !important;
  }

  #phase5-ui .brand-subtitle-text {
    font-size: clamp(0.66rem, 1.6dvh, 0.82rem) !important;
    line-height: 1.4 !important;
    margin-bottom: clamp(4px, 0.9dvh, 10px) !important;
  }

  #phase5-ui .brand-paragraph-desc {
    font-size: clamp(0.62rem, 1.45dvh, 0.78rem) !important;
    line-height: 1.45 !important;
    margin-bottom: 0 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 5 !important;
    overflow: hidden !important;
  }

  #phase5-ui .p5-logo-wrapper {
    width: clamp(56px, 12dvh, 84px) !important;
  }

  #phase5-ui .p5-logo-svg {
    max-width: 100% !important;
    width: 100% !important;
  }

  #phase5-ui .channels-title {
    font-size: clamp(0.9rem, 2.1dvh, 1.1rem) !important;
    margin-bottom: clamp(4px, 0.8dvh, 8px) !important;
  }

  #phase5-ui .channels-desc {
    display: none !important;
  }

  #phase5-ui .channels-header {
    margin-bottom: clamp(4px, 0.8dvh, 8px) !important;
    flex-shrink: 0 !important;
  }

  #phase5-ui .direct-pills-group {
    gap: clamp(6px, 1.1dvh, 12px) !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #phase5-ui .contact-pill-card {
    padding: clamp(8px, 1.2dvh, 12px) 10px !important;
  }

  #phase5-ui .social-pills-row .pill-icon-brand {
    width: clamp(36px, 8dvh, 44px) !important;
    height: clamp(36px, 8dvh, 44px) !important;
  }

  #phase5-ui .social-pills-row .contact-pill-card {
    padding: clamp(8px, 1.2dvh, 12px) 4px !important;
  }

  .social-pills-row {
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .social-pills-row .contact-pill-card {
    flex: 1 1 0 !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 6px !important;
    border-radius: 16px !important;
    text-align: center !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .social-pills-row .pill-info {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0 !important;
  }

  .social-pills-row .pill-title-full,
  .social-pills-row .pill-badge {
    display: none !important;
  }

  .social-pills-row .pill-handle {
    display: block !important;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.88) !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .social-pills-row .pill-icon-brand {
    width: 44px !important;
    height: 44px !important;
    margin: 0 auto;
  }

  .contact-pill-address {
    border-radius: 16px !important;
  }

  .contact-pill-card {
    padding: 10px 12px !important;
    box-sizing: border-box !important;
  }

  .direct-pills-group {
    gap: clamp(8px, 1.5dvh, 14px) !important;
    width: 100% !important;
  }

  .scroll-indicator {
    bottom: max(3dvh, env(safe-area-inset-bottom, 0px)) !important;
  }

  .scroll-cue-chevron {
    width: 48px !important;
    height: 18px !important;
    margin-top: -5px !important;
  }

  .scroll-cue-chevron:first-child {
    margin-top: 0 !important;
  }
}

/* Short phones: keep ONE stack, slightly tighter */
@media (max-width: 1200px) and (max-height: 700px) {
  .phase-ui {
    padding-top: max(2dvh, env(safe-area-inset-top, 0px)) !important;
    padding-bottom: max(2dvh, env(safe-area-inset-bottom, 0px)) !important;
  }

  #phase1-ui {
    gap: clamp(12px, 2.5dvh, 22px) !important;
  }

  #phase1-ui .p1-logo-anchor,
  .p2-logo-anchor,
  .p3-logo-anchor,
  .p4-brand-visual-anchor {
    min-height: 100px !important;
  }

  .phase2-layout-container,
  .phase3-layout-container {
    gap: clamp(14px, 3dvh, 24px) !important;
  }

  .phase4-layout-container {
    gap: 0 !important;
  }

  .phase4-split-container {
    gap: 10px !important;
  }

  #phase2-ui .text-block {
    font-size: 0.84rem !important;
    line-height: 1.5 !important;
  }

  .step-description {
    font-size: 0.68rem !important;
    line-height: 1.4 !important;
  }
}

@media (max-width: 480px) {
  #phase1-ui .tagline-large {
    font-size: clamp(0.62rem, 2.9vw, 0.8rem) !important;
  }

  .text-block {
    font-size: 0.88rem !important;
  }

  .emphasis-text {
    font-size: 0.98rem !important;
  }

  #phase5-ui .brand-column,
  #phase5-ui .capabilities-column {
    padding: 12px 10px !important;
    border-radius: 14px !important;
  }

  .phase5-layout-container {
    max-width: 100% !important;
    width: min(96vw, 520px) !important;
  }

  .blog-slider {
    padding: 12px 10px 20px !important;
  }

  .blog-slider__img,
  .blog-slider__img-backdrop {
    width: min(100%, 180px) !important;
    height: 150px !important;
  }
}

/* ==========================================================================
   PHASE 5 STRUCTURAL STYLES (moved out of HTML inline)
   ========================================================================== */
.p5-logo-wrapper {
  position: relative;
  opacity: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(88px, 22vw, 120px);
  height: auto;
  overflow: visible;
}

.p5-logo-glow {
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  background: radial-gradient(circle, rgba(197, 168, 128, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
  border-radius: 50%;
}

.p5-logo-svg {
  width: 100%;
  max-width: 130px;
  height: auto;
  display: block;
}

.p5-logotype-g {
  transition: opacity 1.5s ease;
  opacity: 0;
}

.channels-header {
  text-align: right;
  margin-bottom: 8px;
}

.channels-title {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.channels-desc {
  font-size: clamp(0.82rem, 1.6vw, 0.9rem);
  color: rgba(255, 255, 255, 0.65);
  font-weight: 300;
  margin: 0;
  line-height: 1.6;
}

.contact-pill-static {
  pointer-events: none;
}

.pill-icon-gold {
  background: rgba(197, 168, 128, 0.1) !important;
  border: 1px solid rgba(197, 168, 128, 0.25) !important;
}

.pill-badge-gold {
  background: rgba(197, 168, 128, 0.08) !important;
  border: 1px solid rgba(197, 168, 128, 0.2) !important;
  color: #C5A880 !important;
}

.luxury-footer-v2 {
  position: absolute;
  bottom: 28px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  direction: rtl;
  pointer-events: auto;
  flex-wrap: wrap;
  box-sizing: border-box;
  padding: 0 20px;
}

.footer-dot-v2 {
  color: #C5A880;
  font-size: 0.55rem;
}

/* Short landscape phones / small tablets — still one stack, just tighter */
@media (max-height: 520px) and (max-width: 1200px) {
  #phase1-ui .p1-logo-anchor,
  .p2-logo-anchor,
  .p3-logo-anchor,
  .p4-brand-visual-anchor {
    width: min(46vw, 160px) !important;
    min-height: 80px !important;
  }

  #phase1-ui {
    gap: clamp(8px, 2dvh, 14px) !important;
  }

  .phase2-layout-container,
  .phase3-layout-container {
    gap: clamp(8px, 2dvh, 14px) !important;
  }

  .phase4-layout-container {
    gap: 0 !important;
  }

  .phase4-split-container {
    gap: 8px !important;
  }

  #phase1-ui .tagline-large {
    font-size: 0.7rem !important;
    padding: 0 8px !important;
  }

  .scroll-indicator {
    display: none !important;
  }

  .blog-slider__img,
  .blog-slider__img-backdrop {
    height: 100px !important;
    width: 100px !important;
  }
}

/* Contact pills: prevent title overflow on narrow screens */
@media (max-width: 640px) {
  .contact-pill-address .pill-info {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .contact-pill-address .pill-title {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
  }

  .contact-pill-address {
    border-radius: 18px !important;
    padding: 12px 14px !important;
    align-items: flex-start !important;
  }

  .social-pills-row .pill-handle {
    font-size: 0.68rem !important;
  }

  .social-pills-row .pill-icon-brand {
    width: 40px !important;
    height: 40px !important;
  }

  .social-pills-row .telegram-pill:hover,
  .social-pills-row .bale-pill:hover,
  .social-pills-row .email-pill:hover {
    transform: none !important;
  }

  .luxury-footer-v2 .footer-dot-v2 {
    display: none;
  }

  .luxury-footer-v2 {
    flex-direction: column !important;
    gap: 4px !important;
  }
}

/* --------------------------------------------------------------------------
   Mobile viewport safety (overflow + keyboard)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  #phase5-ui .direct-pills-group,
  #phase5-ui .social-pills-row,
  #phase5-ui .contact-pill-card {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  #phase4-ui .form-box-card,
  #phase4-ui input,
  #phase4-ui textarea {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}


