/* ============================================================
   CONTACT US — shared component
   Used by: index.html, faq.html, about.html — all three link this
   file directly with no page-specific overrides. Markup comes from
   src/_includes/contact.njk (fully generic, no page-specific
   parameters beyond pathPrefix).

   Depends on tokens defined in each page's own :root block:
   --color-cream, --color-red, --font-body, --font-logo,
   --weight-regular, --weight-light, --section-gap.
============================================================ */

#contact {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: var(--color-black);
  color: var(--text-color-inverse);
  padding-block: calc(var(--section-gap) * 0.5);
  /*background: transparent;*/
}

/* Background image layer. object-fit: cover (not fill) — crops safely
   if the image's real proportions don't match the section's rendered
   height, never distorts, never leaves a gap. */
.contact-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 2.2fr 1.6fr;
  grid-template-areas: "left cups right";
  grid-template-rows: 1fr;
  min-height: 380px;
  align-items: end;
  position: relative;
  z-index: 1;
}

/* Cups image — spans both rows, lifts into cream zone */
.contact-cups {
  grid-area: cups;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  align-self: stretch;
  overflow: visible;
  transform: translateY(-40px);
}

.contact-cups img {
  width: 90%;
  height: auto;
  display: block;
  mix-blend-mode: screen;
  position: relative;
  bottom: 0;
}

/* Left column — contact us + enquire */
.contact-left {
  grid-area: left;
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0 0 2.5vw 2.5vw;
}

/* TODO: sizing not finalized yet — clamp() disabled in favor of a fixed
   4rem while this is dialed in across breakpoints; keep fixing. */
.contact-heading {
  font-family: var(--font-logo);
  /*font-size: clamp(2.5rem, 5vw, 5rem);*/
  font-size: 4rem;
  font-weight: 400;
  text-transform: lowercase;
  color: var(--text-color-inverse);
  line-height: 1;
  letter-spacing: -0.01em;
  position: relative;
  display: inline-block;
  width: fit-content;
}

.contact-heading::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background-image: repeating-linear-gradient(to right,
      #a22323 0px,
      #a22323 6px,
      transparent 6px,
      transparent 10px);
}

/* Contact section enquire button override */
.contact-left .nav-enquire {
  padding: 0.7rem 2rem;
  font-size: var(--text-nav);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-nav);
  line-height: 1.4;
  width: fit-content;
  background-color: var(--color-red);
  color: var(--text-color-inverse);
  border: 1px solid var(--color-red);
  transition: background-color 200ms ease, color 200ms ease, filter 200ms ease;
}

.contact-left .nav-enquire:hover {
  /* Was: fades to transparent on hover — backwards from every other
     button on the site (getting LESS visible against this section's
     dark background). Stays filled, darkens via filter: brightness(),
     same value already verified working for .error-cta--primary's red
     hover (this base color, brand red, has non-zero channels, so
     brightness() works fine here — unlike the pure-black WhatsApp CTA
     case). */
  background-color: var(--color-red);
  color: var(--text-color-inverse);
  border: 1px solid var(--color-red);
  filter: brightness(85%);
}

/* Right column — form + details */
.contact-right {
  grid-area: right;
  align-self: end;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0 2.5vw 2.5vw 0;
}

/* Email form */
.contact-form {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.contact-form input {
  flex: 1;
  background: var(--color-red);
  border: none;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: var(--weight-regular);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-color-inverse);
  outline: none;
}

.contact-form input::placeholder {
  /* rgba(246,238,233,0.7) (--text-color-inverse-secondary) measured
     3.92:1 against this input's flat #a22323 background at this
     font-size — fails 4.5:1. 0.85 measured 5.11:1, clearing with a
     real margin while staying visually dimmer than the full-opacity
     typed-text state. One-off value, single consumer — not promoted
     to a token per this session's 2+-consumer bar. */
  color: rgba(246, 238, 233, 0.85);
}

.contact-form button {
  background: var(--color-red);
  border: none;
  padding: 0.85rem 1rem;
  color: var(--text-color-inverse);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(246, 238, 233, 0.2);
  transition: opacity 200ms ease;
}

.contact-form button:hover {
  opacity: 0.8;
}

.contact-form button svg {
  width: 18px;
  height: 12px;
}

.contact-waitlist {
  font-family: var(--font-body);
  font-size: 12px; /*make this 12px*/
  font-weight: var(--weight-regular);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-color-inverse);
  text-align: right;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: right;
  margin-top: 0.5rem;
}

.contact-details a {
  font-family: var(--font-body);
  font-size: 13px;;
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-contact-details);
  color: var(--text-color-inverse);
  text-decoration: none;
  text-transform: uppercase;
  transition: font-weight 200ms ease;
  line-height: 1.7;
}

.contact-details a:hover {
  font-weight: var(--weight-medium);
}

/* -------- TABLET (<=1024px) -------- */
@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1.2fr 1.6fr;
    grid-template-areas:
      "cups cups"
      "left right";
    min-height: 0;
    row-gap: 1.5rem;
  }

  .contact-cups {
    transform: none;
    padding-top: 2.5vw;
  }

  .contact-cups img {
    width: min(82%, 620px);
  }
}

/* -------- MOBILE (<=768px) -------- */
@media (max-width: 768px) {
  #contact {
    padding-block: var(--section-gap);
  }

  .contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "cups"
      "left"
      "right";
    min-height: auto;
    padding-inline: 20px;
    row-gap: 28px;
  }

  .contact-left {
    padding-inline: 2.5vw;
    gap: 1rem;
  }

  .contact-cups {
    transform: none;
    justify-content: center;
  }

  .contact-right {
    padding-inline: 2.5vw;
    align-items: stretch;
  }


}

/* -------- SMALL PHONE (<=480px) -------- */
@media (max-width: 480px) {
  .contact-heading {
    font-size: 4rem;
  }
   .contact-cups img {
    width: 100%;
  }
}
