/* styles/globals.css */

/* ===================================
   1. IMPORT CSS LIBRARIES
   =================================== */
@import "@mantine/carousel/styles.css";
@import "@mantine/dropzone/styles.css";
@import "@mantine/charts/styles.css";
@import "@mantine/dates/styles.css";
@import "@mantine/tiptap/styles.css";
@import "animate.css";
@import "react-simple-toasts/dist/style.css";
@import "react-simple-toasts/dist/theme/dark.css";
@import "primereact/resources/themes/lara-light-blue/theme.css";
@import "primereact/resources/primereact.min.css";
@import "primeicons/primeicons.css";

/* ===================================
   2. FONT FACE - OPTIMIZED
   =================================== */
@font-face {
  font-family: 'San Francisco';
  src: url('/assets/fonts/font.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap; /* ✅ TAMBAHKAN INI - Penting untuk PageSpeed! */
}

/* ===================================
   3. RESET & BASE STYLES
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'San Francisco', -apple-system, BlinkMacSystemFont, 'Segoe UI', 
               Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   4. GLASS EFFECTS - OPTIMIZED
   =================================== */
.glass {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  position: fixed;
  z-index: 50;
  width: 100%;
  height: 100vh;
  will-change: transform; /* ✅ Hardware acceleration */
}

.glass2 {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  position: fixed;
  z-index: 1;
  will-change: transform; /* ✅ Hardware acceleration */
}

.glass3 {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  will-change: transform; /* ✅ Hardware acceleration */
}

/* ===================================
   5. PERFORMANCE OPTIMIZATION
   =================================== */
img, 
picture, 
video, 
canvas, 
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}