:root {
  --bg-base: #faf6ef;
  --bg-surface: #ffffff;
  --accent-terra: #c2562e;
  --accent-olive: #6b7a3a;
  --text-dark: #2b211a;
  --text-muted: #5a4b41;
  --shadow-soft: 0 12px 24px rgba(43, 33, 26, 0.08);
  --shadow-hover: 0 20px 40px rgba(43, 33, 26, 0.15);
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  color: var(--text-dark);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  font-weight: normal;
  margin-bottom: 1rem;
  line-height: 1.2;
}

a {
  color: inherit;
}

/* Base Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography elements */
.text-link {
  text-decoration: none;
  position: relative;
  font-weight: 500;
  color: var(--text-dark);
  display: inline-block;
}
.text-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-terra);
  transition: width 0.3s var(--ease);
}
.text-link:hover::after {
  width: 100%;
}

.btn-main {
  display: inline-block;
  background-color: var(--accent-terra);
  color: var(--bg-base);
  padding: 12px 24px;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  /* Square buttons as per brief (Square sections and images) */
  border-radius: 0;
}
.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(194, 86, 46, 0.3);
}

/* Header (Inset, floating, rounded ends) */
.site-header {
  position: relative; /* Scrolls up with page */
  margin: 24px auto;
  max-width: 1160px;
  background-color: var(--bg-surface);
  border-radius: 50px;
  box-shadow: var(--shadow-soft);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--text-dark);
  display: flex;
  align-items: center;
}

.desktop-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  align-items: center;
}

.desktop-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
}

.desktop-nav a:hover {
  color: var(--accent-terra);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-surface);
  position: absolute;
  top: 80px;
  left: 20px;
  right: 20px;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
  z-index: 99;
}
.mobile-menu.active {
  display: flex;
}
.mobile-menu a {
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  text-decoration: none;
  font-weight: 500;
}
.mobile-menu a:last-child {
  border-bottom: none;
}

/* Layout Architecture */
.layout-container {
  padding: 40px 20px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.lead-block {
  margin-bottom: 60px;
  max-width: 1000px;
}

.two-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
}

/* Hero Section */
.hero-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 24px;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 32px;
  color: var(--text-muted);
}

/* Overlapping images */
.hero-images {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 60px);
  gap: 10px;
  position: relative;
}

.hero-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* Square images */
  box-shadow: 0 20px 40px rgba(0,0,0,0.3); /* Moody shadows */
  filter: contrast(1.1) brightness(0.9);
}

.img-1 { grid-column: 1 / 5; grid-row: 1 / 5; z-index: 1; }
.img-2 { grid-column: 4 / 7; grid-row: 3 / 6; z-index: 2; margin-top: -20px; }
.img-3 { grid-column: 2 / 5; grid-row: 4 / 7; z-index: 3; margin-left: -20px; }

/* Components */
.card {
  background: var(--bg-surface);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  border-radius: 0; /* Square corners */
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-img-wrap {
  width: 100%;
  height: 240px;
  margin-bottom: 24px;
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
  filter: contrast(1.15) brightness(0.85); /* Moody */
}

.card:hover .card-img-wrap img {
  transform: scale(1.05);
}

.card h3 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-grow: 1;
}

/* Badges & Avatars (Round) */
.badge {
  display: inline-block;
  background: var(--accent-olive);
  color: var(--bg-base);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

/* Section Backgrounds (Clip-path) */
.diagonal-bg {
  position: relative;
  background-color: var(--accent-olive);
  color: var(--bg-base);
  padding: 100px 20px;
  clip-path: polygon(0 4vw, 100% 0, 100% calc(100% - 4vw), 0 100%);
  margin: 60px 0;
}
.diagonal-bg h2, .diagonal-bg .text-link {
  color: var(--bg-base);
}
.diagonal-bg .text-link::after {
  background-color: var(--bg-base);
}
.diagonal-bg .card {
  color: var(--text-dark); /* Reset card text inside dark section */
}

/* Form / Tool Styles */
.tool-container {
  background: var(--bg-surface);
  padding: 40px;
  box-shadow: var(--shadow-soft);
  max-width: 800px;
  margin: 40px auto;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(43, 33, 26, 0.2);
  background: var(--bg-base);
  font-family: var(--font-body);
  color: var(--text-dark);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.log-output {
  margin-top: 32px;
  padding: 24px;
  background: var(--bg-base);
  border-left: 4px solid var(--accent-terra);
  display: none;
}
.log-output pre {
  white-space: pre-wrap;
  font-family: monospace;
  margin-bottom: 16px;
}

/* Footer */
.site-footer {
  margin: 40px auto 24px;
  max-width: 1160px;
  background-color: var(--bg-surface);
  border-radius: 50px;
  box-shadow: var(--shadow-soft);
  padding: 32px 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--accent-terra);
}

.footer-bottom {
  width: 100%;
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.05);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Standard Content Format */
.content-article {
  max-width: 72ch;
  margin: 0 auto;
}
.content-article p {
  margin-bottom: 24px;
  font-size: 1.1rem;
}
.content-article h2 {
  margin-top: 48px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
}
th, td {
  padding: 12px 16px;
  border: 1px solid rgba(43, 33, 26, 0.2);
  text-align: left;
}
th {
  background: var(--accent-olive);
  color: var(--bg-base);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
  }
  .hero-images {
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .site-header {
    border-radius: 20px;
    margin: 16px 20px;
    padding: 12px 24px;
  }
  .site-footer {
    border-radius: 20px;
    flex-direction: column;
    padding: 24px;
    margin: 20px;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .two-col-grid {
    grid-template-columns: 1fr;
  }
  .diagonal-bg {
    clip-path: polygon(0 2vw, 100% 0, 100% calc(100% - 2vw), 0 100%);
    padding: 60px 20px;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 20px;
  }
  .card-img-wrap {
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
