/* GLOBAL RESET */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
}

/* Prevent iOS bounce effect that can interfere */
body {
  overscroll-behavior: none;
  -webkit-overscroll-behavior: none;

}

/* Ensure smooth scrolling container */
html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

body {
  background-color: #fff;
  max-width: 1920px;
  margin: 0 auto;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;

}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'TestTiemposHeadline-Light', serif;
}

p {
  font-family: 'Aeonik', serif;
}


/* .scroll-container {
  position: relative;
  height: 100vh;
  overflow: hidden;
} */

/* .scroll-content {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  will-change: transform;
} */

/* Main container takes full width, with max-width constraint */
.main-container {
  max-width: 1920px;
  width: 100%;
  margin: 0 auto;
}

/* Header */
.header {
  background-color: #012136;
  height: 64px;
  width: 100%;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.3);
}

.header-overlay {
  background-color: rgba(29, 27, 32, 0.16);
  width: 100%;
  height: 100%;
}

/* Header end */
/* Hero Section */

.hero-section {
  text-align: center;
  padding: clamp(40px, 6.6vw, 64px) 0 clamp(40px, 5.7vw, 64px);
}

.hero-title {
  font-size: clamp(28px, 2.5vw, 48px);
  font-family: "Test Tiempos Headline", serif;
  font-weight: 300;
  line-height: clamp(36px, 3vw, 59px);
  color: #2e2c2d;
  margin-bottom: clamp(12px, 1vw, 16px);
  max-width: clamp(500px, 41.3vw, 793px);
  margin-left: auto;
  margin-right: auto;
}

.hero-section p {
  font-size: clamp(14px, 1.25vw, 18px);
  font-family: "Aeonik", sans-serif;
  font-weight: 400;
  line-height: clamp(18px, 1.6vw, 21px);
  color: #2e2c2d;
  max-width: clamp(320px, 28.5vw, 547px);
  margin: 0 auto;
}

/* Hero Section end */

.main-image-wrapper {
  width: clamp(1100px, 91.6vw, 1760px);
  margin: 0 auto clamp(40px, 3.3vw, 64px);
  aspect-ratio: 220 / 98;
  overflow: hidden;
  position: relative;
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  transition: transform 0.2s ease-out;
  display: block;
}

/* Main Image end */

/* three image grid start */
.content-section {
  margin: clamp(40px, 4.17vw, 64px) auto clamp(40px, 4.17vw, 64px);
  max-width: 1920px;
}

/* Grid with 3 fixed-ratio columns */
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, clamp(300px, 29.9vw, 574px));
  /* Maintain Figma proportion */
  gap: clamp(12px, 1.04vw, 20px);
  justify-content: center;
  /* ✅ Center the whole grid */
}

/* Cards: No padding or centering */
.content-card {
  width: 100%;
  aspect-ratio: 574 / 540;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1vw, 20px);
  background: none;
}

.card-text {
  justify-content: flex-start;
}

.content-text {
  font-size: clamp(16px, 1.25vw, 24px);
  font-family: "Aeonik", sans-serif;
  font-weight: 500;
  line-height: clamp(22px, 1.5vw, 28px);
  color: #2e2c2d;
  margin: 0;
}

.content-image {
  width: 100%;
  aspect-ratio: 574 / 540;
  object-fit: cover;
  display: block;
}


.stacked-images {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1vw, 20px);
}

/* Tablet: Stack cards vertically */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .content-card {
    aspect-ratio: auto;
  }

  .stacked-images {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* three image grid end*/

/* AI Update Section with Parallax Background */
.ai-update-section {
  height: clamp(800px, 62.5vw, 1200px);
  background-image: url("../assets/images/img_image.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center 0px;
  /* Start at top */
  /* background-attachment: fixed ; */
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 clamp(32px, 4.2vw, 80px);
  z-index: 0;
  overflow: hidden;
}


.ai-content {
  background-color: #e9e9e9;
  width: clamp(700px, 60.7vw, 1167px);
  /* 1167 / 1920 = ~60.7vw */
  height: clamp(400px, 29.5vw, 566px);
  /* Enforces 566px max height, proportional */
  padding: clamp(64px, 6.1vw, 118px) clamp(40px, 4.5vw, 87px);
  box-sizing: border-box;
  overflow: hidden;
  /* Optional: hides overflow if content grows */
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* vertically center content */
}

/* Title */
.ai-title {
  font-size: clamp(32px, 2.9vw, 56px);
  font-family: "Test Tiempos Headline", serif;
  letter-spacing: normal;
  font-weight: 300;
  line-height: 100%;
  color: #2e2c2d;
  margin-bottom: clamp(24px, 2.5vw, 48px);
  max-width: clamp(600px, 52vw, 998px);
}

/* Description */
.ai-description {
  font-size: clamp(16px, 1.25vw, 24px);
  font-family: "Inter Display", sans-serif;
  font-weight: 400;
  line-height: clamp(22px, 1.5vw, 29px);
  color: #2e2c2d;
  max-width: clamp(480px, 41.8vw, 803px);
}

/* AI Update Section with Parallax Background  end */
/* image-grid start*/
/* image-grid base */

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.2vw, 20px);
  padding: clamp(64px, 5vw, 128px) clamp(24px, 4.2vw, 80px);
  justify-content: center;
  margin: 0 auto;
}


