/* ==========================================================================
   АНКОМ — contacts page
   Four equal cards (call · write · hours · address), then the map across the full width. Only colour/border change on hover (rule 9).
   ========================================================================== */

/* ---------- Contact cards ---------- */
.contacts {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 16px;
  padding-top: 40px;
  padding-bottom: 24px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 28px 28px 26px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.contact-card__title {
  display: flex;
  align-items: baseline; /* + the icon shift below: its centre on the capitals, not on the line box (which holds room for щ, у) */
  gap: 10px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-card__title svg { flex-shrink: 0; color: var(--accent); translate: 0 calc(8px - 0.36em); translate: 0 calc(8px - 0.5cap); }
.contact-card__note { font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); }

/* call: the page's main action */
.contact-card--call { border-color: var(--line-4); }
.contact-card__phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-3xl);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-hi);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.contact-card__phone2 {
  margin-top: -6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.contact-card__phone:hover,
.contact-card__phone2:hover { color: var(--hot); }
.contact-card__action { margin-top: auto; width: 100%; padding: 14px 20px; font-size: var(--fs-md); }

/* write: Viber / Telegram / mail rows (.contact-links — sections.css) */
.contact-card .contact-links + .contact-card__note { margin-top: auto; }

/* hours: today's row lights up (motion.js adds .is-today) */
.hours { display: flex; flex-direction: column; margin: 0; }
.hours__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.hours__row:first-child { border-top: 1px solid var(--line); }
.hours__row dt { display: flex; align-items: center; gap: 10px; font-size: var(--fs-md); color: var(--text-3); }
/* indicator lights: one per row, today's glows */
.hours__row dt::before { content: ''; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--line-4); }
.hours__row.is-today dt::before { background: var(--hot); box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.18); }
.hours__row dd { margin: 0; font-family: var(--font-mono); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.hours__row.is-today dt,
.hours__row.is-today dd { color: var(--text-hi); }
.contact-card .hours + .open-status { margin-top: auto; padding-top: 4px; }

/* address */
.contact-card__address { font-style: normal; font-size: var(--fs-base); line-height: 1.6; color: var(--text); }
.contact-card__link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  align-self: flex-start;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
.contact-card__link svg { flex-shrink: 0; translate: 0 calc(6px - 0.5ex); } /* = .reach__route: centred on the lowercase */
.contact-card__link path { transform-origin: 50% 50%; transition: rotate 0.35s cubic-bezier(0.45, 0, 0.2, 1); }
.contact-card__link:hover { color: var(--hot); }
@media (hover: hover) and (pointer: fine) {
  .contact-card__link:hover path { rotate: 45deg; }
}
.contact-card__link + .contact-card__note { margin-top: auto; }

/* ---------- Map ----------
   The embed's zoom steps with the box height only (up to ~460 px one level out, ~600–860 px the desktop level),
   so the box has a fixed height per regime and each still is shot for it (docs/tools/map-shot.mjs). */
.visit { padding-top: 0; padding-bottom: var(--section-y); }
.visit__map { position: relative; display: flex; height: 660px; padding: 0; }
.visit__map-box {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: repeating-linear-gradient(135deg, var(--bg-3), var(--bg-3) 12px, var(--stripe) 12px, var(--stripe) 24px);
}
/* a still of the same embed shows at once, 1:1 and centred like the live map (docs/tools/map-shot.mjs);
   the live Google map loads in the background and fades in over it (common.js) */
.visit__map-shot img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1600px; /* ≥ the widest box (container 1600 − gutters) */
  max-width: none;
  height: 860px;
  margin: -430px 0 0 -800px;
  filter: grayscale(1) invert(0.92) contrast(0.9);
}
html.js .visit__map-box { cursor: progress; } /* the still is not the map yet */
html.js .visit__map-box iframe { opacity: 0; pointer-events: none; transition: opacity 0.8s var(--ease-out); } /* no dragging an invisible map */
html.js .visit__map-box iframe.is-in { opacity: 1; pointer-events: auto; }
/* "loading" plate in the middle of the still until the live map fades in; the three dots light up in turn.
   After 15 s without the map it offers Google Maps itself (common.js) */
.visit__loading {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: max-content; /* left: 50% alone would shrink it to half the box and wrap the text */
  max-width: calc(100% - 40px);
  padding: 13px 20px;
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  text-align: center;
  text-transform: uppercase;
  color: var(--text-hi);
  background: var(--bg);
  border: 1px solid var(--line-3);
  transform: translate(-50%, -50%);
  transition: opacity 0.4s var(--ease-out);
}
.visit__dots { display: inline-block; width: 3ch; text-align: left; } /* fixed width: the text doesn't shift */
.visit__dots span { animation: map-dot 1.2s ease-in-out infinite; }
.visit__dots span:nth-child(2) { animation-delay: 0.2s; }
.visit__dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes map-dot { 0%, 80%, 100% { opacity: 0.15; } 40% { opacity: 1; } }
.visit__loading a { color: var(--accent); cursor: pointer; }
.visit__loading.is-done { opacity: 0; pointer-events: none; }
html:not(.js) .visit__loading { display: none; }
.visit__map-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) invert(0.92) contrast(0.9);
}
.visit__tag {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 1;
  padding: 7px 11px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  color: var(--text-hi);
  background: var(--bg);
  border: 1px solid var(--line-3);
  pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1279.98px) {
  .contacts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1023.98px) {
  .visit__map-shot img { width: 1000px; height: 440px; margin: -220px 0 0 -500px; } /* the low-box shot: the embed zooms out below ~460 px */
  .visit__map { height: 380px; }
}
@media (max-width: 767.98px) {
  .contacts { grid-template-columns: 1fr; gap: 12px; padding-top: 28px; padding-bottom: 12px; }
  .contact-card { padding: 22px 20px; }
  .visit__map { height: 320px; }
  .visit__tag { left: 20px; bottom: 20px; }
  .visit__loading { padding: 11px 16px; font-size: var(--fs-sm); }
}
