/* ============================================
   LANDSCAPE PRO - BASE CSS
   Professional Polish Landscaping Platform
   Style: Airy, Sophisticated, Natural, Clean
   ============================================ */

/* ============================================
   1. VARIABLES
   ============================================ */
:root {
  /* Color Palette - Natural & Sophisticated */
  --color-background: #FAF9F6;        /* Soft warm beige */
  --color-surface: #FFFFFF;           /* Crisp white */
  --color-surface-alt: #F5F0E8;       /* Soft sand/beige */
  
  --color-text: #2C3328;              /* Deep forest dark */
  --color-text-muted: #6B7565;        /* Muted sage */
  --color-text-inverse: #FAF9F6;      /* For dark backgrounds */
  
  /* Primary - Lush Greens */
  --color-primary: #2D5A27;           /* Deep forest green */
  --color-primary-hover: #1F3D1B;     /* Darker forest */
  --color-primary-light: #E8F3E6;     /* Misty green tint */
  --color-primary-muted: #4A7C59;     /* Sage green */
  
  /* Accents - Sky & Earth */
  --color-accent-blue: #87CEEB;       /* Sky blue */
  --color-accent-blue-light: #E6F3F8; /* Pale sky */
  --color-accent-brown: #8B7355;      /* Warm earth brown */
  --color-accent-sand: #D4C4A8;       /* Soft sand */
  
  /* Semantic Colors */
  --color-success: #4A7C59;
  --color-warning: #D4A373;           /* Warm amber */
  --color-danger: #C75B39;            /* Terracotta */
  --color-info: #5B8DB8;              /* Soft blue */
  
  /* Neutral Scale - Warm Grays */
  --color-neutral-50: #FCFBF9;
  --color-neutral-100: #F5F5F0;
  --color-neutral-200: #E8E8E0;
  --color-neutral-300: #D1D1C7;
  --color-neutral-400: #9A9A8E;
  --color-neutral-500: #6B6B5F;
  --color-neutral-600: #4A4A42;
  --color-neutral-700: #2F2F2A;
  --color-neutral-800: #1A1A17;
  --color-neutral-900: #0D0D0B;
  
  /* Typography */
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  
  --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: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  
  --leading-none: 1;
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  --leading-loose: 2;
  
  /* Spacing Scale - Generous for airy feel */
  --space-0: 0;
  --space-1: 0.25rem;      /* 4px */
  --space-2: 0.5rem;       /* 8px */
  --space-3: 0.75rem;      /* 12px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.25rem;      /* 20px */
  --space-6: 1.5rem;       /* 24px */
  --space-8: 2rem;         /* 32px */
  --space-10: 2.5rem;      /* 40px */
  --space-12: 3rem;        /* 48px */
  --space-16: 4rem;        /* 64px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */
  --space-32: 8rem;        /* 128px */
  
  /* Border Radius - Organic, soft */
  --radius-none: 0;
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-3xl: 2rem;      /* 32px */
  --radius-full: 9999px;
  
  /* Shadows - Soft, natural depth */
  --shadow-sm: 0 1px 2px 0 rgba(44, 51, 40, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(44, 51, 40, 0.08), 0 2px 4px -2px rgba(44, 51, 40, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(44, 51, 40, 0.08), 0 4px 6px -4px rgba(44, 51, 40, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(44, 51, 40, 0.08), 0 8px 10px -6px rgba(44, 51, 40, 0.04);
  --shadow-inner: inset 0 2px 4px 0 rgba(44, 51, 40, 0.04);
  --shadow-glow: 0 0 20px rgba(45, 90, 39, 0.15);
  
  /* Transitions */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Layout */
  --container-max: 1280px;
  --container-padding: clamp(1rem, 5vw, 3rem);
  --header-height: 5rem;
}

/* ============================================
   2. RESET & NORMALIZE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-feature-settings: "liga" 1, "calt" 1;
}

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

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
  background: transparent;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ============================================
   3. BASE STYLES
   ============================================ */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background-color: var(--color-background);
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 { font-size: var(--text-5xl); font-weight: 700; }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); font-weight: 500; }

p {
  margin-bottom: var(--space-6);
  }

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

/* Links */
a {
  transition: color var(--duration-fast) var(--ease-out);
}

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

/* Selection */
::selection {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

/* ============================================
   4. UTILITY CLASSES
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-wide {
  max-width: 1440px;
}

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

.sr-only:focus-visible {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

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

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

/* Spacing Utilities */
.flow > * + * {
  margin-top: var(--flow-space, var(--space-6));
}

/* ============================================
   5. COMPONENTS
   ============================================ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: var(--leading-none);
  text-align: center;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  background-color: var(--color-primary);
  color: var(--color-text-inverse)!important;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.btn:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.btn:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Button Variants */
.btn-secondary {
  background-color: var(--color-primary-light);
  color: var(--color-primary)!important;
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary-hover);
}

.btn-ghost {
  background-color: var(--color-neutral-300);
  color: var(--color-text)!important;
  border-color: var(--color-neutral-300);
}

.btn-ghost:hover {
  background-color: var(--color-neutral-100);
  border-color: var(--color-neutral-400);
}

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

.btn-small {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
}

/* Form Inputs */
.input,
.textarea,
.select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--color-neutral-400);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

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

.input:disabled,
.textarea:disabled,
.select:disabled {
  background-color: var(--color-neutral-100);
  color: var(--color-neutral-400);
  cursor: not-allowed;
}

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

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236B7565' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 1.25rem;
  padding-right: var(--space-10);
}

/* Cards */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-neutral-200);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
}

/* ============================================
   6. ACCESSIBILITY
   ============================================ */
:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-3) var(--space-6);
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: 500;
  border-radius: var(--radius-lg);
  z-index: 9999;
  transition: top var(--duration-fast) var(--ease-out);
}

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

@media (prefers-contrast: high) {
  :root {
    --color-primary: #1A4A15;
    --color-text: #000000;
    --color-neutral-300: #666666;
  }
  
  .btn:focus-visible,
  .input:focus,
  .card-interactive:focus-visible {
    outline-width: 3px;
    outline-style: solid;
  }
}

