/* ═══════════════════════════════════════════════════════════════
   DESIGN ACADEMY — Design System
   Premium, Feminine-Tech, Minimal Luxury
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ───────────────────────────────────────────────────────────────── */

:root {
  /* Brand Colors — Olive Palette */
  --olive-900: #24372E;
  --olive-800: #2D4439;
  --olive-700: #3D5145;
  --olive-600: #4A6155;
  --olive-500: #5A7466;
  
  /* Neutral Warm Tones */
  --ivory-50: #F6F4EE;
  --ivory-100: #EBE8E0;
  --beige-100: #E8DFC9;
  --beige-200: #DDD2B8;
  --beige-300: #D0C3A6;
  
  /* Accent */
  --gold-300: #E0C99A;
  --gold-400: #D4B888;
  --gold-500: #C8A777;
  --gold-600: #B8956A;
  --gold-700: #A6835C;
  
  /* Text Colors */
  --text-900: #1B1F1D;
  --text-800: #2A2F2C;
  --text-700: #3D4340;
  --text-600: #525856;
  --text-500: #6B716F;
  --text-400: #8A908E;
  --text-inverse: #F6F4EE;
  
  /* Functional Colors */
  --success: #4A8C6F;
  --error: #C75B5B;
  --warning: #D4A056;
  --info: #5B8EC7;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(27, 31, 29, 0.04);
  --shadow-sm: 0 2px 4px rgba(27, 31, 29, 0.06);
  --shadow-md: 0 4px 12px rgba(27, 31, 29, 0.08);
  --shadow-lg: 0 8px 24px rgba(27, 31, 29, 0.10);
  --shadow-xl: 0 16px 48px rgba(27, 31, 29, 0.12);
  --shadow-gold: 0 4px 20px rgba(200, 167, 119, 0.15);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  
  /* Typography — Hebrew Focus */
  --font-serif: 'Noto Serif Hebrew', 'David Libre', Georgia, serif;
  --font-sans: 'Assistant', 'Noto Sans Hebrew', 'Segoe UI', sans-serif;
  --font-display: 'Cormorant Garamond', 'Noto Serif Hebrew', serif;
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;
  
  /* Font Weights */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  
  /* Line Heights */
  --leading-tight: 1.2;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 1.75;
  
  /* Letter Spacing */
  --tracking-tighter: -0.03em;
  --tracking-tight: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-slower: 600ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-toast: 700;
  
  /* Container */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;
}

/* ─────────────────────────────────────────────────────────────────
   2. BASE RESET & GLOBAL STYLES
   ───────────────────────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--text-900);
  background-color: var(--ivory-50);
  direction: rtl;
  overflow-x: hidden;
}

/* RTL Support */
[dir="rtl"] {
  text-align: right;
}

/* Selection */
::selection {
  background-color: var(--gold-500);
  color: var(--olive-900);
}

/* Focus Visible */
:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--olive-600);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--olive-700);
}

/* ─────────────────────────────────────────────────────────────────
   3. TYPOGRAPHY
   ───────────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: var(--weight-medium);
  line-height: var(--leading-tight);
  color: var(--text-900);
  letter-spacing: var(--tracking-tight);
}

h1 {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl));
  line-height: 1.1;
}

h2 {
  font-size: clamp(var(--text-3xl), 4.5vw, var(--text-5xl));
}

h3 {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

p {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-700);
}

.lead {
  font-size: var(--text-xl);
  line-height: var(--leading-loose);
  color: var(--text-600);
}

.small {
  font-size: var(--text-sm);
}

.tiny {
  font-size: var(--text-xs);
}

a {
  color: var(--olive-800);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold-600);
}

strong, b {
  font-weight: var(--weight-semibold);
}

em, i {
  font-style: italic;
}

/* ─────────────────────────────────────────────────────────────────
   4. LAYOUT UTILITIES
   ───────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container-sm {
  max-width: var(--container-md);
}

.container-lg {
  max-width: var(--container-2xl);
}

.section {
  padding-block: var(--space-24);
}

.section-sm {
  padding-block: var(--space-16);
}

.section-lg {
  padding-block: var(--space-32);
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }

/* Grid */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────────
   5. BUTTONS
   ───────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

/* Primary Button */
.btn-primary {
  background-color: var(--olive-900);
  color: var(--ivory-50);
  border-color: var(--olive-900);
}

