/**
 * Design System Variables
 * Matches demo site color scheme and typography
 */

:root {
  /* Colors - Demo site design tokens */
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;

  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;

  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;

  --border: 214.3 31.8% 91.4%;

  --primary: 221.2 83.2% 53.3%;
  --primary-dark: 217.2 91.2% 59.8%;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* Color utility classes */
.bg-background {
  background-color: hsl(var(--background));
}

.bg-muted {
  background-color: hsl(var(--muted));
}

.bg-accent {
  background-color: hsl(var(--accent));
}

.bg-foreground {
  background-color: hsl(var(--foreground));
}

.text-foreground {
  color: hsl(var(--foreground));
}

.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

.text-background {
  color: hsl(var(--background));
}

.border-border {
  border-color: hsl(var(--border));
}

/* Typography utilities */
.font-display {
  font-family: var(--font-display);
}

.font-sans {
  font-family: var(--font-sans);
}

.text-balance {
  text-wrap: balance;
}

/* Prose enhancements for article content */
.prose {
  color: hsl(var(--foreground));
  max-width: 65ch;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  line-height: 1.75;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3333333;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.6;
}

.prose a {
  color: hsl(var(--primary));
  text-decoration: underline;
  font-weight: 500;
}

.prose a:hover {
  color: hsl(var(--primary-dark));
}

.prose strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

.prose ul,
.prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/* Not-prose utility to exclude elements from prose styling */
.not-prose,
.not-prose * {
  all: revert;
}

/* Transition utilities */
.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

/* Hover effects */
.hover\:scale-105:hover {
  transform: scale(1.05);
}

.hover\:bg-accent\/80:hover {
  background-color: hsl(var(--accent) / 0.8);
}

.hover\:bg-foreground\/90:hover {
  background-color: hsl(var(--foreground) / 0.9);
}

.hover\:text-foreground:hover {
  color: hsl(var(--foreground));
}

.hover\:text-foreground\/70:hover {
  color: hsl(var(--foreground) / 0.7);
}

/* Group hover effects */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

.group:hover .group-hover\:text-foreground\/70 {
  color: hsl(var(--foreground) / 0.7);
}

/* Aspect ratio utilities */
.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-\[3\/2\] {
  aspect-ratio: 3 / 2;
}

/* Object fit utilities */
.object-cover {
  object-fit: cover;
}

/* Sidebar sticky positioning */
.sticky {
  position: sticky;
}

.top-4 {
  top: 1rem;
}

/* Sticky positioning accounting for 4rem header + spacing */
.top-20 {
  top: 5rem;
}

/* Sticky sidebar with scroll - allows sidebar to scroll independently */
.sticky-sidebar {
  position: sticky;
  top: 5rem;
  align-self: flex-start;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Hide scrollbar but keep functionality */
.sticky-sidebar::-webkit-scrollbar {
  width: 6px;
}

.sticky-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sticky-sidebar::-webkit-scrollbar-thumb {
  background: hsl(var(--muted));
  border-radius: 3px;
}

.sticky-sidebar::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground) / 0.3);
}

/* Rounded corners */
.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-md {
  border-radius: var(--radius-md);
}

.rounded-full {
  border-radius: var(--radius-full);
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}

/* Leading (line-height) */
.leading-relaxed {
  line-height: 1.625;
}

.leading-snug {
  line-height: 1.375;
}

/* Space utilities */
.space-y-1 > * + * {
  margin-top: 0.25rem;
}

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.space-y-8 > * + * {
  margin-top: 2rem;
}

/* Gap utilities */
.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

.gap-12 {
  gap: 3rem;
}

/* Grid utilities */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Two-column layout for travel gear: main content + 350px sidebar */
@media (min-width: 1024px) {
  .lg\:grid-cols-\[1fr_350px\] {
    grid-template-columns: 1fr 350px;
  }

  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Grid column span */
  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }
}

/* Display utilities */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

/* Flex utilities */
.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

/* Width utilities */
.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.h-auto {
  height: auto;
}

/* Max width */
.max-w-7xl {
  max-width: 80rem;
}

.max-w-none {
  max-width: none;
}

/* Margin utilities */
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-8 {
  margin-top: 2rem;
}

/* Padding utilities */
.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.p-6 {
  padding: 1.5rem;
}

.pt-6 {
  padding-top: 1.5rem;
}

/* Text utilities */
.text-center {
  text-align: center;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

@media (min-width: 768px) {
  .md\:text-5xl {
    font-size: 3rem;
    line-height: 1;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Font weight */
.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

/* Text transform */
.uppercase {
  text-transform: uppercase;
}

/* Letter spacing */
.tracking-wide {
  letter-spacing: 0.025em;
}

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

/* Text color utilities */
.text-white {
  color: rgb(255 255 255);
}

.text-neutral-300 {
  color: rgb(212 212 212);
}

/* Background gradient */
.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-neutral-900 {
  --tw-gradient-from: rgb(23 23 23);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(23, 23, 23, 0));
}

.to-neutral-800 {
  --tw-gradient-to: rgb(38 38 38);
}

/* SVG sizing */
.w-5 {
  width: 1.25rem;
}

.h-5 {
  height: 1.25rem;
}

.w-12 {
  width: 3rem;
}

.h-12 {
  height: 3rem;
}

.w-16 {
  width: 4rem;
}

.h-16 {
  height: 4rem;
}

/* Translate transform */
.group:hover .group-hover\:translate-x-1 {
  transform: translateX(0.25rem);
}

.group:hover .group-hover\:text-primary {
  color: hsl(var(--primary));
}

/* Responsive padding */
.py-16 {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* Text color for primary */
.text-primary {
  color: hsl(var(--primary));
}
