/* ==========================================================================
   Contact (contact.html) — page-specific styles only
   Figma: 1440 frame "Contact" (1467:3704) and 393 frame "Contact Mobile"
   (1518:3301). Tablet (768–1023) has no frame: details on top (intro | company),
   the form full width, then the map.
   ========================================================================== */

.page-contact {
  --contact-gap: 27px;                       /* column + row gap between the 4 blocks */
  --contact-ink: rgba(0, 0, 0, 0.5);         /* Figma grey body (labels, lead) */
  --contact-fs: clamp(16px, calc(0.382vw + 14.5px), 20px);
}

/* ---------- Section ---------- */
.contact {
  padding-top: clamp(50px, calc(3.15vw + 37.6px), 83px);
  padding-bottom: clamp(50px, calc(4.68vw + 31.6px), 99px);
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 673fr) minmax(0, 578fr);
  grid-template-areas:
    "info  form"
    "map   map";
  gap: var(--contact-gap);
  align-items: start;
}
.contact__info { grid-area: info; }
.contact__map { grid-area: map; }
.contact__form-wrap { grid-area: form; }

/* ---------- Details (left column) ---------- */
.contact__info { display: flex; flex-direction: column; gap: 36px; }
.contact__intro { display: flex; flex-direction: column; align-items: flex-start; }

.contact__title {
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: -0.005em;
}
.contact__intro .contact__title { margin-top: 22px; }

.contact__lead {
  font-size: var(--contact-fs);
  line-height: 32px;
  color: var(--contact-ink);
  max-width: 629px;
}
.contact__intro .contact__lead:first-of-type { margin-top: 22px; }
.contact__intro .contact__lead + .contact__lead { margin-top: 32px; }

/* Phone + mail rows */
.contact-list { display: flex; flex-direction: column; gap: 24px; margin-top: 32px; }
.contact-list__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--contact-fs);
  line-height: 32px;
  color: #000;
}
.contact-list__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-orange-700);
  color: var(--c-grey-50);
  transition: transform 0.5s var(--ease-out), background-color 0.3s;
}
.contact-list__icon svg { width: 20px; height: 20px; }
.contact-list__label { color: var(--contact-ink); }
.contact-list__value {
  font-weight: 600;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease-out);
}
.contact-list__value--mail {
  color: var(--c-green-500);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  background: none;
  transition: text-underline-offset var(--dur-fast);
}
@media (hover: hover) {
  .contact-list__link:hover .contact-list__icon { background: var(--c-orange-500); }
  .contact-list__link:hover .contact-list__value { background-size: 100% 1px; }
  .contact-list__link:hover .contact-list__value--mail { text-underline-offset: 6px; }
}

