@import url("https://fonts.googleapis.com/css2?family=Aldrich&family=Roboto:wght@400;500&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}

body {
  font-family: "Roboto", sans-serif;
  color: #ffffff;
  background-color: #000000;
  background-image: radial-gradient(
      ellipse at 50% 0%,
      rgba(92, 10, 255, 0.25) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 30%,
      rgba(255, 255, 255, 0.04) 0%,
      transparent 100%
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(255, 255, 255, 0.05) 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      rgba(255, 255, 255, 0.05) 40px
    );
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
.side-title {
  font-family: "Aldrich", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.mobile-section-heading {
  display: none; 
  color: #ffffff;
  text-shadow: 0 0 20px rgba(92, 10, 255, 0.6);
  margin-bottom: 2rem;
}
h2 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 300;
}
h3,
h4,
.side-title {
  font-weight: 600;
}

/* ========== NAV ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid transparent;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}
.navbar.scrolled {
  background: rgba(18, 18, 18, 0.9);
  border-bottom-color: #5c0aff;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
  color: #ffffff;
  z-index: 1301; 
}
.logo a {
  display: flex;
  align-items: center;
}
.logo img {
  height: 60px;
  width: auto; 
}
.navbar.scrolled .logo img {
  height: 40px;
  width: auto;
}
.footer .logo img {
  height: 40px;
  width: auto;
}

/* --- LOGO FIX (DESKTOP) --- */
/* Ensure the symbol logo is hidden by default on all large screens (desktop) */
.logo .logo-symbol-mobile {
  display: none;
}
/* --- END LOGO FIX --- */


.nav-links a {
  margin-left: 1rem;
  color: #cccccc;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}
.nav-links a:hover {
  color: #5c0aff;
  transform: translateY(-2px);
}
.nav-links a.active {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(92, 10, 255, 0.7);
}

/* ========== MOBILE NAV ========== */
.mobile-nav-toggle {
  display: none; 
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1301; 
  padding: 10px;
  margin: -10px;
}
.mobile-nav-toggle .line {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
}
.mobile-nav-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(10px);
  z-index: 1250;
  padding: 8rem 2rem 2rem 2rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
  transition: all 0.4s ease-in-out;
}
.mobile-nav-panel a {
  color: #ffffff;
  text-decoration: none;
  font-family: "Aldrich", sans-serif;
  font-size: 1.8rem;
  text-transform: uppercase;
}
.nav-open .mobile-nav-toggle .line1 {
  transform: translateY(7px) rotate(45deg);
}
.nav-open .mobile-nav-toggle .line2 {
  opacity: 0;
}
.nav-open .mobile-nav-toggle .line3 {
  transform: translateY(-7px) rotate(-45deg);
}
.nav-open .mobile-nav-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}


/* ========== SECTION BASE ========== */
.section {
  padding: 6rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
}
.two-col {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.grid-3 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.section.work {
  max-width: none;
  padding: 0;
}
.section + .section,
.logo-marquee + .section {
  border-top: none;
}

.img-box {
  background: #111111;
  border: none;
  border-radius: 10px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.25rem;
  overflow: hidden;
  position: relative;
}
.img-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.img-box.large {
  height: 600px;
  width: 100%;
  border-radius: 14px;
}
.img-box.wide {
  height: 360px;
  border-radius: 12px;
}
.img-box.medium {
  height: 320px;
}

/* ========== HERO SECTION ========== */
.hero-section {
  text-align: center;
  padding-top: 6rem;
  padding-bottom: 6rem;
  perspective: 1200px;
}
.hero-text-wrapper {
  max-width: 720px;
  margin: 0 auto 2.5rem auto;
}
.hero-image-box {
  max-width: 1200px;
  margin: 0 auto;
  opacity: 1;
  will-change: transform;
}
.hero-image-box .img-box {
  background: #111111;
  box-shadow: 0 0 25px rgba(92, 10, 255, 0.15), 0 0 45px rgba(92, 10, 255, 0.1);
}
#p5-hero-canvas canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-section h2 {
  margin-bottom: 1rem;
  line-height: 1.2;
  color: #ffffff;
  text-transform: uppercase;
}

.hero-sub-headline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.hero-sub-headline span {
  font-family: "Aldrich", sans-serif;
  font-weight: 700;
  text-transform: lowercase;
  font-style: italic;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  color: #ffffff;
}
.hero-logo-box {
  display: inline-block;
  padding: 1rem 2rem;
  background: rgba(17, 17, 17, 0.5);
  border: 1px solid #262626;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(92, 10, 255, 0.15), 0 0 45px rgba(92, 10, 255, 0.1);
  backdrop-filter: blur(4px);
  margin-bottom: 1.5rem;
}
.hero-logo-box img {
  width: 450px;
  max-width: 100%;
  height: auto;
  display: block;
}
.hero-section p {
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto 1.5rem auto;
  color: #cccccc;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: #3a3a3a;
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}
.btn-primary {
  color: white;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  padding: 0.8rem 1.75rem;
  font-size: 1rem;
  background-image: linear-gradient(90deg, #5c0aff, #e95d8c, #ff751f, #5c0aff);
  background-size: 200% auto;
  transition: all 0.4s ease;
}
.btn-primary:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.hero-text-wrapper > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-text-wrapper.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.hero-text-wrapper.is-visible h2 {
  transition-delay: 0.1s;
}
.hero-text-wrapper.is-visible .hero-sub-headline {
  transition-delay: 0.2s;
}
.hero-text-wrapper.is-visible p {
  transition-delay: 0.3s;
}
.hero-text-wrapper.is-visible .btn-primary {
  transition-delay: 0.4s;
}


#about-main .two-col > * {
  flex: 1;
  padding: 40px;
}
#about-main .about-text-block h2 {
  margin-bottom: 1.5rem;
  color: #ffffff;
}
#about-main .about-text-block p {
  color: #cccccc;
  font-size: 1.1rem;
  max-width: 500px;
}
#about-main .about-visual-block .img-box {
  box-shadow: 0 0 25px rgba(92, 10, 255, 0.15), 0 0 45px rgba(92, 10, 255, 0.1);
}

