/* ========= VARIABLES & RESET ========= */
:root {
  --primary-bg: #141414;
  --secondary-bg: #181818;
  --atomic-blue: #1d5175; /* Brand Blue */
  --atomic-orange: #ff7a18; /* CTA Orange */
  --atomic-red: #e50914; /* Netflix-style red glow */
  --text-main: #FFFFFF;
  --text-dim: #E5E5E5;
  --card-bg: rgba(47, 47, 47, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);

  /* Premium (non-neon) accents */
  --warm: #ff7a18;
  --cool: #1d5175;
  --ink: #0f0f12;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@media (pointer: fine) {
  * {
    cursor: none; /* Hide default for custom cursor only on devices with a mouse */
  }
}

html.lenis {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto;
}

body {
  background-color: var(--primary-bg);
  background-image:
    radial-gradient(circle at 18% 52%, rgba(29, 81, 117, 0.18), transparent 42%),
    radial-gradient(circle at 85% 30%, rgba(229, 9, 20, 0.06), transparent 45%),
    radial-gradient(circle at 70% 85%, rgba(255, 122, 24, 0.05), transparent 42%);
  color: var(--text-main);
  overflow-x: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ============ PREMIUM AMBIENT MOTION (NO NEON) ============ */
.fluid-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.fluid-bg::before,
.fluid-bg::after {
  content: '';
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.75;
  mix-blend-mode: screen;
  will-change: transform;
  animation: ambientFloat 16s ease-in-out infinite;
}

.fluid-bg::before {
  background: radial-gradient(circle at 30% 30%, rgba(255, 122, 24, 0.22), rgba(255, 122, 24, 0) 60%);
  transform: translate(-58%, -52%);
}

.fluid-bg::after {
  background: radial-gradient(circle at 60% 60%, rgba(29, 81, 117, 0.18), rgba(29, 81, 117, 0) 62%);
  transform: translate(-42%, -46%);
  animation-duration: 20s;
}

@keyframes ambientFloat {
  0% { transform: translate(-55%, -50%) scale(1); }
  35% { transform: translate(-45%, -58%) scale(1.06); }
  70% { transform: translate(-50%, -40%) scale(0.98); }
  100% { transform: translate(-55%, -50%) scale(1); }
}

/* Cleaner text highlight (reduce “neon” glow) */
.text-gradient {
  text-shadow:
    0 0 18px rgba(255, 122, 24, 0.14),
    0 0 16px rgba(29, 81, 117, 0.14);
}

/* ============ INTRO LOGO / HERO “GOOD” ANIMATION ============ */
#intro-logo {
  position: relative;
  letter-spacing: -0.04em;
  transform: translateY(8px);
  opacity: 0;
}

#intro-logo.intro-animation {
  animation: introLogoIn 900ms cubic-bezier(.2,.9,.2,1) forwards;
}

#intro-logo.intro-zooming {
  animation: introLogoOut 650ms cubic-bezier(.2,.9,.2,1) forwards;
}

@keyframes introLogoIn {
  0% { opacity: 0; transform: translateY(14px) scale(0.98); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes introLogoOut {
  0% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-10px) scale(1.01); filter: blur(10px); }
}

/* ============ CARD HOVER: PREMIUM LIFT + SHEEN ============ */
.slider-item {
  position: relative;
  transform: translateZ(0);
}

.slider-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.12) 38%, transparent 55%);
  transform: translateX(-120%);
  transition: transform 700ms cubic-bezier(.2,.9,.2,1);
  opacity: 0.65;
}

@media (hover: hover) and (pointer: fine) {
  .slider-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 60px rgba(0,0,0,0.55);
  }

  .slider-item:hover::after {
    transform: translateX(120%);
  }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fluid-bg::before,
  .fluid-bg::after,
  #intro-logo.intro-animation,
  #intro-logo.intro-zooming {
    animation: none !important;
  }

  .slider-item,
  .slider-item::after {
    transition: none !important;
  }
}

/* ========= ATOMIC PROFILE LOGO ========= */
.profiles-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.profiles-logo-mark {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 122, 24, 0.95), rgba(255, 122, 24, 0.05) 62%),
    radial-gradient(circle at 70% 70%, rgba(29, 81, 117, 0.9), rgba(29, 81, 117, 0.06) 60%),
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0));
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.10) inset,
    0 10px 28px rgba(0,0,0,0.55),
    0 0 22px rgba(255, 122, 24, 0.20);
}

.profiles-logo-text {
  font-weight: 900;
  letter-spacing: 0.18em;
  font-size: 0.95rem;
  line-height: 1;
  color: rgba(255,255,255,0.92);
}

/* ========= NAVIGATION TRANSITION (SAME TAB OPEN) ========= */
.nav-transition {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 55%, rgba(29, 81, 117, 0.35), transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(229, 9, 20, 0.22), transparent 45%),
    radial-gradient(circle at 72% 86%, rgba(255, 122, 24, 0.16), transparent 45%),
    rgba(0,0,0,0.78);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-transition.active {
  opacity: 1;
  pointer-events: all;
  transform: scale(1);
}

.nav-transition-inner {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 24px 28px;
  border-radius: 16px;
  background: rgba(15, 15, 18, 0.55);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 30px 90px rgba(0,0,0,0.65);
}

.nav-transition-text {
  font-weight: 900;
  letter-spacing: 0.22em;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.92);
}

.nav-transition-spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.18);
  border-top-color: rgba(255, 122, 24, 0.95);
  animation: navSpin 0.9s linear infinite;
}

@keyframes navSpin {
  to { transform: rotate(360deg); }
}

/* To reduce lag, we disable pointer events and apply hardware acceleration */
.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02; 
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    transform: translateZ(0); /* Hardware acceleration to stop layout repaints */
}.brand-font {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: white;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 24px rgba(29, 81, 117, 0.35),
    0 0 14px rgba(229, 9, 20, 0.18),
    0 0 10px rgba(255, 122, 24, 0.14);
}

a { text-decoration: none; color: inherit; }

/* ========= WEBSITE MODAL: EMBED TABS (for multiple embedded sites) ========= */
.web-embed-tabs {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 3;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(12, 12, 14, 0.55);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow-x: auto;
  white-space: nowrap;
}

.web-embed-tabs.is-visible {
  display: flex;
}

.web-embed-tab {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
}

.web-embed-tab.active {
  border-color: rgba(255, 122, 24, 0.65);
  box-shadow: 0 0 0 1px rgba(255, 122, 24, 0.30) inset, 0 10px 24px rgba(0,0,0,0.35);
}

.web-preview-embed {
  position: relative;
}

