/* ==========================================================================
   Princesses — Base Styles
   Reset, CSS Variables, Typography, RTL Foundation
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300;400;500;600;700&family=Cairo:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Primary Palette */
  --color-white:        #FFFFFF;
  --color-cream:        #FAF9F6;
  --color-beige:        #F5EDE6;
  --color-beige-dark:   #E8DDD4;
  --color-pink-soft:    #F7F2EB; /* Gold/Cream soft tint */
  --color-pink:         #E3D5CA; /* Soft Gold/Beige */
  --color-rose-gold:    #C5A880; /* Champagne Gold */
  --color-rose-gold-light: #DFD3C3; /* Light Champagne */
  --color-rose-gold-dark: #8A6F46; /* Deep Bronze Gold */
  --color-text:         #2C2C2C;
  --color-text-muted:   #6B6B6B;
  --color-text-light:   #9A9A9A;

  /* Glassmorphism */
  --glass-bg:           rgba(255, 255, 255, 0.72);
  --glass-bg-strong:    rgba(255, 255, 255, 0.88);
  --glass-border:       rgba(255, 255, 255, 0.45);
  --glass-blur:         16px;

  /* Shadows */
  --shadow-soft:        0 4px 24px rgba(197, 168, 128, 0.08);
  --shadow-medium:      0 8px 32px rgba(197, 168, 128, 0.12);
  --shadow-hover:       0 12px 40px rgba(197, 168, 128, 0.18);
  --shadow-inset:       inset 0 1px 0 rgba(255, 255, 255, 0.6);

  /* Spacing (8px base) */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Border Radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  /* Typography */
  --font-display: 'Alexandria', sans-serif;
  --font-body:    'Cairo', sans-serif;

  --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:  2rem;
  --text-4xl:  2.5rem;
  --text-hero: clamp(2rem, 5vw, 3.5rem);

  /* Transitions */
  --transition-fast:   200ms ease;
  --transition-normal: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --container-max: 1280px;
  --container-narrow: 960px;
  --header-height: 72px;
  --header-height-scrolled: 64px;

  /* Z-index scale */
  --z-decorative: 0;
  --z-content:    1;
  --z-header:     100;
  --z-overlay:    200;
  --z-modal:      300;
  --z-loading:    9999;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-cream);
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-rose-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* --- Focus Styles (Accessibility) --- */
:focus-visible {
  outline: 2px solid var(--color-rose-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  right: var(--space-md);
  z-index: calc(var(--z-loading) + 1);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-rose-gold);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--transition-fast);
}

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

/* --- Selection --- */
::selection {
  background: var(--color-pink-soft);
  color: var(--color-rose-gold-dark);
}

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

/* --- Decorative Background Shapes --- */
.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-decorative);
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.35;
  filter: blur(60px);
}

.bg-shape--1 {
  width: 400px;
  height: 400px;
  background: var(--color-pink-soft);
  top: -100px;
  left: -100px;
}

.bg-shape--2 {
  width: 300px;
  height: 300px;
  background: var(--color-beige);
  bottom: 20%;
  right: -80px;
}

.bg-shape--3 {
  width: 250px;
  height: 250px;
  background: var(--color-pink);
  top: 50%;
  left: 30%;
  opacity: 0.15;
}

.bg-shape--4 {
  width: 180px;
  height: 180px;
  background: var(--color-rose-gold-light);
  bottom: 10%;
  left: 10%;
  opacity: 0.2;
}

/* --- Utility: Visually Hidden --- */
.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;
}
