/*
=================================================================
  APPE LATTE - PREMIUM CORPORATE DESIGN SYSTEM
  Version: 2.0
  Design System based on new corporate identity
=================================================================
*/

/* =====================================================
   1. COLOR PALETTE - Extracted from Corporate Logo
   ===================================================== */

:root {
  /* Primary Colors - From Logo */
  --appe-primary: #728A9D;           /* Slate Blue - Main brand color */
  --appe-primary-dark: #5A6F7F;      /* Darker slate - Hover states */
  --appe-primary-light: #8FA5B5;     /* Lighter slate - Backgrounds */
  --appe-primary-pale: #B8C9D5;      /* Pale blue - Subtle accents */

  /* Secondary Colors */
  --appe-white: #FFFFFF;             /* Pure white - Logo chevrons */
  --appe-off-white: #F8F9FA;         /* Off-white - Backgrounds */
  --appe-light-grey: #E8ECEF;        /* Light grey - Borders */

  /* Dark Tones */
  --appe-dark: #1E2A35;              /* Deep blue-grey - Headers */
  --appe-dark-medium: #2C3E50;       /* Medium dark - Text */
  --appe-dark-light: #3A4F63;        /* Light dark - Secondary text */

  /* Accent Colors */
  --appe-accent: #4A90E2;            /* Bright blue - CTAs */
  --appe-accent-hover: #3A7BC8;      /* Darker blue - CTA hover */
  --appe-success: #27AE60;           /* Green - Success states */
  --appe-warning: #F39C12;           /* Orange - Warnings */
  --appe-danger: #E74C3C;            /* Red - Errors */

  /* Gradients */
  --appe-gradient-primary: linear-gradient(135deg, #728A9D 0%, #5A6F7F 100%);
  --appe-gradient-hero: linear-gradient(135deg, #1E2A35 0%, #2C3E50 50%, #728A9D 100%);
  --appe-gradient-overlay: linear-gradient(180deg, rgba(30, 42, 53, 0.95) 0%, rgba(114, 138, 157, 0.85) 100%);

  /* Shadows */
  --appe-shadow-sm: 0 2px 8px rgba(114, 138, 157, 0.1);
  --appe-shadow-md: 0 4px 16px rgba(114, 138, 157, 0.15);
  --appe-shadow-lg: 0 8px 32px rgba(114, 138, 157, 0.2);
  --appe-shadow-xl: 0 16px 48px rgba(114, 138, 157, 0.25);

  /* Typography */
  --appe-font-primary: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --appe-font-secondary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --appe-font-display: 'Playfair Display', Georgia, serif;

  /* Spacing System */
  --appe-space-xs: 0.5rem;    /* 8px */
  --appe-space-sm: 1rem;      /* 16px */
  --appe-space-md: 1.5rem;    /* 24px */
  --appe-space-lg: 2rem;      /* 32px */
  --appe-space-xl: 3rem;      /* 48px */
  --appe-space-2xl: 4rem;     /* 64px */
  --appe-space-3xl: 6rem;     /* 96px */

  /* Border Radius */
  --appe-radius-sm: 4px;
  --appe-radius-md: 8px;
  --appe-radius-lg: 16px;
  --appe-radius-xl: 24px;
  --appe-radius-full: 9999px;

  /* Transitions */
  --appe-transition-fast: 150ms ease-in-out;
  --appe-transition-base: 300ms ease-in-out;
  --appe-transition-slow: 500ms ease-in-out;

  /* Z-Index Scale */
  --appe-z-base: 1;
  --appe-z-dropdown: 100;
  --appe-z-sticky: 200;
  --appe-z-fixed: 300;
  --appe-z-modal-backdrop: 400;
  --appe-z-modal: 500;
  --appe-z-popover: 600;
  --appe-z-tooltip: 700;
}


/* =====================================================
   2. GLOBAL STYLES
   ===================================================== */

body.appe-theme {
  color: var(--appe-dark-medium);
  background-color: var(--appe-off-white);
  font-family: var(--appe-font-primary);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.appe-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--appe-space-lg);
}

.appe-container-narrow {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--appe-space-lg);
}


/* =====================================================
   3. TYPOGRAPHY SYSTEM
   ===================================================== */

.appe-heading-hero {
  font-family: var(--appe-font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--appe-dark);
  letter-spacing: -0.02em;
  margin-bottom: var(--appe-space-md);
}

.appe-heading-1 {
  font-family: var(--appe-font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--appe-dark);
  letter-spacing: -0.01em;
  margin-bottom: var(--appe-space-md);
}

.appe-heading-2 {
  font-family: var(--appe-font-primary);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--appe-dark);
  margin-bottom: var(--appe-space-md);
}

.appe-heading-3 {
  font-family: var(--appe-font-primary);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--appe-dark-medium);
  margin-bottom: var(--appe-space-sm);
}