.section-title-wrapper {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}
.section-title-wrapper h2 {
  color: #ffffff;
  text-shadow: 0 0 20px rgba(92, 10, 255, 0.6);
  margin-bottom: 1rem;
}
.section-title-wrapper p {
  font-size: 1.1rem;
  color: #cccccc;
}
.team-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 2rem;
  max-width: 700px;
  margin: 0 auto; 
}
.team-member {
  text-align: center;
}
.team-member .img-box {
  width: 180px; 
  height: 180px;
  border-radius: 50%;
  margin: 0 auto 1.5rem auto;
  border: 3px solid #5c0aff;
  box-shadow: 0 0 25px rgba(92, 10, 255, 0.3);
  background: #111;
  overflow: hidden;
  position: relative;
}
.team-member .img-box img {
  object-position: center top;
}
.team-member h3 {
  color: #ffffff; 
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.team-member p {
  color: #5c0aff; 
  text-transform: uppercase;
  font-size: 1.0rem;
}

.section-divider {
  border: none;
  height: 1px;
  background-color: #262626; 
  margin: 6rem auto; 
}

.two-col.row-reversed {
  flex-direction: row-reverse;
}

/* ========== SERVICES / STICKY CASCADE ========== */
.work-wrapper {
  display: grid;
  grid-template-columns: 250px 1fr;
  align-items: flex-start;
  gap: 2rem;
  padding-top: 6rem;
  padding-bottom: 6rem;
}
.side-nav {
  grid-column: 1 / 2;
  position: sticky;
  top: 96px; 
  height: calc(100vh - 96px);
  background: rgba(92, 10, 255, 0.08); 
  border-right: 1px solid rgba(92, 10, 255, 0.15); 
  padding: 2rem;
  backdrop-filter: blur(4px);
  box-shadow: -100vw 0 0 rgba(92, 10, 255, 0.08);
}
.side-title {
  margin-bottom: 1rem;
  color: #ffffff;
  font-size: 1.4rem;
  text-shadow: 0 0 10px rgba(92, 10, 255, 0.5);
}
.side-nav ul {
  list-style: none;
  margin-top: 0.5rem;
}
.side-nav li {
  margin-bottom: 0.6rem;
}
.side-nav a {
  color: #aaaaaa;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}
.side-nav a:hover {
  color: #5c0aff;
  transform: translateX(4px);
}
.side-nav a.active {
  color: #5c0aff;
  transform: translateX(4px);
}

.sticky-cascade-container {
  grid-column: 2 / 3;
  position: relative;
  max-width: 900px; 
}

.sticky-cascade-item {
  position: sticky;
  height: 100vh;
  display: flex;
  align-items: flex-start;
  padding: 3rem 2rem;
  transform-origin: center center;
  z-index: 10;
}

.card-layer {
  width: 100%; 
  margin: 0 auto;
  padding: 2rem;
  background: #111111;
  border-radius: 16px;
  border: 1px solid #262626;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: transform 700ms cubic-bezier(0.2, 0.9, 0.2, 1),
    box-shadow 400ms ease, opacity 700ms ease;
  transform: translateY(12px) scale(0.995);
  max-height: calc(100vh - 96px - 4rem);
  overflow-y: scroll; 
}

.card-layer h2 {
  color: #ffffff;
  text-shadow: 0 0 20px rgba(92, 10, 255, 0.6);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
}

.sticky-cascade-item.active .card-layer {
  transform: translateY(0px) scale(1);
  box-shadow: 0 0 30px rgba(92, 10, 255, 0.25), 0 0 60px rgba(92, 10, 255, 0.1);
}

.sticky-cascade-item.scrolled-past .card-layer {
  transform: scale(0.9);
  opacity: 0;
  pointer-events: none;
}
#services-ai-agent:is(.scrolled-past, .active) .card-layer {
  opacity: 1 !important; 
  transform: translateY(0px) scale(1) !important;
  pointer-events: auto !important;
}

#services-ai-agent {
  opacity: 1 !important;
}


