/* Contact — Editorial Image Composition + Split Background */

.contact {
  position: relative;
  background: var(--paper);
  overflow: visible;
}

/* Full-height split behind the whole contact page */
.contact-split {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.contact-split-light {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, var(--blue-light) 20%, var(--paper) 62%, var(--paper-blue) 100%);
}

.contact-split-dark {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(48vw, 720px);
  background: var(--ink);
  clip-path: polygon(26% 0, 100% 0, 100% 100%, 4% 100%);
}

/* Image runs from hero content down to the section end */
.contact-media {
  position: absolute;
  top: clamp(168px, 18vw, 248px);
  right: max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
  bottom: 0;
  z-index: 1;
  width: min(42vw, calc((var(--max) - 2 * var(--pad)) * .47));
  margin: 0;
}

.contact-media-placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  background:
    linear-gradient(145deg, rgba(232, 242, 251, .92) 0%, rgba(212, 231, 248, .55) 48%, rgba(79, 112, 148, .28) 100%);
  border: 1px solid rgba(255, 255, 255, .22);
}

/* —— Hero —— */
.contact-hero {
  position: relative;
  z-index: 2;
  padding-top: clamp(128px, 15vw, 172px);
  padding-bottom: clamp(72px, 9vw, 120px);
  overflow: visible;
}

.contact-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
}

.contact-compose {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, .95fr);
  grid-template-areas:
    "title ."
    "lead  .";
  column-gap: clamp(28px, 5vw, 72px);
  row-gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.contact-compose h2 {
  grid-area: title;
  position: relative;
  z-index: 2;
  max-width: 11em;
  margin: 0;
  margin-right: clamp(-40px, -4vw, -12px);
  font-size: clamp(40px, 5.8vw, 76px);
  font-weight: 300;
  line-height: .98;
  letter-spacing: -.055em;
}

.contact-compose h2 em {
  color: var(--blue-dark);
  font-style: normal;
  font-weight: 300;
}

.contact-lead {
  grid-area: lead;
  position: relative;
  z-index: 2;
  max-width: 34em;
  margin: 0;
  margin-top: 28px;
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.55;
}

/* —— Form panel: left-aligned, overlaps hero / media —— */
.contact-panel {
  position: relative;
  z-index: 4;
  max-width: var(--max);
  padding-top: 0;
  padding-bottom: clamp(88px, 11vw, 148px);
  background: transparent;
  border-top: 0;
}

.contact-form {
  width: 85%;
  max-width: 100%;
  margin: 0;
  padding: clamp(32px, 4vw, 56px);
  background: linear-gradient(165deg, var(--blue-light) 0%, var(--paper-blue) 100%);
  border: 3px solid rgba(59, 130, 196, .18);
  border-radius: 15px;
  box-shadow: 0 20px 48px rgba(10, 39, 72, .1);
}

.contact-form label {
  display: block;
  color: var(--blue-dark);
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(20px, 3vw, 40px);
}

.field {
  margin-bottom: 0;
  padding: clamp(22px, 2.8vw, 32px) 0;
  border-bottom: 0;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 12px;
  padding: 6px 0 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  min-height: 48px;
  height: 48px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: -.02em;
  text-transform: none;
  resize: none;
  transition: color .25s ease, border-color .25s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  color: var(--blue-dark);
  border-bottom-color: var(--ink);
}

.contact-form input.is-invalid,
.contact-form textarea.is-invalid,
.contact-form input.is-invalid:focus,
.contact-form textarea.is-invalid:focus {
  color: #c43838;
  border-bottom-color: #c43838;
}

.field-error {
  display: block;
  margin-top: 10px;
  color: #c43838;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
}

.field-error:empty {
  display: none;
}

.contact-form .button {
  flex: none;
  font-size: clamp(20px, 1.6vw, 24px);
}

.contact-form .button:disabled {
  opacity: 1;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 18px 40px rgba(10, 39, 72, .18);
  cursor: not-allowed;
  pointer-events: none;
}

.form-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: clamp(4px, 1vw, 12px);
}

.form-bottom > p {
  max-width: 320px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.5;
}

.js .contact .reveal {
  transition-duration: 1s;
}

.js .contact .contact-media.reveal {
  transition-delay: .12s;
}

.js .contact .contact-lead.reveal {
  transition-delay: .2s;
}

.js .contact .contact-form.reveal {
  transition-delay: .08s;
}

@media (max-width: 1100px) {
  .contact-split-dark {
    width: min(52vw, 620px);
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 6% 100%);
  }

  .contact-compose h2 {
    font-size: clamp(36px, 6vw, 64px);
  }

  .contact-form {
    width: 62%;
  }

  .form-row {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .form-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .contact {
    display: flex;
    flex-direction: column;
  }

  .contact-split-dark {
    width: 100%;
    height: 38%;
    top: auto;
    bottom: 0;
    clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%);
  }

  .contact-hero {
    order: 1;
    padding-top: 120px;
    padding-bottom: 24px;
  }

  .contact-compose {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "lead";
    row-gap: 28px;
  }

  .contact-compose h2 {
    margin-right: 0;
    max-width: 11em;
  }

  .contact-media {
    position: relative;
    order: 2;
    top: auto;
    right: auto;
    bottom: auto;
    width: calc(100% - 2 * var(--pad));
    max-width: 520px;
    margin: 8px var(--pad) 0;
    height: auto;
    box-sizing: border-box;
  }

  .contact-media-placeholder {
    height: auto;
    aspect-ratio: 5 / 4;
    min-height: 220px;
  }

  .contact-lead {
    max-width: 36em;
    margin-top: 0;
  }

  .contact-panel {
    order: 3;
    z-index: 2;
    margin-top: 28px;
    padding-bottom: 88px;
  }

  .contact-form {
    width: 100%;
    max-width: none;
    padding: clamp(28px, 5vw, 40px);
    border-radius: 24px;
  }
}

@media (max-width: 480px) {
  .contact-hero {
    padding-top: 112px;
    padding-bottom: 16px;
  }

  .contact-compose h2 {
    font-size: clamp(34px, 10vw, 52px);
  }

  .contact-media {
    width: calc(100% - 2 * var(--pad));
    max-width: none;
  }

  .contact-media-placeholder {
    min-height: 180px;
  }

  .field {
    padding: 20px 0;
  }

  .contact-form {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 20px;
  }

  .contact-panel {
    margin-top: 24px;
    padding-bottom: 72px;
  }
}

@media (max-width: 360px) {
  .contact-form .button {
    gap: 12px;
    padding-left: 16px;
  }
}

