/* ==========================================================================
   XANDER EDGE — Design System Stylesheet
   Version: 1.0
   Usage: Link this stylesheet on any Xander Edge page for consistent design tokens,
          typography, animations, and component classes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Brand Colours */
  --xe-yellow: #FFCF00;
  --xe-blue: #0EA5E9;
  --xe-coral: #F43F5E;
  --xe-green: #10B981;
  --xe-navy: #3B82F6;

  /* Neutrals */
  --xe-black: #0f172a;       /* slate-900 */
  --xe-dark: #020617;        /* slate-950 */
  --xe-white: #ffffff;
  --xe-off-white: #f8fafc;   /* slate-50 */
  --xe-warm-bg: #F5F4F0;

  /* Text */
  --xe-text-primary: #0f172a;
  --xe-text-secondary: #475569;  /* slate-600 */
  --xe-text-muted: #64748b;     /* slate-500 */
  --xe-text-faint: #94a3b8;     /* slate-400 */

  /* Borders */
  --xe-border-light: #e2e8f0;   /* slate-200 */
  --xe-border-faint: #f1f5f9;   /* slate-100 */

  /* Typography */
  --xe-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --xe-font-serif: 'Georgia', 'Times New Roman', serif;

  /* Spacing Scale */
  --xe-space-xs: 0.25rem;
  --xe-space-sm: 0.5rem;
  --xe-space-md: 1rem;
  --xe-space-lg: 1.5rem;
  --xe-space-xl: 2rem;
  --xe-space-2xl: 3rem;
  --xe-space-3xl: 4rem;
  --xe-space-4xl: 6rem;
  --xe-space-5xl: 8rem;

  /* Border Radius */
  --xe-radius-sm: 0.5rem;
  --xe-radius-md: 1rem;
  --xe-radius-lg: 1.5rem;
  --xe-radius-xl: 2rem;
  --xe-radius-2xl: 2.5rem;
  --xe-radius-3xl: 3rem;
  --xe-radius-full: 9999px;

  /* Shadows */
  --xe-shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.04);
  --xe-shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --xe-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
  --xe-shadow-xl: 0 25px 60px rgba(0, 0, 0, 0.2);
  --xe-shadow-2xl: 0 30px 80px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --xe-transition-fast: 200ms ease;
  --xe-transition-base: 300ms ease;
  --xe-transition-slow: 500ms ease;
}


/* --------------------------------------------------------------------------
   2. BASE / RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--xe-font-sans);
  color: var(--xe-text-primary);
  background-color: var(--xe-off-white);
  line-height: 1.6;
}

::selection {
  background: var(--xe-yellow);
  color: var(--xe-black);
}


/* --------------------------------------------------------------------------
   3. TYPOGRAPHY UTILITIES
   -------------------------------------------------------------------------- */
.xe-heading-hero {
  font-size: clamp(2.75rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--xe-text-primary);
}