/* ========= UTILITIES & GLASSMORPHISM ========= */
.glass-panel {
  background: rgba(26, 26, 30, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.button-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.white-text { color: white; font-weight: 500;}

/* ========= CUSTOM CURSOR ========= */
.cursor-dot, .cursor-outline, .cursor-text {
  position: fixed;
  top: 0; left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none; /* Prevent custom cursor from blocking clicks */
  z-index: 9999;
}
.cursor-dot {
  width: 8px; height: 8px;
  background: white;
  mix-blend-mode: difference;
}
.cursor-outline {
  width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: width 0.3s, height 0.3s, background-color 0.3s, mix-blend-mode 0.3s;
}
.cursor-text {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: black;
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
/* When hovering over clickable items */
body.hovering .cursor-outline {
  width: 60px; height: 60px;
  background-color: white;
  mix-blend-mode: normal;
}
body.hovering .cursor-dot { display: none; }
body.hovering .cursor-text { opacity: 1; }


/* ========= SCREENS ========= */
.screen { display: none; width: 100%; min-height: 100vh; }
.screen.active { display: block; }
.full-screen { display: none; align-items: center; justify-content: center; flex-direction: column; }
.full-screen.active { display: flex; }

/* ========= GALLERY VIEW (CATEGORY GRID) ========= */
.gallery-view {
  width: 100%;
  position: relative;
  z-index: 20;
}

/* Key fix: keep the gallery header tight to the top so we don't get a big blank/gradient block */
.gallery-header {
  /* Navbar is fixed and can cover the header; add safe top padding and raise stacking context */
  padding: calc(88px + clamp(18px, 3.2vh, 28px)) 5% clamp(16px, 2.8vh, 22px);
  position: relative;
  z-index: 1200;
  pointer-events: auto;
}

.gallery-back-btn {
  position: relative;
  z-index: 1201;
  pointer-events: auto;
  background: rgba(255,255,255,0.05);
  color: #FFF;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-size: 0.95rem;
  margin-bottom: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gallery-title {
  font-size: clamp(2.2rem, 4.2vw, 4.2rem);
  font-weight: 900;
  margin: 0;
  line-height: 1;
  letter-spacing: -0.03em;
  text-shadow: 0 10px 30px rgba(0,0,0,0.8);
  background: linear-gradient(135deg, #FFF, #A1A1AA);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery-desc {
  color: var(--text-dim);
  margin-top: 10px;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 300;
  max-width: 760px;
  line-height: 1.55;
}

.gallery-grid {
  padding: 0 5% 96px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.slider-item,
.slider-item.post-card {
  aspect-ratio: 9 / 16;
  min-height: 0;
}

.slider-item img,
.slider-item.post-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-grid .slider-item {
  overflow: hidden;
}

.gallery-grid .slider-item > * {
  pointer-events: auto;
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    padding-bottom: 72px;
  }
  .gallery-back-btn {
    width: auto;
    padding: 0.65rem 1.15rem;
  }
}

/* ========= INTRO SCREEN ========= */
#intro-screen {
  background-color: var(--primary-bg);
  position: relative;
  overflow: hidden;
}

.fluid-bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 90, 0, 0.15), transparent 60%);
  animation: pulseBg 4s infinite alternate ease-in-out;
}

.intro-animation {
  font-size: 6vw;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  animation: introRise 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-hint {
  position: absolute; bottom: 10%;
  color: var(--text-dim);
  font-size: 0.9rem; font-weight: 500; font-family: 'Outfit';
  letter-spacing: 4px;
  animation: pulse 2s infinite;
}

@keyframes introRise { to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes pulseBg { 0% { transform: scale(1); opacity: 0.5;} 100% { transform: scale(1.2); opacity: 1;} }

.intro-zooming {
  animation: cinematicZoom 2.5s cubic-bezier(0.7, 0, 0.1, 1) forwards;
}
@keyframes cinematicZoom {
  0% { transform: scale(1); opacity: 1; filter: blur(0px); }
  40% { transform: scale(1.05); opacity: 1; filter: blur(0px); }
  100% { transform: scale(5); opacity: 0; filter: blur(20px); }
}

/* ========= PROFILES SCREEN ========= */
#profiles-screen { animation: fadeIn 1s ease-in; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.who-is-watching { font-size: 3.5rem; font-weight: 800; margin-bottom: 3.5rem; text-align: center; letter-spacing: -0.03em; }

.profiles-container { display: flex; gap: 2.5vw; justify-content: center; flex-wrap: wrap; }
.profile-card { width: 14vw; min-width: 140px; max-width: 250px; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }

.profile-avatar {
    width: 100%; aspect-ratio: 3/4;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    transition: box-shadow 0.4s ease;
}
.profile-avatar::after {
    content: ''; position: absolute; inset: 0;
    border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
    transition: border-color 0.4s ease;
}
/* Ensure profile SVG avatars remain bright and clearly visible on the dark background */
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Remove heavy grayscale/dimming so the SVG artwork pops */
  filter: none;
  transition: all 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.profile-name { margin-top: 1.5rem; text-align: center; color: var(--text-dim); font-size: 1.2rem; font-weight: 600; font-family: 'Outfit'; transition: color 0.4s ease; letter-spacing: 0.5px; }

.profile-card:hover { transform: translateY(-10px) scale(1.02); }
.profile-card:hover .profile-avatar { box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.profile-card:hover .profile-avatar img {
  transform: scale(1.05);
  /* Slight brightness boost on hover for a subtle glow */
  filter: brightness(1.05);
}
.profile-card:hover .profile-avatar::after { border-color: var(--atomic-orange); }
.profile-card:hover .profile-name { color: #fff; text-shadow: 0 2px 10px rgba(255,255,255,0.1); }

.manage-profiles {
  display: block; margin: 4rem auto 0;
  background: transparent; border: 1px solid var(--text-dim);
  color: var(--text-dim); padding: 0.8rem 2rem; font-family: 'Outfit'; font-size: 1rem;
  letter-spacing: 2px; text-transform: uppercase; transition: all 0.4s; border-radius: 4px;
}
.manage-profiles:hover { border-color: white; color: black; background: white; transform: scale(1.05); }

.manage-profiles { display: none; }

/* ========= MAIN SCREEN ========= */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; padding: 25px 5%;
  display: flex; justify-content: space-between; align-items: center; z-index: 1000;
  transition: all 0.5s ease;
}
.navbar.scrolled {
  padding: 15px 5%;
  background: rgba(9, 9, 11, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-left, .nav-right { display: flex; align-items: center; gap: 30px; }

/* Brand mark in top-left */
.nav-logo {
  font-size: clamp(1.35rem, 1.05rem + 1.2vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-right: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}

.nav-logo::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 122, 24, 0.95), rgba(255, 122, 24, 0.12) 62%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12) inset,
    0 10px 26px rgba(0,0,0,0.55);
  transform: translateY(-2px);
}

.nav-links { list-style: none; display: flex; gap: 25px; font-size: 0.95rem; font-weight: 500; }
.nav-links li a { color: var(--text-dim); transition: color 0.3s text-shadow 0.3s; }
.nav-links li a:hover, .nav-links li a.active { color: white; text-shadow: 0 0 10px rgba(255,255,255,0.3); }

.nav-right i { font-size: 1.2rem; color: var(--text-dim); transition: color 0.3s; }
.nav-right i:hover { color: white; }

.profile-dropdown { position: relative; display: flex; align-items: center; gap: 10px; }
.profile-dropdown img { width: 36px; height: 36px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.2); }
.dropdown-menu {
  position: absolute; top: 50px; right: 0; width: 220px;
  display: flex; flex-direction: column; border-radius: 8px;
  padding: 10px 0; opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-dropdown:hover .dropdown-menu { opacity: 1; pointer-events: all; transform: translateY(0); }
.dropdown-menu a {
  padding: 12px 20px; font-size: 0.9rem; color: var(--text-main); font-weight: 500;
  display: flex; align-items: center; gap: 12px; transition: background 0.2s;
}
.dropdown-menu a i { font-size: 1rem; width: 20px; color: var(--text-dim); }
.dropdown-menu a:hover { background: rgba(255,255,255,0.05); }

/* Hero Section */
.hero {
  position: relative;
  height: 90vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 5%;
  color: white;
  overflow: hidden;

  /* Normal “good gradient” background (no overlay element required) */
  background:
    radial-gradient(circle at 18% 52%, rgba(29, 81, 117, 0.32), transparent 46%),
    radial-gradient(circle at 86% 32%, rgba(255, 122, 24, 0.16), transparent 44%),
    linear-gradient(180deg, rgba(10, 10, 12, 0.30) 0%, rgba(10, 10, 12, 0.88) 72%, rgba(10, 10, 12, 1) 100%);
}

/* Distinct hero themes (4 profiles) */
.hero.hero-theme-social {
  background:
    radial-gradient(circle at 22% 42%, rgba(122, 215, 255, 0.22), transparent 48%),
    radial-gradient(circle at 86% 28%, rgba(255, 122, 24, 0.14), transparent 46%),
    linear-gradient(180deg, rgba(10, 10, 12, 0.22) 0%, rgba(10, 10, 12, 0.90) 72%, rgba(10, 10, 12, 1) 100%),
    linear-gradient(135deg, rgba(29, 81, 117, 0.55) 0%, rgba(11, 18, 32, 0.85) 55%, rgba(255, 122, 24, 0.26) 100%);
}

.hero.hero-theme-website {
  background:
    radial-gradient(circle at 70% 22%, rgba(255, 255, 255, 0.18), transparent 52%),
    radial-gradient(circle at 18% 60%, rgba(29, 81, 117, 0.20), transparent 52%),
    linear-gradient(180deg, rgba(10, 10, 12, 0.18) 0%, rgba(10, 10, 12, 0.92) 72%, rgba(10, 10, 12, 1) 100%),
    linear-gradient(135deg, rgba(7, 10, 18, 1) 0%, rgba(29, 81, 117, 0.55) 52%, rgba(11, 18, 32, 0.95) 100%);
}

.hero.hero-theme-seo {
  background:
    radial-gradient(circle at 22% 38%, rgba(255, 122, 24, 0.16), transparent 52%),
    radial-gradient(circle at 80% 28%, rgba(29, 81, 117, 0.28), transparent 52%),
    linear-gradient(180deg, rgba(10, 10, 12, 0.22) 0%, rgba(10, 10, 12, 0.92) 72%, rgba(10, 10, 12, 1) 100%),
    linear-gradient(135deg, rgba(6, 9, 18, 1) 0%, rgba(29, 81, 117, 0.62) 44%, rgba(11, 18, 32, 0.98) 100%);
}

.hero.hero-theme-ads {
  background:
    radial-gradient(circle at 76% 24%, rgba(255, 122, 24, 0.22), transparent 52%),
    radial-gradient(circle at 18% 56%, rgba(29, 81, 117, 0.22), transparent 52%),
    linear-gradient(180deg, rgba(10, 10, 12, 0.18) 0%, rgba(10, 10, 12, 0.92) 72%, rgba(10, 10, 12, 1) 100%),
    linear-gradient(135deg, rgba(11, 16, 32, 1) 0%, rgba(29, 81, 117, 0.52) 44%, rgba(255, 122, 24, 0.28) 100%);
}
.hero-bg-video, .hero-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1;
}

.web-preview-hero {
  position: absolute;
  inset: 0;
  display: none;
  align-items: flex-end;
  padding: 18px;
  color: rgba(255,255,255,0.96);
  background:
    radial-gradient(1200px 500px at 20% 10%, rgba(255, 255, 255, 0.10), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(255, 105, 59, 0.18), transparent 55%),
    linear-gradient(135deg, rgba(29, 81, 117, 0.95), rgba(14, 32, 48, 0.92));
}

.web-preview-hero.is-visible {
  display: flex;
}

.web-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.web-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.2px;
  background: rgba(0,0,0,0.24);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
}

.web-preview-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 6px;
  text-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

.web-preview-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.82);
  max-width: 46ch;
}

