/* Contact — the owner's layout (6 October 2026): one short centred page. The title; the inquiry
   with its one line of explanation and its button; then, over a hairline, WhatsApp and
   the email in that order, each a button with its number or address under it. "Enquire now" opens the five homes as cards
   (components/shared/InquiryPicker.tsx), styled at the end of this sheet.

   Palette: the site's own (theme.css). This sheet is linked only on /contact/; elsewhere it is
   held out of the cascade with media="not all". */

.contact {
  --contact-heading: var(--color-ink);
  --contact-line: var(--color-line);

  padding: clamp(3rem, 1.6rem + 4.4vw, 6.5rem) var(--gutter) var(--space-prefooter);
  text-align: center;
  color: var(--color-ink);
}

/* The small tracked labels over the two sections: the site's label */
.contact-label {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-label);
}

.contact-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-h1);
  line-height: 1;
  letter-spacing: var(--display-tracking);
  text-wrap: balance;
  color: var(--contact-heading);
}

/* ---------- The inquiry ---------- */
.contact-inquiry {
  margin-top: clamp(2.5rem, 1.8rem + 2.4vw, 4rem);
}

.contact-inquiry__text {
  max-width: 36em;
  margin: var(--space-xs) auto 0;
  font-size: var(--text-body);
  line-height: 1.6;
  text-wrap: pretty;
  color: var(--color-ink-soft);
}

/* The site's own button. A <button> rather than a link, since it opens a dialog, so it drops
   the browser's raised border, as the inquiry form's Submit does. */
.contact-inquiry__cta {
  min-width: 14rem;
  margin-top: var(--space-l);
  border: 0;
  cursor: pointer;
}

/* ---------- The other two ways ---------- */
.contact-direct {
  max-width: 58rem;
  margin: clamp(3rem, 2rem + 3vw, 5rem) auto 0;
  padding-top: clamp(2rem, 1.6rem + 1.4vw, 3rem);
  border-top: 1px solid var(--contact-line);
}

.contact-direct__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-l) clamp(2rem, 0.5rem + 4vw, 5rem);
  margin-top: var(--space-m);
}

.contact-direct__way {
  display: grid;
  justify-items: center;
  gap: var(--space-xs);
}

/* One width for the two, so the row reads as a set stepping down from filled to drawn: at least
   14rem, and in a language where one label runs longer, both take its width (equal grid columns,
   the row as wide as its content) */
.contact-direct__way .btn {
  width: 100%;
  min-width: 14rem;
}

@media not all and (max-width: 52rem) {
  .contact-direct__list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    width: fit-content;
    margin-inline: auto;
  }
}

.contact-direct__detail {
  font-size: var(--text-small);
  font-variant-numeric: lining-nums;
  color: var(--color-ink-soft);
}

/* The number or address goes where its button does. It keeps the caption's look and takes the
   footer's line on hover, drawn in from the left. */
.contact-direct__detail a {
  padding-bottom: 0.2em;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  text-decoration: none;
  transition: background-size 0.4s var(--ease-out);
}

.contact-direct__detail a:hover,
.contact-direct__detail a:focus-visible {
  background-size: 100% 1px;
}

/* ---------- Where you can also find us (components/shared/FindUs.tsx) ----------
   Last, over a hairline of its own, set out as the ways above it are: the label, then the two
   cards */
.contact-find {
  max-width: 58rem;
  margin: clamp(3rem, 2rem + 3vw, 5rem) auto 0;
  padding-top: clamp(2rem, 1.6rem + 1.4vw, 3rem);
  border-top: 1px solid var(--contact-line);
}

/* A phone keeps the two side by side across the page, as the homepage's closing pair does
   (components.css; Danylo, 5 November 2026: they stacked until then). Each way is a subgrid of the
   pair's two rows, so both buttons are one height and the number and the address start on one
   line. */
@media (max-width: 40rem) {
  .contact-direct__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    column-gap: var(--pair-gap);
    row-gap: 0;
    width: min(100%, 30rem);
    margin-inline: auto;
  }

  .contact-direct__way {
    grid-row: 1 / span 2;
    grid-template-rows: subgrid;
    row-gap: 0.5rem;
  }

  .contact-direct__way .btn {
    min-width: 0;
    min-height: 2.75rem;
    padding-inline: var(--pair-pad);
    white-space: normal;
    text-wrap: balance;
    line-height: 1.3;
  }

  .contact-direct__detail {
    font-size: var(--pair-note);
    line-height: 1.4;
    text-align: center;
  }
}

