/* ==========================================================================
   Template Stylesheet
   Description: Universal Styling Sheet for Portfolio / Landing Templates
   Author: FrontSyl
   Version: 1.0.0
   License: Custom License (see LICENSE.md for details)
========================================================================== */

/* ======================
  BASE TYPOGRAPHY & SCROLL
====================== */
body {
  font-family: "Inter", sans-serif; /* Modern sans-serif font for clean readability */
}

html {
  scroll-behavior: smooth; /* Enables smooth scrolling for anchor links */
}

/* ======================
  CARD WRAPPER
====================== */
.card-wrapper {
  position: relative;
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  overflow-x: visible;
}

/* ===== Layer 1: Outer glass bezel (bright glow effect) ===== */
.card-wrapper .glass-backdrop-outer {
  position: absolute;
  inset: -2.5rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(26px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  z-index: 0;
}

/* ===== Layer 2: Inner glass bezel (stronger inner blur) ===== */
.card-wrapper .glass-backdrop-inner {
  position: absolute;
  inset: -1.2rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
  z-index: 1;
}

/* ===== Dark Mode: Outer glass layer adjustment ===== */
.dark .card-wrapper .glass-backdrop-outer {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* ===== Dark Mode: Inner glass layer adjustment ===== */
.dark .card-wrapper .glass-backdrop-inner {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 6px 30px rgba(0, 0, 0, 0.4);
}

/* ===== Main Content Layer (above all glass layers) ===== */
.card-wrapper .card-content {
  position: relative;
  z-index: 2;
}

/* ========== RESPONSIVE FIX ========== */

/* Tablet (iPad Mini, dsb) */
@media (min-width: 768px) and (max-width: 1024px) {
  .card-wrapper {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 100%; /* ✅ pastikan tidak overflow */
    box-sizing: border-box;
  }

  .card-wrapper .card-content {
    border-radius: 1.5rem;
    overflow: hidden; /* ✅ biar isi tidak bocor */
  }

  /* Glass backdrop lebih rapi */
  .card-wrapper .glass-backdrop-outer,
  .dark .card-wrapper .glass-backdrop-outer {
    left: 1rem; /* ✅ bukan 0, jadi tidak nempel pinggir layar */
    right: 1rem;
    top: -1.5rem;
    bottom: -1.5rem;
    border-radius: 1.5rem;
    max-width: calc(100% - 2rem); /* ✅ batasi agar tidak melebihi layar */
  }

  .card-wrapper .glass-backdrop-inner,
  .dark .card-wrapper .glass-backdrop-inner {
    left: 2rem;
    right: 2rem;
    top: -1rem;
    bottom: -1rem;
    border-radius: 1.25rem;
    max-width: calc(100% - 4rem); /* ✅ ikut container */
  }
}

/* Mobile Portrait */
@media (max-width: 768px) {
  .card-wrapper {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .card-wrapper .card-content {
    border-radius: 1.25rem;
  }

  .card-wrapper .card-content .grid {
    grid-template-columns: 1fr !important;
  }

  .card-wrapper .card-content .grid > * {
    width: 100%;
  }

  .card-wrapper .card-content canvas {
    min-height: 180px;
  }

  .card-wrapper .card-content .grid-cols-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .card-wrapper .card-content .grid-cols-3 > div {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  /* ✅ Glass backdrop mobile */
  .card-wrapper .glass-backdrop-outer,
  .card-wrapper.dark .glass-backdrop-outer {
    left: 0;
    right: 0;
    top: -1.5rem;
    bottom: -1.5rem;
    border-radius: 1.25rem;
  }

  .card-wrapper .glass-backdrop-inner,
  .card-wrapper.dark .glass-backdrop-inner {
    left: 0.85rem;
    right: 0.85rem;
    top: -0.75rem;
    bottom: -0.75rem;
    border-radius: 1rem;
  }
}

/* Mobile Landscape (umum) */
@media (max-width: 768px) and (max-height: 420px) {
  #home .hero-content {
    margin-top: 8rem !important;
  }

  .card-big-container {
    margin-top: 18rem !important;
  }

  #about {
    padding-top: 32rem !important;
  }
}

/* Wide but short (contoh: device 800×500 landscape) */
@media (min-width: 800px) and (max-height: 500px) {
  #home .hero-content {
    margin-top: 10rem !important;
  }

  .card-big-container {
    margin-top: 20rem !important;
  }

  #about {
    padding-top: 35rem !important;
  }
}

