/* ==========================================================================
   IPS — contact page: page head · map of the office neighbourhood (our own SVG from OpenStreetMap) with the office
   card · phone / email / social cards · request form
   ========================================================================== */

/* ---------- Map frame (10px inset and rounded, like the home hero) ---------- */
.cmap { padding: 0 10px; }
.cmap__wrap { position: relative; }
.cmap__frame {
  position: relative; height: min(calc(var(--vh, 1vh) * 72), 720px); min-height: 460px; border-radius: var(--radius); overflow: hidden;
  clip-path: inset(0 round var(--radius)); isolation: isolate; background: #e8ebef; cursor: grab; touch-action: pan-y;
}
.cmap__frame.is-drag { cursor: grabbing; }
.cmap__layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; opacity: 0; transition: opacity .9s var(--ease); }
.cmap__frame.is-ready .cmap__layer { opacity: 1; }
.cmap__layer svg { display: block; width: 100%; height: 100%; }
/* soft shade at the edges so the card and the buttons sit on a calm ground */
.cmap__frame::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 0 0 120px rgba(32, 45, 71, .1); }

/* map colours (classes written by tools/map/osm_to_svg.py) */
.cmap .mbg { fill: #e8ebef; }
.cmap .mgreen { fill: #dbe3de; }
.cmap .mwater { fill: #cdd8e6; }
.cmap .mwaterline { fill: none; stroke: #c3d1e2; stroke-width: 4; stroke-linecap: round; }
.cmap .mrd { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.cmap .mbld { fill: #d9dde4; stroke: #cfd4dc; stroke-width: .6; }
.cmap .moffice { fill: var(--accent); }
.cmap .mpin { display: none; } /* the HTML pin below keeps its size while zooming */
.cmap .mlbl { font-family: var(--f-latin); font-size: 11px; font-weight: 500; letter-spacing: .04em; fill: #7c8697; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
html[lang="ka"] .cmap .mlbl { font-family: var(--f-text); letter-spacing: .01em; font-size: 11.5px; }
.cmap .mlbl--main { font-size: 13px; font-weight: 600; fill: var(--ink); }
html[lang="ka"] .cmap .mlbl--en, html[lang="en"] .cmap .mlbl--ka { display: none; }
.cmap .mattr { font-family: var(--f-latin); font-size: 9px; fill: rgba(32, 45, 71, .45); }

/* the office pin: the IPS symbol on navy, a slow pulse around it */
.cmap__pin { position: absolute; left: 0; top: 0; z-index: 2; width: 0; height: 0; pointer-events: none; }
.cmap__mark {
  position: absolute; left: -27px; top: -27px; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); box-shadow: 0 12px 28px -10px rgba(20, 28, 45, .55), 0 0 0 4px #fff;
}
.cmap__mark .logo-symbol { width: 30px; height: auto; }
.cmap__pulse { position: absolute; left: -27px; top: -27px; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 114, 18, .35); animation: cmapPulse 2.6s cubic-bezier(.22, 1, .36, 1) infinite; }
@keyframes cmapPulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cmap__pulse { animation: none; opacity: 0; } }

/* zoom buttons */
.cmap__zoom { position: absolute; right: 16px; top: 16px; z-index: 3; display: grid; gap: 6px; }
.cmap__zoom button {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink);
  font-size: 22px; line-height: 1; box-shadow: 0 8px 20px -12px rgba(20, 28, 45, .5); transition: background-color .4s var(--ease), color .4s var(--ease);
}
.cmap__zoom button svg { width: 16px; height: 16px; }
.cmap__zoom button:hover { background: var(--ink); color: #fff; }

/* the office card */
.cmap__card {
  position: absolute; left: clamp(16px, 2vw, 32px); bottom: clamp(16px, 2vw, 32px); z-index: 3; width: min(420px, calc(100% - 32px));
  display: grid; gap: 6px; padding: clamp(20px, 2vw, 28px); border-radius: var(--radius); background: #fff;
  box-shadow: 0 24px 60px -30px rgba(20, 28, 45, .55); cursor: auto;
}
.cmap__card .marker { display: flex; margin-bottom: 8px; }
.cmap__street { font-weight: 600; font-size: clamp(22px, 2vw, 30px); line-height: 1.2; }
html[lang="en"] .cmap__street { font-family: var(--f-latin); letter-spacing: -.015em; }
.cmap__city { font-size: 15px; color: var(--text-2); }
.cmap__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; }
.cmap__copy { display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; font-size: 13.5px; color: var(--text-2); border-bottom: 1px solid transparent; transition: color .4s, border-color .4s; }
.cmap__copy:hover { color: var(--ink); border-color: currentColor; }
.cmap__copy.is-done { color: var(--slate); }

/* ---------- Phone / email / social ---------- */
.ccards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); padding-top: clamp(14px, 1.4vw, 20px); }
.ccard { display: flex; flex-direction: column; gap: 10px; min-height: 190px; padding: clamp(20px, 2vw, 30px); border-radius: var(--radius); background: #fff; transition: box-shadow .6s var(--ease); }
a.ccard:hover { box-shadow: 0 22px 50px -32px rgba(20, 28, 45, .5); }
.ccard__k { color: var(--text-3); }
.ccard__v { margin-top: auto; font-family: var(--f-latin); font-weight: 300; font-size: clamp(24px, 2.2vw, 36px); line-height: 1.15; letter-spacing: -.015em; overflow-wrap: anywhere; }
.ccard__go { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--slate); }
.ccard__go .arr { width: 13px; height: 13px; transition: transform .6s var(--ease); }
a.ccard:hover .ccard__go .arr { transform: translateX(4px); }
.ccard__links { margin-top: auto; display: grid; gap: 10px; }
.ccard__links a { display: inline-flex; align-items: center; gap: 8px; width: fit-content; font-size: 18px; font-weight: 500; }
.ccard__links .arr { width: 11px; height: 11px; }

/* ---------- Request form ---------- */
.cform { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; padding-top: var(--sec); padding-bottom: var(--sec); }
.cform__head { grid-column: 1 / span 5; display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 24px); }
.cform__head .marker { display: flex; }
.cform__head .t-body { max-width: 420px; }
.cform__form { grid-column: 7 / span 6; margin-top: 0; position: relative; }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px var(--gap); }
.cform__send { justify-self: start; margin-top: 14px; }
.cform__form .form__ok { inset: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .ccards { grid-template-columns: 1fr 1fr; }
  .ccard--social { grid-column: 1 / -1; min-height: 0; }
  .ccard--social .ccard__links { grid-template-columns: repeat(3, auto); justify-content: start; gap: 10px 28px; }
  .cform__head, .cform__form { grid-column: 1 / -1; }
  .cform__head { position: static; margin-bottom: 26px; }
}
@media (max-width: 760px) {
  .cmap { padding: 0 6px; }
  /* phones: the map, then the office card right below it (not over the map) */
  .cmap__frame { height: calc(var(--vh, 1vh) * 58); min-height: 360px; }
  .cmap__card { position: static; width: 100%; margin-top: 6px; box-shadow: none; }
  .cmap__btns .btn { flex: 1 1 auto; justify-content: center; height: 46px; }
  .cmap__copy { min-height: 44px; }
  .ccards { grid-template-columns: 1fr; gap: 8px; }
  .ccard { min-height: 0; }
  .ccard__v { margin-top: 6px; font-size: 26px; }
  .ccard--social .ccard__links { grid-template-columns: 1fr; }
  .cform__row { grid-template-columns: 1fr; }
  .cform__send { width: 100%; height: 50px; }
}

/* the footer repeats phone, email and address right under this page: here it keeps only its link columns */
body[data-page="contact"] .footer__top { display: none; }
