/* =========================================================
   HOME PAGE STYLES
   ========================================================= */

html,
body[data-page="home"]{
  overflow-x: clip;
}

body[data-page="home"] section#features{
  padding: 76px 20px 28px;
  overflow-x: clip;
}

body[data-page="home"] .container{
  width: min(100%, 1120px);
  margin: 0 auto;
  overflow-x: clip;
}

.section-title{
  position: relative;
  z-index: 2;
  text-align: center;
  margin: 0 0 22px;
  font-family: "Cormorant SC", serif;
  font-size: clamp(42px, 6vw, 69px);
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-shadow:
    0 0 10px rgba(0,255,255,0.18),
    0 0 16px rgba(255,0,255,0.14);
}

.title-swap{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(88px, 13vw, 126px);
  min-width: clamp(220px, 36vw, 420px);
  padding-top: 8px;
  overflow: visible;
}

.section-title .sos-title--text{
  display: inline-block;
  position: relative;
  opacity: 0;
  animation: presentsFade 4.5s ease-in-out infinite;
}

.section-title .sos-title-logo-wrap{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -58%);
  opacity: 1;
  pointer-events: none;
  animation: logoSwapFade 4.5s ease-in-out infinite, heartBeat 1.6s ease-in-out infinite;
}

.section-title .sos-title-logo{
  width: clamp(102px, 15.3vw, 187px);
  height: auto;
  display: block;
}

.section-title .sos-title--text::after{
  content: "Presents...";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0,255,255,0) 0%,
    rgba(0,255,255,0) 42%,
    rgba(0,255,255,1) 48%,
    rgba(255,0,255,1) 52%,
    rgba(255,0,255,0) 58%,
    rgba(255,0,255,0) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: scanBand 2.2s linear infinite;
}

@keyframes logoSwapFade{
  0%, 66% {
    opacity: 1;
    transform: translate(-50%, -58%) scale(1);
  }
  72% {
    opacity: 0;
    transform: translate(-50%, -58%) scale(0.98);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -58%) scale(0.98);
  }
}

@keyframes presentsFade{
  0%, 66% { opacity: 0; }
  72%     { opacity: 1; }
  95%     { opacity: 1; }
  100%    { opacity: 0; }
}

@keyframes heartBeat{
  0%, 100% { transform: translate(-50%, -58%) scale(1); }
  50%      { transform: translate(-50%, -58%) scale(1.05); }
}

@keyframes scanBand{
  0%   { background-position: 200% 0; }
  100% { background-position: 0% 0; }
}

@keyframes homeGradientBorder{
  0%{ background-position:0% 50%; }
  50%{ background-position:100% 50%; }
  100%{ background-position:0% 50%; }
}

@keyframes homeButtonShift{
  0%{ background-position:0% 50%; }
  50%{ background-position:100% 50%; }
  100%{ background-position:0% 50%; }
}

@keyframes cardNeonShiftDiagonal{
  0%{ background-position:0% 0%; }
  50%{ background-position:100% 100%; }
  100%{ background-position:0% 0%; }
}

body[data-page="home"] .features-container{
  position: relative;
  height: 500px;
  perspective: 1280px;
  margin: 20px 0 8px;
  overflow: visible;
}

body[data-page="home"] .carousel-3d{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.4, 0, .2, 1);
}

body[data-page="home"] .feature-card-3d{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 232px;
  height: 332px;
  margin-left: -116px;
  margin-top: -166px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 14px 10px;
  box-sizing: border-box;
  pointer-events: auto;
  touch-action: pan-y;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255,255,255,.16);
  border-radius: 20px;
  transition: transform .5s ease, box-shadow .35s ease, background .35s ease, border-color .35s ease;
  transform-style: preserve-3d;
  cursor: pointer;
  overflow: hidden;
  backface-visibility: hidden;
}

body[data-page="home"] .feature-card-3d::before{
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: linear-gradient(45deg, var(--primary), var(--secondary), var(--glow), var(--primary));
  background-size: 300% 300%;
  opacity: 0;
  z-index: -1;
  transition: opacity .5s ease;
  animation: homeGradientBorder 3s linear infinite;
}

body[data-page="home"] .feature-card-3d:hover::before,
body[data-page="home"] .carousel-3d .feature-card-3d.is-active::before{
  opacity: 1;
}

body[data-page="home"] .feature-card-3d:hover,
body[data-page="home"] .carousel-3d .feature-card-3d.is-active{
  background: linear-gradient(135deg, rgba(255,0,255,.18) 0%, rgba(255,255,255,.06) 30%, rgba(0,255,255,.18) 100%);
  background-size: 220% 220%;
  animation: cardNeonShiftDiagonal 6.2s ease-in-out infinite;
  box-shadow: 0 22px 54px rgba(0,217,255,.22), inset 0 0 30px rgba(255,255,255,.07);
}

body[data-page="home"] .feature-card-3d:nth-child(1){ transform: rotateY(0deg) translateZ(334px); }
body[data-page="home"] .feature-card-3d:nth-child(2){ transform: rotateY(60deg) translateZ(334px); }
body[data-page="home"] .feature-card-3d:nth-child(3){ transform: rotateY(120deg) translateZ(334px); }
body[data-page="home"] .feature-card-3d:nth-child(4){ transform: rotateY(180deg) translateZ(334px); }
body[data-page="home"] .feature-card-3d:nth-child(5){ transform: rotateY(240deg) translateZ(334px); }
body[data-page="home"] .feature-card-3d:nth-child(6){ transform: rotateY(300deg) translateZ(334px); }