/* Surface Duo Portrait (540 × 720) */
@media (min-width: 500px) and (max-width: 750px) and (orientation: portrait) {
  .card-big-container {
    margin-top: 5rem !important;
  }

  #about {
    padding-top: 17rem !important;
  }
}

/* Surface Duo Landscape (720 × 540) */
@media (min-width: 700px) and (max-width: 750px) and (orientation: landscape) {
  .card-big-container {
    margin-top: 8rem !important;
  }

  #about {
    padding-top: 22rem !important;
  }
}

/* ==========================================================================
   Marquee Section
========================================================================== */

.logos__marquee,
.logos__marquee2 {
  display: flex;
  overflow-x: hidden;
  mask-image: linear-gradient(
    to right,
    hsl(0 0% 0% / 0),
    hsl(0 0% 0% / 1) 20%,
    hsl(0 0% 0% / 1) 80%,
    hsl(0 0% 0% / 0)
  );
}

.marquee__logos {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  min-width: 100%;
  animation: loop 20s linear infinite;
}

.marquee__logos2 {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  min-width: 100%;
  animation: loop 20s linear infinite;
  animation-direction: reverse;
}

.marquee__logos img,
.marquee__logos2 img {
  display: block;
  margin-inline: 2rem;
}

.dark .marquee__logos img,
.dark .marquee__logos2 img {
  filter: brightness(0) invert(1);
}

