/* ==========================================================================
   Tranquil Escape — Contact section (ultra-premium redesign)
   Mobile-first. Uses existing palette + Gilda Display font.
   ========================================================================== */

.te-contact {
  --te-gold: #aa8453;
  --te-gold-soft: #c2a06f;
  --te-gold-deep: #7c6038;
  --te-brown-deep: #4f3f25;
  --te-cream: #f8f5f0;
  --te-cream-light: #fff9ee;
  --te-heading: #222;
  --te-text: #666;
  --te-border: #e6e6e6;
  --te-white: #fff;
  --te-radius: 26px;
  --te-radius-sm: 14px;
  --te-ease: cubic-bezier(0.22, 1, 0.36, 1);

  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 56px 18px 72px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(170, 132, 83, 0.08) 0%, rgba(170, 132, 83, 0) 55%),
    radial-gradient(120% 90% at 0% 100%, rgba(170, 132, 83, 0.06) 0%, rgba(170, 132, 83, 0) 50%),
    var(--te-cream);
  font-family: var(--font--paragraph, "Gilda Display"), "Gilda Display", "Gildadisplay Woff", serif;
}

.te-contact *,
.te-contact *::before,
.te-contact *::after {
  box-sizing: border-box;
}

.te-contact__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  min-width: 0;
}

/* Defensive: never allow a flex/grid child to force horizontal overflow */
.te-contact__panel,
.te-contact__aside,
.te-contact__form-side,
.te-contact__form,
.te-contact__form-grid,
.te-field-row,
.te-field,
.te-contact__detail,
.te-contact__detail-body {
  min-width: 0;
  max-width: 100%;
}

.te-input,
.te-textarea,
.te-contact__submit,
.te-contact__cta {
  max-width: 100%;
}

.te-contact__detail-value,
.te-contact__subtitle {
  overflow-wrap: anywhere;
}

/* ---- The split panel -------------------------------------------------- */
.te-contact__panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border-radius: var(--te-radius);
  background: var(--te-white);
  box-shadow:
    0 1px 0 rgba(170, 132, 83, 0.08),
    0 30px 70px -32px rgba(79, 63, 37, 0.38);
}

/* ---- Aside (gold) ----------------------------------------------------- */
.te-contact__aside {
  position: relative;
  overflow: hidden;
  padding: 44px 28px 40px;
  color: var(--te-white);
  background:
    linear-gradient(155deg, #b1895690 0%, rgba(124, 96, 56, 0) 60%),
    linear-gradient(160deg, var(--te-gold) 0%, var(--te-gold-deep) 52%, var(--te-brown-deep) 100%);
}

/* faint decorative texture + glow */
.te-contact__aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.35;
  pointer-events: none;
}

.te-contact__aside-glow {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 249, 238, 0.35) 0%, rgba(255, 249, 238, 0) 70%);
  pointer-events: none;
}

.te-contact__aside-content {
  position: relative;
  z-index: 1;
}

.te-contact__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding-bottom: 8px;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--te-cream-light);
  border-bottom: 1px solid rgba(255, 249, 238, 0.4);
}

.te-contact__title {
  margin: 0 0 16px;
  font-family: var(--font--heading, "Gilda Display"), "Gilda Display", serif;
  font-weight: 400;
  font-size: clamp(34px, 9vw, 46px);
  line-height: 1.08;
  color: var(--te-white);
}

.te-contact__subtitle {
  margin: 0 0 28px;
  max-width: 42ch;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

/* ---- Contact detail rows --------------------------------------------- */
.te-contact__details {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.te-contact__detail {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 12px;
  margin: 0 -12px;
  border-radius: var(--te-radius-sm);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.35s var(--te-ease), transform 0.35s var(--te-ease);
}

.te-contact__detail:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.te-contact__detail-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--te-white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background-color 0.35s var(--te-ease), color 0.35s var(--te-ease);
}

.te-contact__detail:hover .te-contact__detail-icon {
  background: var(--te-cream-light);
  color: var(--te-gold-deep);
}

.te-contact__detail-icon svg {
  width: 21px;
  height: 21px;
}

.te-contact__detail-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.te-contact__detail-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 249, 238, 0.72);
}

.te-contact__detail-value {
  font-size: 16px;
  line-height: 1.45;
  color: var(--te-white);
}

/* ---- Primary WhatsApp CTA on aside ----------------------------------- */
.te-contact__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 22px;
  border-radius: 100px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--te-gold-deep);
  background: var(--te-cream-light);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.5);
  transition: transform 0.35s var(--te-ease), box-shadow 0.35s var(--te-ease), background-color 0.35s var(--te-ease);
}

.te-contact__cta svg {
  width: 20px;
  height: 20px;
}

.te-contact__cta:hover {
  transform: translateY(-2px);
  background: var(--te-white);
  box-shadow: 0 20px 38px -16px rgba(0, 0, 0, 0.55);
}

.te-contact__cta:active {
  transform: translateY(0);
}

/* ---- Form side -------------------------------------------------------- */
.te-contact__form-side {
  padding: 36px 24px 40px;
  background: var(--te-white);
}

.te-contact__form {
  margin: 0;
}