.web-preview-embed {
  position: absolute;
  inset: 0;
  display: none;
  background: rgba(0,0,0,0.12);
  /* Important for scroll/interaction inside iframe */
  overflow: hidden;
}

.web-preview-embed.is-visible {
  display: block;
}

.web-preview-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0b0f14;
  /* Default: DO NOT allow internal scrolling for website previews */
  overflow: hidden;
  -webkit-overflow-scrolling: auto;
}

/* Email/template mode: keep scrolling enabled inside the embed */
.web-modal.is-email-mode .web-preview-embed iframe {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Email mode also allows the tall-shot scroller when used */
.web-modal.is-email-mode .web-tall {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Website mode: ensure tall scroller doesn't show scroll UI (we generally don't want tall scroll for sites) */
.web-modal.is-website-mode .web-tall {
  overflow: hidden;
}

/* Email preview: enhance the 'client frame' look */
.web-modal.is-email-mode .web-modal-card {
  border-radius: 18px;
}

.web-modal.is-email-mode .web-preview-stage {
  background: radial-gradient(1000px 600px at 30% 20%, rgba(255,255,255,0.08), transparent 60%), #0b0f14;
}

.web-modal.is-email-mode .web-preview-embed {
  background: rgba(0,0,0,0.20);
}

/* Add a subtle padding frame around the email preview so it feels like a device/email client */
.web-modal.is-email-mode .web-preview-embed iframe,
.web-modal.is-email-mode .web-tall {
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(0,0,0,0.55);
}

@media (max-width: 720px) {
  .web-modal.is-email-mode .web-preview-embed iframe,
  .web-modal.is-email-mode .web-tall {
    inset: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    border-radius: 12px;
  }
}

/* When tabs are shown, offset the iframe down instead of padding it */
.web-preview-embed.has-tabs iframe {
  top: 56px;
  height: calc(100% - 56px);
}

/* Tall screenshot scroller (used when embeds are blocked, e.g., Figma) */
.web-tall {
  position: absolute;
  inset: 0;
  display: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  background: #0b0f14;
  pointer-events: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.web-tall.is-visible {
  display: block;
}

/* In tall-screenshot mode, ensure the iframe is fully disabled so it can't steal scroll/clicks */
.web-preview-embed.is-tall-mode iframe {
  pointer-events: none;
}

.web-preview-embed.is-tall-mode .web-tall {
  z-index: 2;
}

/* Embed-only mode: the tall container behaves like an in-site scrollable page */
.web-preview-embed.is-tall-mode {
  overflow: hidden;
}

.web-preview-embed.is-tall-mode .web-embed-tabs,
.web-preview-embed.is-tall-mode .web-embed-loading {
  display: none !important;
}

.web-preview-embed.is-tall-mode .web-tall {
  top: 0;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #0b0f14;
}

/* Email chrome (top bar) reduces available height; ensure tall scroller accounts for it */
.web-modal.is-email-mode .web-preview-embed.is-tall-mode .web-tall {
  top: 56px;
  height: calc(100% - 56px);
}

.web-preview-embed.is-tall-mode .web-tall img {
  width: 100%;
  height: auto;
  display: block;
}

.web-preview-embed.has-tabs .web-tall {
  top: 56px;
  height: calc(100% - 56px);
}

.web-tall img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: contain;
}

.web-embed-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(29, 81, 117, 0.35), rgba(14, 32, 48, 0.55));
  color: rgba(255,255,255,0.92);
  z-index: 2;
}