.btn-primary:hover {
  background-color: var(--olive-800);
  border-color: var(--olive-800);
  color: var(--ivory-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Secondary Button */
.btn-secondary {
  background-color: transparent;
  color: var(--olive-900);
  border-color: var(--olive-900);
}

.btn-secondary:hover {
  background-color: var(--beige-100);
  color: var(--olive-900);
}

/* Ghost Button */
.btn-ghost {
  background-color: transparent;
  color: var(--olive-800);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: var(--beige-100);
  color: var(--olive-900);
}

/* Gold Button */
.btn-gold {
  background-color: var(--gold-500);
  color: var(--olive-900);
  border-color: var(--gold-500);
}

.btn-gold:hover {
  background-color: var(--gold-600);
  border-color: var(--gold-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* Light Button (for dark backgrounds) */
.btn-light {
  background-color: var(--ivory-50);
  color: var(--olive-900);
  border-color: var(--ivory-50);
}

.btn-light:hover {
  background-color: var(--beige-100);
  border-color: var(--beige-100);
  color: var(--olive-900);
  transform: translateY(-2px);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
}

/* Button with Icon */
.btn svg,
.btn i {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────
   6. CARDS
   ───────────────────────────────────────────────────────────────── */

.card {
  background-color: var(--ivory-50);
  border: 1px solid rgba(61, 81, 69, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: rgba(61, 81, 69, 0.2);
  box-shadow: var(--shadow-md);
}

.card-beige {
  background-color: var(--beige-100);
}

.card-olive {
  background-color: var(--olive-900);
  color: var(--ivory-50);
}

.card-olive h3,
.card-olive h4,
.card-olive p {
  color: var(--ivory-50);
}

.card-olive p {
  opacity: 0.85;
}

/* Card with Gold Accent */
.card-gold {
  position: relative;
  overflow: hidden;
}

.card-gold::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to left, var(--gold-500), transparent);
}

/* ─────────────────────────────────────────────────────────────────
   7. FORMS
   ───────────────────────────────────────────────────────────────── */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-800);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-900);
  background-color: var(--ivory-50);
  border: 1px solid var(--beige-200);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(200, 167, 119, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-400);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-hint {
  font-size: var(--text-sm);
  color: var(--text-500);
}

.form-error {
  font-size: var(--text-sm);
  color: var(--error);
}

/* ─────────────────────────────────────────────────────────────────
   8. DECORATIVE ELEMENTS
   ───────────────────────────────────────────────────────────────── */

/* Gold Line Accent */
.gold-line {
  width: 60px;
  height: 2px;
  background: var(--gold-500);
}

.gold-line-center {
  margin-inline: auto;
}

/* Section Divider */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to left,
    transparent,
    var(--beige-200) 20%,
    var(--beige-200) 80%,
    transparent
  );
}

.divider-gold {
  background: linear-gradient(
    to left,
    transparent,
    var(--gold-500) 30%,
    var(--gold-500) 70%,
    transparent
  );
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius-full);
}

.badge-gold {
  background-color: rgba(200, 167, 119, 0.15);
  color: var(--gold-700);
}

.badge-olive {
  background-color: rgba(36, 55, 46, 0.1);
  color: var(--olive-800);
}

/* ─────────────────────────────────────────────────────────────────
   9. ANIMATIONS
   ───────────────────────────────────────────────────────────────── */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-gentle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn var(--transition-slow) forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-down {
  animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Staggered Delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }

/* Initial State for Animated Elements */
[data-animate] {
  opacity: 0;
}

[data-animate].is-visible {
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────────────
   10. ACCESSIBILITY
   ───────────────────────────────────────────────────────────────── */

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-4) var(--space-6);
  background-color: var(--olive-900);
  color: var(--ivory-50);
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* ─────────────────────────────────────────────────────────────────
   11. RESPONSIVE HELPERS
   ───────────────────────────────────────────────────────────────── */

.hide-mobile {
  display: block;
}

.show-mobile {
  display: none;
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }
  
  .show-mobile {
    display: block;
  }
  
  .container {
    padding-inline: var(--space-4);
  }
  
  .section {
    padding-block: var(--space-16);
  }
  
  .section-lg {
    padding-block: var(--space-20);
  }
}

/* ─────────────────────────────────────────────────────────────────
   12. TEXT UTILITIES
   ───────────────────────────────────────────────────────────────── */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-olive-900 { color: var(--olive-900); }
.text-olive-700 { color: var(--olive-700); }
.text-gold { color: var(--gold-500); }
.text-ivory { color: var(--ivory-50); }
.text-muted { color: var(--text-500); }

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

.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: var(--tracking-wide); }
.tracking-wider { letter-spacing: var(--tracking-wider); }

/* ─────────────────────────────────────────────────────────────────
   13. BACKGROUND UTILITIES
   ───────────────────────────────────────────────────────────────── */

.bg-olive-900 { background-color: var(--olive-900); }
.bg-olive-800 { background-color: var(--olive-800); }
.bg-ivory { background-color: var(--ivory-50); }
.bg-beige { background-color: var(--beige-100); }
.bg-gold { background-color: var(--gold-500); }

/* Decorative Backgrounds */
.bg-pattern-dots {
  background-image: radial-gradient(var(--beige-200) 1px, transparent 1px);
  background-size: 24px 24px;
}

.bg-gradient-olive {
  background: linear-gradient(135deg, var(--olive-900) 0%, var(--olive-800) 100%);
}

.bg-gradient-warm {
  background: linear-gradient(135deg, var(--ivory-50) 0%, var(--beige-100) 100%);
}

