/* ==========================================================================
   Khaled ElGendy / Rajib Kabir Portfolio - Modern Clean Stylesheet
   Faithful recreation of Framer design system, typography & visual effects
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Clash Grotesk Webfont from Fontshare */
@font-face {
  font-family: 'Clash Grotesk';
  src: url('https://framerusercontent.com/third-party-assets/fontshare/wf/2SAK53YLUN7RMYJU4MYLSBV6SSSJEJZB/RXS4DPGJRKOUFZMF5X5BVUGNNKJT65XZ/DJS4RYGIUYUXJQOHY5VCZPKSTXUSHTSP.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Clash Grotesk';
  src: url('https://framerusercontent.com/third-party-assets/fontshare/wf/MKEEQN57GWBZOSYWCRODNJOOZNPLMAKN/5SPTSZGHEACWWLF34DQ4WAA4OGU6PQIF/KN7DX4F6PXB74R6L2K2Y4NH3CB7FC53Q.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-primary: #f5f1ec;
  --bg-card: #ffffff;
  --bg-card-subtle: #fbf8f4;
  --bg-accent-gold: #f4e3d0;
  --border-subtle: #e8e9ea;
  --border-card: #f0ede8;
  --text-primary: #1e1a1c;
  --text-secondary: #3b3b3b;
  --text-muted: #7e8083;
  --accent-orange: #ff7a38;
  --accent-coral: #fb5f72;
  --accent-purple: #b254e0;
  --accent-gold: #ffb930;
  --font-heading: 'Clash Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100vw;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  max-width: 100vw;
  overflow-x: clip;
  margin: 0;
  padding: 0;
}

.font-heading {
  font-family: var(--font-heading);
}

.font-body {
  font-family: var(--font-body);
}

/* ==========================================================================
   Hero Visual Effects & Layering
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  max-height: 1000px;
  overflow: hidden;
  background-color: #ffdcb2;
  background: radial-gradient(circle at 50% 35%, #ffdcb2 0%, #f7cda0 45%, #f5f1ec 90%);
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  opacity: 0.5;
  pointer-events: none;
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 230, 195, 0.4) 0%, rgba(245, 241, 236, 0.5) 65%, #f5f1ec 100%);
  pointer-events: none;
}

/* Hero Background Giant Text Marquees (Positioned behind person) */
.hero-marquee-container {
  position: absolute;
  top: 40%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

.hero-marquee-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
}

@keyframes hero-marquee-left {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes hero-marquee-right {
  0% {
    transform: translate3d(-50%, 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

.hero-marquee-left {
  animation: hero-marquee-left 32s linear infinite;
  will-change: transform;
}

.hero-marquee-right {
  animation: hero-marquee-right 36s linear infinite;
  will-change: transform;
}

.hero-marquee-text-1 {
  font-family: var(--font-heading);
  font-size: clamp(52px, 6.2vw, 88px);
  font-weight: 500;
  line-height: 1.1;
  color: rgba(30, 26, 28, 0.45);
  padding-right: 3rem;
  letter-spacing: -0.02em;
}

.hero-marquee-text-2 {
  font-family: var(--font-heading);
  font-size: clamp(52px, 6.2vw, 88px);
  font-weight: 500;
  line-height: 1.1;
  color: rgb(30, 26, 28);
  padding-right: 3rem;
  letter-spacing: -0.02em;
}

/* Hero Person Portrait */
.hero-portrait-stage {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: min(100%, 1160px);
  height: clamp(620px, 72vh, 680px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  perspective: 1200px;
}

.hero-portrait-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

.hero-portrait-img {
  width: 100%;
  max-width: 1103px;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  user-select: none;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 65%, rgba(0, 0, 0, 0.6) 82%, transparent 98%);
  -webkit-mask-image: linear-gradient(to bottom, black 65%, rgba(0, 0, 0, 0.6) 82%, transparent 98%);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.06));
}

/* Bottom Fade of Hero */
.hero-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent 0%, rgba(245, 241, 236, 0.4) 35%, rgba(245, 241, 236, 0.85) 75%, #f5f1ec 100%);
  z-index: 25;
  pointer-events: none;
}

/* Mobile Responsive Hero Optimizations */
@media (max-width: 767.98px) {
  .hero-section {
    min-height: 450px !important;
    height: 450px !important;
    max-height: 450px !important;
    overflow: hidden;
  }

  .hero-marquee-container {
    top: 48%;
    transform: translateY(-50%);
    gap: 0.65rem;
  }

  .hero-marquee-text-1,
  .hero-marquee-text-2 {
    font-size: 46px;
    line-height: 1.1;
    padding-right: 1.75rem;
  }

  .hero-portrait-stage {
    width: 513px;
    max-width: none;
    height: 334px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }

  .hero-portrait-inner {
    width: 100%;
    height: 100%;
    transform: none !important;
  }

  .hero-portrait-img {
    width: 513px;
    max-width: none;
    height: 334px;
    object-fit: cover;
    object-position: top center;
    mask-image: linear-gradient(to bottom, black 65%, rgba(0, 0, 0, 0.6) 82%, transparent 98%);
    -webkit-mask-image: linear-gradient(to bottom, black 65%, rgba(0, 0, 0, 0.6) 82%, transparent 98%);
  }

  .hero-bottom-fade {
    height: 80px;
  }
}

/* ==========================================================================
   Framer Exact Gradient CTA Button
   ========================================================================== */

.btn-gradient {
  background: linear-gradient(270deg, #ff7a38 0%, #fb5f72 50.29%, #b254e0 100%);
  border-radius: 10px;
  box-shadow: inset 0px -2px 12px 0px rgba(255, 255, 255, 0.7), 0 4px 16px rgba(251, 95, 114, 0.35);
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-gradient:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: inset 0px -2px 14px 0px rgba(255, 255, 255, 0.8), 0 8px 24px rgba(251, 95, 114, 0.45);
}

/* Rolling Text Button Effect */
.btn-slide {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.btn-slide .btn-inner {
  position: relative;
  display: block;
  overflow: hidden;
  height: 1.5em;
  line-height: 1.5em;
}

.btn-slide .btn-text-default {
  display: block;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-slide .btn-text-hover {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-slide:hover .btn-text-default {
  transform: translateY(-100%);
}

.btn-slide:hover .btn-text-hover {
  transform: translateY(0);
}

/* ==========================================================================
   Scroll-Driven Reveal & Motion Animations (Desktop & Mobile)
   ========================================================================== */

.scroll-scale-item {
  will-change: transform, opacity;
  transition: transform 0.35s ease-out, opacity 0.35s ease-out;
  opacity: 0;
  transform: translateY(14px);
}

.scroll-scale-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Asymmetric Parallax Columns for Selected Projects */
.parallax-col-left {
  will-change: transform;
  transition: transform 0.1s linear;
}

.parallax-col-right {
  will-change: transform;
  transition: transform 0.1s linear;
  margin-top: 2rem;
}

@media (max-width: 767.98px) {
  .scroll-scale-item {
    opacity: 0;
    transform: translateY(10px);
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
  }

  .scroll-scale-item.in-view {
    opacity: 1;
    transform: translateY(0);
  }

  .parallax-col-left,
  .parallax-col-right {
    transform: none !important;
    margin-top: 0 !important;
  }
}

/* Card base styling */
.framer-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 28px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.framer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(30, 26, 28, 0.09);
  border-color: #d8d8d8;
}

/* Infinite Marquee Ticker for Partner Logos */
.marquee-wrapper {
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

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

.marquee-content {
  display: flex;
  width: max-content;
  animation: marquee 25s linear infinite;
}

.marquee-content:hover {
  animation-play-state: paused;
}

/* Accordion transition */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
}

.accordion-item.active .accordion-content {
  opacity: 1;
}

.accordion-icon {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

/* Slider transition */
.testimonial-slide {
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #d6d1ca;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #bab4ac;
}
