﻿/* ==========================================================================
   Contact: "Begin Your Transformation"
   Form card with a tied-back curtain on the left. When an enquiry is sent
   successfully, js/components/contact-form.js releases the tieback
   (.is-released), js/components/drape.js draws the SVG curtain across,
   and .is-thanks reveals the thank-you note.
   ========================================================================== */

.contact-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(79, 110, 92, 0.55), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(20, 40, 32, 0.9), transparent 60%),
    var(--c-green);
}

/* Thin arch outlines, echoing the hero and the logo */
.contact-arch {
  position: absolute;
  left: -120px;
  bottom: -40px;
  width: 460px;
  height: 640px;
  border: 1px solid rgba(196, 154, 90, 0.16);
  border-bottom: none;
  border-radius: 999px 999px 0 0;
  pointer-events: none;
}
.contact-arch::before {
  content: "";
  position: absolute;
  inset: 16px 16px 0;
  border: 1px solid rgba(196, 154, 90, 0.08);
  border-bottom: none;
  border-radius: inherit;
}

/* ---------- Contact detail cards ---------- */
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(196, 154, 90, 0.22);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s var(--ease-out);
}
a.contact-card:hover {
  border-color: rgba(196, 154, 90, 0.6);
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}
.contact-card__label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.contact-card__value {
  display: block;
  font-weight: 300;
  line-height: 1.5;
  color: var(--c-tan);
  overflow-wrap: anywhere;
}
.contact-card__arrow {
  width: 18px;
  height: 18px;
  margin-left: auto;
  flex-shrink: 0;
  color: rgba(196, 154, 90, 0.7);
}

/* ---------- Form card ---------- */
.consult-card {
  /* Read by js/components/drape.js as well */
  --open-w: 24px;                 /* curtain width at the rod while tied back */
  --pinch: 9px;                   /* how far the tieback pulls the edge in */
  --rod-y: 18px;                  /* where the curtain hangs from */
  position: relative;
  overflow: hidden;
  background: var(--c-cream);
  border-radius: 6px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(196, 154, 90, 0.25);
}
@media (min-width: 640px) {
  .consult-card { --open-w: 60px; --pinch: 22px; }
}

.consult-card__rod {
  position: absolute;
  top: calc(var(--rod-y) - 4px);
  left: 12px;
  right: 12px;
  z-index: 5;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(#f6e4b8, var(--c-gold) 45%, var(--c-gold-dark));
  box-shadow: 0 3px 8px rgba(60, 40, 15, 0.3);
}
.consult-card__rod::before,
.consult-card__rod::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 35% 30%, #fff3d1, var(--c-gold) 45%, var(--c-gold-dark));
}
.consult-card__rod::before { left: -5px; }
.consult-card__rod::after { right: -5px; }

.consult-card__body {
  padding: 2.75rem 1.25rem 1.75rem calc(var(--open-w) + 1.25rem);
}
@media (min-width: 640px) {
  .consult-card__body { padding: 3.25rem 2.5rem 2.5rem calc(var(--open-w) + 2rem); }
}

/* ---------- The curtain (SVG drawn by js/components/drape.js) ---------- */
.consult-drape {
  position: absolute;
  top: var(--rod-y);
  left: 0;
  z-index: 3;
  width: 100%;
  height: calc(100% - var(--rod-y));
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(5px 0 10px rgba(60, 40, 15, 0.28));
}

/* Gold tieback knob (same motif as the logo). Sits on the pinch point. */
.consult-tieback {
  position: absolute;
  z-index: 4;
  top: calc(var(--rod-y) + (100% - var(--rod-y)) * 0.56);
  left: calc(var(--open-w) - var(--pinch));
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #fff3d1, var(--c-gold) 45%, var(--c-gold-dark));
  box-shadow: 0 3px 6px rgba(60, 40, 15, 0.4);
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out);
  pointer-events: none;
}
@media (min-width: 640px) {
  .consult-tieback { width: 22px; height: 22px; }
}
/* Released: the knob slips down and fades as the fabric lets go */
.consult-card.is-released .consult-tieback {
  opacity: 0;
  transform: translate(-50%, -10%) scale(0.7);
}

/* ---------- Thank-you note (sits on the closed curtain) ---------- */
.consult-thanks {
  position: absolute;
  top: var(--rod-y);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--c-green);
  background: radial-gradient(ellipse at 50% 45%, rgba(251, 247, 239, 0.85), rgba(251, 247, 239, 0) 70%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.6s var(--ease-out), visibility 0s linear 0.6s;
}
/* Added by JS once the curtain is nearly drawn */
.consult-card.is-thanks .consult-thanks {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.7s ease, transform 0.8s var(--ease-out), visibility 0s;
}
.consult-thanks__medallion {
  width: 88px;
  height: 88px;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  box-shadow: 0 16px 30px -12px rgba(60, 40, 15, 0.55);
}
.consult-thanks__heading {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
}
.consult-thanks__heading:focus { outline: none; }
.consult-thanks__text {
  max-width: 300px;
  margin: 0.75rem auto 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(23, 32, 28, 0.72);
}

@media (prefers-reduced-motion: reduce) {
  .consult-thanks,
  .consult-card.is-thanks .consult-thanks { transition: opacity 0.3s ease, visibility 0s; transform: none; }
}