/* ---------- The five homes (the dialog "Enquire now" opens) ----------
   The shared dialog shell, wide enough for the five side by side. Each card is the Stays row
   folded down: the photograph, the name, the place and three counts, then the button. */
.modal--homes {
  --modal-width: 80rem;
}

.home-picker__title {
  padding-inline: 2.5rem;
  text-align: center;
  text-wrap: balance;
}

.home-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-l) clamp(1rem, 0.6rem + 1vw, 1.75rem);
  margin-top: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
}

.home-pick {
  display: grid;
  grid-template-rows: auto 1fr;
  cursor: pointer;
}

.home-pick__media {
  overflow: hidden;
  border-radius: 2px;
  background: var(--color-media);
}

.home-pick__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: var(--pick-focal, center);
  transition: transform 0.9s var(--ease-out);
}

.home-pick:hover .home-pick__photo {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .home-pick:hover .home-pick__photo {
    transform: none;
  }
}

/* Where each photograph is cut, from the owner's crops (crop tool, jobs contact-pick-*, 6 October
   2026): the upright frame here, the square one on a phone below. Position = x / (1 - w). */
.home-pick--beach-house {
  --pick-focal: 50% 0%;
}

.home-pick--mare-nostrum {
  --pick-focal: 27.1% 50%;
}

.home-pick--domus-aenaria {
  --pick-focal: 45.7% 50%;
}

.home-pick--casa-al-mulino {
  --pick-focal: 7.6% 50%;
}

.home-pick--isclana-house {
  --pick-focal: 40.5% 50%;
}

@media (max-width: 40rem) {
  .home-pick--beach-house {
    --pick-focal: 50% 61.1%;
  }

  .home-pick--mare-nostrum {
    --pick-focal: 25.8% 50%;
  }

  .home-pick--domus-aenaria {
    --pick-focal: 50.9% 50%;
  }

  .home-pick--casa-al-mulino {
    --pick-focal: 9.3% 50%;
  }

  .home-pick--isclana-house {
    --pick-focal: 39% 50%;
  }
}

.home-pick__body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: start;
  padding-top: var(--space-s);
  text-align: left;
}

.home-pick__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-h4);
  line-height: 1.1;
  letter-spacing: var(--display-tracking);
  color: var(--modal-heading);
}

.home-pick__place {
  margin-top: 0.4rem;
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-label);
}

.home-pick__facts {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  margin-top: 0.8rem;
  font-size: var(--text-small);
  color: var(--modal-ink);
}

.home-pick__facts li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.home-pick__facts .fact-line {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.home-pick__fact-icon {
  flex: none;
  width: 1.35em;
  height: 1.35em;
  margin-left: -0.12em;
  color: var(--color-cta);
}

/* The site's own button, as on the page: only the border a <button> brings is taken off */
.home-pick__cta {
  justify-self: stretch;
  margin-top: var(--space-m);
  border: 0;
  cursor: pointer;
}

/* Three across, the last two centred under them on six half-tracks */
@media (max-width: 64rem) {
  .home-picker {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .home-pick {
    grid-column: span 2;
  }

  .home-pick:nth-child(4) {
    grid-column: 2 / span 2;
  }
}

/* A phone: one home per row, a square photograph beside its name and counts */
@media (max-width: 40rem) {
  .home-picker {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .home-pick,
  .home-pick:nth-child(4) {
    grid-column: auto;
    grid-template-rows: none;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: var(--space-s);
    align-items: start;
    padding-block: var(--space-s);
  }

  .home-pick + .home-pick {
    border-top: 1px solid var(--inq-rule, var(--color-line));
  }

  .home-pick__photo {
    aspect-ratio: 1;
  }

  .home-pick__body {
    padding-top: 0;
  }

  .home-pick__facts {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.25rem 0.9rem;
    margin-top: 0.55rem;
  }

  .home-pick__cta {
    justify-self: start;
    margin-top: var(--space-xs);
  }
}
