/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CSS Variables */
:root {
  --primary: #1D3557;
  --primary-dark: #0F1B2E;
  --accent: #E63946;
  --accent-hover: #C62C3A;
  --bg-primary: #F1FAEE;
  --bg-secondary: #A8DADC;
  --bg-card: #FEFEFE;
  --text-primary: #1D3557;
  --text-secondary: #457B9D;
  --border-color: #D8E4E6;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Crimson Pro', serif;
  --shadow-light: 0 2px 8px rgba(29, 53, 87, 0.1);
  --shadow-medium: 0 4px 16px rgba(29, 53, 87, 0.15);
  --shadow-heavy: 0 8px 32px rgba(29, 53, 87, 0.2);
  --transition: all 0.3s ease;
  --border-radius: 8px;
}

/* Typography */
html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(168, 218, 220, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(29, 53, 87, 0.05) 0%, transparent 50%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.25rem;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 1rem;
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: 0.75rem;
}

/* Paragraphs and Text */
p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

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

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

/* Layout Utilities */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

/* Section Spacing */
.section {
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.section-large {
  padding: 8rem 0;
}

.section-small {
  padding: 3rem 0;
}

/* Main Content Wrapper */
.main-content {
  padding-top: 100px;
  min-height: 100vh;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fadeInRight {
  animation: fadeInRight 0.8s ease-out forwards;
}

/* Reveal on Scroll */
.reveal-element {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal-element.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Image Styles */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.image-rounded {
  border-radius: var(--border-radius);
}

.image-shadow {
  box-shadow: var(--shadow-medium);
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles */
*:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
}

/* Responsive Typography */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .container,
  .container-narrow,
  .container-wide {
    padding: 0 1rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .section-large {
    padding: 5rem 0;
  }
  
  .main-content {
    padding-top: 80px;
  }
}

@media (max-width: 480px) {
  .grid {
    gap: 1rem;
  }
  
  .section {
    padding: 2rem 0;
  }
}