.te-contact__form-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.te-field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.te-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.te-field label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--te-gold-deep);
}

.te-input {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 15px 18px;
  font-family: "Gildadisplay Woff", var(--font--paragraph, "Gilda Display"), serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--te-heading);
  background: #faf8f4;
  border: 1px solid rgba(34, 34, 34, 0.12);
  border-radius: 12px;
  transition: border-color 0.3s var(--te-ease), background-color 0.3s var(--te-ease), box-shadow 0.3s var(--te-ease);
  -webkit-appearance: none;
  appearance: none;
}

.te-input::placeholder {
  color: rgba(34, 34, 34, 0.38);
  font-weight: 300;
}

.te-input:hover {
  border-color: rgba(170, 132, 83, 0.45);
  background: var(--te-white);
}

.te-input:focus,
.te-input:focus-visible {
  outline: none;
  border-color: var(--te-gold);
  background: var(--te-white);
  box-shadow: 0 0 0 4px rgba(170, 132, 83, 0.14);
}

.te-textarea {
  min-height: 150px;
  height: auto;
  resize: vertical;
  line-height: 1.65;
}

/* ---- Submit ----------------------------------------------------------- */
.te-submit-wrap {
  margin-top: 4px;
}

.te-contact__submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 54px;
  padding: 16px 30px;
  font-family: "Gildadisplay Woff", var(--font--paragraph, "Gilda Display"), serif;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--te-white);
  background: linear-gradient(135deg, var(--te-gold) 0%, var(--te-gold-deep) 100%);
  border: 0;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 16px 32px -16px rgba(124, 96, 56, 0.85);
  transition: transform 0.35s var(--te-ease), box-shadow 0.35s var(--te-ease), filter 0.35s var(--te-ease);
}

.te-contact__submit::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  transition: left 0.7s var(--te-ease);
}

.te-contact__submit:hover {
  transform: translateY(-2px);
  filter: saturate(1.05);
  box-shadow: 0 22px 40px -18px rgba(124, 96, 56, 0.95);
}

.te-contact__submit:hover::after {
  left: 130%;
}

.te-contact__submit:active {
  transform: translateY(0);
}

/* ---- Form feedback ---------------------------------------------------- */
.te-contact__feedback {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.te-contact__feedback--done {
  color: #2f5d3a;
  background: #eef6ef;
  border: 1px solid #cfe6d4;
}

.te-contact__feedback--fail {
  color: #7a2e2e;
  background: #fbeeee;
  border: 1px solid #f0d2d2;
}

/* ==========================================================================
   Reveal animations (progressive enhancement — armed by JS)
   ========================================================================== */
.te-contact.is-armed .te-reveal,
.te-contact.is-armed .te-reveal-item {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--te-ease), transform 0.7s var(--te-ease);
  will-change: opacity, transform;
}

.te-contact.is-armed .te-reveal.is-visible,
.te-contact.is-armed .te-reveal.is-visible .te-reveal-item.is-visible {
  opacity: 1;
  transform: none;
}

/* staggered children once the panel is visible */
.te-contact.is-armed .te-reveal-item {
  transition-delay: calc(var(--te-i, 0) * 80ms);
}

/* ==========================================================================
   Breakpoints (mobile-first → up)
   ========================================================================== */

/* Small phones: a touch more outer room */
@media (min-width: 380px) {
  .te-contact {
    padding-left: 22px;
    padding-right: 22px;
  }
}

/* Large phones / small tablets */
@media (min-width: 560px) {
  .te-contact {
    padding: 64px 32px 84px;
  }

  .te-contact__aside {
    padding: 52px 44px 48px;
  }

  .te-contact__form-side {
    padding: 48px 44px 52px;
  }

  .te-field-row {
    grid-template-columns: 1fr 1fr;
  }

  .te-contact__cta {
    width: auto;
  }
}

/* Tablets */
@media (min-width: 768px) {
  .te-contact {
    padding: 80px 40px 100px;
  }

  .te-contact__form-grid {
    gap: 22px;
  }

  .te-field-row {
    gap: 22px;
  }
}

/* Desktop: switch to the side-by-side split panel */
@media (min-width: 992px) {
  .te-contact {
    padding: 96px 48px 112px;
  }

  .te-contact__panel {
    grid-template-columns: 0.92fr 1.08fr;
  }

  .te-contact__aside {
    padding: 64px 56px;
    display: flex;
    align-items: center;
  }

  .te-contact__form-side {
    padding: 64px 60px;
    display: flex;
    align-items: center;
  }

  .te-contact__form {
    width: 100%;
  }

  .te-contact__title {
    font-size: 48px;
  }
}

/* Wide desktop */
@media (min-width: 1200px) {
  .te-contact__aside {
    padding: 72px 64px;
  }

  .te-contact__form-side {
    padding: 72px 68px;
  }
}

/* ==========================================================================
   Accessibility — reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .te-contact.is-armed .te-reveal,
  .te-contact.is-armed .te-reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .te-contact__detail,
  .te-contact__cta,
  .te-contact__submit,
  .te-contact__submit::after,
  .te-input {
    transition: none;
  }
}
