/* =========================================================
   page-contact.css
   Luxury / editorial Contact page styling for WordPress
   Built to support Contact Form 7 markup
   ========================================================= */

.contact-page,
.contact-wrap,
.contact-info,
.contact-form-wrap,
.contact-form-shell,
.contact-form-shell .wpcf7,
.contact-form-shell .wpcf7 form {
  color: #111111;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Page shell ---------- */
.contact-wrap {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  padding: 120px 0 110px;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(420px, 1fr);
  gap: 72px;
  align-items: start;
}

.contact-info,
.contact-form-wrap {
  min-width: 0;
}

/* ---------- Shared type ---------- */
.contact-info__label,
.contact-meta-row__label,
.contact-form-wrap label,
.form-footer__note {
  font-family: "DM Sans", sans-serif;
  letter-spacing: 0.08em;
}

.contact-info__heading,
.contact-form__heading {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: #111111;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

/* ---------- Info column ---------- */
.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 720px;
}

.contact-info__top {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-info__label {
  margin: 0;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.56);
}

.contact-info__heading {
  margin: 0;
  font-size: clamp(4rem, 8vw, 6.6rem);
  line-height: 0.9;
}

.contact-info__heading em {
  font-style: italic;
  font-weight: 300;
}

.contact-info__sub {
  max-width: 34ch;
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(17, 17, 17, 0.66);
}

.contact-info__email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  text-decoration: none;
  color: rgba(17, 17, 17, 0.78);
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  border-bottom: 1px solid rgba(17, 17, 17, 0.18);
  padding-bottom: 4px;
  transition: border-color 0.25s ease, opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.contact-info__email:hover,
.contact-info__email:focus-visible {
  opacity: 1;
  color: #111111;
  border-color: rgba(17, 17, 17, 0.4);
  transform: translateY(-1px);
}

.contact-info__meta {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
  display: grid;
  gap: 18px;
}

.contact-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.contact-meta-row__label {
  flex: 0 0 120px;
  font-size: 11px;
  line-height: 1.4;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.34);
}

.contact-meta-row__value {
  flex: 1 1 auto;
  text-align: right;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(17, 17, 17, 0.72);
}

/* ---------- Form column ---------- */
.contact-form-wrap {
  position: relative;
  padding: 42px 40px 36px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 17, 17, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.contact-form-wrap::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(17, 17, 17, 0.05);
  pointer-events: none;
}

.contact-form__heading {
  position: relative;
  z-index: 1;
  margin-bottom: 28px;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1;
}

.contact-form-shell {
  position: relative;
  z-index: 1;
}

/* ---------- Contact Form 7 layout ---------- */
.contact-form-shell .wpcf7,
.contact-form-shell .wpcf7 form,
.contact-form-shell .cf7-lux-form {
  width: 100%;
}

.contact-form-shell .wpcf7 form {
  margin: 0;
}

.contact-form-shell .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.contact-form-shell p {
  margin: 0;
}

/* ---------- Form structure ---------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label,
.contact-form-shell label {
  display: inline-block;
  margin-bottom: 10px;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.48);
}

/* ---------- Fields ---------- */
.contact-form-shell input[type="text"],
.contact-form-shell input[type="email"],
.contact-form-shell input[type="tel"],
.contact-form-shell input[type="url"],
.contact-form-shell select,
.contact-form-shell textarea {
  width: 100%;
  display: block;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.16);
  background: transparent !important;
  border-radius: 0;
  box-shadow: none !important;
  outline: none;
  padding: 0 0 14px;
  min-height: 52px;
  font-family: "DM Sans", sans-serif !important;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  color: #111111 !important;
  transition:
    border-color 0.25s ease,
    opacity 0.25s ease,
    transform 0.25s ease,
    background-color 0.25s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.contact-form-shell textarea {
  min-height: 140px;
  padding-top: 2px;
  resize: vertical;
}

.contact-form-shell input[type="text"]:hover,
.contact-form-shell input[type="email"]:hover,
.contact-form-shell input[type="tel"]:hover,
.contact-form-shell input[type="url"]:hover,
.contact-form-shell select:hover,
.contact-form-shell textarea:hover {
  border-color: rgba(17, 17, 17, 0.32);
}

.contact-form-shell input[type="text"]:focus,
.contact-form-shell input[type="email"]:focus,
.contact-form-shell input[type="tel"]:focus,
.contact-form-shell input[type="url"]:focus,
.contact-form-shell select:focus,
.contact-form-shell textarea:focus {
  border-color: #111111;
}

.contact-form-shell input::placeholder,
.contact-form-shell textarea::placeholder {
  color: rgba(17, 17, 17, 0.34) !important;
  opacity: 1;
}

/* ---------- Select styling ---------- */
.contact-form-shell select,
.contact-form-shell .wpcf7-form-control.wpcf7-select {
  font-family: "DM Sans", sans-serif !important;
  font-size: 16px;
  font-weight: 400;
  color: #111111 !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
}