body[data-page="home"] .feature-title-3d{
  flex: 0 0 20%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  color: var(--light);
  font-family: "Cormorant SC", serif;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: .05em;
  text-transform: uppercase;
  transform: translateZ(10px);
}

body[data-page="home"] .carousel-card-image{
  flex: 0 0 40%;
  width: 100%;
  max-width: 206px;
  height: 128px;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  transform: translateZ(10px);
}

body[data-page="home"] .feature-description-3d{
  flex: 0 0 20%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  color: rgba(255,255,255,.9);
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: .9rem;
  line-height: 1.38;
  letter-spacing: .02em;
}

body[data-page="home"] .feature-number{
  display: none !important;
}

body[data-page="home"] .guide-btn,
body[data-page="home"] .carousel-btn{
  position: relative;
  isolation: isolate;
  color: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  transition: transform 180ms ease, box-shadow 220ms ease, color 220ms ease, border-color 220ms ease;
  -webkit-tap-highlight-color: transparent;
}

body[data-page="home"] .guide-btn::before,
body[data-page="home"] .carousel-btn::before{
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, rgba(0,255,255,0.95), rgba(255,0,255,0.95));
  background-size: 200% 100%;
  animation: homeButtonShift 2.8s ease-in-out infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .78;
  pointer-events: none;
  z-index: -1;
}

body[data-page="home"] .guide-btn::after,
body[data-page="home"] .carousel-btn::after{
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,255,255,.48), rgba(255,0,255,.44));
  filter: blur(16px);
  opacity: .46;
  pointer-events: none;
  z-index: -2;
}

body[data-page="home"] .guide-btn::after{
  inset: -8px;
  filter: blur(10px);
  opacity: .28;
}

body[data-page="home"] .guide-btn:hover,
body[data-page="home"] .carousel-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(0,255,255,0.20), 0 0 20px rgba(255,0,255,0.14), inset 0 0 0 1px rgba(255,255,255,.05);
  color: #ffffff;
}

body[data-page="home"] .guide-btn:active,
body[data-page="home"] .carousel-btn:active{
  transform: translateY(0px);
}

body[data-page="home"] .guide-btn{
  flex: 0 0 20%;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0 auto;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: auto;
}

body[data-page="home"] .guide-btn:focus-visible{
  outline: 2px solid rgba(0,255,255,0.75);
  outline-offset: 4px;
}

body[data-page="home"] .carousel-controls{
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  z-index: 300;
  pointer-events: auto;
}

body[data-page="home"] .carousel-btn{
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  line-height: 1;
  user-select: none;
  appearance: none;
  -webkit-appearance: none;
}

@media (max-width: 768px){
  body[data-page="home"] section#features{
    padding-top: 68px;
    padding-bottom: 72px;
  }

  .section-title{
    margin-bottom: 18px;
    font-size: clamp(36px, 8vw, 52px);
  }

  .title-swap{
    min-height: 76px;
    min-width: min(100%, 250px);
    padding-top: 6px;
  }

  .section-title .sos-title-logo{
    width: clamp(88px, 28vw, 136px);
  }

  .section-title .sos-title-logo-wrap{
    transform: translate(-50%, -56%);
  }

  @keyframes logoSwapFade{
    0%, 66% {
      opacity: 1;
      transform: translate(-50%, -56%) scale(1);
    }
    72% {
      opacity: 0;
      transform: translate(-50%, -56%) scale(0.98);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -56%) scale(0.98);
    }
  }

  @keyframes heartBeat{
    0%, 100% { transform: translate(-50%, -56%) scale(1); }
    50%      { transform: translate(-50%, -56%) scale(1.05); }
  }

  body[data-page="home"] .features-container{
    height: 426px;
    margin: 14px 0 10px;
    perspective: 900px;
  }

  body[data-page="home"] .feature-card-3d{
    width: 198px;
    height: 306px;
    margin-left: -99px;
    margin-top: -153px;
    padding: 9px 11px 9px;
  }

  body[data-page="home"] .feature-card-3d:nth-child(1){ transform: rotateY(0deg) translateZ(192px); }
  body[data-page="home"] .feature-card-3d:nth-child(2){ transform: rotateY(60deg) translateZ(192px); }
  body[data-page="home"] .feature-card-3d:nth-child(3){ transform: rotateY(120deg) translateZ(192px); }
  body[data-page="home"] .feature-card-3d:nth-child(4){ transform: rotateY(180deg) translateZ(192px); }
  body[data-page="home"] .feature-card-3d:nth-child(5){ transform: rotateY(240deg) translateZ(192px); }
  body[data-page="home"] .feature-card-3d:nth-child(6){ transform: rotateY(300deg) translateZ(192px); }

  body[data-page="home"] .feature-title-3d{
    font-size: 1rem;
  }

  body[data-page="home"] .carousel-card-image{
    max-width: 176px;
    height: 118px;
  }

  body[data-page="home"] .feature-description-3d{
    font-size: .8rem;
    line-height: 1.38;
  }

  body[data-page="home"] .guide-btn{
    min-width: 104px;
    padding: 9px 14px;
    font-size: 10px;
  }

  body[data-page="home"] .carousel-controls{
    bottom: -38px;
  }

  body[data-page="home"] .carousel-btn{
    width: 42px;
    height: 42px;
    font-size: 17px;
  }
}
