/* ==========================================================================
   ElevatteLife — consultation.css
   Consultation (booking) page only, scoped under body.page-consultation.
   Brand palette only: white, mint, deep green, small orange accent.
   The hero is the home hero component (home.css .hm-hero); this file adds
   the image frame, service cards, booking steps and FAQ.
   ========================================================================== */

/* --------------------------------------------------- Spacing system ------ */
/* Section padding: desktop 96 / tablet 72 / mobile 56. */
body.page-consultation {
  --section-y: 96px;
}

@media (max-width: 1024px) {
  body.page-consultation { --section-y: 72px; }
}

@media (max-width: 640px) {
  body.page-consultation { --section-y: 56px; }
}

/* Bands: white, mint, white, then the deep-green CTA. */
.page-consultation .cn-choose,
.page-consultation .cn-faq {
  background: var(--surface);
}

.page-consultation .cn-how {
  background: var(--bg);
}

/* ----------------------------------------------------------- Hero -------- */
.page-consultation .cn-hero {
  --hm-header-h: 97px;   /* this page's header is taller than the home one */
  min-height: min(calc(100svh - var(--hm-header-h)), 640px);
}

.page-consultation .cn-hero__crumb {
  margin-bottom: 18px;
}


/* 4:5 image, max 440px wide, shrinks on short windows to stay above the fold. */
.page-consultation .cn-hero__frame {
  position: relative;
  z-index: 1;
  width: min(100%, 440px, calc((100svh - var(--hm-header-h, 97px) - 110px) * 4 / 5));
  min-width: 260px;
}

/* Rounded frame, the same treatment as the About and Services heroes. */
.page-consultation .cn-hero__img {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-media);
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 30px 60px -34px rgba(24, 32, 27, 0.35);
}

.page-consultation .cn-hero__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* "By appointment": the home name card with a green icon. */
.page-consultation .cn-hero__badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
}

.page-consultation .cn-hero__badge::before {
  content: none;
}

.page-consultation .cn-hero__badge-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--brand-mid);
}

.page-consultation .cn-hero__badge-icon svg {
  width: 18px;
  height: 18px;
}

.page-consultation .cn-hero__badge-text {
  display: grid;
  gap: 2px;
}

.page-consultation .cn-hero__badge .hm-hero__card-role {
  font-size: 0.6875rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-consultation .cn-hero .hm-actions .btn svg {
  width: 18px;
  height: 18px;
}

/* ------------------------------------------- Choose your consultation ---- */
.page-consultation .cn-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

/* Equal height; the buttons sit on the same line across cards. */
.page-consultation .cn-card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border: 1px solid var(--line-brand);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.page-consultation .cn-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(24, 32, 27, 0.05), 0 26px 50px -24px rgba(24, 32, 27, 0.3);
}

.page-consultation .cn-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--brand);
}

.page-consultation .cn-card__icon svg {
  width: 20px;
  height: 20px;
}

.page-consultation .cn-card__title {
  margin: 18px 0 8px;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--brand);
}

.page-consultation .cn-card__text {
  margin: 0 0 24px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.page-consultation .cn-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

/* ------------------------------------------------- How booking works ----- */
.page-consultation .cn-steps {
  --dot: 56px;
  --gap: 32px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

/* Connecting line through the dots; draws left to right on reveal. */
.page-consultation .cn-steps::before {
  content: "";
  position: absolute;
  top: calc(var(--dot) / 2 - 1px);
  left: calc(var(--dot) / 2);
  right: calc((100% - 3 * var(--gap)) / 4 - var(--dot) / 2);
  height: 2px;
  background: var(--brand-mid);
  opacity: 0.35;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1600ms var(--ease-out) 300ms;
}

.page-consultation .cn-steps.is-visible::before,
html:not(.reveal-init) .page-consultation .cn-steps::before {
  transform: scaleX(1);
}

.page-consultation .cn-step {
  position: relative;
}

.page-consultation .cn-step__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--dot);
  height: var(--dot);
  border: 2px solid var(--brand-mid);
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand);
}