/* ========== MISSION GRID  ========== */
.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.mission-card {
  background: #111111;
  border: 1px solid #262626;
  padding: 2rem;
  border-radius: 12px;
}
.mission-card h3 {
  color: #5c0aff;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}
.team-section-wrapper{
  padding-top: 10rem;
}
/* === Animation for fade-in effect DISABLED === 
.fade-in-up {
  opacity: 1; 
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
#about-main .two-col.fade-in-up:nth-of-type(1) .about-visual-block {
  transition-delay: 0.2s;
}
.team-section-wrapper.fade-in-up {
  transition-delay: 0.2s;
}
#about-main .two-col.fade-in-up:nth-of-type(3) {
  transition-delay: 0.2s;
}

/* ========== CONTACT + FOOTER ========== */
#contact-book {
  max-width: 520px;
  margin: 0 auto 3rem auto;
  text-align: center;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 520px;
  margin: 1rem auto 0 auto;
}
.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #262626;
  background: #1a1a1a;
  color: #ffffff;
}
.subtle-contact-info {
  text-align: left;
  margin-top: 2rem;
}

.footer {
  padding: 3.5rem 1.5rem;
  background: #111111;
  color: #cccccc;
  border-top: 1px solid #262626;
  text-align: center;
}
.footer-nav a,
.footer-social p {
  color: #cccccc;
  text-decoration: none;
}
.footer-nav ul{
  list-style: none;
}
.footer-nav a:hover {
  color: #5c0aff;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  justify-content: center;
}
.social-links a {
  color: #ffffff;
  transition: color 0.3s ease;
}
.social-links a:hover {
  color: #5c0aff;
}
.social-links svg {
  height: 24px;
  width: 24px;
}