/* Wrapper for maintaining ratio */
.grid-card-wrapper {
  width: 100%;
  aspect-ratio: 574 / 540;
  max-width: 570px;
  max-height: 540px;
  margin: 0 auto;
}

/* Card styles */
.grid-card {
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
  background: #222;
  position: relative;
}

/* Parallax effect */
.card-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 150%;
  background-size: cover;
  background-position: center;
  transform: scale(1);
  /* ✅ Reset to normal */
  transition: transform 0.3s ease-out;
  will-change: transform;
  z-index: 1;
}

/* 
.grid-overlay {
  position: relative;
  z-index: 2;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.7));
} */

.overlay-top {
  pointer-events: none;
}

.grid-label {
  font-size: clamp(18px, 1.3vw, 25px);
  font-weight: 300;
  margin-bottom: 6px;
  opacity: 0;
}

.grid-title {
  font-size: clamp(24px, 2.1vw, 40px);
  font-weight: 400;
  margin: 0;
  line-height: 1.4;
  opacity: 0;
}

.grid-hover {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  margin-top: auto;
}

.grid-description {
  font-size: clamp(20px, 1.6vw, 35px);
  margin-bottom: 12px;
  color: #fff;
}

.expand-btn {
  font-size: 20px;
  font-weight: bold;
  color: white;
  border-bottom: 2px solid white;
  text-decoration: none;
}


.grid-card:hover .card-background {
  filter: brightness(1);
}

.grid-card:hover .card-background::before {
  opacity: 1;
}

.card-background::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.02);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

/* image-grid end*/



/* Footer */
.footer {
  background-color: #141414;
  padding: clamp(40px, 3.1vw, 60px) clamp(32px, 3vw, 60px) clamp(15px, 3.2vw, 32px);
  position: relative;
  max-width: 1920px;
  margin: 0 auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: clamp(24px, 3vw, 60px);
  margin-bottom: clamp(60px, 5.2vw, 100px);
}

.footer-nav,
.footer-contact,
.footer-social {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 0.83vw, 16px);
}

.footer-link,
.footer-contact-text,
.footer-address,
.social-text {
  font-size: clamp(18px, 1.46vw, 28px);
  font-family: "Inter Display", sans-serif;
  font-weight: 400;
  font-style: normal;
  line-height: clamp(24px, 1.8vw, 34px);
  color: #ffffff;
  text-decoration: none;
}

.footer-link:hover,
.social-link:hover {
  color: #e9e9e9;
  opacity: 0.8;
}

/* 
.footer-address {
  line-height: clamp(30px, 2.2vw, 42px);
  white-space: pre-line;
} */

.social-link {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.25vw, 16px);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.social-icon {
  width: clamp(24px, 1.6vw, 32px);
  height: clamp(24px, 1.6vw, 32px);
}

/* Footer Logo & Divider */
.footer-logo {
  width: clamp(600px, 93.75vw, 1800px);
  /* Responsive width */
  max-height: 424px;
  /* Enforce max height */
  height: auto;
  /* Maintain aspect ratio */
  margin-bottom: clamp(40px, 3.1vw, 60px);
  display: block;
  object-fit: contain;
  /* Optional for cleaner scaling */
}

.footer-divider {
  width: clamp(600px, 93.75vw, 1800px);
  height: 1px;
  background-color: #e9e9e9;
  margin-bottom: clamp(24px, 2vw, 39px);
}

/* Footer CTA (if used) */
.footer-cta {
  position: absolute;
  right: clamp(40px, 4.1vw, 80px);
  top: clamp(80px, 9.5vw, 183px);
  font-size: clamp(18px, 1.67vw, 32px);
  font-family: "Inter Display", sans-serif;
  font-weight: 400;
  line-height: clamp(28px, 2vw, 38px);
  color: #e9e9e9;
  max-width: clamp(300px, 29.9vw, 574px);
}

