/* Villa Perla — Design Tokens & Global Styles */
/* Inspired by logo: cream, mint/seafoam, soft yellow, charcoal */

:root {
  /* Colors */
  --color-bg: #f5f0eb;
  --color-bg-alt: #faf8f5;
  --color-bg-white: #ffffff;
  --color-text: #4a5568;
  --color-text-dark: #2d3748;
  --color-text-light: #5f6e7e;
  --color-text-muted: #5e6c82;
  --color-accent-mint: #9dd4c5;
  --color-accent-mint-dark: #7bc4b1;
  --color-accent-mint-text: #24705f;
  --color-accent-mint-light: #c5e8df;
  --color-accent-yellow: #f0e6a0;
  --color-accent-yellow-light: #f7f2c8;
  --color-charcoal: #4a5568;
  --color-charcoal-light: #6b7a8d;
  --color-border: #e2dcd6;
  --color-border-light: #d5cec6;
  --color-overlay: rgba(74, 85, 104, 0.7);
  --color-shadow: rgba(74, 85, 104, 0.1);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-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: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;

  /* Spacing */
  --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;

  /* Borders */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(74, 85, 104, 0.06);
  --shadow-md: 0 4px 12px rgba(74, 85, 104, 0.08);
  --shadow-lg: 0 8px 24px rgba(74, 85, 104, 0.1);
  --shadow-xl: 0 16px 48px rgba(74, 85, 104, 0.12);

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 300ms var(--ease-out);
  --transition-slow: 500ms var(--ease-out);

  /* Layout */
  --container-max: 1200px;
  --container-wide: 1400px;
  --nav-height: 80px;
}

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-text-dark);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: 600;
}

h3 {
  font-size: var(--text-3xl);
  font-weight: 600;
}

h4 {
  font-size: var(--text-2xl);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

a {
  color: var(--color-accent-mint-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-charcoal);
}

/* Prevent fixed nav from obscuring focused/scrolled-to content (WCAG 2.4.11) */
h1, h2, h3, h4,
[tabindex], a, button, input, select, textarea {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Skip to main content (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  background: var(--color-accent-mint);
  color: var(--color-text-dark);
  padding: var(--space-3) var(--space-6);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* Focus visible (WCAG 2.4.7) */
*:focus-visible {
  outline: 2px solid var(--color-accent-mint);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Reduced motion (WCAG 2.3.3) */
@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;
  }
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Section spacing */
.section {
  padding: var(--space-24) 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

/* Section labels */
.section-tag {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent-mint-text);
  margin-bottom: var(--space-4);
  font-weight: 600;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text-dark);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-light);
  max-width: 600px;
  line-height: 1.7;
}

.section-header {
  margin-bottom: var(--space-16);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-accent-mint);
  color: var(--color-text-dark);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-primary:hover {
  background: var(--color-accent-mint-dark);
  color: var(--color-bg-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  color: var(--color-text-dark);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  border-color: var(--color-accent-mint);
  background: rgba(157, 212, 197, 0.1);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  color: var(--color-bg-white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--color-bg-white);
}

/* Screen reader utility (WCAG) */
.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;
}

/* Responsive */
@media (max-width: 1024px) {
  :root {
    --nav-height: 72px;
  }

  h1 { font-size: var(--text-4xl); }
  h2, .section-title { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }

  .section {
    padding: var(--space-16) 0;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  h1 { font-size: var(--text-3xl); }
  h2, .section-title { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }

  .container, .container-wide {
    padding: 0 var(--space-4);
  }

  .section {
    padding: var(--space-12) 0;
  }

  .section-header {
    margin-bottom: var(--space-8);
  }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-2xl); }
  h2, .section-title { font-size: var(--text-xl); }

  .container, .container-wide {
    padding: 0 var(--space-3);
  }

  .section {
    padding: var(--space-10) 0;
  }

  .btn-primary,
  .btn-secondary,
  .btn-outline {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    width: 100%;
    justify-content: center;
  }
}

/* Forced high-contrast mode (WCAG) */
@media (forced-colors: active) {
  .btn-primary,
  .btn-secondary,
  .btn-outline {
    border: 2px solid ButtonText;
  }

  *:focus-visible {
    outline: 2px solid Highlight;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
    font-size: 12pt;
    line-height: 1.5;
  }

  nav, .burger-menu, .mobile-menu, .skip-link,
  .cookie-banner, .cookie-modal {
    display: none !important;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    font-weight: normal;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  h1, h2, h3 {
    page-break-after: avoid;
    color: black;
  }

  .section {
    padding: 1rem 0;
  }
}
