.nav-links a.active,
.nav-drawer a.active { color: var(--secondary); }

#navbar,
#navbar.scrolled {
  background: rgba(1, 26, 63, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

body { background: #ffffff; }

.contact-section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: #ffffff;
  overflow: hidden;
}

.contact-section .dot-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(34,170,131,0.5) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0;
  animation: fadeUp 1.2s ease 0.4s forwards;
  pointer-events: none;
}

.contact-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items:center;
  padding: 200px 64px 64px 64px;
}

.contact-intro { padding-top: 8px; }

.contact-intro h1 { color: var(--primary); }

.contact-lead {
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--primary);
  max-width: 600px;
  margin-bottom: 40px;
}

.contact-form-wrap {
  position: relative;
  background: #f6f8fa;
  border: 1px solid rgba(1, 26, 63, 0.12);
  border-top: none;
  box-shadow: 0 30px 60px -42px rgba(1, 26, 63, 0.45);
  width: 100%;
  max-width: 700px;
  justify-self: end;
}

.form-cap {
  height: 5px;
  width: 100%;
  background: var(--secondary);
}

.contact-form { padding: 30px; }

.field { margin-bottom: 20px; border: none; }

.field > label,
.field > legend {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(1, 26, 63, 0.6);
  margin-bottom: 12px;
  padding: 0;
}

.req { color: var(--secondary); }

.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: 'Sora', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  color: var(--primary);
  background: #ffffff;
  border: 1px solid rgba(1, 26, 63, 0.18);
  border-radius: 0;
  padding: 10px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(34,170,131,0.15);
}

.field input::placeholder,
.field textarea::placeholder { color: rgba(1, 26, 63, 0.4); }

.field input.invalid,
.field textarea.invalid {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(190,105,138,0.15);
}

.select-wrap { position: relative; }

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--secondary);
  border-bottom: 2px solid var(--secondary);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.select-wrap select option {
  background: #ffffff;
  color: var(--primary);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip { position: relative; display: inline-flex; }

.chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chip span {
  display: inline-block;
  padding: 10px;
  border: 1px solid rgba(1, 26, 63, 0.18);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.chip:hover span {
  border-color: var(--secondary);
  color: var(--secondary);
}

.chip input:checked + span {
  border-color: var(--secondary);
  background: rgba(34,170,131,0.12);
  color: var(--primary);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

.form-status {
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--primary);
  margin-bottom: 20px;
  min-height: 1.2em;
}
.form-status.error { color: #b23a5e; }
.form-status:empty { margin-bottom: 0; }

.contact-form .btn-primary { margin-right: 0; }

.form-success { padding: 56px 40px 64px; }
.form-success h3 { color: var(--primary); margin-bottom: 1.25rem; }
.form-success p {
  font-weight: 300;
  line-height: 1.8;
  color: rgba(1, 26, 63, 0.8);
  max-width: 440px;
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 120px 32px 96px;
  }
  .contact-form-wrap { justify-self: stretch; max-width: none; }
}

@media (min-width: 600px) and (max-width: 1024px) {
  .contact-grid { padding: 120px 40px 96px; }
}

@media (max-width: 599px) {
  .contact-grid { padding: 104px 24px 80px; }
  .contact-form { padding: 32px 24px; }
  .form-success { padding: 40px 24px 48px; }
  .contact-form .btn-primary { display: block; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-section .dot-grid { opacity: 0.4; animation: none; }
}
