/*
Theme Name: VP Psychotherapy
Theme URI: https://vptherapy.ca
Author: Frame Five Media
Author URI: https://framefive.ca
Description: Custom theme for VP Psychotherapy — Vanessa Paterino, Registered Psychotherapist.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
License URI: https://framefive.ca
Text Domain: vp-therapy
*/

/* ===== TOKENS ===== */
:root {
  --vpt-sage:       #c7cdbf;
  --vpt-sage-dark:  #8a9178;
  --vpt-sage-light: #dfe3d8;
  --vpt-charcoal:   #2d2d2d;
  --vpt-text:       #3a3a3a;
  --vpt-text-light: #6b6b6b;
  --vpt-off-white:  #f5f4f1;
  --vpt-white:      #fefefe;
  --vpt-border:     #e2e0db;

  --vpt-font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --vpt-font-body:    'Raleway', 'Helvetica Neue', Arial, sans-serif;

  --vpt-max-width:  1200px;
  --vpt-gap:        clamp(2rem, 5vw, 4rem);
  --vpt-section-py: clamp(4.5rem, 9vw, 7.5rem);
  --vpt-header-h:   72px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--vpt-header-h); }
body {
  font-family: var(--vpt-font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.0625rem);
  line-height: 1.72;
  color: var(--vpt-text);
  background: var(--vpt-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 {
  font-family: var(--vpt-font-heading);
  font-weight: 600;
  line-height: 1.22;
  color: var(--vpt-charcoal);
  text-wrap: balance;
}

/* ===== LAYOUT ===== */
.vpt-wrap {
  width: 100%;
  max-width: var(--vpt-max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.vpt-section { padding: var(--vpt-section-py) 0; }
.vpt-grid { display: grid; gap: var(--vpt-gap); }
.vpt-grid--halves  { grid-template-columns: 1fr 1fr; }
.vpt-grid--1x2     { grid-template-columns: 1fr 2fr; }
.vpt-grid--2x1     { grid-template-columns: 2fr 1fr; }
.vpt-bg-alt { background: var(--vpt-off-white); }

/* ===== BUTTON ===== */
.vpt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85em 2.2em;
  font-family: var(--vpt-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  background: var(--vpt-sage);
  color: var(--vpt-charcoal);
  transition: background 0.3s ease, transform 0.25s ease;
}
.vpt-btn:hover,
.vpt-btn:focus-visible {
  background: var(--vpt-sage-dark);
  color: #fff;
  transform: translateY(-1px);
}
.vpt-btn:focus-visible {
  outline: 2px solid var(--vpt-sage-dark);
  outline-offset: 3px;
}

/* ===== HEADER ===== */
.vpt-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--vpt-header-h);
  display: flex;
  align-items: center;
  background: rgba(254,254,254,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--vpt-border);
  transition: box-shadow 0.3s;
}
.vpt-header.is-scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
}
.vpt-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--vpt-max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.vpt-header__logo {
  font-family: var(--vpt-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--vpt-charcoal);
  letter-spacing: -0.01em;
}
.vpt-header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.vpt-header__link {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--vpt-text-light);
  transition: color 0.25s;
  position: relative;
}
.vpt-header__link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1.5px;
  background: var(--vpt-sage-dark);
  transition: width 0.3s ease;
}
.vpt-header__link:hover { color: var(--vpt-charcoal); }
.vpt-header__link:hover::after { width: 100%; }
.vpt-header__cta {
  font-size: 0.75rem;
  padding: 0.6em 1.4em;
}
.vpt-header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.vpt-header__toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--vpt-charcoal);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== HERO ===== */
.vpt-hero {
  position: relative;
  min-height: max(100svh, 600px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--vpt-off-white);
}
.vpt-hero__bg {
  position: absolute;
  inset: 0;
  background: url('/wp-content/uploads/2025/08/vanessa-three.jpg') center right / cover no-repeat;
}
.vpt-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(245,244,241,0.96) 0%,
    rgba(245,244,241,0.82) 32%,
    rgba(245,244,241,0.30) 55%,
    transparent 72%
  );
}
.vpt-hero__content {
  position: relative;
  z-index: 2;
  max-width: 500px;
  padding: calc(var(--vpt-header-h) + 4rem) 0 4rem;
}
.vpt-hero__name {
  font-size: clamp(2.4rem, 4.8vw, 3.4rem);
  font-weight: 700;
  margin-bottom: 0.2em;
  letter-spacing: -0.015em;
}
.vpt-hero__title {
  font-family: var(--vpt-font-body);
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  font-weight: 400;
  color: var(--vpt-text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2.5em;
}

/* ===== ABOUT ===== */
.vpt-about .vpt-grid { align-items: center; }
.vpt-about__heading {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 1em;
  font-style: italic;
  font-weight: 400;
}
.vpt-about__text p {
  margin-bottom: 1em;
  max-width: 56ch;
}
.vpt-about__credentials {
  margin-top: 1.8em;
  padding-top: 1.8em;
  border-top: 1px solid var(--vpt-border);
}
.vpt-about__credentials h3 {
  font-family: var(--vpt-font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vpt-text-light);
  margin-bottom: 1em;
}
.vpt-about__credentials li {
  position: relative;
  padding-left: 1.3em;
  margin-bottom: 0.45em;
  font-size: 0.9375rem;
}
.vpt-about__credentials li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.62em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--vpt-sage);
}
.vpt-about__portrait {
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 2/3;
  max-height: 620px;
}
.vpt-about__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* ===== SERVICES ===== */
.vpt-service__header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.vpt-service__label {
  display: inline-block;
  font-family: var(--vpt-font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vpt-sage-dark);
  margin-bottom: 0.5em;
}
.vpt-service__title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}
.vpt-service .vpt-grid { align-items: start; }
.vpt-service__checklist {
  padding: 1.8rem 1.4rem;
  background: var(--vpt-white);
  border-radius: 6px;
  border: 1px solid var(--vpt-border);
}
.vpt-bg-alt .vpt-service__checklist {
  background: var(--vpt-off-white);
  border-color: transparent;
  box-shadow: 0 1px 8px rgba(0,0,0,0.035);
}
.vpt-service__checklist li {
  position: relative;
  padding: 0.5em 0 0.5em 1.6em;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--vpt-border);
}
.vpt-service__checklist li:last-child { border-bottom: none; }
.vpt-service__checklist li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.75em;
  width: 12px; height: 6px;
  border-left: 1.5px solid var(--vpt-sage-dark);
  border-bottom: 1.5px solid var(--vpt-sage-dark);
  transform: rotate(-45deg);
}
.vpt-service__body p {
  margin-bottom: 1em;
  max-width: 60ch;
}

