/* ==========================================================================
   The Creative Conservator - Main Stylesheet
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */
:root {
  /* Brand Colors */
  --deep-red: #3B0510;
  --green: #889063;
  --vintage-wine: #221516;
  --cream: #F5F0E8;
  --white: #FFFFFF;

  /* Semantic Colors */
  --color-primary: var(--deep-red);
  --color-secondary: var(--green);
  --color-dark: var(--vintage-wine);
  --color-light: var(--cream);
  --color-background: var(--white);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font Sizes - Mobile First */
  --font-size-h1: clamp(2.5rem, 5vw + 1rem, 4rem);
  --font-size-h2: clamp(2rem, 3vw + 0.5rem, 2.5rem);
  --font-size-h3: clamp(1.5rem, 2vw + 0.25rem, 1.75rem);
  --font-size-body: 1rem;
  --font-size-small: 0.875rem;
  --font-size-large: 1.125rem;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;

  /* Container */
  --container-max-width: 1200px;
  --container-padding: 1.5rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-weight: 400;
  color: var(--vintage-wine);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Remove animations for people who've turned them off */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Scroll margin for anchor links with fixed header */
section[id] {
  scroll-margin-top: 100px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--deep-red);
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-h1);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-h2);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--font-size-h3);
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

/* Body Text */
p {
  margin-bottom: var(--spacing-md);
  max-width: 70ch;
}

p:last-child {
  margin-bottom: 0;
}

/* Links */
a:hover {
  color: var(--deep-red);
}

/* Emphasis */
strong,
b {
  font-weight: 600;
}

em,
i {
  font-style: italic;
}

/* Small Text */
small {
  font-size: var(--font-size-small);
}

/* Large Text */
.text-large {
  font-size: var(--font-size-large);
}

/* Lead Paragraph */
.lead {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--vintage-wine);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-narrow {
  max-width: 800px;
}

.container-wide {
  max-width: 1400px;
}

/* Section Padding */
.section-padding {
  padding-top: var(--spacing-2xl);
  padding-bottom: var(--spacing-2xl);
}

.section-padding-sm {
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
}

.section-padding-lg {
  padding-top: var(--spacing-3xl);
  padding-bottom: var(--spacing-3xl);
}

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

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

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

/* Text Colors */
.text-primary {
  color: var(--deep-red);
}

.text-secondary {
  color: var(--green);
}

.text-dark {
  color: var(--vintage-wine);
}

.text-light {
  color: var(--cream);
}

.text-white {
  color: var(--white);
}

/* Background Colors */
.bg-primary {
  background-color: var(--deep-red);
}

.bg-secondary {
  background-color: var(--green);
}

.bg-dark {
  background-color: var(--vintage-wine);
}

.bg-light {
  background-color: var(--cream);
}

.bg-white {
  background-color: var(--white);
}

/* Spacing Utilities */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.my-0 { margin-top: 0; margin-bottom: 0; }
.my-1 { margin-top: var(--spacing-xs); margin-bottom: var(--spacing-xs); }
.my-2 { margin-top: var(--spacing-sm); margin-bottom: var(--spacing-sm); }
.my-3 { margin-top: var(--spacing-md); margin-bottom: var(--spacing-md); }
.my-4 { margin-top: var(--spacing-lg); margin-bottom: var(--spacing-lg); }
.my-5 { margin-top: var(--spacing-xl); margin-bottom: var(--spacing-xl); }

/* Display Utilities */
.hidden {
  display: none !important;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.grid {
  display: grid;
}

/* Flexbox Utilities */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

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

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

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

.gap-1 { gap: var(--spacing-xs); }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }
.gap-4 { gap: var(--spacing-lg); }
.gap-5 { gap: var(--spacing-xl); }

/* Width Utilities */
.w-full {
  width: 100%;
}

.max-w-full {
  max-width: 100%;
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet - 768px */
@media (min-width: 768px) {
  :root {
    --container-padding: 2rem;
  }

  .section-padding {
    padding-top: var(--spacing-3xl);
    padding-bottom: var(--spacing-3xl);
  }

  /* Tablet-specific utilities */
  .md\:hidden {
    display: none !important;
  }

  .md\:block {
    display: block !important;
  }

  .md\:flex {
    display: flex !important;
  }

  .md\:grid {
    display: grid !important;
  }

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

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

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

/* Desktop - 1024px */
@media (min-width: 1024px) {
  :root {
    --container-padding: 2.5rem;
  }

  /* Desktop-specific utilities */
  .lg\:hidden {
    display: none !important;
  }

  .lg\:block {
    display: block !important;
  }

  .lg\:flex {
    display: flex !important;
  }

  .lg\:grid {
    display: grid !important;
  }

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

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

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

/* Large Desktop - 1280px */
@media (min-width: 1280px) {
  .xl\:hidden {
    display: none !important;
  }

  .xl\:block {
    display: block !important;
  }

  .xl\:flex {
    display: flex !important;
  }

  .xl\:grid {
    display: grid !important;
  }
}