.web-embed-loading.is-visible {
  display: flex;
}

.web-embed-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.22);
  border-top-color: rgba(255, 105, 59, 0.95);
  animation: webSpin 0.85s linear infinite;
}

.web-embed-loading-text {
  font-size: 13px;
  letter-spacing: 0.2px;
  opacity: 0.92;
}

@keyframes webSpin {
  to { transform: rotate(360deg); }
}

/* ========= IMAGE GALLERY MODAL ========= */
.img-modal {
  position: fixed;
  inset: 0;
  z-index: 3600;
  display: none;
}

.img-modal.active {
  display: block;
}

.img-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.img-card {
  position: relative;
  width: min(1100px, calc(100% - 22px));
  margin: 72px auto;
  border-radius: 18px;
  overflow: hidden;
}

/* Compact mode for small preview used by website/photo cards */
.img-modal.compact .img-card {
  width: min(520px, calc(100% - 28px));
  margin: 24px auto;
  border-radius: 12px;
}

.img-modal.compact .img-backdrop {
  background: rgba(0,0,0,0.48);
}

.img-modal.compact .img-topbar { padding: 10px 12px; }
.img-modal.compact .img-stage { padding: 8px; }
.img-modal.compact #img-stage { max-height: 420px; width: auto; max-width: 100%; display: block; margin: 0 auto; }

.img-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(0,0,0,0.38);
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.12);
}

.img-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.20);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.img-dots {
  display: inline-flex;
  gap: 6px;
}

.img-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.20);
}

.img-dots span:nth-child(1) { background: rgba(229, 9, 20, 0.90); }
.img-dots span:nth-child(2) { background: rgba(255, 204, 0, 0.90); }
.img-dots span:nth-child(3) { background: rgba(0, 210, 120, 0.90); }

.img-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.img-count {
  font-size: 12px;
  color: rgba(255,255,255,0.62);
}

.img-stage {
  position: relative;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(255,255,255,0.08), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(255, 122, 24, 0.14), transparent 60%),
    linear-gradient(135deg, rgba(29, 81, 117, 0.55), rgba(10, 14, 20, 0.88));
  padding: 18px;
}

.img-stage img {
  width: 100%;
  height: min(62vh, 620px);
  object-fit: contain;
  border-radius: 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.10);
}

.img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.92);
  z-index: 4;
}

.img-prev { left: 16px; }
.img-next { right: 16px; }

.img-nav[disabled] {
  opacity: 0.35;
  pointer-events: none;
}

.img-meta {
  padding: 14px 16px 16px;
}

.img-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.78);
  margin-bottom: 12px;
}

.img-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.img-thumb {
  width: 96px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.10);
  opacity: 0.78;
  cursor: pointer;
  background: rgba(0,0,0,0.25);
}

.img-thumb.is-active {
  opacity: 1;
  border-color: rgba(255, 122, 24, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.14);
}

@media (max-width: 720px) {
  .img-card {
    margin: 56px auto;
  }
  .img-stage img {
    height: min(58vh, 520px);
  }
}

/* If JS hides hero content (e.g., viewing a category gallery), don't leave a huge blank hero behind */
.hero.hero-collapsed {
  height: auto;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.hero.hero-collapsed .hero-bg,
.hero.hero-collapsed .hero-bg-video,
.hero.hero-collapsed .hero-fade-bottom {
  display: none;
}

/* Hero overlay removed (we now rely on the hero's background gradients) */

.hero-content { position: relative; z-index: 10; width: 60%; max-width: 900px; margin-top: 60px; }

.hero-title-txt { 
  font-size: 6.5rem; 
  line-height: 0.95; 
  margin-bottom: 1.5rem; 
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #FFFFFF 0%, #A1A1AA 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 20px 40px rgba(0,0,0,0.5); 
}
  
.hero-description { 
  font-size: 1.4rem; 
  line-height: 1.6; 
  margin-bottom: 3rem; 
  color: var(--text-dim); 
  max-width: 650px; 
  font-weight: 400; 
}

.hero-buttons { display: flex; gap: 20px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 1.2rem 3rem; border-radius: 100px; font-size: 1.1rem; font-weight: 600; font-family: 'Outfit';
  border: none; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none; cursor: pointer;
}
.btn:hover { transform: translateY(-3px) scale(1.02); }
.btn:active { transform: scale(0.98); }

.btn-play {
  background: white;
  color: black;
}
.btn-play:hover { background: rgba(255, 255, 255, 0.8); }
.btn-info { 
  background: rgba(255,255,255,0.05); 
  color: white; 
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1); 
}
.btn-info:hover { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }

.btn-git { background: #1a1a1a; color: white; border: 1px solid #333; }

/* Sliders Section */
.sliders-container { position: relative; z-index: 10; padding-bottom: 0; margin-top: 0; }
.slider-row { margin-bottom: 3vw; position: relative; }
.slider-row:last-child { margin-bottom: 0; }
.slider-title {
  color: var(--text-main); font-size: 1.6rem; font-weight: 700; margin: 0 5% 1rem 5%;
  display: flex; align-items: center; gap: 10px; transition: color 0.3s;
}
.title-icon { font-size: 1rem; opacity: 0; transform: translateX(-10px); transition: all 0.3s; color: var(--atomic-blue);}
.slider-title:hover .title-icon { opacity: 1; transform: translateX(0); }

.slider-wrapper { position: relative; display: flex; align-items: center; z-index: 10; }
.slider {
  display: flex; gap: 1vw; padding: 20px 0; margin: 0 5%;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
}
.slider::-webkit-scrollbar { display: none; }

.handle {
  position: absolute; top: 20px; bottom: 20px; width: 5%; background: rgba(5,5,5,0.7);
  color: white; border: none; font-size: 2rem; z-index: 10; opacity: 0; transition: opacity 0.3s, font-size 0.2s;
  backdrop-filter: blur(4px);
}
.slider-wrapper:hover .handle { opacity: 1; }
.handle:hover { font-size: 2.5rem; background: rgba(5,5,5,0.9); }
.left-handle { left: 0; border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.right-handle { right: 0; border-top-left-radius: 8px; border-bottom-left-radius: 8px; }

.slider-item {
  flex: 0 0 calc(20% - 1vw);
  min-width: 280px;
  aspect-ratio: 16/9;
  background-color: var(--card-bg);
  border-radius: 12px;
  position: relative;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: center;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  z-index: 1;
  will-change: transform;
}
.slider-item.video-card,
.gallery-item.video-card,
.gallery-grid .slider-item.video-card {
  aspect-ratio: 9 / 16 !important;
}

/* Video thumbnails: keep a reliable cover so cards never appear blank */
.video-thumb {
  position: relative;
  width: 100%;
  height: 100%;
}

.video-thumb-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transform: translateZ(0);
}

/* When the video has a frame, let it visually take over */
.video-thumb .card-video-thumb {
  position: relative;
  z-index: 1;
  background: transparent;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.video-thumb .card-video-thumb:not([src]) { opacity: 0; }
.slider-item img,
.slider-item .card-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.7s ease;
  filter: brightness(0.85);
  display: block;
  background: var(--card-bg);
}

.slider-item .card-video-thumb {
  background-color: rgba(13, 27, 42, 0.5);
  pointer-events: none;
}
.gallery-item img,
.gallery-item .card-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slider-item::after { content: ''; position: absolute; inset: 0; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); pointer-events: none; transition: border-color 0.5s;}