/* Company details */
.company__title { line-height: 40px; }
.company__list { margin-top: 30px; font-size: var(--contact-fs); line-height: 32px; }
.company__row dt { display: inline; color: var(--contact-ink); }
.company__row dd { display: inline; margin: 0; white-space: nowrap; font-weight: 600; color: #000; }

/* ---------- Images ---------- */
.contact__map { border-radius: var(--r-xl); }
.contact__map { display: block; aspect-ratio: 1280 / 560; background: #dbe6e8; }
.contact__back { margin-bottom: 20px; }
.contact__back[hidden] { display: none; }
/* Inline SVG: viewBox wraps the region, geometry runs past it, so the whole area stays in view */
.contact__map-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-land { fill: #e7e3dc; stroke: #fff; stroke-width: 1.5; }
.map-be { fill: #f8f5ef; stroke: #fff; stroke-width: 1.5; }
.map-lu { fill: #efebe3; stroke: #fff; stroke-width: 1.5; }
.map-region { fill: var(--c-green-500); stroke: var(--c-green-700); stroke-width: 1.5; stroke-linejoin: round; }
.map-road { fill: none; stroke: #fff; stroke-opacity: 0.55; stroke-width: 2; }
.map-river { fill: none; stroke: #a9c4cc; stroke-width: 1.5; stroke-linecap: round; }
.map-country { font-family: var(--f-ui); font-size: 17px; font-weight: 600; letter-spacing: 0.14em; fill: var(--c-green-500); fill-opacity: 0.45; }
.map-town circle { r: 5px; fill: var(--c-green-500); stroke: #fff; stroke-width: 2; }
.map-town text { font-family: var(--f-ui); font-size: 21px; font-weight: 600; fill: var(--c-green-500); paint-order: stroke; stroke: #f8f5ef; stroke-width: 5px; stroke-linejoin: round; }
.map-town--on text { fill: #fff; stroke: var(--c-green-700); }
.map-town--on circle { fill: #fff; stroke: var(--c-green-700); }
.contact__map-key {
  position: absolute;
  z-index: 2;
  left: 20px;
  top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 40px);
  padding: 8px 12px;
  border-radius: var(--r-md);
  background: rgba(253, 253, 253, 0.92);
  color: var(--c-green-500);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}
.contact__map-swatch { flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--c-green-500); }
.contact__map-pill {
  position: absolute;
  z-index: 2;
  left: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: rgba(253, 253, 253, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--sh-soft);
  color: var(--c-green-500);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  transition: transform 0.5s var(--ease-out), background-color 0.3s, color 0.3s;
}
@media (hover: hover) {
  .contact__map:hover .contact__map-pill { background: var(--c-green-500); color: var(--c-card); }
}
.contact__map:focus-visible { outline-offset: 4px; border-radius: var(--r-xl); }

/* ---------- Form (right column) ---------- */
.contact__form-wrap { display: flex; flex-direction: column; }
.contact__title--form { margin-top: -12px; }
.form-card {
  margin-top: 36px;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--c-card);
  transition: box-shadow 0.6s var(--ease-out);
}
.form-card:focus-within { box-shadow: 0 24px 60px -32px rgba(18, 43, 28, 0.35); }

/* fields, states, spinner and success panel: base.css (Forms); behaviour: form.js */
.contact-form .form__submit { margin-top: 56px; }

/* ---------- Small desktop (1024–1199) ---------- */
@media (max-width: 1199.98px) {
  .page-contact { --contact-gap: 24px; }
  .contact__title { font-size: 36px; }
}

/* ---------- Tablet (768–1023) ---------- */
@media (max-width: 1023.98px) {
  .page-contact { --contact-fs: 18px; }
  .contact__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "info  info"
      "form  form"
      "map   map";
    row-gap: 56px;
  }
  .contact__info {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    column-gap: 40px;
    align-items: end;
  }
  .company { padding: 28px; border-radius: var(--r-lg); background: var(--c-card); }
  .company__title { font-size: 28px; line-height: 36px; }
  .company__list { margin-top: 18px; font-size: 16px; line-height: 30px; }
  .contact__map { aspect-ratio: 2 / 1; height: auto; }
  .map-town text { font-size: 30px; }
  .map-country { font-size: 22px; }
  .form-card { margin-top: 28px; padding: 28px; }
}

/* ---------- Mobile (< 768) — Figma 393 ---------- */
@media (max-width: 767.98px) {
  .page-contact { --contact-fs: 16px; }
  .contact__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .contact__info { display: flex; align-items: stretch; gap: 36px; }
  .contact__title { font-size: 40px; line-height: 1.2; }
  .contact__intro .contact__title { margin-top: 22px; }
  .company { padding: 0; background: none; }
  .company__title { font-size: 32px; line-height: 40px; }
  .company__list { margin-top: 30px; font-size: 16px; line-height: 32px; }
  .contact__map { margin-top: 36px; aspect-ratio: 1 / 1; }
  .contact__form-wrap { margin-top: 56px; }
  .form-card { margin-top: 36px; padding: 20px; }
  .contact__map-pill { left: 12px; bottom: 12px; padding: 8px 12px; font-size: 13px; }
  .contact__map-key { left: 12px; top: 12px; max-width: calc(100% - 24px); font-size: 12px; }
  .map-town--minor { display: none; }
  .map-town text { font-size: 34px; }
  .map-country { font-size: 24px; }
}