/* Copyright */
.footer-copyright {
  font-size: clamp(14px, 0.94vw, 18px);
  line-height: clamp(18px, 1.15vw, 22px);
  font-family: "Inter Display", sans-serif;
  font-weight: 400;
  color: #ffffff;
  margin-top: clamp(20px, 2vw, 40px);
}

.footer-copyright .company-name {
  line-height: clamp(24px, 1.88vw, 36px);
}

.footer-copyright .company-name a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-copyright .company-name a:hover {
  color: #0d6efd;
}

/* footer end*/

/* custom cursor design for card hover  */


/* Responsive Design */
@media (max-width: 1920px) {
  .main-container {
    width: 100%;
    max-width: 1920px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
    line-height: 40px;
  }

  .content-section {
    flex-direction: column;
    gap: 40px;
    margin: 0 40px 80px;
  }

  .image-row {
    flex-direction: column;
  }

  .grid-row {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
    gap: 40px;
  }
}

/* Interactive Elements */
.interactive-element {
  cursor: pointer;
  transition: all 0.3s ease;
}

.interactive-element:hover {
  opacity: 0.8;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Focus States */
.footer-link:focus,
.social-link:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* --------------------------------------------------- */
/* Optional: Better spacing on smaller screens */
@media (max-width: 768px) {
  .header {
    height: 56px;
  }

  .main-container {
    padding: 0;
  }
}

/* header section media  query start*/
/* Tablet (768px to 1024px) */
@media (max-width: 1024px) {
  .header {
    height: 56px;
  }
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
  .header {
    height: 48px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
  }

  .header-overlay {
    background-color: rgba(29, 27, 32, 0.1);
    /* slightly lighter overlay */
  }
}

/* header section media  query end */
/* hero section media query start  */
/* Tablet-specific tweaks */
@media (max-width: 1024px) {
  .hero-section {
    padding: 48px 20px;
  }

  .hero-title {
    font-size: 32px;
    line-height: 42px;
    max-width: 80%;
  }

  .hero-section p {
    font-size: 16px;
    line-height: 24px;
    max-width: 90%;
  }
}

/* Mobile-specific tweaks */
@media (max-width: 767px) {
  .hero-section {
    padding: 40px 16px;
  }

  .hero-title {
    font-size: 26px;
    line-height: 34px;
    max-width: 100%;
  }

  .hero-section p {
    font-size: 14px;
    line-height: 22px;
    max-width: 100%;
  }
}

/* hero section media query end */
/* image section media query start  */
/* Tablet */
@media (max-width: 1024px) {
  .main-image-wrapper {
    width: 90vw;
    aspect-ratio: 16 / 9;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .main-image-wrapper {
    width: 100%;
    height: 250px;
    aspect-ratio: 4 / 3;
    margin-bottom: 0px;
  }

  .main-image {
    object-fit: cover;
    transform: scale(2);
    display: block;
  }
}

/* image section media query  end */
/* ai section media query  start */
/* Tablet */
@media (max-width: 1024px) {
  .ai-update-section {
    height: auto;
    padding: 64px 24px;
  }

  .ai-content {
    width: 100%;
    height: auto;
    padding: 48px 24px;
  }

  .ai-title {
    font-size: 32px;
    line-height: 32px;
    letter-spacing: normal;
    max-width: 100%;
  }

  .ai-description {
    font-size: 16px;
    line-height: 24px;
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .ai-update-section {
    background-image: url("../assets/images/img_image.png");
    background-size: cover !important;
    background-position: center center;
    background-repeat: no-repeat;
    height: 120svh;
    position: relative;
    z-index: 1;
    overflow: hidden;
  }


  .ai-content {
    width: 100%;
    height: auto;
    padding: 32px 16px;
  }

  .ai-title {
    font-size: 24px;
    line-height: 24px;
    letter-spacing: normal;
  }

  .ai-description {
    font-size: 14px;
    line-height: 22px;
  }
}

/* ai section media query  end */
/* footer section media query  start*/
/* Tablet Layout Adjustments */
@media (max-width: 1024px) {
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .footer-nav,
  .footer-contact,
  .footer-social {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
  }

  .footer-address {
    font-size: 18px;
    line-height: 28px;
    max-width: 90%;
  }

  .footer-logo,
  .footer-divider {
    width: 100%;
    max-width: 100%;
  }
}

/* Mobile Layout Tweaks */
@media (max-width: 767px) {
  .footer {
    padding: 40px 16px 24px;
  }

  .footer-content {
    gap: 24px;
    align-items: flex-start;
  }

  .footer-nav,
  .footer-contact,
  .footer-social {
    flex-direction: column;
    gap: 16px;
  }

  .footer-address {
    font-size: 16px;
    line-height: 24px;
  }

  .footer-logo {
    width: 100%;
    max-width: 100%;
    margin-bottom: 32px;
  }

  .footer-divider {
    width: 100%;
    height: 1px;
    margin-bottom: 24px;
  }

  .footer-copyright {
    font-size: 12px;
    line-height: 18px;
    text-align: center;
  }

  .footer-copyright .company-name {
    display: block;
    line-height: 20px;
  }

  .footer-cta {
    position: static;
    margin-top: 32px;
    font-size: 16px;
    line-height: 24px;
    max-width: 100%;
  }
}

/* footer section media query  end */

/* 📱 Mobile: 2 columns */
@media (max-width: 767px) {
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-card-wrapper {
    aspect-ratio: 1 / 1;
    max-height: none;
  }
}

/* 💻 Tablet & small desktop: 3 columns */
@media (min-width: 768px) and (max-width: 1439px) {
  .image-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-card-wrapper {
    aspect-ratio: 574 / 540;
    max-width: 100%;
    max-height: none;
  }
}





/* Mobile: Enable native scroll and disable smooth scroll logic */
@media (max-width: 768px) {

  html,
  body {
    overflow: auto;
    height: auto;
  }

  .scroll-container {
    height: auto;
    overflow: auto;
  }

  .scroll-content {
    position: static !important;
    transform: none !important;
    will-change: auto !important;
  }

  #custom-cursor {
    display: none !important;
  }
}

/* ------------------------------------------------------ */
@media (max-width: 1024px) {
  .content-section {
    margin: 0 auto;
    padding: clamp(40px, 5vw, 64px) clamp(20px, 5vw, 48px);
  }

  .content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Two columns on tablet */
    gap: clamp(16px, 3vw, 24px);
    margin: 0 auto;
    /* Center the grid */
  }

  .content-card {
    width: 100%;
    aspect-ratio: 574 / 540;
    margin: 0 auto;
    /* Keep each card centered if needed */
  }

  .stacked-images {
    flex-direction: column;
    gap: clamp(12px, 2vw, 20px);
    margin: 0 auto;
  }

  .stacked-images .grid-card {
    width: 100%;
    aspect-ratio: 574 / 540;
    margin: 0 auto;
  }

  .content-text {
    font-size: clamp(10px, 1.2vw, 12px);
    line-height: 1.6;
    margin: 0;
    /* Optional: reset if previously styled */
  }
}


/* === Image Grid === */


/* 📱 Mobile: 2 columns */
@media (max-width: 767px) {
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-card-wrapper {
    aspect-ratio: 1 / 1;
    max-height: none;
  }
}

/* 📲 Tablet (768px to 1399px): 3 columns */
@media (min-width: 768px) and (max-width: 1920px) {
  .image-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-card-wrapper {
    aspect-ratio: 574 / 540;
    max-width: 100%;
    max-height: none;
  }
}

/* 💻 Large screen: auto responsive with max width */
@media (min-width: 1400px) {
  .image-grid {
    grid-template-columns: repeat(auto-fit, minmax(clamp(260px, 48vw, 570px), 1fr));
  }
}

/* === Responsive Override for Mobile (Force 2 columns) === */
@media (max-width: 767px) {
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* === Card Base === */
.grid-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 574 / 540;
  transition: transform 0.5s ease;
  cursor: pointer;
  transform-origin: top left;
}

.card-background {
  will-change: transform;
  transition: transform 0.1s ease-out;
}

/* custom cursor css */

#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  background: white;
  padding: 2px;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Text styling */
  color: black;
  font-size: .94vw;
  font-family: 'Aeonik', serif;
  text-align: center;
}

.circle-text {
  animation: rotateText 10s linear infinite;
}

.center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2vw;
  color: rgb(20, 20, 20);
  pointer-events: none;
}

#custom-cursor.visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

@keyframes rotateText {
  0% {
    transform: rotate(360deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

#custom-cursor svg:nth-of-type(2) {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 2;
}

/* ----------------------this is the responsive logic for the image grid ----------- */

/* Only use clamped width when there's enough space */
@media (min-width: 1440px) {
  .image-grid {
    grid-template-columns: repeat(3, clamp(300px, 29.9vw, 574px));
  }
}

/* 📱 Mobile: 2 columns */
@media (max-width: 767px) {
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-card-wrapper {
    aspect-ratio: 1 / 1;
    max-height: none;
  }
}

/* 📲 Tablet (768px to 1399px): 3 columns */
@media (min-width: 768px) and (max-width: 1920px) {
  .image-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-card-wrapper {
    aspect-ratio: 574 / 540;
    max-width: 100%;
    max-height: none;
  }
}

/* ----------------------------------------------- */
.card-background {
  filter: brightness(1) contrast(1) saturate(1);
}