/* ================================================================
   contact.css  —  Heptacare Contact Page  (v3)
   Hero > Contact Bar > Centered Form > Map > Footer
   ================================================================ */

/* ── 1  Reset & Variables ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', -apple-system, sans-serif;
  color: #212529;
  background: #F7F8F9;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:root {
  --navy:   #0B2545;
  --navy-2: #13315C;
  --accent: #134074;
  --steel:  #2B4F76;
  --bg:     #F7F8F9;
  --border: #DEE2E6;
  --text:   #212529;
  --muted:  #6C757D;
  --white:  #FFFFFF;
  --serif:  'Source Serif 4', Georgia, serif;
  --sans:   'IBM Plex Sans', -apple-system, sans-serif;
  --mono:   'IBM Plex Mono', 'SF Mono', monospace;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 2.5rem; }


/* ── 2  Navigation ── */
.nav {
  position: sticky; top: 0; z-index: 1000;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: box-shadow 0.3s ease;
}
.nav.scrolled { box-shadow: 0 2px 16px rgba(11,37,69,0.25); }

.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 2.5rem;
  height: 64px; display: flex; align-items: center;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; margin-right: auto; }
.nav-logo img { height: 30px; width: auto; filter: brightness(0) invert(1); }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
  color: rgba(255,255,255,0.7); text-decoration: none;
  letter-spacing: 0.01em; padding: 4px 0;
  border-bottom: 1.5px solid transparent; transition: all 0.2s ease;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; border-bottom-color: #fff; }

