/**
 * contact-page.css
 * Contact page (2026 refresh). Replaces contact.css.
 * Library: plannera/contact-page, attached from node--contact-page.html.twig.
 * Desktop-first; breakpoints 992 / 768 (max-width).
 */

/* ---------- Page ---------- */

.contact-page {
  background: linear-gradient(51deg, #f2edea 0%, #f4f4fc 99%);
  padding-top: calc(var(--header-height, 72px) + 5rem);
  padding-bottom: clamp(64px, calc(64px + (120 - 64) * (100vw - 414px) / (1920 - 414)), 120px);
}

/* ---------- Header: text + image ---------- */

.contact-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 40fr);
  grid-template-areas: "text media";
  column-gap: 9%;
  align-items: center;
}

.contact-header__text {
  grid-area: text;
  position: relative;
  z-index: 1;
}

.contact-header__media {
  grid-area: media;
}

.contact-header__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 8;
  object-fit: cover;
  border-radius: 16px;
}

.contact-header__label {
  margin: 0 0 clamp(8px, calc(8px + (20 - 8) * (100vw - 414px) / (1920 - 414)), 20px);
  font-size: clamp(16px, calc(16px + (24 - 16) * (100vw - 414px) / (1920 - 414)), 24px);
  font-weight: 500;
  line-height: 1.33;
  color: #24125f;
}

.contact-header__title {
  margin: 0;
  font-size: clamp(40px, calc(40px + (64 - 40) * (100vw - 414px) / (1920 - 414)), 64px);
  font-weight: 300;
  line-height: 1.22;
  color: #24125f;
}

/* Two-colour divider under the heading */
.contact-header__bars {
  display: flex;
  gap: 10px;
  margin: clamp(28px, calc(28px + (56 - 28) * (100vw - 414px) / (1920 - 414)), 56px) 0
          clamp(24px, calc(24px + (40 - 24) * (100vw - 414px) / (1920 - 414)), 40px);
}

.contact-header__bars::before,
.contact-header__bars::after {
  content: "";
  height: 6px;
  border-radius: 3px;
}

.contact-header__bars::before {
  width: 74px;
  background: #9d92e3;
}

.contact-header__bars::after {
  width: 24px;
  background: #ffb25b;
}

.contact-header__intro, 
.contact-header__intro p {
  font-size: clamp(20px, calc(20px + (32 - 20) * (100vw - 414px) / (1920 - 414)), 32px);
  font-weight: 300;
  line-height: 1.5;
  color: #24125f;
}

.contact-header__intro .field--name-body {
  font-family: 'Merriweather', serif;
}

.contact-header__intro p:last-child {
  margin-bottom: 0;
}

/* Decorative squares (orange + mint), aligned to the top of the header */
.contact-header__squares {
  position: relative;
  margin-left: auto;   /* right edge of the text column, in any layout */
  margin-bottom: 1rem; /* space above the label; tune to the design */
}

@media (max-width: 992px) {
  .contact-header__squares {
    margin-bottom: -0.5rem; /* the column gap is 1.5rem here */
  }
}

@media (max-width: 768px) {
  .contact-header__squares {
    display: none;
  }
}

/* ---------- Notice ---------- */

.contact-notice {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: clamp(50px, calc(50px + (75 - 50) * (100vw - 414px) / (1920 - 414)), 75px);
  padding: 26px 24px;
  background: #fdf7ec;
  border-radius: 16px;
}

.contact-notice__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  color: #d1b27e;
  font-size: 18px;
}

.contact-notice__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: #242935;
}

.contact-notice__message {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #242935;
}

.contact-notice__message p {
  margin: 0;
}

.contact-notice__message a {
  color: #7e61de;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Cards ---------- */

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, calc(16px + (34 - 16) * (100vw - 414px) / (1920 - 414)), 34px);
  margin: 50px 0 0;
  padding: 0;
  list-style: none;
}

.contact-card {
  position: relative; /* anchors .stretched-link */
  display: flex;
  flex-direction: column;
  min-height: clamp(370px, calc(370px + (474 - 370) * (100vw - 414px) / (1920 - 414)), 474px);
  padding: clamp(24px, calc(24px + (42 - 24) * (100vw - 414px) / (1920 - 414)), 42px);
  background: #fff;
  border: 1px solid #ececf4;
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
  border-color: #7e61de;
}

.contact-card:has(.stretched-link:focus-visible) {
  outline: 2px solid #7e61de;
  outline-offset: 3px;
}

.contact-card .stretched-link:focus-visible {
  outline: none;
}

/* Icon tile; colours alternate lavender / peach */
.contact-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(72px, calc(72px + (110 - 72) * (100vw - 414px) / (1920 - 414)), 110px);
  aspect-ratio: 1;
  border-radius: 4px;
  background: #e8e5fd;
  color: #7e61de;
  font-size: clamp(24px, calc(24px + (36 - 24) * (100vw - 414px) / (1920 - 414)), 36px);
}

.contact-card:nth-child(even) .contact-card__icon {
  background: #f5e2c4;
  color: #b9844a;
}

/* Image instead of icon (field_cc_image); beats the even-card colour rule */
.contact-card .contact-card__icon.contact-card__icon--image {
  overflow: hidden;
  background: #ecf5ff;
  padding: 20px;
}

.contact-card__icon--image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* logos: fit the whole image inside the tile */
}

.contact-card__title {
  margin: clamp(24px, calc(24px + (42 - 24) * (100vw - 414px) / (1920 - 414)), 42px) 0
          clamp(12px, calc(12px + (20 - 12) * (100vw - 414px) / (1920 - 414)), 20px);
  font-size: clamp(22px, calc(22px + (28 - 22) * (100vw - 414px) / (1920 - 414)), 28px);
  font-weight: 500;
  line-height: 1.25;
  color: #242935;
}

.contact-card__title a {
  color: inherit;
  text-decoration: none;
}

.contact-card__text {
  margin-bottom: 24px;
  font-size: clamp(16px, calc(16px + (18 - 16) * (100vw - 414px) / (1920 - 414)), 18px);
  font-weight: 300;
  line-height: 1.65;
  color: #242935;
}

.contact-card__text p:last-child {
  margin-bottom: 0;
}

.contact-card .contact-card__arrow {
  margin-top: auto;
  align-self: flex-end;
  font-size: clamp(28px, calc(28px + (50 - 28) * (100vw - 414px) / (1920 - 414)), 50px);
}

/* ---------- 992 design ---------- */

@media (max-width: 992px) {
  .contact-page {
    padding-top: calc(var(--header-height, 72px) + 3rem);
  }

  /* Text is taller than the image here, so keep the squares in the column gap */
  .contact-header__decor::before {
    left: 48%;
  }

  .contact-header__decor::after {
    left: 54%;
  }

  .contact-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- 768 / 414 designs ---------- */

@media (max-width: 768px) {
  .contact-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "text"
      "media";
    row-gap: 72px;
  }

  .contact-header__decor::before {
    top: -10px;
    left: 69%;
  }

  .contact-header__decor::after {
    top: 40px;
    left: 79%;
  }

  .contact-header__bars::before {
    width: 52px;
    height: 5px;
  }

  .contact-header__bars::after {
    width: 16px;
    height: 5px;
  }

  .contact-notice {
    align-items: flex-start;
    padding: 28px 24px;
  }

  .contact-notice__icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .contact-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