.slider-item-overlay {
  position: absolute; bottom: 0; left: 0; width: 100%; padding: 25px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
  opacity: 0; transform: translateY(20px); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom-left-radius: 12px; border-bottom-right-radius: 12px;
}
  .slider-item-title { font-size: 1.3rem; margin-bottom: 5px; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
  .slider-item-desc { font-size: 0.85rem; color: #ccc; line-height: 1.4; }

.slider-item:hover { transform: scale(1.05) translateY(-5px); z-index: 100; box-shadow: 0 10px 20px rgba(0,0,0,0.7); border-color: var(--atomic-orange); }
.slider-item:hover img { transform: scale(1.1); filter: brightness(1.1); }
.slider-item:hover::after { border-color: rgba(229, 9, 20, 0.4); }
.slider-item:hover .slider-item-overlay { opacity: 1; transform: translateY(0); }
.slider-item:hover:first-child { transform-origin: left center; }
.slider-item:hover:last-child { transform-origin: right center; }/* ========= GALLERY GRID ========= */

/* When a card scales up, temporarily disable pointer events on following siblings
   so hovering a big card won't let overlapped cards steal the click. */
.slider-item:hover ~ .slider-item {
  pointer-events: none;
}


/* ========= SOCIAL POSTS UI (Post-like cards) ========= */
.slider-item.post-card {
  aspect-ratio: 1 / 1;
  min-width: 260px;
}

.slider-item.post-card img {
  filter: brightness(0.92);
}

.post-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none; /* let the whole card receive the click */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.15) 40%,
    rgba(0,0,0,0.80) 100%
  );
}

.post-overlay-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.post-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.post-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

.post-handle {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.post-handle .name {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-handle .meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
}

.platform-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(9, 9, 11, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.92);
}

.post-caption {
  font-size: 0.95rem;
  line-height: 1.35;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 6px 18px rgba(0,0,0,0.65);
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
}

.post-actions .left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-actions i {
  opacity: 0.9;
}

.gallery-item.post-item {
  aspect-ratio: 1 / 1;
}

.gallery-item.post-item:hover {
  transform: scale(1.03) translateY(-4px) translateZ(0);
}

.gallery-item.post-item .gallery-item-overlay {
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0) 95%);
  padding: 18px 16px;
}
.gallery-item {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0); /* Hardware acceleration */
}
.gallery-item img, .gallery-item video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s ease;
  will-change: transform, filter;
  transform: translateZ(0); /* Hardware acceleration */
}
.gallery-item::after { content: ''; position: absolute; inset: 0; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); pointer-events: none; transition: border-color 0.5s;}
  
.gallery-item-overlay {
  position: absolute; bottom: 0; left: 0; width: 100%; padding: 25px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
  opacity: 0; transform: translateY(20px); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom-left-radius: 12px; border-bottom-right-radius: 12px;
}

  .gallery-item:hover { transform: scale(1.05) translateY(-5px) translateZ(0); z-index: 100; box-shadow: 0 10px 20px rgba(0,0,0,0.7); }
  .gallery-item:hover img, .gallery-item:hover video { transform: scale(1.02) translateZ(0); filter: brightness(1.1); }
  .gallery-item:hover::after { border-color: rgba(229, 9, 20, 0.4); }
  .gallery-item:hover .gallery-item-overlay { opacity: 1; transform: translateY(0); }

  .gallery-item-website {
    aspect-ratio: 16/9;
  }
  
  .gallery-item-website:hover { transform: scale(1.03) translateY(-3px); }

  /* Play / Pause indicator for videos (animated) */
  /* Removed visual play indicator overlays from cards to keep videos clean. */

/* ========= CINEMATIC MODAL ========= */
/* Base state: completely hidden and non-interactive so it cannot block clicks */
.cinematic-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;            /* remove from layout and hit-testing */
  opacity: 0;
  pointer-events: none;     /* extra safety */
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active state: visible and clickable */
.cinematic-modal.active {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

/* Ensure the video only receives pointer events when the modal is active */
/* ========= FIX IG MEDIA (VIDEO + BLUR ALIGNMENT) ========= */

.ig-media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: black;
}

/* Main video / image */
#modal-video-player,
.ig-media video,
.ig-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

/* Blur background layer */
.ig-media-blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px);
  transform: scale(1.05);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}

/* Optional cinematic gradient overlay */
.ig-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.2),
    rgba(0,0,0,0.7)
  );
  z-index: 2;
  pointer-events: none;
}

/* ========= FIX IG CARD LAYOUT ========= */

.ig-card {
  position: relative;
  width: min(1100px, 94vw);
  max-height: 90vh;
  height: auto;
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.075),
    rgba(255,255,255,0.035)
  );
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 34px 110px rgba(0,0,0,0.55);
}

/* ========= RESPONSIVE FIX ========= */

@media (max-width: 900px) {
  .ig-card {
    grid-template-columns: 1fr;
    max-height: 95vh;
  }

  .ig-media {
    height: 60vh;
  }
}

/* ========= OPTIONAL: CENTER VIDEO (IF YOU WANT CONTAIN STYLE) ========= */
/*
.ig-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

#modal-video-player {
  width: auto;
  height: 100%;
  object-fit: contain;
}
*/
.ig-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.10);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}

.ig-close:hover { background: rgba(255,255,255,0.88); color: rgba(10,12,16,0.95); }

.ig-media {
  background: rgba(12,14,18,0.92);
  position: relative;
  overflow: hidden;
}

.ig-media-blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  filter: blur(20px) saturate(1.15);
  transform: scale(1.10);
  opacity: 0.36;
  pointer-events: none; /* don't block interactions with the media */
}

.ig-media::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Subtle, non-black “focus” vignette (prevents harsh black overlay) */
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 40%, rgba(0,0,0,0.18) 72%, rgba(0,0,0,0.28) 100%);
  pointer-events: none; /* purely visual vignette */
}

.ig-media img,
.ig-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.ig-media::after {
  z-index: 2;
}

.ig-side {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(18,20,26,0.66), rgba(16,18,24,0.58));
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
}

.ig-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.ig-user { display: flex; align-items: center; gap: 12px; min-width: 0; }

.ig-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.30), rgba(255,255,255,0.07));
  border: 1px solid rgba(255,255,255,0.20);
}

.ig-user-meta { min-width: 0; }
.ig-username { font-weight: 800; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-location { font-size: 0.78rem; color: rgba(255,255,255,0.72); }

.ig-more { color: rgba(255,255,255,0.75); }

.ig-caption {
  padding: 16px 16px;
  flex: 1;
  overflow: auto;
}

.ig-caption-title {
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.ig-caption-text {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.90);
}

.ig-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.ig-actions-left { display: flex; align-items: center; gap: 6px; }

.ig-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.ig-icon-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.20);
  transform: translateY(-1px);
}

