/* =========================================
   LAYOUT & GRID
   ========================================= */

/* Sticky Footer Architecture */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--divider);
}

section:first-of-type {
  padding-top: var(--space-xl);
}

/* Improve vertical rhythm inside sections */
section p:last-child {
  margin-bottom: 0;
}

/* Grid Systems */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* Hero Layout */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-image {
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

/* Footer Layout */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
  margin-top: var(--space-2xl);
}

.footer-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-image {
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  section {
    padding: var(--space-xl) 0;
  }
}

/* Accessibility: Focus States */
:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}