.contact-form-shell select {
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(17, 17, 17, 0.55) 50%),
    linear-gradient(135deg, rgba(17, 17, 17, 0.55) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.contact-form-shell select:invalid,
.contact-form-shell select option[value=""] {
  color: rgba(17, 17, 17, 0.34);
}

.contact-form-shell select option {
  color: #111111;
  background: #ffffff;
}

/* ---------- Submit row ---------- */
.form-footer {
  margin-top: 10px;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.form-footer__note {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  line-height: 1.5;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.46);
}

/* ---------- Button ---------- */
.contact-form-shell .btn,
.contact-form-shell .wpcf7-submit,
.contact-form-shell input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid #111111;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.contact-form-shell .btn:hover,
.contact-form-shell .wpcf7-submit:hover,
.contact-form-shell input[type="submit"]:hover,
.contact-form-shell .btn:focus-visible,
.contact-form-shell .wpcf7-submit:focus-visible,
.contact-form-shell input[type="submit"]:focus-visible {
  background: transparent;
  color: #111111;
  transform: translateY(-1px);
}

.contact-form-shell .btn:active,
.contact-form-shell .wpcf7-submit:active,
.contact-form-shell input[type="submit"]:active {
  transform: translateY(0);
}

/* ---------- CF7 validation / status ---------- */
.contact-form-shell .wpcf7-spinner {
  margin: 0 0 0 12px;
  vertical-align: middle;
}

.contact-form-shell .wpcf7-not-valid {
  border-color: #b42318 !important;
}

.contact-form-shell .wpcf7-not-valid-tip {
  margin-top: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: #b42318;
}

/* Base response output */
.contact-form-shell .wpcf7-response-output {
  margin: 22px 0 0 !important;
  padding: 14px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(17, 17, 17, 0.1) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #111111;
}

/* Success state styled like original demo */
.contact-form-shell .wpcf7 form.sent .wpcf7-response-output {
  position: relative !important;
  display: block !important;
  margin: 0 !important;
  padding: 96px 0 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(17, 17, 17, 0.74) !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  text-align: left !important;
  animation: lorenaSuccessFade 0.45s ease;
}

.contact-form-shell .wpcf7 form.sent .wpcf7-response-output::before {
  content: "✦\A Message Received";
  white-space: pre-line;
  position: absolute;
  top: 18px;
  left: 0;
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #111111;
}

.contact-form-shell .wpcf7 form.sent .cf7-lux-form {
  display: none;
}

.contact-form-shell .wpcf7 form.sent .wpcf7-spinner,
.contact-form-shell .wpcf7 form.sent .wpcf7-not-valid-tip {
  display: none !important;
}

/* Error states */
.contact-form-shell .wpcf7 form.invalid .wpcf7-response-output,
.contact-form-shell .wpcf7 form.unaccepted .wpcf7-response-output,
.contact-form-shell .wpcf7 form.failed .wpcf7-response-output,
.contact-form-shell .wpcf7 form.aborted .wpcf7-response-output,
.contact-form-shell .wpcf7 form.spam .wpcf7-response-output {
  margin: 24px 0 0 !important;
  padding: 14px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(180, 35, 24, 0.2) !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #b42318 !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.is-visible,
.no-js .reveal {
  opacity: 1;
  transform: translateY(0);
}

@keyframes lorenaSuccessFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .contact-wrap {
    width: min(1100px, calc(100% - 48px));
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 96px 0 90px;
  }

  .contact-info {
    min-height: auto;
    gap: 40px;
  }

  .contact-info__sub {
    max-width: 56ch;
  }

  .contact-info__meta {
    max-width: 720px;
  }
}

@media (max-width: 767px) {
  .contact-wrap {
    width: calc(100% - 32px);
    padding: 76px 0 72px;
    gap: 36px;
  }

  .contact-info__top {
    gap: 22px;
  }

  .contact-info__heading {
    font-size: clamp(3.2rem, 16vw, 4.8rem);
  }

  .contact-info__sub,
  .contact-info__email {
    font-size: 14px;
  }

  .contact-meta-row {
    flex-direction: column;
    gap: 4px;
  }

  .contact-meta-row__value {
    text-align: left;
  }

  .contact-form-wrap {
    padding: 28px 22px 24px;
  }

  .contact-form-wrap::before {
    inset: 12px;
  }

  .contact-form__heading {
    margin-bottom: 22px;
  }

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

  .form-group {
    margin-bottom: 20px;
  }

  .contact-form-shell input[type="text"],
  .contact-form-shell input[type="email"],
  .contact-form-shell input[type="tel"],
  .contact-form-shell input[type="url"],
  .contact-form-shell select,
  .contact-form-shell textarea {
    min-height: 48px;
    font-size: 16px;
  }

  .form-footer {
    align-items: stretch;
  }

  .form-footer__note {
    width: 100%;
  }

  .contact-form-shell .btn,
  .contact-form-shell .wpcf7-submit,
  .contact-form-shell input[type="submit"] {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .contact-info__email,
  .contact-form-shell input,
  .contact-form-shell select,
  .contact-form-shell textarea,
  .contact-form-shell .btn,
  .contact-form-shell .wpcf7-submit,
  .contact-form-shell input[type="submit"] {
    transition: none !important;
  }
}