/* === BASE RESET === */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #4c3926;
  color: #f0ece5;
  font-family: 'Inter', sans-serif !important;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 1025px) {
  html, body {
    overflow-y: hidden;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif !important;
}

/* === BACKGROUND LAYERS (Optimized) === */
.bg-solid {
  position: fixed;
  inset: 0;
  background: #4c3926;
  z-index: 0;
}

.bg-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% center;
  filter: brightness(.7);
  z-index: 1;
  transform: scale(1.05);
  will-change: transform, filter;
  pointer-events: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(210,180,120,.28) 0%, rgba(0,0,0,.25) 100%);
  z-index: 2;
}

.grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(240,236,229,.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(240,236,229,.02) 1px, transparent 1px);
  background-size: 80px 260px;
  z-index: 3;
  opacity: .5;
}

.texture {
  position: fixed;
  inset: 0;
  background: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
  opacity: .02;
  z-index: 4;
  pointer-events: none;
}

/* === MAIN CONTENT (BLADES) === */
.blades {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  width: 85%;
  max-width: 1400px;
  padding: 0 5%;
}

.blade {
  flex: 1;
  min-width: 260px;
  max-width: 420px;
  min-height: 65vh; /* ✅ 65vh on desktop */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: rgba(240,236,229,.08);
  border: 1px solid rgba(240,236,229,.15);
  border-radius: 6px;
  opacity: 0;
  transform: translateY(60px) scale(.96);
  animation: bladeEnter 1s forwards cubic-bezier(.22,1,.36,1);
  transition: all .5s ease, backdrop-filter .6s ease;
  cursor: pointer;
  padding: 2rem 1.6rem;
  overflow: hidden;
  will-change: transform, opacity, backdrop-filter;
  backdrop-filter: blur(2px);
}

.blade:nth-child(1) { animation-delay: .2s; }
.blade:nth-child(2) { animation-delay: .35s; }
.blade:nth-child(3) { animation-delay: .5s; }

@keyframes bladeEnter {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.blade:hover {
  transform: translateY(-5px) scale(1.04);
  border-color: #f0ece5;
  box-shadow: 0 0 25px rgba(191,161,122,.45);
  background: rgba(240,236,229,.1);
  backdrop-filter: none;
}

.blade::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(240,236,229,.15), transparent);
  opacity: 0;
  transform: translateX(-75%) skewX(-20deg);
  transition: all .8s ease;
}

.blade:hover::before {
  opacity: 1;
  transform: translateX(125%) skewX(-20deg);
}

.blade-content {
  max-width: 85%;
  position: relative;
  z-index: 5;
}

.blade-logo {
  max-width: 140px;
  margin: 0 auto 1rem;
  display: block;
}

.highlight-word {
  display: block;
  margin-top: .4rem;
  color: #f0ece5;
  letter-spacing: .1em;
  font-size: clamp(1rem, 1.8vw, 1.6rem);
  text-transform: uppercase;
}

.blade p {
  margin-top: 1.2rem;
  font-size: clamp(.85rem, .9vw, 1rem);
  color: rgba(240,236,229,.9);
  line-height: 1.7;
}

/* === KEYWORD === */
.keywords {
  position: fixed;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  font-size: clamp(2.5rem, 10vw, 8rem);
  font-weight: 800;
  color: rgba(240,236,229,.05);
  letter-spacing: .15em;
  z-index: 0;
  white-space: nowrap;
  opacity: 0;
  animation: keywordEnter 1.6s forwards cubic-bezier(.22,1,.36,1);
  animation-delay: 1s;
}

@keyframes keywordEnter {
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes pulse {
  0%, 100% { color: rgba(240,236,229,.06); transform: translateX(-50%) scale(1); }
  50% { color: rgba(191,161,122,.25); transform: translateX(-50%) scale(1.05); }
}

/* === RESPONSIVE FIXES === */
@media (max-width: 1024px) {
  .blades {
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 8vh 6%;
  }
}

@media (max-width: 768px) {
  html, body { overflow-y: auto !important; }
  .blades {
    position: relative;
    transform: none;
    top: auto;
    left: 0;
    flex-direction: column;
    height: auto;
    padding: 3vh 1% 5vh;
    margin: 0 auto;
  }
  .blade {
    width: 100%;
    max-width: 440px;
    min-height: 40vh; /* ✅ 40vh on mobile */
  }
  .keywords {
    bottom: 2%;
    font-size: clamp(2.2rem, 14vw, 6rem);
  }
}

@media (max-width: 480px) {
  .blade {
    padding: 1.6rem;
    border-radius: 5px;
  }
  .highlight-word { font-size: 1.2rem; }
  .blade p { font-size: .9rem; }
}

/* === MOBILE CINEMATIC SCROLL EXPERIENCE === */
@media (max-width: 768px) {
  .highlight-word {
    font-size: 1.6rem;
  }
  .bg-image {
    transform: scale(1.55) translateY(17px) translateX(-55px);
  }
}
