/* ========================================
     CSS CUSTOM PROPERTIES
     ======================================== */
:root {
  /* Peak District Moorland Palette - Professional & Natural */
  --primary-color: #2d3d2f; /* Deep moorland green with earthy undertone */
  --primary-dark: #1a2318; /* Dark heather shadow */
  --primary-light: #4a5d4c; /* Lighter moorland grass */
  --accent-color: #5a7c59; /* Peak District bracken and moorland green */
  --accent-dark: #486847; /* Darker moorland for hover states */
  --secondary-color: #8b7d6b; /* Gritstone and peat - warm earth tone */

  /* Text Colors */
  --text-dark: #1a2318;
  --text-body: #3d4939;
  --text-light: #6b7669;
  --text-white: #ffffff;

  /* Background Colors */
  --bg-white: #ffffff;
  --bg-light: #f7f8f8; /* Subtle warm off-white */
  --bg-gray: #e8eaeb; /* Refined neutral gray */
  --bg-dark: #2c3e3f;

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

  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;

  /* Transitions */
  --transition-speed: 0.3s;
}

/* ========================================
     RESET & BASE STYLES
     ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-body);
  background-color: var(--bg-white);
}

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

/* ========================================
     TYPOGRAPHY
     ======================================== */
h1,
h2,
h3 {
  color: var(--text-dark);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--secondary-color);
}

/* ========================================
     LAYOUT UTILITIES
     ======================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

section {
  padding: var(--spacing-xl) 0;
}

section:nth-child(even) {
  background-color: var(--bg-light);
}

/* ========================================
     HEADER (STICKY)
     ======================================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.08);
  height: var(--header-height);
  border-bottom: 1px solid rgba(90, 124, 89, 0.12);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo:hover {
  color: var(--primary-dark);
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

nav a:not(.social-icon) {
  color: var(--text-body);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 4px;
  transition: background-color var(--transition-speed),
    color var(--transition-speed);
}

nav a:not(.social-icon):hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.social-icons {
  display: flex;
  gap: var(--spacing-sm);
}

nav .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-body) !important;
  transition: color var(--transition-speed),
    transform var(--transition-speed);
}

nav .social-icon:hover {
  color: var(--primary-color) !important;
  transform: translateY(-2px);
}

.social-icon svg {
  width: 24px;
  height: 24px;
}

/* ========================================
     HERO SECTION WITH CAROUSEL
     ======================================== */
.hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
}

.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
}

/* Hero carousel slides will use background images set via JavaScript */

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.5)
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: left;
  color: var(--text-white);
  max-width: var(--max-width);
  padding: var(--spacing-md);
  margin: 0 auto;
  width: 100%;
  opacity: 0;
  animation: fadeInHero 0.6s ease-in-out 0.1s forwards;
}

@keyframes fadeInHero {
  to {
    opacity: 1;
  }
}

.hero h1 {
  color: var(--text-white);
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-subtext {
  font-size: 1.25rem;
  color: var(--text-white);
  margin-bottom: var(--spacing-md);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: var(--spacing-md);
}

/* ========================================
     BUTTONS
     ======================================== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-speed);
  border: 2px solid transparent;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--text-white);
  border-color: var(--accent-color);
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(90, 124, 89, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-white);
  border-color: var(--text-white);
}

.btn-secondary:hover {
  background-color: var(--text-white);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================
     CONTACT SECTION
     ======================================== */
.contact-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  align-items: start;
}

.contact-intro {
  font-size: 1.1rem;
  color: var(--text-body);
  line-height: 1.8;
}

.contact-form {
  background-color: var(--bg-white);
  padding: var(--spacing-lg);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--bg-gray);
}

/* 2-column layout on desktop */
@media (min-width: 1024px) {
  .contact-container {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--bg-gray);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

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

.form-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
  display: none;
}

.form-group.error input,
.form-group.error textarea {
  border-color: #dc3545;
}

.form-group.error .form-error {
  display: block;
}

.form-success {
  background-color: #d4edda;
  color: #155724;
  padding: var(--spacing-md);
  border-radius: 6px;
  margin-bottom: var(--spacing-md);
  border: 1px solid #c3e6cb;
  display: none;
}

.form-success.show {
  display: block;
}

/* Honeypot field - hidden from users */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ========================================
     FOOTER
     ======================================== */
footer {
  background-color: var(--primary-dark);
  color: var(--text-white);
  padding: var(--spacing-lg) 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: start;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-links h3 {
  font-size: 1rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-white);
  font-weight: 600;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-speed);
  font-size: 0.95rem;
}

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

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-contact h3 {
  font-size: 1rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-white);
  font-weight: 600;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-speed);
  font-size: 0.95rem;
}

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

.footer-social-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  align-items: flex-end;
}

.footer-social {
  display: flex;
  gap: var(--spacing-md);
}

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

.footer-social .social-icon:hover {
  color: var(--accent-color);
}

.footer-copyright {
  margin: 0;
  opacity: 0.8;
  font-size: 0.9rem;
  text-align: right;
}

/* Responsive footer */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    text-align: center;
  }

  .footer-social-section {
    align-items: center;
  }

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

/* ========================================
     RESPONSIVE DESIGN
     ======================================== */
@media (max-width: 850px) {
  nav {
    gap: var(--spacing-sm);
  }

  nav a:not(.social-icon) {
    font-size: 0.9rem;
    padding: var(--spacing-xs);
    white-space: nowrap;
  }

  .logo {
    font-size: 1.3rem;
  }

  .logo img {
    height: 36px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero {
    height: 50vh;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .social-icons {
    display: none;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 600px) {
  .header-content {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  .logo img {
    height: 32px;
  }

  nav {
    gap: 0.5rem;
  }

  nav a:not(.social-icon) {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
  }
}

/* ========================================
     ACCESSIBILITY
     ======================================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