.ig-stats {
  padding: 8px 16px 0;
  font-weight: 700;
  font-size: 0.92rem;
}

.ig-time {
  padding: 6px 16px 12px;
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.55);
}

.ig-comment-box {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.ig-comment-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 12px 14px;
  color: white;
  outline: none;
}

.ig-comment-input::placeholder {
  color: rgba(255,255,255,0.55);
}

.ig-post-btn {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.12);
  color: white;
  font-weight: 800;
}

.ig-post-btn:hover { background: rgba(255,255,255,0.18); }

@media (max-width: 900px) {
  .ig-card {
    grid-template-columns: 1fr;
    height: min(860px, 92vh);
  }
  .ig-media { height: 52vh; }
}

/* ========= WEBSITE PREVIEW MODAL ========= */
.web-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.web-modal.active { opacity: 1; pointer-events: all; }

/* Prevent background scroll when any modal is open (toggled via JS) */
body.modal-open {
  overflow: hidden !important;
}

/* Backdrop class used by the current HTML */
.web-modal-backdrop,
.web-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Modal card used by the current HTML */
.web-modal-card,
.web-card {
  position: relative;
  width: min(1180px, calc(100% - 22px));
  height: min(94vh, 1040px);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 38px 110px rgba(0,0,0,0.82);
  display: grid;
  /* Stage gets the most space; details stays compact */
  grid-template-rows: 1fr auto;
  background: linear-gradient(180deg, rgba(12,14,20,0.92), rgba(10,12,18,0.86));
  border: 1px solid rgba(255,255,255,0.08);
}

.web-modal-close,
.web-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.5);
  color: white;
  display: grid;
  place-items: center;
}
.web-close:hover { background: rgba(255,255,255,0.9); color: black; }

.web-modal-close:hover { background: rgba(255,255,255,0.9); color: black; }

.web-topbar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(10,10,12,0.72);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* If the topbar gets hidden in markup, keep layout sane */
.web-modal-card .web-topbar,
.web-card .web-topbar {
  position: relative;
  z-index: 4;
}

.web-dots { display: flex; gap: 8px; }
.web-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
}
.web-dots span:nth-child(1) { background: rgba(255,95,86,0.9); }
.web-dots span:nth-child(2) { background: rgba(255,189,46,0.9); }
.web-dots span:nth-child(3) { background: rgba(39,201,63,0.9); }

.web-url {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  padding: 8px 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.web-dots,
.web-url {
  display: none !important;
}

/* Explicitly hide the URL container (user request: no links visible) */
#web-url {
  display: none !important;
}

.web-actions { display: flex; justify-content: flex-end; }
.web-cta {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  font-weight: 800;
  font-size: 0.85rem;
}
.web-cta:hover { background: rgba(255,255,255,0.16); }

.web-preview {
  aspect-ratio: 9 / 16;
  background: #000;
  position: relative;
  overflow: hidden;
}

/* Current markup uses a dedicated stage wrapper */
.web-preview-stage {
  position: relative;
  background: #000;
  overflow: hidden;
  /* Responsive height: avoid card exceeding viewport */
  height: 100%;
  min-height: 320px;
}

/* Email previews should be taller (the scrollable bit) */
.web-modal.is-email-mode .web-preview-stage {
  min-height: 680px;
}

/* ---------- Email preview chrome (top bar like the reference) ---------- */
.email-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 6;
  background: rgba(10, 10, 12, 0.78);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 14px 50px rgba(0,0,0,0.35);
}

.web-modal.is-email-mode .email-chrome {
  display: flex;
}

.email-chrome-dots {
  display: flex;
  gap: 8px;
}

.email-chrome-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.email-chrome-dots span:nth-child(1) { background: rgba(255,95,86,0.92); }
.email-chrome-dots span:nth-child(2) { background: rgba(255,189,46,0.92); }
.email-chrome-dots span:nth-child(3) { background: rgba(39,201,63,0.92); }

.email-chrome-title {
  color: rgba(255,255,255,0.88);
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 70%;
  text-align: center;
}

/* The stage should fill available space and avoid nested scrollbars */
.web-modal-card .web-preview-stage {
  display: grid;
}

.web-preview-stage > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: brightness(0.95);
}

.web-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.95);
}

.web-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

/* --- Embed wrapper: make it behave like a full-bleed viewport inside the card --- */
.web-preview-embed {
  position: absolute;
  inset: 0;
  display: none;
}

/* Reserve space for the chrome bar in email mode */
.web-modal.is-email-mode .web-preview-embed {
  top: 48px;
  height: calc(100% - 48px);
}

.web-modal.is-email-mode .web-preview-embed iframe,
.web-modal.is-email-mode .web-preview-embed .web-tall {
  top: 0;
  height: 100%;
}

.web-preview-embed.is-visible {
  display: block;
}

.web-preview-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Tall screenshot mode: allow scrolling inside the tall container, not the entire modal */
.web-tall {
  position: absolute;
  inset: 0;
  display: none;
  overflow: auto;
  overscroll-behavior: contain;
  background: #0b0d12;
}

/* Email previews must be scrollable */
.web-modal.is-email-mode .web-tall {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.web-tall.is-visible {
  display: block;
}

.web-tall img {
  width: 100%;
  height: auto;
  display: block;
}

/* Loading overlay */
.web-embed-loading {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: rgba(255,255,255,0.82);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: radial-gradient(circle at 30% 20%, rgba(255, 122, 24, 0.10), transparent 40%), rgba(0,0,0,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 3;
}

.web-embed-loading.is-visible {
  display: grid;
}

.web-preview,
.web-card,
.web-topbar,
.web-meta {
  pointer-events: auto;
}

.web-meta {
  padding: 18px 20px 22px;
  background: rgba(24,24,28,0.85);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Current markup uses .web-modal-details instead of .web-meta */
.web-modal-details {
  padding: 16px 20px 18px;
  background: rgba(24,24,28,0.85);
  border-top: 1px solid rgba(255,255,255,0.08);
  overflow: auto;
  overscroll-behavior: contain;
}

/* Email mode: use a premium glass overlay so the preview stays dominant */
.web-modal.is-email-mode .web-modal-details {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 7;
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(14,16,22,0.62), rgba(10,12,18,0.78));
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 22px 80px rgba(0,0,0,0.55);
  overflow: hidden;
}

.web-modal.is-email-mode .web-title {
  font-size: 1.35rem;
  margin: 0 0 4px;
}

.web-modal.is-email-mode .web-desc {
  margin: 0 0 10px;
  color: rgba(255,255,255,0.78);
  line-height: 1.45;
  max-width: 78ch;
}

.web-modal.is-email-mode .web-stack {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 0.85rem;
  margin: 0;
}

.web-modal-details .web-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
}

.web-modal.is-email-mode .web-modal-details .web-actions {
  padding-top: 12px;
}

/* Make the Open button look like a primary action in this modal */
#web-open-btn {
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 122, 24, 0.35);
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.28), rgba(29, 81, 117, 0.18));
  padding: 12px 18px;
  min-width: 140px;
}

#web-open-btn:hover {
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.38), rgba(29, 81, 117, 0.22));
}

/* When embed preview is visible, keep the outer details scrollable but avoid nested scrollbars */
.web-modal-card .web-preview-embed.is-visible {
  display: block;
}