.page-consultation .cn-step__dot svg {
  width: 22px;
  height: 22px;
}

.page-consultation .cn-step__num {
  display: block;
  margin-top: 20px;
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  color: var(--accent);
}

.page-consultation .cn-step__title {
  margin: 4px 0 8px;
  font-size: 1.375rem;
  color: var(--brand);
}

.page-consultation .cn-step__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.reveal-init .page-consultation .cn-steps .cn-step {
  opacity: 0;
  translate: 0 12px;
  transition: opacity 700ms var(--ease-out), translate 700ms var(--ease-out);
}

.reveal-init .page-consultation .cn-steps.is-visible .cn-step {
  opacity: 1;
  translate: 0 0;
}

.reveal-init .page-consultation .cn-steps .cn-step:nth-child(2) { transition-delay: 350ms; }
.reveal-init .page-consultation .cn-steps .cn-step:nth-child(3) { transition-delay: 700ms; }
.reveal-init .page-consultation .cn-steps .cn-step:nth-child(4) { transition-delay: 1050ms; }

/* --------------------------------------------------------------- FAQ ----- */
.page-consultation .cn-faq .accordion {
  max-width: 820px;
}

/* -------------------------------------------------------- Responsive ----- */
@media (max-width: 1100px) {
  .page-consultation .cn-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  /* Steps stacked: one connector per step, dot to the next dot. */
  .page-consultation .cn-steps {
    --dot: 48px;
    --gap: 28px;
    grid-template-columns: minmax(0, 1fr);
  }

  .page-consultation .cn-steps::before {
    content: none;
  }

  .page-consultation .cn-step {
    display: grid;
    grid-template-columns: var(--dot) minmax(0, 1fr);
    column-gap: 20px;
  }

  .page-consultation .cn-step__dot {
    grid-row: span 3;
  }

  .page-consultation .cn-step__num {
    margin-top: 2px;
  }

  .page-consultation .cn-step__dot svg {
    width: 20px;
    height: 20px;
  }

  .page-consultation .cn-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: var(--dot);
    bottom: calc(var(--gap) * -1);
    left: calc(var(--dot) / 2 - 1px);
    width: 2px;
    background: var(--brand-mid);
    opacity: 0.35;
    transform: scaleY(0);
    transform-origin: center top;
    transition: transform 600ms var(--ease-out) 300ms;
  }

  .page-consultation .cn-steps.is-visible .cn-step::after,
  html:not(.reveal-init) .page-consultation .cn-step::after {
    transform: scaleY(1);
  }

  .page-consultation .cn-steps .cn-step:nth-child(2)::after { transition-delay: 650ms; }
  .page-consultation .cn-steps .cn-step:nth-child(3)::after { transition-delay: 1000ms; }

}

@media (max-width: 860px) {
  .page-consultation .cn-hero {
    min-height: 0;
  }

  .page-consultation .cn-hero__crumb { order: 0; }

  /* Desktop breaks after the first sentence; phones wrap naturally. */
  .page-consultation .cn-br {
    display: none;
  }

  .page-consultation .cn-hero .hm-hero__title {
    font-size: clamp(28px, 8.2vw, 36px);
  }

  /* Image max ~280px tall (224 x 280 at 4:5), centred. */
  .page-consultation .cn-hero__frame {
    width: 224px;
    min-width: 0;
    max-width: 100%;
  }

  .page-consultation .cn-hero__badge {
    left: -20px;
    right: auto;
    bottom: -24px;   /* overlaps the image's bottom edge, like the home card */
    padding: 10px 14px 10px 10px;
    white-space: nowrap;
  }

  .page-consultation .cn-hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  /* Service cards: a swipe carousel that bleeds to the screen edges. */
  .page-consultation .cn-cards {
    display: flex;
    gap: 14px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .page-consultation .cn-cards::-webkit-scrollbar {
    display: none;
  }

  .page-consultation .cn-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .page-consultation .cn-card:hover {
    transform: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  .page-consultation .cn-steps::before,
  .page-consultation .cn-step::after {
    transform: none;
    transition: none;
  }
}
