@import "https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4";

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

@theme {
  --color-primary-50: #f0f4f8;
  --color-primary-100: #d9e2ec;
  --color-primary-200: #bcccdc;
  --color-primary-300: #9fb3c8;
  --color-primary-400: #829ab1;
  --color-primary-500: #1B2D4F;
  --color-primary-600: #162440;
  --color-primary-700: #111c33;
  --color-primary-800: #0d1526;
  --color-primary-900: #080e19;

  --color-accent-red: #C9A227;
  --color-accent-yellow: #D4A843;
  --color-accent-green: #2a9d8f;

  --color-surface-white: #ffffff;
  --color-surface-warm: #faf9f7;
  --color-surface-dark: #1B2D4F;
  --color-surface-darker: #0f1d33;

  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: 'Outfit', system-ui, sans-serif;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f0f4f8;
}

::-webkit-scrollbar-thumb {
  background: #1B2D4F;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #C9A227;
}

::selection {
  background-color: #C9A227;
  color: #ffffff;
}

/* Container */
.container-custom {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Text gradient */
.text-gradient {
  background: linear-gradient(135deg, #1B2D4F, #C9A227);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass morphism */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(26, 24, 22, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Skeleton shimmer */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #e5e7eb;
  border-radius: 0.5rem;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Shadows */
.shadow-subtle {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shadow-elevated {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.shadow-floating {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.shadow-glow {
  box-shadow: 0 0 20px rgba(201, 162, 39, 0.3);
}

/* Noise overlay */
.noise::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* Reveal animation */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Hover lift */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Press effect */
.press-effect {
  transition: transform 0.1s ease;
}

.press-effect:active {
  transform: scale(0.97);
}

/* Reduced motion */
@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;
  }

  .reveal-up {
    opacity: 1;
    transform: none;
  }
}

/* Product card grid responsive */
.product-card {
  container-type: inline-size;
}

@container (max-width: 400px) {
  .product-card .card-hover {
    border-radius: 0.75rem;
  }
  
  .product-card .card-hover > div:first-child {
    padding: 0.5rem;
  }
  
  .product-card .card-hover > div:last-child {
    padding: 0.625rem;
  }
}

/* Section title responsive */
.section-title {
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* Hero responsive sizing */
.hero-title {
  font-size: clamp(1.75rem, 5vw, 3.5rem);
}

.hero-subtitle {
  font-size: clamp(0.875rem, 2vw, 1.125rem);
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .card-hover:hover {
    transform: none;
  }
  
  .card-hover:active {
    transform: scale(0.98);
  }
}

/* Safe area for modern phones */
.safe-top {
  padding-top: env(safe-area-inset-top);
}

.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid #C9A227;
  outline-offset: 2px;
}

/* Tap target size */
button, a, input[type="submit"] {
  min-height: 44px;
}