@media (max-width: 720px) {
  .web-modal-card,
  .web-card {
    width: calc(100% - 14px);
    height: 94vh;
    border-radius: 12px;
  }

  .web-modal.is-email-mode .web-preview-stage {
    min-height: 420px;
  }

  .web-modal.is-email-mode .web-modal-details {
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 14px;
  }

  .web-modal.is-email-mode .web-title {
    font-size: 1.2rem;
  }
}

.web-title { font-size: 1.6rem; font-weight: 900; margin: 0 0 6px; }
.web-desc { margin: 0 0 10px; color: rgba(255,255,255,0.75); line-height: 1.55; }
.web-stack { color: rgba(255,255,255,0.9); font-weight: 700; font-size: 0.95rem; }

/* ========= VIDEO ADS POLISH ========= */
.cinematic-modal .modal-content {
  /* The cinematic modal is for vertical (reels/story) viewing */
  width: min(520px, 94vw);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(12,14,20,0.98), rgba(8,10,14,0.95));
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 36px 100px rgba(0,0,0,0.84);
  overflow: hidden;
  max-height: 92vh;
}

.modal-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 92vh;
  background:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,0.10), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(124,92,255,0.18), transparent 32%),
    #05070b;
  overflow: hidden;
}

/* Softer top fade so the close button stays readable */
.modal-video-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.10) 42%, rgba(0,0,0,0) 62%);
  z-index: 2;
  pointer-events: none;
}

#modal-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01) translateZ(0);
  filter: saturate(1.04) contrast(1.03);
}

/* Bottom fade for title + controls */
.modal-vid-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.18) 30%, rgba(0,0,0,0.78) 100%);
  z-index: 2;
  pointer-events: none;
}

.modal-vid-info {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 74px; /* sits above the control bar */
  z-index: 30;
}

.modal-vid-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: 0.02em;
  text-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

/* Hide the long details section in the reel viewer (keeps it clean + avoids seams) */
.cinematic-modal .modal-details {
  display: none;
}

/* Legacy video UI styles (disabled). We keep only ONE set of `.vid-*` rules
   further down to avoid conflicting layouts that can look like “two UIs”. */
/*
.vid-ui {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 12px;
  border-radius: 18px;
  background: rgba(9,11,15,0.62);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.vid-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: #fff;
  display: grid;
  place-items: center;
}

.vid-btn:hover { background: rgba(255,255,255,0.12); }

.vid-progress {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}

.vid-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ffb36b, #ff5f6d, #7c5cff);
  border-radius: inherit;
}

.vid-progress-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  transform: translate(-50%, -50%);
}

.vid-time {
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.82);
  font-weight: 700;
  white-space: nowrap;
}
*/

/* Keep mobile layout clean and readable */
@media (max-width: 900px) {
  .cinematic-modal .modal-content {
    width: min(520px, 96vw);
    border-radius: 16px;
  }

  .vid-ui {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 10px;
    gap: 8px;
  }

  .vid-btn { width: 38px; height: 38px; border-radius: 12px; }
  .vid-time { font-size: 0.78rem; }
}

@media (max-width: 768px) {
  .web-topbar { grid-template-columns: 90px 1fr 90px; }
  .web-preview { aspect-ratio: 4/3; }
}

.modal-backdrop {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* NOTE: cinematic modal sizing/9:16 is handled in the VIDEO ADS POLISH block above.
   Keeping the generic `.modal-content` styles for other modals only. */

.web-embed-fallback {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 6;
  padding: 22px;
  align-items: center;
  justify-content: center;
}

.web-embed-fallback.is-visible {
  display: flex;
}

.web-embed-fallback-inner {
  width: min(720px, 92%);
  border-radius: 16px;
  padding: 18px 18px 16px;
  background: rgba(10, 14, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.web-embed-fallback-title {
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.web-embed-fallback-sub {
  opacity: 0.82;
  line-height: 1.45;
  margin-bottom: 14px;
}

.web-embed-fallback-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.web-embed-fallback-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 13px;
}

.web-embed-fallback-link:hover {
  background: rgba(255, 255, 255, 0.12);
}


/* Make vertical videos feel like Stories/Reels */
.modal-content.reel-mode { 
  overflow: hidden;
}

.modal-content.reel-mode #modal-video-player {
  object-fit: cover;
  background: #000;
}

.modal-content.reel-mode .modal-vid-gradient {
  display: none;
}

.modal-content.reel-mode .modal-vid-info {
  left: 18px;
  right: 18px;
  bottom: 92px; /* leave room for vid-ui */
}

.modal-content.reel-mode .modal-vid-title {
  font-size: 2.1rem;
  margin-bottom: 12px;
}

.modal-content.reel-mode .modal-details {
  display: none;
}

.modal-content.reel-mode .modal-meta {
  font-size: 0.95rem;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-content.reel-mode .modal-split {
  grid-template-columns: 1fr;
  gap: 14px;
}

.modal-content.reel-mode .modal-desc {
  font-size: 1.02rem;
}

/* Make close button always readable on bright video frames */
.modal-close {
  box-shadow: 0 12px 26px rgba(0,0,0,0.55);
}

/* Video overlay controls */
.vid-ui {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 35;
  display: grid;
  grid-template-columns: 40px 40px minmax(140px, 1fr) max-content;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(10,12,16,0.72), rgba(0,0,0,0.50));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}

.modal-video-wrapper:hover .vid-ui,
.modal-video-wrapper.video-ui-show .vid-ui {
  opacity: 1;
  transform: translateY(0);
}

.ig-modal,
.web-modal,
.img-modal,
.cinematic-modal {
  pointer-events: none;
}

.ig-card,
.web-card,
.img-card,
.modal-content {
  pointer-events: auto;
}

.modal-content,
.modal-video-wrapper,
.web-card,
.ig-card,
.img-card {
  position: relative;
  z-index: 1;
}

.ig-more {
  display: none !important;
}

.vid-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: white;
  display: grid;
  place-items: center;
}

.vid-btn i {
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.55));
}

/* Make controls feel Atomic-branded */
.vid-progress-fill {
  background: linear-gradient(90deg, rgba(29,81,117,1) 0%, rgba(255,122,24,0.98) 100%);
}

.vid-progress { height: 9px; }

.vid-progress-knob {
  width: 14px;
  height: 14px;
}

/* Video thumbs in gallery: always show an image cover instantly */
.card-video-thumb-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.card-video-cover,
.card-video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-video-cover {
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.02);
}

/* Touch devices: show controls by default */
@media (hover: none) and (pointer: coarse) {
  .vid-ui {
    opacity: 1;
    transform: translateY(0);
  }
}

.vid-btn:hover { background: rgba(255,255,255,0.14); }

.vid-progress {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  overflow: hidden;
  cursor: pointer;
}

.vid-progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(29,81,117,1) 0%, rgba(255,122,24,0.98) 100%);
}

.vid-progress-knob {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: white;
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
}

.vid-time {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  padding: 0 4px;
  white-space: nowrap;
}

/* If the UI is extremely wide (desktop), keep it from looking like a stretched slab */
@media (min-width: 900px) {
  .vid-ui {
    left: 22px;
    right: 22px;
    max-width: 720px;
    margin: 0 auto;
  }
}

