/* contacts: стили contacts. */

button {
  cursor: none !important;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-strong);
  border: 1px solid var(--border-strong);
}
.contact-card {
  position: relative;
  min-width: 0;
  background: var(--bg);
  padding: clamp(22px, 3vh, 34px);
  overflow: hidden;
}
.contact-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 3px;
  background: var(--accent);
  transition: width 0.35s ease;
}
.contact-card:hover::before {
  width: 100%;
}
.contact-card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border: 1.5px solid var(--border-strong);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}
.company-outline-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 16px 28px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
}
.company-outline-button:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.contact-card {
  min-height: 350px;
}
.contact-card h3 {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  text-align: left;
  color: var(--text);
  font-family: var(--font-body);
}
.contact-item span {
  min-width: 0;
}
.contact-item b {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}
.contact-item small {
  display: block;
  margin-top: 3px;
  color: var(--text-dim);
}
.contact-item i {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}
.contact-item:hover i,
.contact-item.is-copied i {
  opacity: 1;
}
.contact-address {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-dim);
}
.contact-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.contact-card-actions button,
.contact-card-actions a {
  padding: 9px 13px;
  border: 1px solid var(--border-strong);
  background: none;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.contact-card-actions button,
.contact-card-actions a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px;
  padding: 12px 18px !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.contact-card-actions button:hover,
.contact-card-actions a:hover,
.contact-card-actions button:focus-visible,
.contact-card-actions a:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}
.contact-card-actions button:focus-visible,
.contact-card-actions a:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
}
.map-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.7fr) minmax(520px, 1.3fr);
  gap: clamp(45px, 6vw, 90px);
  align-items: center;
}
.map-copy .company-heading {
  margin-bottom: 28px;
}
.map-copy .btn-ghost {
  margin-top: 28px;
}
.map-frame {
  height: min(62vh, 590px);
  padding: 12px;
  border: 1px solid var(--border-strong);
  background: #fff;
  box-shadow: 0 20px 60px rgba(13, 122, 120, 0.1);
}
.map-embed {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg3);
}
.contact-cta-actions {
  position: relative;
  display: flex;
  gap: 14px;
}
@media (max-height: 820px) {
  .contact-card {
    padding: 20px 24px;
    min-height: 310px;
  }
  .map-frame {
    height: 57vh;
  }
}


.contact-card-icon img {
  display: block;
  width: 30px;
  height: 30px;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* CONTACT ENVELOPE START — one shared timeline keeps paper, flap and seal in sync. */
.contact-mark {
  height: clamp(350px, 62vh, 600px);
  min-height: 0;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
.contact-mail {
  --mail-duration: 7s;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  font-family: var(--font-body), sans-serif;
}
.contact-mark.reveal { transform: none; transition-property: opacity; }
.contact-mark.visible .contact-mail { visibility: visible; }

/* The SVG group is centered permanently, before the first frame. */
.mail-letter { animation: mail-letter var(--mail-duration) cubic-bezier(.45, 0, .2, 1) both; }
.mail-flap-open, .mail-flap-closed { transform-origin: 240px 170px; }
.mail-flap-open { animation: mail-open var(--mail-duration) ease-in both; }
.mail-flap-closed { transform: scaleY(0); animation: mail-close var(--mail-duration) ease-out both; }
.mail-seal { opacity: 0; animation: mail-seal var(--mail-duration) ease-out both; }
.mail-stamp-ring { opacity: 0; animation: mail-stamp-ring var(--mail-duration) ease-out both; }
.mail-envelope-body { transform-origin: 240px 278px; animation: mail-press var(--mail-duration) ease-out both; }
/* The existing reveal observer starts this sequence on the first appearance. */
.contact-mark:not(.visible) .contact-mail * { animation-play-state: paused; }
@keyframes mail-letter {
  0%, 15% { transform: translateY(0); }
  46%, 100% { transform: translateY(135px); }
}
@keyframes mail-open {
  0%, 49% { transform: scaleY(1); }
  56%, 100% { transform: scaleY(0); }
}
@keyframes mail-close {
  0%, 56% { transform: scaleY(0); }
  64%, 100% { transform: scaleY(1); }
}
@keyframes mail-seal {
  0%, 67% { opacity: 0; transform: translateY(-26px) scale(1.45); }
  71% { opacity: 1; transform: translateY(0) scale(.9); }
  74% { opacity: 1; transform: translateY(0) scale(1.04); }
  77%, 100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes mail-stamp-ring {
  0%, 70% { opacity: 0; transform: scale(.8); }
  71% { opacity: .6; transform: scale(.85); }
  80%, 100% { opacity: 0; transform: scale(1.7); }
}
@keyframes mail-press {
  0%, 69%, 76%, 100% { transform: translateY(0) scale(1); }
  71% { transform: translateY(3px) scale(.992); }
}
@media (prefers-reduced-motion: reduce) {
  .contact-mail * { animation: none !important; }
  .mail-letter { transform: translateY(135px); }
  .mail-flap-open { transform: scaleY(0); }
  .mail-flap-closed { transform: scaleY(1); }
  .mail-seal { opacity: 1; }
}
/* CONTACT ENVELOPE END */

/* CONTACT FONT LOADING START */
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/golos-text-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/golos-text-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/unbounded-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* CONTACT FONT LOADING END */

/* Contacts: section labels and stacked introduction. */
.contacts-page #ways .section-label::after,
.contacts-page #map .section-label::after,
.contacts-page #question .section-label::after {
  content: none;
}
.contacts-page #ways .section-label::before,
.contacts-page #map .section-label::before {
  content: "";
  flex: 0 0 38px;
  width: 38px;
  height: 2px;
  background: var(--accent);
}
.contacts-page #ways .company-section-head {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 2vh, 22px);
  align-items: start;
}
.contacts-page #ways .company-intro {
  max-width: 900px;
}

.desktop-only-break { display: none; }

  .desktop-only-break { display: block; }
  html:has(body.contacts-page) { scroll-snap-type: none; }

/* Резервируем ширину обеих надписей: соседняя ссылка не сдвигается. */
.contacts-page .contact-card-actions > .copy-value {
  display: inline-grid !important;
  grid-template-areas: "copy-label";
  grid-template-columns: max-content;
}
.contacts-page .contact-card-actions > .copy-value > i,
.contacts-page .contact-card-actions > .copy-value::after {
  grid-area: copy-label;
  font-style: normal;
}
.contacts-page .contact-card-actions > .copy-value::after {
  content: "Скопировано";
  visibility: hidden;
  pointer-events: none;
}

/* An SVG handset avoids platform-specific emoji rendering. */
.contacts-page .cta-icon svg { display: block; width: 30px; height: 30px; color: #fff; }