.appe-heading-4 {
  font-family: var(--appe-font-primary);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--appe-dark-medium);
  margin-bottom: var(--appe-space-sm);
}

.appe-lead {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.7;
  color: var(--appe-dark-light);
  font-weight: 400;
}

.appe-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--appe-dark-medium);
}

.appe-small {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--appe-dark-light);
}

.appe-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--appe-primary);
}


/* =====================================================
   4. BUTTON SYSTEM
   ===================================================== */

.appe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--appe-font-primary);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  text-align: center;
  border: none;
  border-radius: var(--appe-radius-md);
  cursor: pointer;
  transition: all var(--appe-transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.appe-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width var(--appe-transition-slow), height var(--appe-transition-slow);
}

.appe-btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Primary Button */
.appe-btn-primary {
  background: var(--appe-gradient-primary);
  color: var(--appe-white);
  box-shadow: var(--appe-shadow-md);
}

.appe-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--appe-shadow-lg);
  color: var(--appe-white);
}

/* Secondary Button */
.appe-btn-secondary {
  background: var(--appe-white);
  color: var(--appe-primary);
  border: 2px solid var(--appe-primary);
  box-shadow: var(--appe-shadow-sm);
}

.appe-btn-secondary:hover {
  background: var(--appe-primary);
  color: var(--appe-white);
  transform: translateY(-2px);
  box-shadow: var(--appe-shadow-md);
}

/* Accent Button */
.appe-btn-accent {
  background: var(--appe-accent);
  color: var(--appe-white);
  box-shadow: var(--appe-shadow-md);
}

.appe-btn-accent:hover {
  background: var(--appe-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--appe-shadow-lg);
  color: var(--appe-white);
}

/* Ghost Button */
.appe-btn-ghost {
  background: transparent;
  color: var(--appe-primary);
  border: 2px solid var(--appe-primary);
}

.appe-btn-ghost:hover {
  background: var(--appe-primary);
  color: var(--appe-white);
}

/* Large Button */
.appe-btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
  border-radius: var(--appe-radius-lg);
}

/* Small Button */
.appe-btn-sm {
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  border-radius: var(--appe-radius-sm);
}


/* =====================================================
   5. CARD COMPONENTS
   ===================================================== */

.appe-card {
  background: var(--appe-white);
  border-radius: var(--appe-radius-lg);
  padding: var(--appe-space-xl);
  box-shadow: var(--appe-shadow-md);
  transition: all var(--appe-transition-base);
  border: 1px solid var(--appe-light-grey);
}

.appe-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--appe-shadow-xl);
}

.appe-card-header {
  margin-bottom: var(--appe-space-lg);
}

.appe-card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--appe-dark);
  margin-bottom: var(--appe-space-sm);
}

.appe-card-subtitle {
  font-size: 1rem;
  color: var(--appe-dark-light);
  margin-bottom: 0;
}

.appe-card-body {
  margin-bottom: var(--appe-space-lg);
}

.appe-card-footer {
  padding-top: var(--appe-space-lg);
  border-top: 1px solid var(--appe-light-grey);
}


/* =====================================================
   6. SECTION STYLES
   ===================================================== */

.appe-section {
  padding: var(--appe-space-3xl) 0;
  position: relative;
}

.appe-section-sm {
  padding: var(--appe-space-2xl) 0;
}

.appe-section-lg {
  padding: 8rem 0;
}

.appe-section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--appe-space-3xl);
}

.appe-section-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--appe-primary);
  margin-bottom: var(--appe-space-sm);
  padding: 0.5rem 1rem;
  background: var(--appe-primary-pale);
  border-radius: var(--appe-radius-full);
}

.appe-section-title {
  font-family: var(--appe-font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--appe-dark);
  margin-bottom: var(--appe-space-md);
}

.appe-section-description {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--appe-dark-light);
  max-width: 700px;
  margin: 0 auto;
}

/* Background Variants */
.appe-section-primary {
  background: var(--appe-gradient-primary);
  color: var(--appe-white);
}

.appe-section-primary .appe-section-title,
.appe-section-primary .appe-heading-2,
.appe-section-primary .appe-heading-3 {
  color: var(--appe-white);
}

.appe-section-primary .appe-section-description,
.appe-section-primary .appe-body {
  color: rgba(255, 255, 255, 0.9);
}

.appe-section-dark {
  background: var(--appe-dark);
  color: var(--appe-white);
}

.appe-section-dark .appe-section-title,
.appe-section-dark .appe-heading-2,
.appe-section-dark .appe-heading-3 {
  color: var(--appe-white);
}

.appe-section-dark .appe-section-description,
.appe-section-dark .appe-body {
  color: rgba(255, 255, 255, 0.85);
}

.appe-section-light {
  background: var(--appe-off-white);
}


/* =====================================================
   7. HERO SECTION
   ===================================================== */

.appe-hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--appe-gradient-hero);
  padding: var(--appe-space-3xl) 0;
}