.designer-credit {
  font-size: 0.8rem;
  color: #666666;
  margin-top: 1rem;
}

/* ========== P5.JS CANVAS STYLES ========== */
.p5-canvas-container {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 12px;
  overflow: hidden; 
}
.p5-canvas-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; 
  height: 100%;
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }
  .sticky-cascade-item,
  .card-layer,
  .parallax,
  .btn,
  .nav-links a,
  .side-nav a {
    transition: none;
    animation: none;
    transform: none;
  }
}

.mobile-section-heading {
  display: none; 
  color: #ffffff;
  text-shadow: 0 0 20px rgba(92, 10, 255, 0.6);
  margin-bottom: 2rem; 
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .work-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto; 
    display: flex;
    flex-direction: column;
    align-items: center; 
    padding-top: 0;
    padding-bottom: 10rem;
  }
  .side-nav {
    display: none;
  }
  .mobile-section-heading {
    display: block;
    text-align: center; 
    width: 100%; 
  }
}

@media (max-width: 900px) {
  .navbar .logo {
    display: none;
  }
  
  .section {
    padding-top: 4rem; 
    padding-bottom: 4rem; 
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero-section {
    padding-top: 3.5rem; 
    padding-bottom: 10.5rem;
  }
  .section.work {
    padding-top: 0; 
    padding-bottom: 4rem; 
  }

  .nav-links {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  
  .sticky-cascade-container {
    height: auto !important; 
    position: relative;
    max-width: 100%;
    
  }
  .sticky-cascade-item {
    height: auto;
    position: relative;
    padding: 0 0 3rem 0; 
  }
  .sticky-cascade-container .sticky-cascade-item:first-child {
    padding-top: 0;
  }
  .card-layer {
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-height: none; 
    overflow-y: visible; 
  }
  
  .mobile-section-heading {
    margin-top: 3rem; 
    margin-bottom: 1.5rem;
    text-align: center;
  }
  
  .two-col {
    flex-direction: column; 
  }
  .two-col.row-reversed {
    flex-direction: column; 
  }
  
  #about-main .two-col > * {
    flex: 1;
    width: 100%;
    padding-top: 1rem; 
  }
  
  .team-section-wrapper{
    padding-top: 10rem;
  }
  
  #about-main .about-visual-block {
    display: block; 
    max-width: 100%;
  }
  .img-box.wide {
    height: 300px; 
  }
  
  .team-section-wrapper {
    margin-top: 2rem;
  }

  .content-divider {
    height: 90px; 
  }
  .content-divider.top-fade {
    height: 90px;
  }
  .footer-content-wrapper {
  display: flex;
  flex-direction: column;
  flex-direction: column-reverse;
  align-items: center;
}
.footer-brand {
    text-align: center; 
  }

  .footer-brand .logo {
    display: inline-block; 
    margin: 0 auto; 
  }

  .footer-brand .logo a {
    display: block; 
    width: fit-content;
    margin: 0 auto;
  }

  .footer-social .social-links {
    display: flex;
    justify-content: center;
  }
.footer {
  text-align: center;
}
.footer-content {
  display: flex;
  flex-direction: column-reverse; 
}

.footer-brand,
.footer-nav,
.footer-social {
  width: 100%;
}
.footer-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 600px) {
  .team-grid-container {
    grid-template-columns: 1fr;  
  }
}


.content-divider {
  height: 150px; 
  width: 100%;
  position: relative;
  background: linear-gradient(
    180deg, 
    rgba(0, 0, 0, 0) 0%, 
    rgba(0, 0, 0, 0.9) 80%, 
    #000000 100%
  );
}
.content-divider.top-fade {
  height: 150px;
  width: 100%;
  position: relative;
  background: linear-gradient(
    0deg, 
    rgba(0, 0, 0, 0) 0%, 
    rgba(0, 0, 0, 0.9) 80%, 
    #000000 100%
  );
}