/* Contact: its parts placed and sized with the tokens of system.css (the shared parts are in components.css). */

/* ---------- 1. the header, the call first: the call card over an own roof, its phone ringing three times as the page
   opens; the whole form beside it ---------- */
.contact-hero { padding-block: clamp(2.5rem, 5vw, 4.5rem) var(--section-y); }
.contact-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 470px); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact-hero__title { font-size: clamp(2.4rem, 1.4rem + 2.8vw, 3.8rem); line-height: 1.02; color: var(--c-brand); text-wrap: balance; }
.contact-hero__line { margin-top: var(--space-3); max-width: 34rem; font-size: var(--fs-lead); line-height: 1.45; color: var(--c-ink-soft); }
.ring { position: relative; max-width: 560px; margin-top: var(--space-5); }
.ring__photo .gable__media { aspect-ratio: 16 / 9; box-shadow: var(--shadow-l); }
.ring__photo .gable__media > img { object-position: 50% 42%; }
.ring__call { position: absolute; z-index: 5; left: 6%; right: 6%; bottom: -1.8rem; display: flex; align-items: center; gap: 1.1rem; padding: 1rem 1.3rem; text-decoration: none; transition: transform var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .ring__call:hover { transform: translateY(-3px); } }
.ring__call:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 4px; }
.ring__icon { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--c-accent); color: var(--c-on-accent); }
.ring__icon .icon { position: relative; z-index: 1; width: 30px; height: 30px; animation: ring-shake 1.3s var(--ease-out) 700ms 3; }
.ring__icon i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c-accent); opacity: 0; animation: ring-wave 1.3s var(--ease-out) 700ms 3; }
.ring__icon i + i { animation-delay: 1000ms; }
@keyframes ring-wave { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes ring-shake { 0%, 50%, 100% { rotate: 0deg; } 10% { rotate: -14deg; } 20% { rotate: 12deg; } 30% { rotate: -10deg; } 40% { rotate: 8deg; } }
.ring__words { display: grid; gap: 0.15rem; min-width: 0; }
.ring__words small { font: 600 var(--fs-small)/1.2 var(--font-ui); color: var(--c-on-ink-soft); }
.ring__words b { font: 800 clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem)/1.05 var(--font-display); color: var(--c-paper); white-space: nowrap; }
.ring__words span { font-size: var(--fs-small); color: var(--c-on-ink-soft); }
.contact-hero__more { margin-top: calc(var(--space-5) + 1.8rem); align-items: center; }
.contact-hero__mail { display: inline-flex; align-items: center; gap: 0.5rem; }
.contact-hero__mail .icon { width: 1.1em; height: 1.1em; }
@media (max-width: 960px) {
  .contact-hero__grid { grid-template-columns: 1fr; }
  .contact-hero__form { max-width: 560px; }
}
@media (max-width: 520px) {
  .ring__call { left: 3%; right: 3%; gap: 0.8rem; padding: 0.8rem 1rem; }
  .ring__icon { width: 52px; height: 52px; }
  .ring__icon .icon { width: 26px; height: 26px; }
  .ring__words b { font-size: 1.6rem; }
}

/* ---------- 3. the office on 73rd Street: every way to reach it, and its map ---------- */
.office__grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.office__ways { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; gap: 0.6rem; }
.office__way { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 0.95rem; align-items: center; padding: 0.8rem 1rem; border-radius: var(--radius-m); background: var(--c-card); box-shadow: inset 0 0 0 1px var(--c-line); color: var(--c-ink); text-decoration: none; transition: box-shadow var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .office__way:hover { box-shadow: inset 0 0 0 2px var(--c-accent); } }
.office__way:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.office__ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c-brand); color: var(--c-accent); }
.office__ico .icon { width: 21px; height: 21px; }
.office__words { display: grid; gap: 0.1rem; min-width: 0; }
.office__words b { font: 700 1.08rem/1.25 var(--font-display); overflow-wrap: anywhere; }
.office__words span { font-size: var(--fs-small); color: var(--c-ink-soft); }
.office__map .gable__media { aspect-ratio: 4 / 3; box-shadow: var(--shadow-l); background: #e8e4da; }
.office__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* its focus: a ring round the whole frame (the gable's clip would cut one drawn on the map itself) and one inside it */
.office__map { border-radius: var(--radius-l); }
.office__map:focus-within { outline: 3px solid var(--c-accent); outline-offset: 6px; }
.office__map iframe:focus { outline: 4px solid var(--c-accent); outline-offset: -4px; }
@media (max-width: 900px) { .office__grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .ring__icon .icon, .ring__icon i { animation: none; }
  .ring__call, .office__way { transition: none; }
}
