/* CSS Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #1f2937;
  background-color: #ffffff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #1f2937;
  color: #ffffff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

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

/* Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

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

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.menu a {
  color: #374151;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.menu a:hover,
.menu a[aria-current="page"] {
  color: #2563eb;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #1f2937;
  margin: 3px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .menu {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    gap: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  }

  .menu.is-open {
    display: flex;
  }
}

/* Page header */
.page-header {
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  font-weight: 800;
  color: #111827;
  margin: 0 0 1rem;
}

.page-lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: #4b5563;
  margin: 0 auto;
  max-width: 680px;
  line-height: 1.6;
}

/* Contact section */
.contact-section {
  padding: 4rem 0 6rem;
  background-color: #ffffff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 1rem;
}

.contact-info p {
  color: #4b5563;
  margin: 0 0 1rem;
}

.contact-email {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0;
}

.contact-email a {
  color: #2563eb;
  word-break: break-all;
}

/* Contact form */
.contact-form-wrapper {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #374151;
}

.optional {
  font-weight: 400;
  color: #6b7280;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  color: #1f2937;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: #dc2626;
}

.contact-form input[aria-invalid="true"]:focus,
.contact-form textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.error-message {
  display: none;
  color: #dc2626;
  font-size: 0.875rem;
}

.error-message.is-visible {
  display: block;
}

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

/* Spam check */
.spam-check {
  max-width: 220px;
}

/* Consent checkbox */
.consent-check {
  margin-top: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 400;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  accent-color: #2563eb;
  flex-shrink: 0;
}

.checkbox-label span {
  color: #4b5563;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.checkbox-label a {
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.2s ease, transform 0.1s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background-color: #2563eb;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-primary:disabled {
  background-color: #93c5fd;
  cursor: not-allowed;
  transform: none;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  width: 100%;
}

/* Form status */
.form-status {
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-status.error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Footer */
.site-footer {
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9375rem;
}

.footer-inner ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.footer-inner a {
  color: #4b5563;
  font-size: 0.9375rem;
}

.footer-inner a:hover {
  color: #2563eb;
}

/* Responsive */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-info {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-inner ul {
    gap: 1rem;
  }
}
