/* ==========================================================================
   HERO SECTION: 3D PERSPECTIVE SCROLL GRID & EDITORIAL BANNER
   Inspired by Codrops Scroll3DGrid + Uploaded UI Reference
   ========================================================================== */

/* Google Fonts for Handwritten Notes and Modern Display */
@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Plus+Jakarta+Sans:wght@400;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --hero-bg-cream: #ede8df;
  --hero-title-dark: #212121;
  --hero-hw-color: #525252;
  --hero-dark-bg: #000000;

  /* 3D Grid Parameters (Codrops Type 3 configuration - Zoomed for impact) */
  --perspective: 1600px;
  --grid-width: 115%;
  --grid-columns: 6;
  --grid-gap: 2.2vw;
  --grid-item-ratio: 800 / 520;
  --grid-inner-scale: 0.85;
}

/* --------------------------------------------------------------------------
   1. Hero Main Section Container
   -------------------------------------------------------------------------- */
.hero-scroll3d-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: var(--hero-bg-cream);
}

/* --------------------------------------------------------------------------
   2. Top Editorial Banner (Cream background matching uploaded mockup)
   -------------------------------------------------------------------------- */
.hero-editorial-banner {
  width: 100%;
  background-color: #ffffff;
  padding: 85px 24px 65px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 5;
  box-sizing: border-box;
}

.hero-editorial-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-editorial-title-box {
  position: relative;
  display: inline-block;
  text-align: center;
  padding: 10px 40px;
}

/* Big Modern Headline */
.hero-main-title,
.hero-main-title .hero-title-line {
  margin: 0;
  /* font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important; */
  font-size: clamp(40px, 7.2vw, 104px);
  font-weight: 700 !important;
  line-height: 1.02;
  letter-spacing: -0.03em !important;
  color: var(--hero-title-dark);
  text-transform: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

/* Top-Left Handwritten Annotation: ARCHITECTURAL */
.hero-hw-badge.hero-hw-arch {
  position: absolute;
  top: -22px;
  left: -28px;
  transform: rotate(-4deg);
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
}

.hero-hw-text {
  font-family: 'Architects Daughter', cursive !important;
  font-size: clamp(14px, 1.6vw, 22px);
  color: #5a5a5a;
  letter-spacing: 0.12em;
  font-weight: 600;
  line-height: 1;
}

.hero-hw-underline {
  display: block;
  width: 106%;
  height: 1.5px;
  background-color: #5a5a5a;
  margin-top: 3px;
  border-radius: 1px;
  opacity: 0.8;
}

/* Right Handwritten Annotation: -> NOT SOFTWARE */
.hero-hw-badge.hero-hw-software {
  position: absolute;
  right: -85px;
  bottom: 2px;
  transform: rotate(1.5deg);
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: none;
}

.hero-hw-arrow-svg {
  width: 34px;
  height: 22px;
  color: #5a5a5a;
  flex-shrink: 0;
  margin-top: -6px;
}

.hero-hw-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}

.hero-hw-not {
  font-family: 'Architects Daughter', cursive !important;
  font-size: clamp(13px, 1.35vw, 19px);
  color: #5a5a5a;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-bottom: 1.5px solid #5a5a5a;
  padding-bottom: 1px;
}

.hero-hw-soft {
  font-family: 'Architects Daughter', cursive !important;
  font-size: clamp(11px, 1.15vw, 16px);
  color: #5a5a5a;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-top: 3px;
}

p.sub_title_hero_section {
  font-weight: 300;
  font-size: 24px;
  max-width: 640px;
}

/* --------------------------------------------------------------------------
   3. 3D Perspective Grid Section (Codrops grid--3 / type3)
   -------------------------------------------------------------------------- */
.hero-3d-viewport {
  position: relative;
  width: 100%;
  background-color: var(--hero-dark-bg);
  overflow: hidden;
  box-shadow: inset 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hero-content-grid {
  position: relative;
  margin-bottom: 40vh;
  width: 100%;
  /* overflow: hidden; */
}

.grid {
  display: grid;
  place-items: center;
  padding: 3rem 0;
  width: 100%;
  perspective: var(--perspective);
  perspective-origin: 50% 50%;
}

.grid-wrap {
  width: var(--grid-width);
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: var(--grid-gap);
  transform-style: preserve-3d;
  will-change: transform;
}

.grid__item {
  aspect-ratio: var(--grid-item-ratio, 800 / 500);
  width: 100%;
  height: auto;
  overflow: hidden;
  position: relative;
  border-radius: 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.65);
  background-color: #121212;
  transform-style: preserve-3d;
  will-change: transform, filter;
}

.grid__item-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: 50% 50%;
  will-change: transform;
}

/* Codrops Overlay Headline: "Embrace now, tomorrow may fade." */
.hero-content-grid .content__title {
  position: absolute;
  height: 100vh;
  width: 100vw;
  top: 50%;
  left: 50%;
  margin: -20vh 0 0 -50vw;
  padding: 0 8vw 10vh;
  display: grid;
  place-items: end start;
  text-align: left;
  font-weight: 300;
  font-size: clamp(2rem, 7vw, 5.5rem);
  line-height: 1.05;
  color: #ffffff;
  pointer-events: none;
  z-index: 20;
  /* font-family: 'Playfair Display', Georgia, serif; */
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 1px 4px rgba(0, 0, 0, 0.9);
}

.content__title--bottom {
  align-items: end;
}

.content__title--left {
  justify-items: start;
  text-align: left;
}

/* --------------------------------------------------------------------------
   4. Responsive Adjustments
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
  :root {
    --grid-columns: 6;
    --grid-width: 120%;
    --grid-gap: 2.5vw;
  }

  .hero-hw-badge.hero-hw-arch {
    top: -12px;
    left: -10px;
  }

  .hero-hw-badge.hero-hw-software {
    right: -40px;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --grid-columns: 4;
    --grid-width: 140%;
    --grid-gap: 3vw;
  }

  .hero-editorial-banner {
    padding: 48px 16px 36px;
  }

  .hero-editorial-title-box {
    padding: 6px 12px;
    max-width: 100%;
  }

  .hero-main-title,
  .hero-main-title .hero-title-line {
    font-size: clamp(28px, 8vw, 56px);
  }

  .hero-hw-badge.hero-hw-arch {
    top: -18px;
    left: 4px;
    transform: rotate(-3deg);
  }

  .hero-hw-badge.hero-hw-software {
    position: static;
    margin-top: 12px;
    justify-content: center;
    transform: none;
  }

  .hero-hw-arrow-svg {
    transform: rotate(45deg);
  }

  .hero-content-grid {
    margin-bottom: 50vh;
  }

  .hero-content-grid .content__title {
    font-size: clamp(1.8rem, 6.5vw, 3.2rem);
    padding: 0 6vw 8vh;
  }
}

@media screen and (max-width: 480px) {
  .hero-editorial-banner {
    padding: 36px 12px 28px;
  }

  .hero-editorial-title-box {
    padding: 4px 6px;
  }

  .hero-main-title,
  .hero-main-title .hero-title-line {
    font-size: clamp(24px, 7.5vw, 38px);
  }

  .hero-hw-text {
    font-size: 13px;
  }
}