/* ==========================================================================
   RESET & BOX MODEL
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  color: var(--color-charcoal);
  background-color: var(--color-off-white);
  line-height: var(--leading-normal);
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
}

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

ul, ol {
  list-style: none;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--leading-tight);
  color: var(--color-charcoal);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, var(--text-5xl)); }
h2 { font-size: clamp(1.75rem, 3.5vw, var(--text-3xl)); }
h3 { font-size: clamp(1.35rem, 2.5vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  color: var(--color-dark-gray);
  line-height: var(--leading-relaxed);
  font-size: var(--text-base);
}

.serif {
  font-family: var(--font-serif);
}

.display-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, var(--text-6xl));
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: var(--text-lg);
  color: var(--color-medium-gray);
  line-height: var(--leading-normal);
}

.caption {
  font-size: var(--text-xs);
  color: var(--color-medium-gray);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-fluid {
  width: 100%;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

#main-content {
  flex: 1 0 auto;
  min-height: calc(100vh - var(--header-height) - 400px);
}

/* ==========================================================================
   UTILITY CLASSES & GRID HELPERS
   ========================================================================== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.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;
}

/* ==========================================================================
   SECTION COMMONS
   ========================================================================== */
.section-padding {
  padding-top: clamp(3rem, 6vw, 5.5rem);
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
}

.section-header {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-header.text-center {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.section-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary-pink);
  margin-bottom: var(--space-2);
  background: var(--color-blush);
  padding: 4px 14px;
  border-radius: var(--radius-full);
}

.section-title {
  margin-bottom: var(--space-3);
}

.section-desc {
  font-size: var(--text-base);
  color: var(--color-medium-gray);
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in {
  animation: fadeIn var(--transition-smooth) forwards;
}

.animate-slide-up {
  animation: slideUpFade var(--transition-smooth) forwards;
}

/* Skeleton Loading Effect */
.skeleton {
  background: linear-gradient(90deg, #f0ede8 25%, #fbf9f6 50%, #f0ede8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   FOCUS & ACCESSIBILITY
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary-pink);
  outline-offset: 3px;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-cream-light);
}

::-webkit-scrollbar-thumb {
  background: var(--color-soft-pink);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-pink);
}

/* Responsive Padding Adjustments */
@media (max-width: 768px) {
  .container, .container-narrow, .container-fluid {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}