.xe-heading-section {
  font-size: clamp(2rem, 4vw, 3.75rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.xe-heading-card {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.xe-body-large {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.6;
}

.xe-body {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.7;
}

.xe-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.xe-italic-accent {
  font-family: var(--xe-font-serif);
  font-style: italic;
  font-weight: 300;
}


/* --------------------------------------------------------------------------
   4. ANIMATIONS & KEYFRAMES
   -------------------------------------------------------------------------- */
@keyframes xe-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes xe-fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes xe-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes xe-slide-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.xe-animate-pulse {
  animation: xe-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.xe-fade-up {
  animation: xe-fade-up 0.6s ease-out forwards;
}

.xe-fade-in {
  animation: xe-fade-in 0.4s ease-out forwards;
}

.xe-slide-down {
  animation: xe-slide-down 0.3s ease-out forwards;
}


/* --------------------------------------------------------------------------
   5. COMPONENT CLASSES
   -------------------------------------------------------------------------- */

/* --- Buttons --- */
.xe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--xe-transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.xe-btn-primary {
  background-color: var(--xe-black);
  color: var(--xe-white);
  padding: 0.875rem 2rem;
  border-radius: var(--xe-radius-full);
  font-size: 1rem;
}
.xe-btn-primary:hover {
  background-color: #000;
  transform: scale(1.03);
  box-shadow: var(--xe-shadow-lg);
}

.xe-btn-primary-lg {
  background-color: var(--xe-black);
  color: var(--xe-white);
  padding: 1.125rem 2.5rem;
  border-radius: var(--xe-radius-full);
  font-size: 1.125rem;
}
.xe-btn-primary-lg:hover {
  background-color: #000;
  transform: scale(1.03);
  box-shadow: var(--xe-shadow-xl);
}

.xe-btn-secondary {
  background-color: rgba(255, 255, 255, 0.5);
  color: var(--xe-black);
  padding: 1.125rem 2.5rem;
  border-radius: var(--xe-radius-full);
  font-size: 1.125rem;
  border: 1px solid var(--xe-black);
  backdrop-filter: blur(12px);
}
.xe-btn-secondary:hover {
  background-color: var(--xe-white);
  transform: scale(1.03);
  box-shadow: var(--xe-shadow-lg);
}

/* --- Cards --- */
.xe-card {
  background: var(--xe-white);
  border-radius: var(--xe-radius-xl);
  box-shadow: var(--xe-shadow-sm);
  transition: all var(--xe-transition-slow);
  overflow: hidden;
}
.xe-card:hover {
  box-shadow: var(--xe-shadow-lg);
}

.xe-card-dark {
  background: var(--xe-black);
  border-radius: var(--xe-radius-xl);
  box-shadow: var(--xe-shadow-xl);
  color: var(--xe-white);
}

.xe-card-lift:hover {
  transform: translateY(-4px);
}

/* --- Pills / Tags --- */
.xe-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--xe-radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.xe-pill-light {
  background: rgba(255, 255, 255, 0.9);
  color: var(--xe-black);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.xe-pill-dark {
  background: var(--xe-off-white);
  color: var(--xe-black);
  border: 1px solid var(--xe-border-faint);
}

/* --- Highlight Text (yellow marker) --- */
.xe-highlight {
  background-color: var(--xe-yellow);
  color: var(--xe-black);
  padding: 0.125rem 0.5rem;
  font-weight: 700;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* --- Colour Bars (accent line above cards/sections) --- */
.xe-bar-yellow { background-color: var(--xe-yellow); }
.xe-bar-blue { background-color: var(--xe-blue); }
.xe-bar-coral { background-color: var(--xe-coral); }
.xe-bar-green { background-color: var(--xe-green); }
.xe-bar-navy { background-color: var(--xe-navy); }

/* --- Nav underline hover effect --- */
.xe-nav-link {
  position: relative;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  color: var(--xe-text-secondary);
  text-decoration: none;
  transition: color var(--xe-transition-fast);
}
.xe-nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--xe-yellow);
  transition: width var(--xe-transition-base);
}
.xe-nav-link:hover {
  color: var(--xe-black);
}
.xe-nav-link:hover::after {
  width: 100%;
}

/* --- Section backgrounds --- */
.xe-bg-yellow { background-color: var(--xe-yellow); }
.xe-bg-blue { background-color: var(--xe-blue); }
.xe-bg-coral { background-color: var(--xe-coral); }
.xe-bg-dark { background-color: var(--xe-dark); }
.xe-bg-warm { background-color: var(--xe-warm-bg); }
.xe-bg-off-white { background-color: var(--xe-off-white); }


/* --------------------------------------------------------------------------
   6. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.xe-container {
  max-width: 80rem; /* 1280px */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 768px) {
  .xe-container {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

.xe-container-narrow {
  max-width: 64rem; /* 1024px */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 768px) {
  .xe-container-narrow {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

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

@media (min-width: 768px) {
  .xe-section {
    padding-top: var(--xe-space-5xl);
    padding-bottom: var(--xe-space-5xl);
  }
}


/* --------------------------------------------------------------------------
   7. INTERACTIVE STATES (for the flip cards in What We Do)
   -------------------------------------------------------------------------- */
.xe-flip-card {
  position: relative;
  height: 320px;
  border-radius: var(--xe-radius-2xl);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--xe-transition-slow);
}

.xe-flip-card .xe-flip-front {
  position: absolute;
  inset: 0;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all var(--xe-transition-slow);
  opacity: 1;
  transform: translateY(0);
}

.xe-flip-card .xe-flip-back {
  position: absolute;
  inset: 0;
  padding: 2rem;
  background: var(--xe-black);
  color: var(--xe-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all var(--xe-transition-slow);
  opacity: 0;
  transform: translateY(2rem);
}

.xe-flip-card:hover .xe-flip-front {
  opacity: 0;
  transform: translateY(-1rem);
}

.xe-flip-card:hover .xe-flip-back {
  opacity: 1;
  transform: translateY(0);
}

.xe-flip-card:hover {
  box-shadow: var(--xe-shadow-lg);
}


/* --------------------------------------------------------------------------
   8. STACKING CARDS (How We Work scroll effect)
   -------------------------------------------------------------------------- */
.xe-stack-card {
  position: sticky;
  background: var(--xe-white);
  border-radius: var(--xe-radius-xl);
  border: 1px solid var(--xe-border-faint);
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.06);
  transition: all var(--xe-transition-base);
}

.xe-stack-card-1 { top: 8rem; z-index: 10; }
.xe-stack-card-2 { top: 10rem; z-index: 20; }
.xe-stack-card-3 { top: 12rem; z-index: 30; }


/* --------------------------------------------------------------------------
   9. FOOTER
   -------------------------------------------------------------------------- */
.xe-footer-link {
  font-weight: 700;
  color: #cbd5e1; /* slate-300 */
  text-decoration: none;
  transition: color var(--xe-transition-fast);
}
.xe-footer-link:hover {
  color: var(--xe-yellow);
}

.xe-footer-link-cta {
  color: var(--xe-yellow);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--xe-transition-fast);
}
.xe-footer-link-cta:hover {
  color: var(--xe-white);
}
