/**
 * PETALI D'ARTE - DESIGN SYSTEM
 * Modern, artistic design system following 2026 trends
 * Warm minimalism with elegant typography
 */

/* =========================================
   DESIGN TOKENS & CSS VARIABLES
   ========================================= */

:root {
  /* Color Palette - Inspired by Petali d'Arte logo */
  --color-primary: #E63946;
  /* Rosso/Corallo - Vibrant coral red */
  --color-primary-light: #FF5A63;
  /* Lighter coral for hover states */
  --color-primary-dark: #D62839;
  /* Darker red for active states */

  --color-secondary: #2A9D8F;
  /* Verde naturale - Nature green */
  --color-secondary-light: #3DB8A8;
  --color-secondary-dark: #238276;

  --color-bg-main: #F8F9FA;
  /* Bianco avorio - Warm white */
  --color-bg-elevated: #FFFFFF;
  /* Pure white for cards */
  --color-bg-overlay: rgba(0, 0, 0, 0.6);

  --color-text-main: #4A4A4A;
  /* Grigio caldo - Warm gray */
  --color-text-light: #757575;
  /* Light gray for secondary text */
  --color-text-dark: #2C2C2C;
  /* Almost black for headings */
  --color-text-inverse: #FFFFFF;
  /* White text on dark backgrounds */

  --color-accent: #F4A261;
  /* Warm orange accent */
  --color-success: #06D6A0;
  /* Success green */
  --color-warning: #FFB800;
  /* Warning yellow */
  --color-error: #E63946;
  /* Error red (same as primary) */

  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-hover: rgba(0, 0, 0, 0.15);
  --color-shadow: rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  /* Elegant serif for headings */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font Sizes - Perfect scale (fluid via clamp where used) */
  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1rem;
  /* 16px */
  --text-lg: 1.125rem;
  /* 18px */
  --text-xl: 1.25rem;
  /* 20px */
  --text-2xl: 1.5rem;
  /* 24px */
  --text-3xl: 2rem;
  /* 32px */
  --text-4xl: 2.5rem;
  /* 40px */
  --text-5xl: 3rem;
  /* 48px */
  --text-6xl: 4rem;
  /* 64px */

  /* Fluid heading sizes — scale smoothly from 375px to 1280px */
  --h1-fluid: clamp(1.75rem, 5vw, 3rem);
  /* 28px → 48px */
  --h2-fluid: clamp(1.5rem, 4vw, 2.5rem);
  /* 24px → 40px */
  --h3-fluid: clamp(1.25rem, 3vw, 2rem);
  /* 20px → 32px */
  --h4-fluid: clamp(1.1rem, 2.5vw, 1.5rem);
  /* 17px → 24px */
  --h5-fluid: clamp(1rem, 2vw, 1.25rem);
  /* 16px → 20px */
  --body-fluid: clamp(0.9375rem, 1.5vw, 1rem);
  /* 15px → 16px */

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

  /* Spacing Scale - 8px base */
  --space-xs: 0.5rem;
  /* 8px */
  --space-sm: 1rem;
  /* 16px */
  --space-md: 1.5rem;
  /* 24px */
  --space-lg: 2rem;
  /* 32px */
  --space-xl: 3rem;
  /* 48px */
  --space-2xl: 4rem;
  /* 64px */
  --space-3xl: 6rem;
  /* 96px */
  --space-4xl: 8rem;
  /* 128px */

  /* Layout */
  --max-width-content: 1280px;
  --max-width-text: 720px;
  --max-width-wide: 1600px;

  --header-height: 80px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows - Soft and elegant */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.15);

  /* Transitions - Smooth and modern */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index layers */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-toast: 600;
}

/* =========================================
   GLOBAL RESET & BASE STYLES
   ========================================= */

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-main);
  background-color: var(--color-bg-main);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text-dark);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: var(--h1-fluid);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--h2-fluid);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--h3-fluid);
}

h4 {
  font-size: var(--h4-fluid);
}

h5 {
  font-size: var(--h5-fluid);
}

h6 {
  font-size: var(--text-lg);
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
}

p {
  margin-bottom: var(--space-sm);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-primary-light);
}

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

em,
i {
  font-style: italic;
}

/* Lead text */
.lead {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--color-text-light);
}

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

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

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

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

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

.text-secondary {
  color: var(--color-secondary);
}

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

/* =========================================
   LAYOUT SYSTEM
   ========================================= */

.container {
  width: 100%;
  max-width: var(--max-width-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

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

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

/* Section spacing */
.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

.section-sm {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.section-lg {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-4xl);
}

/* Grid system */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

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

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive grid */
@media (max-width: 1200px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }
}

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  flex-direction: column;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

/* =========================================
   SPACING UTILITIES
   ========================================= */

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.pt-sm {
  padding-top: var(--space-sm);
}

.pt-md {
  padding-top: var(--space-md);
}

.pt-lg {
  padding-top: var(--space-lg);
}

.pb-sm {
  padding-bottom: var(--space-sm);
}

.pb-md {
  padding-bottom: var(--space-md);
}

.pb-lg {
  padding-bottom: var(--space-lg);
}

/* Load Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');
