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

:root {
  --primary: #1B263B;
  --primary-dark: #0D1421;
  --accent: #C1121F;
  --accent-hover: #9A0E18;
  --bg-primary: #E0E1DD;
  --bg-secondary: #F5F5F5;
  --bg-card: #FFFFFF;
  --text-primary: #1B263B;
  --text-secondary: #415A77;
  --border-color: #778DA9;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Crimson Text', serif;
  --shadow-light: 0 2px 10px rgba(27, 38, 59, 0.08);
  --shadow-medium: 0 8px 30px rgba(27, 38, 59, 0.12);
  --shadow-heavy: 0 20px 60px rgba(27, 38, 59, 0.15);
}

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

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  font-weight: 400;
}

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

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

h3 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

h4 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
}

h5 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

h6 {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

p {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

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

a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

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

.section-padding {
  padding: 5rem 0;
}

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

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

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 2.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 2.5rem; }

/* Grid Systems */
.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 {
  display: flex;
}

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

.flex-wrap {
  flex-wrap: wrap;
}

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

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

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

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .section-padding {
    padding: 3rem 0;
  }
  
  .section-padding-large {
    padding: 4rem 0;
  }
  
  .grid {
    gap: 1.5rem;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Animations and Transitions */
@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);
  }
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in-left {
  opacity: 0;
  animation: fadeInLeft 0.8s ease forwards;
}

.fade-in-right {
  opacity: 0;
  animation: fadeInRight 0.8s ease forwards;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

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

/* Utility Classes */
.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;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}