/*
Theme Name: Holistic Psychotherapy
Theme URI:
Author:
Description: Single-page WordPress theme for Holistic Psychotherapy practice.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: holistic-psychotherapy
*/

/* ================================================
   VARIABLES
   ================================================ */
:root {
  --cream:       #f8f6e9;
  --cream-light: #faf9f0;
  --cream-alt:   #f9f7e6;
  --sage:        #7D9E82;
  --green-alt:   #ebf6ed;
  --blue-alt:    #f9fdff;
  --sage-hover:  #5C7F61;
  --text:        #1C0F05;
  --heading:     #221a06;
  --text-soft:   #6A6257;
  --text-muted:  #9D9287;
  --white:       #f9f5ed;
  --header-h:    72px;
  --max-w:       1120px;
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ================================================
   RESET & BASE
   ================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
  line-height: 1.8;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

section[id] {
  scroll-margin-top: var(--header-h);
}

/* ================================================
   HEADER
   ================================================ */
#masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  opacity: 0.95;
  transition: box-shadow 0.4s var(--ease), opacity 0.4s var(--ease);
}

#masthead.scrolled {
  box-shadow: 0 2px 24px rgba(45, 42, 38, 0.08);
  opacity: 1;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--heading);
  transition: color 0.3s;
  font-style: italic;
}

.site-title-bold { font-weight: 400; font-style: italic; }

.site-title:hover { color: var(--sage); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--sage);
  transition: right 0.35s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  right: 0;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s var(--ease);
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ================================================
   HERO
   ================================================ */
#hero {
  --hero-bg: none;
  position: relative;
}

.hero-stage {
  height: 100vh;
  overflow: hidden;
  background: var(--cream);
  display: flex;
  align-items: center;
}

/* Background image layer */
.hero-bg-layer {
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: 40% center;
  background-repeat: no-repeat;
  z-index: 0;
}

/* Text panel — sits above the animation layer */
.hero-content {
  padding: 60px 52px 60px 0;
  position: relative;
  z-index: 3;
  max-width: 52%;
  margin-left: max(40px, calc((100vw - var(--max-w)) / 2 + 40px));
  margin-right: auto;
  margin-top: -15vh;
  background: transparent;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .hero-content {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 48px 36px;
    margin-top: 24px;
  }
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--heading);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--heading);
  flex-shrink: 0;
}

.hero-content .eyebrow {
  color: #fff;
  font-size: 0.9375rem;
}

.hero-content .eyebrow::before {
  background: #fff;
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 800;
  color: var(--heading);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 36px;
}

.hero-text {
  font-size: 1.25rem;
  line-height: 1.9;
  color: #fff;
  max-width: 100%;
  margin-bottom: 18px;
  font-weight: 400;
}

mark {
  background: rgba(0, 0, 0, 0.15);
  color: inherit;
  padding:7px 10px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

mark mark {
  background: rgba(0, 0, 0, 0.3);
  font-style: italic;
  white-space: nowrap;
  font-style: italic;
}

.hero-actions {
  margin-top: 52px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 38px;
  border-radius: 100px;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  border: none;
  line-height: 1;
}

.btn-primary {
  background: var(--heading);
  color: #ffffff;
}

.btn-primary:hover {
  background: #162438;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 27, 42, 0.28);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-soft);
  border: 1px solid rgba(13, 27, 42, 0.2);
}

.btn-outline:hover {
  border-color: var(--heading);
  color: var(--heading);
  transform: translateY(-2px);
}

.hero-actions .btn-outline {
  background: transparent;
  color: #ffffff;
  font-weight: 700;
  border: 1px solid #ffffff;
}

.hero-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  color: #ffffff;
}

.hero-actions .btn-primary {
  background: rgba(13, 27, 42, 0.7);
  border: 1px solid rgba(13, 27, 42, 0.7);
}

.hero-actions .btn-primary:hover {
  background: #162438;
}

/* ================================================
   SHARED SECTION STYLES
   ================================================ */
section {
  padding: 100px 0;
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--heading);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--heading);
  flex-shrink: 0;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}

.section-text {
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--text-soft);
  font-weight: 300;
  margin-bottom: 22px;
}

.section-text:last-child { margin-bottom: 0; }

/* Botanical SVG divider */
.botanical-divider {
  width: 160px;
  margin: 0 0 48px;
  opacity: 1;
  display: none;
}

/* Scroll fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   SCROLL STORY
   ================================================ */
