@import "tailwindcss";

@theme {
  /* Primary Colors */
  --color-primary: #004e41;
  --color-primary-light: #006b5a;
  --color-primary-dark: #003a31;

  /* Accent Colors */
  --color-accent: #db6b30;
  --color-accent-light: #e8864f;
  --color-accent-dark: #c25a24;

  /* Neutral Colors */
  --color-background: #f8f6f1;
  --color-background-alt: #ffffff;
  --color-surface: #ffffff;
  --color-text: #2d2d2d;
  --color-text-muted: #5a5a5a;
  --color-text-light: #717171;
  --color-border: #e5e2db;

  /* Semantic Colors */
  --color-success: #4caf50;
  --color-error: #f44336;
  --color-warning: #ff9800;

  /* Typography - using CSS variables from Next.js fonts */
  --font-serif: var(--font-playfair), Georgia, serif;
  --font-sans: var(--font-inter), -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography - don't override color if a text-* class is present */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
}

h1:not([class*="text-"]),
h2:not([class*="text-"]),
h3:not([class*="text-"]),
h4:not([class*="text-"]),
h5:not([class*="text-"]),
h6:not([class*="text-"]) {
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

/* Links - only apply to plain text links without explicit text color classes */
a:not([class*="bg-"]):not([class*="inline-flex"]):not([class*="text-"]) {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 150ms ease;
}

a:not([class*="bg-"]):not([class*="inline-flex"]):not([class*="text-"]):hover {
  color: var(--color-primary-light);
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: var(--color-primary);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-background);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Video container */
.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.video-container video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* Overlay gradient */
.overlay-gradient {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

/* Card hover effect */
.card-hover {
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Image zoom effect */
.img-zoom {
  transition: transform 500ms ease;
}

.group:hover .img-zoom {
  transform: scale(1.05);
}

/* Container */
.container-custom {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container-custom {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding: 0 3rem;
  }
}

/* Section spacing */
.section-padding {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 6rem 0;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding: 8rem 0;
  }
}

/* Masonry grid for gallery */
.masonry-grid {
  column-count: 1;
  column-gap: 1rem;
}

@media (min-width: 640px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .masonry-grid {
    column-count: 3;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
}

/* Loading skeleton */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-border) 25%,
    var(--color-background) 50%,
    var(--color-border) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