/* Reel mode: make controls + info a bit tighter so everything fits */
.modal-content.reel-mode .vid-ui {
  left: 14px;
  right: 14px;
  bottom: 74px; /* leave room for vid-ui */
}

/* Reel-friendly mode for vertical videos */
.modal-content.reel-mode .modal-video-wrapper {
  aspect-ratio: 9/16;
}
.modal-content.reel-mode {
  max-width: 520px;
}

/* -------------------------------------------------------------------------
   Legacy cinematic modal overrides (DISABLED)
   These generic .modal-* rules were re-added later in the file and can
   override the newer 9:16 + reel-mode polish in a data-dependent way.
   In particular, this block forces a full-height gradient which can look like
   a persistent black overlay/band on some videos.
   Keep them commented out so all videos (1-4) use the newer rules above.
--------------------------------------------------------------------------- */
/*
.modal-close {
  position: absolute; top: 20px; right: 20px; z-index: 30; width: 40px; height: 40px;
  border-radius: 50%; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2);
  color: white; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); transition: background 0.3s, transform 0.3s;
}
.modal-close:hover { background: white; color: black; transform: scale(1.1); }

.modal-vid-gradient {
  position: absolute; inset: 0; background: linear-gradient(0deg, var(--secondary-bg) 0%, transparent 60%);
}
.modal-vid-info { position: absolute; bottom: 30px; left: 40px; right: 40px; }
.modal-vid-title { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; text-shadow: 0 4px 10px rgba(0,0,0,0.5); }

.modal-details { padding: 40px; }
.modal-meta { display: flex; gap: 15px; margin-bottom: 25px; font-weight: 600; font-size: 1.1rem; align-items: center; }
.match-score { color: #46D369; }
.hd-badge { border: 1px solid rgba(255,255,255,0.4); padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; letter-spacing: 1px;}
.duration { color: var(--text-dim); }

.modal-split { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.modal-desc { font-size: 1.15rem; line-height: 1.7; color: rgba(255,255,255,0.9); }
.modal-stack { font-size: 0.95rem; color: var(--text-dim); line-height: 1.8; }
.modal-stack span:first-child { color: #a0a0a0; margin-right: 5px; }
*/

/* ========= FOOTER ========= */
.site-footer {
  padding: 60px 5%;
  border-top: 1px solid rgba(255, 122, 24, 0.1);
  margin-top: 100px;
  background: linear-gradient(135deg, rgba(11, 20, 32, 0.5) 0%, rgba(29, 82, 117, 0.3) 100%);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255, 122, 24, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(29, 82, 117, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.footer-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-content {
  margin-bottom: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column {
  text-align: left;
}

.footer-column-title {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: white;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
}

.footer-links a:hover {
  color: #ff7a18;
}

.footer-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -3px;
  left: 0;
  background: #ff7a18;
  transition: width 0.3s ease;
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-address {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
}

.footer-socials {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.footer-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 122, 24, 0.1);
  color: #ff7a18;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.footer-social-icon:hover {
  background: rgba(255, 122, 24, 0.25);
  transform: translateY(-3px);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding: 30px 0;
  border-top: 1px solid rgba(255, 122, 24, 0.1);
}

.footer-policies {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
}

.footer-policies a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-policies a:hover {
  color: #ff7a18;
}

.footer-divider {
  color: rgba(255, 255, 255, 0.3);
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin: 0;
  flex: 1;
  text-align: center;
}

.btn-footer {
  background: linear-gradient(135deg, #ff7a18 0%, #ff9944 100%);
  color: white;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-footer:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 122, 24, 0.3);
}

/* ========= FOOTER RESPONSIVE ========= */
@media (max-width: 768px) {
  .site-footer {
    padding: 40px 5%;
    margin-top: 60px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-policies {
    justify-content: center;
    width: 100%;
  }

  .footer-copyright {
    text-align: center;
    width: 100%;
  }

  .btn-footer {
    width: 100%;
    text-align: center;
  }
}

/* ========= AMBIENT BACKGROUND & NAVIGATION ========= */
.ambient-bg-wrapper {
  position: absolute; top:0; left:0; width:100%; height:100%; z-index:-1; overflow:hidden;
}
.ambient-bg-overlay {
  position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,9,11,0.4) 0%, var(--primary-bg) 100%); z-index: 1;
}
.ambient-bg-video {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.15;
}

.dropdown-services {
  margin-left: 1rem;
}
.dropdown-caret {
  font-size: 0.8rem; margin-left: 5px;
}
.dropdown-menu-services {
  left: 0; right: auto; top: 35px; min-width: 200px;
}

.back-to-site-btn {
  font-size: 0.9rem; margin-right: 15px; font-weight: 500;
}
.get-started-btn {
  background: linear-gradient(180deg, rgba(255, 140, 40, 1) 0%, var(--atomic-orange) 100%);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 800;
  margin-right: 15px;
  color: #0b0c10;
  box-shadow: 0 14px 40px rgba(255, 122, 24, 0.22);
  border: 1px solid rgba(255,255,255,0.08);
}

.get-started-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 18px 55px rgba(255, 122, 24, 0.28),
    0 0 0 1px rgba(29, 81, 117, 0.35) inset;
}

/* Fallback for backdrop-filter performance */
@supports not (backdrop-filter: blur(24px)) {
  .glass-panel {
    background: rgba(26, 26, 30, 0.95);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title-txt { font-size: 3rem; }
  .slider-item { flex: 0 0 calc(50% - 10px); min-width: 200px; }
  .modal-split { grid-template-columns: 1fr; }
  .modal-vid-title { font-size: 2rem; }
  .cursor-dot, .cursor-outline, .cursor-text { display: none !important; }
}

/* ========= GLOBAL LOADER ========= */
.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--primary-bg);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.global-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--atomic-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loader-text {
  color: var(--text-main);
  letter-spacing: 4px;
  font-size: 0.9rem;
  opacity: 0.8;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

body.loading {
  overflow: hidden !important;
}
.noise-overlay,
.fluid-bg,
.hero-fade-bottom,
.cursor-dot,
.cursor-outline,
.cursor-text {
  pointer-events: none;
}
.slider {
  overflow-x: auto;
  overflow-y: visible;
}

.slider-item {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.slider-item:hover {
  z-index: 999;
}

.sliders-container {
  position: relative;
  z-index: 20;
}
.hero-fade-bottom {
  pointer-events: none;
}
.ig-modal {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.ig-modal.active {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
}

/* Grid: allow the progress column to actually shrink without blowing up the grid */
.vid-ui > .vid-progress {
  min-width: 140px;
}

.vid-progress {
  min-width: 0; /* critical for CSS grid so it can shrink without collapsing content */
}

.vid-time {
  min-width: 92px;
  text-align: right;
}

/* Very narrow: stack time under the bar instead of crushing everything */
@media (max-width: 420px) {
  .vid-ui {
    grid-template-columns: 40px 40px 1fr;
    grid-template-areas:
      "play mute bar"
      "play mute time";
    row-gap: 6px;
    border-radius: 16px;
    padding: 10px 12px;
  }

  #vid-play { grid-area: play; }
  #vid-mute { grid-area: mute; }
  #vid-progress { grid-area: bar; }
  #vid-time { grid-area: time; justify-self: end; }

  .vid-ui > .vid-progress {
    min-width: 0;
  }
}