/* ===== PARALLAX DIVIDERS ===== */
.vpt-divider {
  position: relative;
  height: clamp(260px, 32vw, 400px);
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.vpt-divider--brain2 { background-image: url('/wp-content/uploads/2025/08/brain-2.jpg'); }
.vpt-divider--brain3 { background-image: url('/wp-content/uploads/2025/08/brain-3.jpg'); }
.vpt-divider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.14) 100%);
}
@supports not (background-attachment: fixed) {
  .vpt-divider { background-attachment: scroll; }
}

/* ===== FAQ ===== */
.vpt-faq { max-width: 780px; margin: 0 auto; }
.vpt-faq__title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  text-align: center;
  margin-bottom: 2.5rem;
}
.vpt-faq__item { border-bottom: 1px solid var(--vpt-border); }
.vpt-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.15em 0;
  font-family: var(--vpt-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--vpt-charcoal);
  text-align: left;
}
.vpt-faq__icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-left: 1em;
  position: relative;
}
.vpt-faq__icon::before,
.vpt-faq__icon::after {
  content: '';
  position: absolute;
  background: var(--vpt-sage-dark);
  border-radius: 1px;
}
.vpt-faq__icon::before {
  top: 50%; left: 1px; right: 1px;
  height: 1.5px; transform: translateY(-50%);
}
.vpt-faq__icon::after {
  left: 50%; top: 1px; bottom: 1px;
  width: 1.5px; transform: translateX(-50%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.vpt-faq__item.is-open .vpt-faq__icon::after {
  transform: translateX(-50%) scaleY(0);
  opacity: 0;
}
.vpt-faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.vpt-faq__item.is-open .vpt-faq__answer {
  grid-template-rows: 1fr;
}
.vpt-faq__answer-inner { overflow: hidden; }
.vpt-faq__answer-text {
  padding: 0 0 1.2em;
  color: var(--vpt-text);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ===== CONTACT ===== */
.vpt-contact__top { margin-bottom: var(--vpt-gap); }
.vpt-contact__top .vpt-grid { align-items: center; }
.vpt-contact__cta-heading {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1em;
}
.vpt-contact__quote {
  border-radius: 6px;
  overflow: hidden;
  max-width: 380px;
  margin: 0 auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.vpt-contact__quote img { width: 100%; height: auto; }
.vpt-contact__form-heading {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  text-align: center;
  margin-bottom: 2rem;
}
.vpt-contact__bottom .vpt-grid { align-items: start; }
.vpt-contact__info h3 {
  font-family: var(--vpt-font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.8em;
}
.vpt-contact__info p { margin-bottom: 0.5em; }
.vpt-contact__info a {
  color: var(--vpt-sage-dark);
  font-weight: 600;
  transition: color 0.2s;
}
.vpt-contact__info a:hover { color: var(--vpt-charcoal); }

/* WPForms overrides */
.vpt-contact__form .wpforms-container .wpforms-form .wpforms-submit-container button {
  background: var(--vpt-sage) !important;
  color: var(--vpt-charcoal) !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  border-radius: 3px !important;
  transition: background 0.3s !important;
}
.vpt-contact__form .wpforms-container .wpforms-form .wpforms-submit-container button:hover {
  background: var(--vpt-sage-dark) !important;
  color: #fff !important;
}

/* ===== FOOTER ===== */
.vpt-footer {
  background: var(--vpt-charcoal);
  color: rgba(255,255,255,0.5);
  padding: 1.8rem 0;
  font-size: 0.8125rem;
}
.vpt-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vpt-footer a {
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}
.vpt-footer a:hover { color: var(--vpt-sage-light); }

/* ===== SCROLL REVEAL ===== */
.vpt-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.vpt-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.vpt-reveal--d1 { transition-delay: 0.1s; }
.vpt-reveal--d2 { transition-delay: 0.2s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .vpt-grid--halves,
  .vpt-grid--1x2,
  .vpt-grid--2x1 {
    grid-template-columns: 1fr;
  }
  .vpt-about__portrait { max-width: 400px; margin: 0 auto; aspect-ratio: 3/4; }
  .vpt-hero__content { max-width: 100%; }
  .vpt-hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(245,244,241,0.92) 0%,
      rgba(245,244,241,0.70) 55%,
      rgba(245,244,241,0.40) 100%
    );
  }
  .vpt-contact__quote { max-width: 280px; }
  .vpt-service__grid-reverse { display: contents; }
  .vpt-service__grid-reverse .vpt-service__checklist { order: 2; }
  .vpt-service__grid-reverse .vpt-service__body { order: 1; }
}

@media (max-width: 680px) {
  .vpt-header__nav {
    display: none;
    position: fixed;
    top: var(--vpt-header-h);
    left: 0; right: 0;
    background: var(--vpt-white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--vpt-border);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  }
  .vpt-header__nav.is-open { display: flex; }
  .vpt-header__toggle { display: flex; }
  .vpt-header__cta { width: 100%; text-align: center; }
  .vpt-divider { background-attachment: scroll; }
  .vpt-hero { min-height: max(80svh, 480px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .vpt-reveal { opacity: 1; transform: none; transition: none; }
  .vpt-faq__answer { transition: none; }
  .vpt-divider { background-attachment: scroll; }
}


/* ═══════════════════════════════════════════════════════════════════════
   VPT PERFORMANCE + LOGO PATCH — Frame Five Media, 2026-09-01
   Appended to style.css. Everything below overrides the rules above it.
   ═══════════════════════════════════════════════════════════════════════ */

/* ---- 1. Self-hosted variable fonts -----------------------------------
   Replaces the render-blocking fonts.googleapis.com stylesheet and the two
   extra DNS+TLS handshakes it forced. Two variable files cover every weight
   400–700 that the theme actually uses; the old link requested Raleway 300,
   which no rule in this sheet ever applies.
   font-display:swap keeps text painted in the fallback until they land.    */

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/playfair-var.woff2') format('woff2-variations'),
       url('assets/fonts/playfair-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                 U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/playfair-italic-var.woff2') format('woff2-variations'),
       url('assets/fonts/playfair-italic-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                 U+FFFD;
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/raleway-var.woff2') format('woff2-variations'),
       url('assets/fonts/raleway-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                 U+FFFD;
}

/* ---- 2. Header logo ---------------------------------------------------
   The header rendered the words "VP Psychotherapy" set in Playfair. It now
   carries the real VP monogram (uploads/2025/07/VP-Logo-2.png, keyed off its
   baked-in #ECE1DD ground so the black mark sits on the header's own blur).  */

.vpt-header__logo {
  display: flex;
  align-items: center;
  line-height: 0;           /* kill the inline-image descender gap */
  flex: 0 0 auto;
}
.vpt-header__logo-img {
  display: block;
  height: 54px;
  width: auto;
  transition: height 0.3s ease;
}
.vpt-header.is-scrolled .vpt-header__logo-img { height: 46px; }

@media (max-width: 900px) {
  .vpt-header__logo-img,
  .vpt-header.is-scrolled .vpt-header__logo-img { height: 44px; }
}

/* ---- 3. WebP background images ---------------------------------------
   The .jpg line is the fallback any browser without image-set() keeps;
   image-set() lets modern browsers take the WebP instead. The hero and the
   two dividers are CSS backgrounds, so they are NOT lazy-loaded — all three
   were downloading at full 2560px during first render.                     */

.vpt-hero__bg {
  background-image: url('/wp-content/uploads/2025/08/opt/vanessa-three.jpg');
  background-image: -webkit-image-set(
      url('/wp-content/uploads/2025/08/opt/vanessa-three.webp') type('image/webp'),
      url('/wp-content/uploads/2025/08/opt/vanessa-three.jpg')  type('image/jpeg'));
  background-image: image-set(
      url('/wp-content/uploads/2025/08/opt/vanessa-three.webp') type('image/webp'),
      url('/wp-content/uploads/2025/08/opt/vanessa-three.jpg')  type('image/jpeg'));
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
}

.vpt-divider--brain2 {
  background-image: url('/wp-content/uploads/2025/08/opt/brain-2.jpg');
  background-image: -webkit-image-set(
      url('/wp-content/uploads/2025/08/opt/brain-2.webp') type('image/webp'),
      url('/wp-content/uploads/2025/08/opt/brain-2.jpg')  type('image/jpeg'));
  background-image: image-set(
      url('/wp-content/uploads/2025/08/opt/brain-2.webp') type('image/webp'),
      url('/wp-content/uploads/2025/08/opt/brain-2.jpg')  type('image/jpeg'));
}

.vpt-divider--brain3 {
  background-image: url('/wp-content/uploads/2025/08/opt/brain-3.jpg');
  background-image: -webkit-image-set(
      url('/wp-content/uploads/2025/08/opt/brain-3.webp') type('image/webp'),
      url('/wp-content/uploads/2025/08/opt/brain-3.jpg')  type('image/jpeg'));
  background-image: image-set(
      url('/wp-content/uploads/2025/08/opt/brain-3.webp') type('image/webp'),
      url('/wp-content/uploads/2025/08/opt/brain-3.jpg')  type('image/jpeg'));
}

/* ---- 4. Reserve space for the two lazy portraits ----------------------
   Both are lazysizes-swapped, so they arrive after layout. Giving the boxes
   their aspect up front stops the reflow when they land.                    */

.vpt-contact__quote { aspect-ratio: 3 / 4; }
.vpt-contact__quote img { height: 100%; object-fit: cover; }
