/* ==========================================================================
   sections/contact.css — the contact page. The whole page is the CTA: a
   compact hero with the phone front and centre, a details column beside the
   request form, then directions. Clarity over creativity by design.
   ========================================================================== */

/* --- Hero: the phone, front and centre, over a faded shopfront --------- */
.contact-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--paper);
  border-bottom: 1px solid var(--paper-edge);
  text-align: center;
}

/* The outside of the shop, sat well back behind a paper wash so the type and
   the greeting card stay legible on top. */
.contact-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to bottom, rgba(251, 248, 245, 0.89), rgba(251, 248, 245, 0.94)),
    url('../../images/storefront-flatbed-hero.webp');
  background-size: cover;
  background-position: center 58%;
}

.contact-hero .page-width {
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}

.contact-hero .eyebrow { color: var(--red-ink); }

.contact-hero h1 {
  font-size: var(--step-4);
  margin-top: var(--sp-3);
  text-wrap: balance;
}

.contact-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--red);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.contact-phone:hover { color: var(--red-deep); }

.contact-phone svg {
  width: 0.82em;
  height: 0.82em;
  flex: none;
  transform-origin: center;
}

.contact-phone:hover svg { animation: phone-ring 0.6s var(--ease); }

@keyframes phone-ring {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-15deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-phone:hover svg { animation: none; }
}

.contact-hero__lead {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  color: var(--ink-soft);
  font-size: var(--step-0);
}

/* Steven's greeting, framed like a spoken line with his (placeholder) photo */
.greeting-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  max-width: 560px;
  margin: clamp(1.25rem, 2.5vw, 1.75rem) auto 0;
  padding: var(--sp-3) var(--sp-5) var(--sp-3) var(--sp-3);
  text-align: left;
  background: var(--white);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.greeting-card__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--paper-edge);
  background: var(--paper-tint);
  color: var(--ink-mute);
}

.greeting-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.greeting-card__avatar svg { width: 28px; height: 28px; }

.greeting-card__quote {
  color: var(--ink);
  font-style: italic;
  line-height: 1.5;
}

.greeting-card__name {
  margin-top: var(--sp-2);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-ink);
}

/* --- Main: details beside the request form ----------------------------- */
.contact {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--white);
  border-bottom: 1px solid var(--paper-edge);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.contact__details { margin: 0; }

.detail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 var(--sp-4);
  padding-block: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--paper-edge);
}

.contact__details .detail:first-child {
  border-top: 0;
  padding-top: 0;
}

.detail__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  grid-row: span 2;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
}

.detail__icon svg { width: 22px; height: 22px; }

.detail h3 {
  align-self: center;
  font-family: var(--font-display);
  font-size: var(--step-1);
}

.detail__body {
  grid-column: 2;
  margin-top: var(--sp-2);
  color: var(--ink-soft);
  font-size: var(--step--1);
  line-height: 1.6;
}

.detail__body strong { color: var(--ink); font-weight: 600; }
.detail__body a { color: var(--red-ink); font-weight: 600; }

/* The form card is lighter here than in the dark closing band */
.contact .request-card {
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--paper-edge);
}

/* --- Getting here: one plain paragraph, then the map placeholder -------- */
.getting-here {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--paper-tint);
}

.getting-here__lede {
  max-width: 62ch;
  margin-top: var(--sp-3);
  color: var(--ink-soft);
  font-size: var(--step-0);
  line-height: 1.65;
}

/* Same full-window-minus-gutter width as the parts-counter photo */
.contact-map {
  margin-top: clamp(2rem, 4vw, 3rem);
  margin-inline: calc(50% - 50vw + var(--gutter));
  aspect-ratio: 21 / 8;
  min-height: 280px;
}

@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; gap: clamp(2.5rem, 6vw, 3.5rem); }
  .contact-map { aspect-ratio: 3 / 2; }
}

/* Below 420px the 3/2 ratio and the 280px floor would force the map wider than
   the screen. Both agree on 280px at 420px, so the switch is seamless. */
@media (max-width: 420px) {
  .contact-map { aspect-ratio: auto; height: 280px; }
}
