/* ========================================
   SocialPanda - Main Stylesheet
   ======================================== */

/* CSS Custom Properties */
:root {
  /* Core Theme */
  --white: #FFFFFF;
  --background: #FFFFFF;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --primary-accent: #2563EB;
  --accent-hover: #1D4ED8;
  --soft-blue: #DBEAFE;
  --border-color: #E2E8F0;
  --surface-muted: #F8FAFC;
  --surface-alt: #EFF6FF;

  /* RGB Helpers */
  --text-primary-rgb: 15, 23, 42;
  --text-secondary-rgb: 71, 85, 105;
  --accent-rgb: 37, 99, 235;

  /* Backwards-Compatible Aliases */
  --midnight-plum: var(--text-primary);
  --soft-rose-gold: var(--primary-accent);
  --warm-gray: var(--text-secondary);
  --dusty-lavender: var(--border-color);
  --pale-mauve: var(--surface-muted);
  --light-plum: var(--border-color);
  --cream: var(--surface-alt);

  /* Accent Colors */
  --success: #2563EB;
  --warning: #F59E0B;
  --error: #DC2626;
  
  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: 'Plus Jakarta Sans', sans-serif;
  
  /* Spacing */
  --section-xl: 8rem;
  --section-lg: 6rem;
  --section-md: 4rem;
  --section-sm: 2rem;
  --space-xl: 4rem;
  --space-lg: 3rem;
  --space-md: 2rem;
  --space-sm: 1.5rem;
  --space-xs: 1rem;
  --space-xxs: 0.5rem;
  
  /* Layout */
  --container-max: 1280px;
  --container-padding: 2rem;
  --navbar-height: 80px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(var(--text-primary-rgb), 0.05);
  --shadow-md: 0 8px 20px rgba(var(--text-primary-rgb), 0.08);
  --shadow-lg: 0 16px 36px rgba(var(--text-primary-rgb), 0.12);
  --shadow-xl: 0 24px 56px rgba(var(--text-primary-rgb), 0.16);
  
  /* Transitions */
  --transition-fast: 200ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--midnight-plum);
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.75rem;
  font-weight: 500;
}

h4 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

::selection {
  background: var(--soft-blue);
  color: var(--text-primary);
}

.text-large {
  font-size: 1.125rem;
  line-height: 1.7;
}

.text-small {
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-caption {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Section Base */
.section {
  padding: var(--section-lg) 0;
}

.section-xl {
  padding: var(--section-xl) 0;
}

.section-md {
  padding: var(--section-md) 0;
}

.section-sm {
  padding: var(--section-sm) 0;
}

/* Background Colors */
.bg-white { background-color: var(--white); }
.bg-cream { background-color: var(--surface-alt); }
.bg-lavender { background-color: var(--soft-blue); }
.bg-mauve { background-color: var(--surface-muted); }
.bg-plum { background-color: var(--midnight-plum); }

/* Text Colors */
.text-white { color: var(--white); }
.text-plum { color: var(--midnight-plum); }
.text-gray { color: var(--warm-gray); }
.text-rose { color: var(--soft-rose-gold); }

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

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

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

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

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

/* Flex Layouts */
.flex {
  display: flex;
}

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

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

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

/* Spacing Utilities */
.mt-xl { margin-top: var(--space-xl); }
.mt-lg { margin-top: var(--space-lg); }
.mt-md { margin-top: var(--space-md); }
.mt-sm { margin-top: var(--space-sm); }
.mt-xs { margin-top: var(--space-xs); }

.mb-xl { margin-bottom: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-xs { margin-bottom: var(--space-xs); }

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Section Header */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-lg);
}

.section-header h2 {
  margin-bottom: var(--space-xs);
}

.section-header p {
  font-size: 1.125rem;
}

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

/* Hero Section */
.hero {
  margin-top: var(--navbar-height);
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 12% 18%, rgba(var(--accent-rgb), 0.16), transparent 24%),
    radial-gradient(circle at 88% 16%, rgba(var(--accent-rgb), 0.08), transparent 22%),
    linear-gradient(180deg, #FFFFFF 0%, var(--surface-alt) 100%);
}

.hero__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.hero__layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  min-height: clamp(560px, calc(100vh - var(--navbar-height) - 4.5rem), 760px);
  min-height: clamp(560px, calc(100svh - var(--navbar-height) - 4.5rem), 760px);
}

.hero__content {
  max-width: 430px;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent-hover);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__title {
  font-size: clamp(3rem, 4.4vw, 4.45rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 9ch;
}

.hero__description {
  max-width: 46ch;
  font-size: 1rem;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  padding-top: 0.25rem;
}

.hero .btn-primary {
  box-shadow: 0 18px 34px rgba(var(--accent-rgb), 0.24);
}

.hero .btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--border-color);
}

.hero .btn-secondary:hover {
  background: var(--soft-blue);
}

.hero__visual {
  position: relative;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 36px;
  background: linear-gradient(160deg, #FFFFFF 0%, var(--soft-blue) 100%);
  border: 1px solid var(--border-color);
  box-shadow: 0 30px 80px rgba(var(--text-primary-rgb), 0.12);
}

.hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.12) 0%, rgba(var(--accent-rgb), 0) 42%);
  pointer-events: none;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Global Theme Overrides */
main[style*="padding-top: 80px"] {
  padding-top: var(--navbar-height) !important;
}

main > section:first-child[style*="padding: 5rem 0"][style*="text-align: center"] {
  background: linear-gradient(180deg, var(--soft-blue) 0%, rgba(var(--accent-rgb), 0.08) 100%) !important;
  border-bottom: 1px solid var(--border-color);
}

main > section:first-child[style*="padding: 5rem 0"] [style*="color: white"],
main > section:first-child[style*="padding: 5rem 0"] [style*="color: #000"],
main > section:first-child[style*="padding: 5rem 0"] [style*="color: rgba(255,255,255"],
main > section:first-child[style*="padding: 5rem 0"] [style*="color: rgba(0,0,0"] {
  color: var(--text-primary) !important;
}

main > section:first-child[style*="padding: 5rem 0"] div[style*="font-size: 5rem"] {
  color: var(--primary-accent) !important;
}

.service-card__icon[style],
.pricing-card__icon[style] {
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 24px rgba(var(--text-primary-rgb), 0.14);
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
}
