/*
 * RJ Park Frontend - Shared CSS Foundation
 * Design tokens and utility styles shared across all components.
 */

/* ============================================================
   Design Tokens
   ============================================================ */

:root {
  /* Brand colours */
  --rj-primary: #25314b;
  --rj-secondary: #febb20;
  --rj-secondary-dark: #e5a810;

  /* Text */
  --rj-text: #222;
  --rj-text-dark: #25314b;
  --rj-text-light: #6b7280;
  --rj-text-muted: #9ca3af;

  /* Backgrounds */
  --rj-bg: #f4f5f7;
  --rj-bg-alt: #f8fafc;
  --rj-bg-white: #fff;
  --rj-bg-muted: #f2f2f2;
  --rj-bg-muted-hover: #e8e8e8;

  /* Borders */
  --rj-border: #e5e7eb;
  --rj-border-light: #ebebeb;
  --rj-border-medium: #ddd;
  --rj-border-subtle: #f0f0f0;
  --rj-input-border: #e0e0e0;

  /* Overlays & Semantic Colors */
  --rj-overlay-bg: rgba(0, 0, 0, 0.5);
  --rj-color-muted-gray: #d1d5db;
  --rj-primary-subtle: rgba(37, 49, 75, 0.06);

  /* Semantic States */
  --rj-color-error: #dc2626;
  --rj-color-error-bg: #fef2f2;
  --rj-color-error-border: #fecaca;
  --rj-color-success: #16a34a;
  --rj-color-highlight-bg: #fef3c7;

  /* Radii */
  --rj-radius-xs: 4px;
  --rj-radius-sm: 8px;
  --rj-radius-md: 12px;
  --rj-radius-lg: 16px;
  --rj-radius-pill: 9999px;

  /* Shadows */
  --rj-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --rj-shadow-md: 0 8px 32px rgba(37, 49, 75, 0.1);
  --rj-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.2);

  /* Focus */
  --rj-focus-ring: 0 0 0 3px rgba(37, 49, 75, 0.06);

  /* Typography */
  --rj-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, sans-serif;
  --rj-font-size-base: 0.9375rem;
  --rj-font-size-xs: 12px;
  --rj-font-size-sm: 14px;
  --rj-font-size-xl: 22px;
  --rj-font-weight-medium: 500;
  --rj-font-weight-semibold: 600;
  --rj-font-weight-bold: 700;
  --rj-tracking-tight: -0.02em;

  /* Spacing */
  --rj-space-xs: 4px;
  --rj-space-sm: 8px;
  --rj-space-sm-md: 12px;
  --rj-space-md: 16px;
  --rj-space-md-lg: 20px;
  --rj-space-lg: 24px;
  --rj-space-xl: 32px;

  /* Motion */
  --rj-transition: 0.25s ease;
  --rj-transition-spring: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   Body Scroll Lock
   ============================================================ */

html.rj-body-locked,
body.rj-body-locked {
  overflow: hidden;
}

/* ============================================================
   Shared Navigation Arrows (carousels)
   ============================================================ */

.rj-nav-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--rj-bg-white);
  border: 1.5px solid var(--rj-border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--rj-transition), box-shadow var(--rj-transition);
}

.rj-nav-arrow:hover {
  border-color: var(--rj-text);
  box-shadow: var(--rj-shadow-sm);
}

.rj-nav-arrow[disabled] {
  opacity: 0.25;
  cursor: default;
}

.rj-nav-counter {
  font-size: var(--rj-font-size-sm);
  font-weight: var(--rj-font-weight-medium);
  color: var(--rj-text-light);
}

/* ============================================================
   Shared Section Header (title left, nav right)
   ============================================================ */

.rj-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--rj-space-lg);
}

.rj-section-title {
  font-size: var(--rj-font-size-xl);
  font-weight: var(--rj-font-weight-semibold);
  color: var(--rj-text);
  letter-spacing: var(--rj-tracking-tight);
}

.rj-section-nav {
  display: flex;
  align-items: center;
  gap: var(--rj-space-sm);
}

/* ============================================================
   Accessibility: Reduced Motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