.nav-cta {
  margin-left: 2rem; font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  color: var(--navy); background: #fff; padding: 0.5rem 1.25rem;
  text-decoration: none; transition: all 0.2s ease;
}
.nav-cta:hover { background: #E8ECF0; }

.nav-hamburger {
  display: none; background: none; border: none; color: #fff;
  font-size: 1.5rem; cursor: pointer; margin-left: 1rem; padding: 0; width: 44px; height: 44px; line-height: 44px; text-align: center;
}
.nav-mobile-menu {
  display: none; background: var(--navy); padding: 1rem 2.5rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.nav-mobile-menu.active { display: block; }
.nav-mobile-menu a {
  display: block; padding: 0.85rem 0; color: rgba(255,255,255,0.8);
  text-decoration: none; font-size: 0.9rem; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover { color: #fff; }


/* ── 3  Hero ── */
.hero {
  background: var(--navy); position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: drift 30s linear infinite;
}
@keyframes drift {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

.hero-inner {
  position: relative; z-index: 1;
  padding: 6.5rem 0 5.5rem;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.hero-label {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.4);
  text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: var(--serif); font-size: 2.8rem; font-weight: 700;
  line-height: 1.15; color: #fff; letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero-sub {
  font-size: 1.05rem; line-height: 1.65;
  color: rgba(255,255,255,0.55); max-width: 520px; margin: 0 auto;
}


/* ── 4  Contact Bar ── */
.contact-bar {
  background: var(--navy-2);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.bar-grid {
  max-width: 1280px; margin: 0 auto; padding: 0 2.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.bar-item {
  padding: 1.6rem 1.75rem;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.bar-item:last-child { border-right: none; }

.bar-label {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 0.55rem;
}
.bar-value {
  font-family: var(--sans); font-size: 1.05rem; font-weight: 600;
  color: rgba(255,255,255,0.95); line-height: 1.5;
}
.bar-value a {
  color: rgba(255,255,255,0.95); text-decoration: none;
  transition: color 0.2s;
}
.bar-value a:hover { color: #fff; }
.bar-value-secondary {
  font-family: var(--sans); font-size: 0.92rem; font-weight: 400;
  color: rgba(255,255,255,0.65); margin-top: 0.25rem;
}


/* ── 5  Form Section ── */
.form-section {
  padding: 5rem 0; position: relative; background: var(--bg);
}
.form-section::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, rgba(11,37,69,0.022) 1px, transparent 1px),
    linear-gradient(rgba(11,37,69,0.022) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.form-container {
  position: relative; z-index: 1;
  max-width: 880px; margin: 0 auto;
}

.section-eyebrow {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.75rem;
}
.section-heading {
  font-family: var(--serif); font-size: 2rem; font-weight: 700;
  color: var(--navy); letter-spacing: -0.015em; margin-bottom: 2.5rem;
}

.form-card {
  background: var(--white); border: 1px solid var(--border);
  padding: 2.5rem;
}

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

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

.form-label {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  color: var(--text); margin-bottom: 0.4rem;
}
.req { color: #C0392B; }

.form-input,
.form-select,
.form-textarea {
  width: 100%; padding: 0.7rem 0.9rem;
  font-family: var(--sans); font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 0; outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-appearance: none; appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--navy); background: var(--white);
}
.form-input::placeholder,
.form-textarea::placeholder { color: #B0B8C1; }

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236C757D' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 01.708 0L8 10.293l5.646-5.647a.5.5 0 01.708.708l-6 6a.5.5 0 01-.708 0l-6-6a.5.5 0 010-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}
.form-textarea { resize: vertical; min-height: 120px; }

.form-group--full { margin-bottom: 1.25rem; }

.btn-submit {
  display: block; width: 100%;
  padding: 1rem 2rem; margin-top: 0.75rem;
  font-family: var(--sans); font-size: 0.85rem; font-weight: 600;
  color: var(--white); background: var(--navy);
  border: none; border-radius: 0; cursor: pointer;
  transition: background 0.2s ease; letter-spacing: 0.02em;
}
.btn-submit:hover { background: var(--navy-2); }
.btn-submit.sent { background: #1a6b35; cursor: default; }

.form-note {
  font-size: 0.75rem; color: var(--muted);
  margin-top: 1rem; line-height: 1.5;
}


/* ── 6  Map Section ── */
.map-section {
  padding: 5rem 0 0; background: #EAECF0;
}
.map-section .section-eyebrow { color: var(--steel); }

.map-header {
  max-width: 1280px; margin: 0 auto;
  padding: 0 2.5rem 2.5rem;
}

#map {
  width: 100%; height: 440px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  filter: saturate(0.3);
  z-index: 1;
}

/* Leaflet overrides — sharp corners */
.leaflet-popup-content-wrapper {
  border-radius: 0 !important;
  box-shadow: 0 4px 20px rgba(11,37,69,0.18) !important;
  padding: 0 !important;
}
.leaflet-popup-tip { box-shadow: none !important; }
.leaflet-popup-content { margin: 0 !important; font-family: var(--sans); }

.popup-inner { padding: 1rem 1.25rem; }
.popup-label {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.08em; color: var(--muted);
  text-transform: uppercase; margin-bottom: 0.3rem;
}
.popup-title {
  font-family: var(--serif); font-size: 1rem; font-weight: 700;
  color: var(--navy); margin-bottom: 0.2rem;
}
.popup-addr { font-size: 0.82rem; color: var(--text); line-height: 1.5; }

/* Location cards */
.location-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  max-width: 1280px; margin: 0 auto;
  background: var(--border);
  gap: 1px;
}

.loc-card {
  background: var(--white);
  padding: 1.75rem 2.5rem;
  cursor: pointer; border: none; text-align: left;
  display: flex; align-items: center; gap: 1.5rem;
  font-family: var(--sans);
  transition: background 0.2s ease;
  width: 100%;
}
.loc-card:hover { background: #F0F3F6; }
.loc-card.active { background: var(--navy); }
.loc-card.active .loc-name,
.loc-card.active .loc-role { color: #fff; }
.loc-card.active .loc-desc { color: rgba(255,255,255,0.55); }
.loc-card.active .loc-marker { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.loc-card.active .loc-marker svg { fill: #fff; }

.loc-marker {
  flex-shrink: 0; width: 44px; height: 44px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.loc-marker svg { width: 18px; height: 18px; fill: var(--navy); transition: fill 0.2s; }

.loc-details { flex: 1; }
.loc-name {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 700;
  color: var(--navy); margin-bottom: 0.15rem; transition: color 0.2s;
}
.loc-role {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--steel); margin-bottom: 0.3rem; transition: color 0.2s;
}
.loc-desc {
  font-size: 0.82rem; color: var(--muted);
  line-height: 1.45; transition: color 0.2s;
}


/* ── 7  Footer ── */
.footer {
  background: var(--navy); color: rgba(255,255,255,0.6); padding: 4rem 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem; padding-bottom: 3rem;
}
.footer-logo { display: flex; align-items: center; margin-bottom: 1rem; }
.footer-logo img { height: 24px; width: auto; filter: brightness(0) invert(1); margin-bottom: 0.5rem; }
.footer h4 {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; color: rgba(255,255,255,0.4);
  text-transform: uppercase; margin-bottom: 1rem;
}
.footer a {
  display: block; color: rgba(255,255,255,0.6); text-decoration: none;
  font-size: 0.85rem; padding: 0.25rem 0; transition: color 0.2s;
}
.footer a:hover { color: #fff; }
.footer p { font-size: 0.82rem; line-height: 1.5; margin-bottom: 0.5rem; }
.footer strong { color: rgba(255,255,255,0.8); font-weight: 600; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 0; display: flex;
  justify-content: space-between; align-items: center; font-size: 0.75rem;
}
.footer-tagline {
  font-family: var(--sans); letter-spacing: 0.05em;
  font-size: 0.68rem; font-weight: 500; color: rgba(255,255,255,0.25);
}


/* ── 8  Animations ── */
.fade-in {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-d1 { transition-delay: 0.1s; }
.fade-in-d2 { transition-delay: 0.2s; }


/* ── 9  Responsive ── */
@media (max-width: 1024px) {
  .hero-inner { padding: 5rem 0 4rem; }
  .hero h1 { font-size: 2.2rem; }
  .bar-grid { grid-template-columns: repeat(2, 1fr); }
  .bar-item:nth-child(2) { border-right: none; }
  .section-heading { font-size: 1.75rem; }
}

@media (max-width: 768px) {
  .wrap { padding: 0 1.5rem; }
  .nav-inner { padding: 0 1.5rem; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: block; }

  .hero-inner { padding: 4rem 0 3rem; }
  .hero h1 { font-size: 1.85rem; }

  .bar-grid { grid-template-columns: 1fr 1fr; padding: 0 1.5rem; }
  .bar-item { padding: 1rem 1.25rem; }

  .form-section { padding: 3.5rem 0; }
  .form-card { padding: 1.75rem; }
  .form-row { grid-template-columns: 1fr; gap: 1rem; }

  .map-header { padding: 0 1.5rem 2rem; }
  #map { height: 320px; }
  .location-cards { grid-template-columns: 1fr; }
  .loc-card { padding: 1.25rem 1.5rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .bar-grid { grid-template-columns: 1fr; }
  .bar-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .bar-item:last-child { border-bottom: none; }
  .form-card { padding: 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