/* Spline 3D scene — behind the hero text panel */
.story-spinner {
  position: absolute;
  width: 55vw;
  height: 85vh;
  max-width: 760px;
  top: 50%;
  left: 38%;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.story-spinner spline-viewer {
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .story-spinner {
    width: 90vw;
    height: 60vh;
    left: 50%;
  }
}

.story-phrase {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--heading);
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  will-change: transform, opacity;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 32px rgba(247, 242, 233, 0.9);
}

.story-final {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--heading);
  opacity: 0;
  text-align: center;
  pointer-events: none;
  will-change: opacity;
  letter-spacing: -0.02em;
  width: 80%;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .story-phrase {
    font-size: clamp(1rem, 5vw, 1.4rem);
    white-space: normal;
    text-align: center;
    width: 72%;
  }
  .story-final {
    font-size: clamp(1.4rem, 6vw, 2rem);
    width: 88%;
  }
  .story-spinner { width: 150px; height: 230px; }
}

@media (prefers-reduced-motion: reduce) {
  .story-spinner,
  .story-phrase,
  .story-final { display: none; }
}

/* ================================================
   ABOUT
   ================================================ */
#about {
  background: var(--cream-light);
}

.about-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.about-header .section-label {
  justify-content: center;
}

.about-header .section-label::before {
  display: none;
}

.about-header .botanical-divider {
  margin: 0 auto 48px;
}

.about-header .section-text {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.offerings-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-align: center;
}

.offerings-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0;
}

.offering-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 22px;
  background: white;
  border: 1px solid rgba(125, 158, 130, 0.22);
  border-radius: 100px;
  font-size: 0.88rem;
  color: var(--text-soft);
  text-decoration: none;
  transition: border-color 0.3s, color 0.3s;
}

.offering-tag:hover {
  border-color: var(--sage);
  color: var(--text);
}

.offering-tag svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: var(--sage);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pillars-intro-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--heading);
  margin-bottom: 28px;
  text-align: center;
  align-items: center;
  gap: 14px;
}



.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-bottom: 56px;
  border: 1px solid rgba(125, 158, 130, 0.18);
}

.pillar-card {
  background: var(--cream-light);
  padding: 52px 44px;
  border-radius: 0;
  border-right: 3px solid var(--cream);
  border-bottom: 3px solid var(--cream);
  border-left: 0;
}

.pillar-number {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 14px;
  opacity: 0.8;
}

.pillar-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 12px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.pillar-card p {
  font-size: 0.93rem;
  line-height: 1.8;
  color: var(--text-soft);
  font-weight: 300;
}

.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.pillar-tag {
  font-size: 0.7rem;
  font-weight: 400;
  padding: 4px 11px;
  background: rgba(125, 158, 130, 0.1);
  color: var(--sage-hover);
  border-radius: 100px;
  letter-spacing: 0.05em;
}

.about-closing {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px !important;
  display: block;
  text-align: center;
}

/* ================================================
   BIO
   ================================================ */
#bio {
  background: white;
}

.bio-layout {
  display: grid;
  grid-template-columns: 1fr 1.65fr;
  gap: 80px;
  align-items: start;
}

.bio-photo-wrap {
  position: sticky;
  top: calc(var(--header-h) + 40px);
}

.bio-photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--cream-alt);
  border-radius: 3px;
  border: 1px solid rgba(125, 158, 130, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.bio-photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.bio-photo-placeholder .photo-icon {
  width: 56%;
  opacity: 0.12;
}

.bio-photo-caption {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.06em;
}

.bio-text-wrap .section-text { margin-bottom: 24px; }

/* ================================================
   CONTACT
   ================================================ */
#contact {
  background: var(--blue-alt);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.contact-intro-text {
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--text-soft);
  font-weight: 300;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: white;
  border: 1px solid rgba(125, 158, 130, 0.22);
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.97rem;
  font-weight: 300;
  color: var(--text);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(125, 158, 130, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.75;
}

.form-submit { align-self: flex-start; }

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  padding: 14px 18px;
  border-radius: 2px;
  font-size: 0.9rem;
  line-height: 1.6;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(125, 158, 130, 0.1);
  border: 1px solid rgba(125, 158, 130, 0.28);
  color: var(--sage-hover);
}

.form-message.error {
  display: block;
  background: rgba(196, 100, 80, 0.07);
  border: 1px solid rgba(196, 100, 80, 0.22);
  color: #a05040;
}

/* ================================================
   BOOKINGS
   ================================================ */
#bookings {
  background: var(--cream-light);
}