@keyframes loop {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* ======================
  SHADOW CUSTOM
====================== */
.shadow-primary {
  --tw-drop-shadow: drop-shadow(
    0 0 20px color-mix(in srgb, var(--color-secondary) 30%, transparent)
  );
  filter: var(--tw-drop-shadow);
}

.dark .shadow-primary {
  --tw-drop-shadow: drop-shadow(
    0 0 20px color-mix(in srgb, var(--color-secondary-dark) 30%, transparent)
  );
}

/* ======================
  SWIPPER TESTIMONIAL
====================== */
.swiper.testimonialSwiper {
  padding-left: 1rem;
  padding-right: 1rem;
}

.testimonial-card {
  background-color: rgba(255, 255, 255, 0.45); /* Soft glassy feel */
  color: var(--color-trinary);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.dark .testimonial-card {
  background-color: rgba(28, 32, 44, 0.3); /* dark glass effect */
  color: var(--color-trinary-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Hover Elevation */
.testimonial-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

/* Swiper Overrides */
.swiper.testimonialSwiper {
  position: relative;
}

/* Remove default icons */
.swiper-button-prev::after,
.swiper-button-next::after {
  display: none;
}

/* Custom nav buttons */
.swiper-button-prev,
.swiper-button-next {
  position: absolute;
  top: 50%;
  transform: translateY(-15%);
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-trinary);
  border: 1px solid var(--color-secondary);
  border-radius: 50%;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: background 0.2s, color 0.2s;
}
.swiper-button-prev {
  left: -2.5rem;
}
.swiper-button-next {
  right: -2.5rem;
}
.dark .swiper-button-prev,
.dark .swiper-button-next {
  background: var(--color-primary-light-dark);
  border-color: var(--color-secondary-dark);
  color: var(--color-secondary-dark);
}
.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: var(--color-secondary);
  color: var(--color-primary-bg);
}
.dark .swiper-button-prev:hover,
.dark .swiper-button-next:hover {
  color: var(--color-primary-bg-dark);
}

/* Pagination Dots */
.swiper-pagination {
  bottom: -2rem !important;
}
.swiper-pagination-bullet {
  background: var(--color-trinary) !important;
  opacity: 0.8 !important;
  width: 10px !important;
  height: 10px !important;
  margin: 0 4px !important;
}
.swiper-pagination-bullet-active {
  background: var(--color-secondary) !important;
  opacity: 1 !important;
  transform: scale(1.2);
}
.dark .swiper-pagination-bullet {
  background: var(--color-trinary-dark) !important;
}
.dark .swiper-pagination-bullet-active {
  background: var(--color-secondary-dark) !important;
}

/* Responsive Button Position */
@media (max-width: 1024px) {
  .swiper-button-prev {
    left: -1.5rem;
  }
  .swiper-button-next {
    right: -1.5rem;
  }
}

@media (max-width: 768px) {
  .swiper-button-prev {
    left: -0.5rem;
  }
  .swiper-button-next {
    right: -0.5rem;
  }
}

@media (max-width: 640px) {
  .swiper-button-prev {
    left: 0.25rem;
  }
  .swiper-button-next {
    right: 0.25rem;
  }
}

@media (max-width: 480px) {
  .swiper-button-prev,
  .swiper-button-next {
    width: 2rem;
    height: 2rem;
  }

  .swiper-button-prev {
    left: 0.5rem;
  }

  .swiper-button-next {
    right: 0.5rem;
  }
}

@media (max-width: 360px) {
  .swiper-button-prev {
    left: 0.25rem;
  }
  .swiper-button-next {
    right: 0.25rem;
  }
}

/* ======================
  LOADER PAGE
====================== */
.pl {
  width: 6em;
  height: 6em;
}
.pl__ring {
  animation: ringA 2s linear infinite;
}
.ring-a {
  stroke: var(--color-secondary);
}
.ring-b {
  animation-name: ringB;
  stroke: var(--color-primary);
}
.ring-c {
  animation-name: ringC;
  stroke: var(--color-trinary);
}
.ring-d {
  animation-name: ringD;
  stroke: var(--color-trinary);
}

.dark .pl__ring--a {
  stroke: var(--color-secondary-dark);
}
.dark .pl__ring--b {
  stroke: var(--color-secondary-light-dark);
}
.dark .pl__ring--c,
.dark .pl__ring--d {
  stroke: var(--color-trinary-dark);
}

/* ======================
  LOADER ANIMATION KEYFRAMES
====================== */
@keyframes ringA {
  from,
  4% {
    stroke-dasharray: 0 660;
    stroke-width: 20;
    stroke-dashoffset: -330;
  }
  12% {
    stroke-dasharray: 60 600;
    stroke-width: 30;
    stroke-dashoffset: -335;
  }
  32% {
    stroke-dasharray: 60 600;
    stroke-width: 30;
    stroke-dashoffset: -595;
  }
  40%,
  54% {
    stroke-dasharray: 0 660;
    stroke-width: 20;
    stroke-dashoffset: -660;
  }
  62% {
    stroke-dasharray: 60 600;
    stroke-width: 30;
    stroke-dashoffset: -665;
  }
  82% {
    stroke-dasharray: 60 600;
    stroke-width: 30;
    stroke-dashoffset: -925;
  }
  90%,
  to {
    stroke-dasharray: 0 660;
    stroke-width: 20;
    stroke-dashoffset: -990;
  }
}

@keyframes ringB {
  from,
  12% {
    stroke-dasharray: 0 220;
    stroke-width: 20;
    stroke-dashoffset: -110;
  }
  20% {
    stroke-dasharray: 20 200;
    stroke-width: 30;
    stroke-dashoffset: -115;
  }
  40% {
    stroke-dasharray: 20 200;
    stroke-width: 30;
    stroke-dashoffset: -195;
  }
  48%,
  62% {
    stroke-dasharray: 0 220;
    stroke-width: 20;
    stroke-dashoffset: -220;
  }
  70% {
    stroke-dasharray: 20 200;
    stroke-width: 30;
    stroke-dashoffset: -225;
  }
  90% {
    stroke-dasharray: 20 200;
    stroke-width: 30;
    stroke-dashoffset: -305;
  }
  98%,
  to {
    stroke-dasharray: 0 220;
    stroke-width: 20;
    stroke-dashoffset: -330;
  }
}

@keyframes ringC {
  from {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: 0;
  }
  8% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -5;
  }
  28% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -175;
  }
  36%,
  58% {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: -220;
  }
  66% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -225;
  }
  86% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -395;
  }
  94%,
  to {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: -440;
  }
}

@keyframes ringD {
  from,
  8% {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: 0;
  }
  16% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -5;
  }
  36% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -175;
  }
  44%,
  50% {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: -220;
  }
  58% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -225;
  }
  78% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -395;
  }
  86%,
  to {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: -440;
  }
}

/* ======================
  SCROLL TO TOP BUTTON
====================== */
#scrollTopBtn {
  opacity: 0;
  transform: translateY(60px) scale(0.5);
  transition: opacity 0.4s ease-out,
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#scrollTopBtn.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#scrollTopBtn:hover {
  transform: translateY(0) scale(1.15);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