.appe-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(114, 138, 157, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(114, 138, 157, 0.15) 0%, transparent 50%);
  z-index: 1;
}

.appe-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--appe-space-lg);
}

.appe-hero-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--appe-primary-pale);
  margin-bottom: var(--appe-space-md);
  padding: 0.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--appe-radius-full);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.appe-hero-title {
  font-family: var(--appe-font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--appe-white);
  margin-bottom: var(--appe-space-lg);
  letter-spacing: -0.02em;
}

.appe-hero-description {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--appe-space-2xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.appe-hero-cta {
  display: flex;
  gap: var(--appe-space-md);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.appe-hero-scroll {
  position: absolute;
  bottom: var(--appe-space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all var(--appe-transition-base);
}

.appe-hero-scroll:hover {
  color: var(--appe-white);
  transform: translateX(-50%) translateY(4px);
}

.appe-hero-scroll-icon {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  position: relative;
}

.appe-hero-scroll-icon::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scroll-down 2s infinite;
}

@keyframes scroll-down {
  0% {
    opacity: 1;
    top: 8px;
  }
  100% {
    opacity: 0;
    top: 22px;
  }
}


/* =====================================================
   8. UTILITY CLASSES
   ===================================================== */

/* Text Alignment */
.appe-text-center { text-align: center; }
.appe-text-left { text-align: left; }
.appe-text-right { text-align: right; }

/* Text Colors */
.appe-text-primary { color: var(--appe-primary); }
.appe-text-dark { color: var(--appe-dark); }
.appe-text-light { color: var(--appe-dark-light); }
.appe-text-white { color: var(--appe-white); }
.appe-text-accent { color: var(--appe-accent); }

/* Background Colors */
.appe-bg-primary { background-color: var(--appe-primary); }
.appe-bg-dark { background-color: var(--appe-dark); }
.appe-bg-light { background-color: var(--appe-off-white); }
.appe-bg-white { background-color: var(--appe-white); }

/* Spacing Utilities */
.appe-mt-xs { margin-top: var(--appe-space-xs); }
.appe-mt-sm { margin-top: var(--appe-space-sm); }
.appe-mt-md { margin-top: var(--appe-space-md); }
.appe-mt-lg { margin-top: var(--appe-space-lg); }
.appe-mt-xl { margin-top: var(--appe-space-xl); }
.appe-mt-2xl { margin-top: var(--appe-space-2xl); }

.appe-mb-xs { margin-bottom: var(--appe-space-xs); }
.appe-mb-sm { margin-bottom: var(--appe-space-sm); }
.appe-mb-md { margin-bottom: var(--appe-space-md); }
.appe-mb-lg { margin-bottom: var(--appe-space-lg); }
.appe-mb-xl { margin-bottom: var(--appe-space-xl); }
.appe-mb-2xl { margin-bottom: var(--appe-space-2xl); }

/* Display Utilities */
.appe-flex { display: flex; }
.appe-inline-flex { display: inline-flex; }
.appe-grid { display: grid; }
.appe-block { display: block; }
.appe-inline-block { display: inline-block; }

/* Flex Utilities */
.appe-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.appe-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.appe-flex-column {
  display: flex;
  flex-direction: column;
}

.appe-gap-sm { gap: var(--appe-space-sm); }
.appe-gap-md { gap: var(--appe-space-md); }
.appe-gap-lg { gap: var(--appe-space-lg); }

/* Border Radius */
.appe-rounded-sm { border-radius: var(--appe-radius-sm); }
.appe-rounded-md { border-radius: var(--appe-radius-md); }
.appe-rounded-lg { border-radius: var(--appe-radius-lg); }
.appe-rounded-xl { border-radius: var(--appe-radius-xl); }
.appe-rounded-full { border-radius: var(--appe-radius-full); }

/* Shadow Utilities */
.appe-shadow-sm { box-shadow: var(--appe-shadow-sm); }
.appe-shadow-md { box-shadow: var(--appe-shadow-md); }
.appe-shadow-lg { box-shadow: var(--appe-shadow-lg); }
.appe-shadow-xl { box-shadow: var(--appe-shadow-xl); }

/* Animation */
.appe-fade-in {
  animation: fadeIn var(--appe-transition-slow) ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.appe-slide-up {
  animation: slideUp var(--appe-transition-slow) ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =====================================================
   9. RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 1200px) {
  .appe-container {
    max-width: 100%;
    padding: 0 var(--appe-space-md);
  }
}

@media (max-width: 768px) {
  .appe-section {
    padding: var(--appe-space-2xl) 0;
  }

  .appe-hero {
    min-height: 80vh;
    padding: var(--appe-space-2xl) 0;
  }

  .appe-hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .appe-hero-cta .appe-btn {
    width: 100%;
  }

  .appe-card {
    padding: var(--appe-space-lg);
  }
}

@media (max-width: 480px) {
  :root {
    --appe-space-3xl: 4rem;
  }

  .appe-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }
}