.bookings-layout {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.bookings-layout .section-label {
  justify-content: center;
}

.bookings-layout .section-label::before { display: none; }

.bookings-layout .section-heading { margin: 0 auto 20px; }

.bookings-intro {
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--text-soft);
  font-weight: 300;
  margin-bottom: 20px;
}

.calendly-wrapper {
  background: var(--cream-light);
  border-radius: 3px;
  border: 1px solid rgba(125, 158, 130, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendly-wrapper .calendly-inline-widget {
  width: 100%;
  min-height: 700px;
}

.calendly-placeholder {
  padding: 20px 20px;
  text-align: center;
}

.calendly-placeholder svg {
  width: 48px;
  height: 48px;
  stroke: var(--sage);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.45;
  margin: 0 auto 24px;
}

.calendly-placeholder p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.85;
}

.calendly-placeholder strong {
  color: var(--text-soft);
  font-weight: 400;
}

.calendly-placeholder em {
  font-style: normal;
  color: var(--sage);
}

/* ================================================
   FOOTER
   ================================================ */
#colophon {
  background: var(--text);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: rgba(247, 242, 233, 0.75);
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(247, 242, 233, 0.35);
  letter-spacing: 0.05em;
}

/* ================================================
   WORDPRESS ADMIN BAR OFFSET
   Shifts the fixed header down when the WP admin bar
   is visible (32px desktop, 46px on narrow screens).
   ================================================ */
.admin-bar #masthead {
  top: 32px;
}

.admin-bar section[id] {
  scroll-margin-top: calc(var(--header-h) + 32px);
}

.admin-bar .hero-stage {
  top: 32px;
  height: calc(100vh - 32px);
}

/* WP switches admin bar to 46px below 782px */
@media screen and (max-width: 782px) {
  .admin-bar #masthead {
    top: 46px;
  }

  .admin-bar section[id] {
    scroll-margin-top: calc(var(--header-h) + 46px);
  }

  .admin-bar .hero-stage {
    top: 46px;
    height: calc(100vh - 46px);
  }
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 960px) {
  .bio-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .bio-photo-wrap {
    position: static;
    max-width: 300px;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
    --text: #000000;
    --text-soft: #000000;
    --text-muted: #000000;
  }

  /* Readability pass: larger type across the board on small screens.
     --heading is left alone (also drives button/divider backgrounds),
     so headings that use it get color set explicitly here instead. */
  .site-title { color: #000000; }
  .hero-content .eyebrow { font-size: 1.08rem; padding-left: 30px;}
  .hero-text { font-size: 1.4rem; padding-left: 20px; padding-right: 20px; }
  .btn { font-size: 0.92rem; }
  .section-label { font-size: 0.83rem; color: #000000; }
  .section-heading { font-size: clamp(2.3rem, 3.5vw, 3rem); color: #000000; }
  .section-text { font-size: 1.17rem; }
  .offerings-label { font-size: 0.86rem; }
  .pillars-intro-label { font-size: 0.83rem; color: #000000; }
  .pillar-card h3 { font-size: 1.32rem; color: #000000; }
  .pillar-card p { font-size: 1.07rem; }
  .contact-intro-text { font-size: 1.17rem; }
  .bookings-intro { font-size: 1.17rem; }
  .form-group label { font-size: 0.86rem; }
  .form-group input,
  .form-group textarea { font-size: 1.12rem; }
  .form-message { font-size: 1.04rem; }
  .calendly-placeholder p { font-size: 1.09rem; }
  .footer-name { font-size: 1.27rem; }
  .footer-copy { font-size: 0.9rem; }

  .container { padding: 0 24px; }

  section { padding: 72px 0; }

  .header-inner { padding: 0 24px; }

  /* Mobile nav */
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 16px 0 24px;
    border-bottom: 1px solid rgba(125, 158, 130, 0.14);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 14px 24px;
    font-size: 1.01rem;
    text-align: center;
  }

  .nav-links a::after { display: none; }

  .hero-heading { font-size: clamp(2.2rem, 9vw, 3.2rem); }

  .hero-actions { flex-direction: column; align-items: flex-start; padding:0 15px;}
  .hero-actions .btn { width: 100%; text-align: center; }

  .bio-photo-wrap { margin: 0 auto; }

  .contact-layout { gap: 40px; }

  .bookings-layout { text-align: left; }
  .bookings-layout .section-label { justify-content: flex-start; }
  .bookings-layout .section-label::before { display: block; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .pillar-card { padding: 28px 24px; }
  .hero-content { padding: 60px 0; }
}
