/* CSS Design System for Steven Eserin Website (Light Theme) */
@import url('https://fonts.googleapis.com/css2?family=PT+Sans+Narrow:wght@400;700&display=swap');

:root {
  /* Colors */
  --bg-body: #f8fafc;
  /* Off-white */
  --text-primary: #111111;
  /* Dark charcoal/black */
  --text-secondary: #475569;
  /* Medium grey */

  --accent-primary: #111111;
  /* Charcoal black */
  --accent-secondary: #475569;
  /* Medium grey */
  --accent-glow: rgba(17, 17, 17, 0.08);


  --header-bg: #111111;
  /* Charcoal grey */
  --header-text: #f8fafc;
  /* White/light text for contrast */
  --header-text-secondary: #94a3b8;

  --panel-bg: #ffffff;
  /* White card */
  --panel-border: #e2e8f0;
  /* Light border */
  --footer-bg: #f1f5f9;
  /* Slightly darker light grey for footer */
  --footer-border: #e2e8f0;

  /* Fonts */
  --font-heading: 'PT Sans Narrow', sans-serif;
  --font-body: 'PT Sans Narrow', sans-serif;

  /* Heights */
  --header-height: 72px;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 1000;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--header-text);
}

.logo-svg {
  width: 32px;
  height: 32px;
}

/* Hamburger Menu Button */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  z-index: 1010;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--header-text);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s;
}

/* Hamburger Active/Open Animation */
.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background-color: var(--header-text);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background-color: var(--header-text);
}

/* Navigation Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  height: 100vh;
  background-color: var(--header-bg);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: var(--header-height);
  padding-right: 1.5rem;
  padding-left: 1.5rem;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-overlay.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: right;
  width: 100%;
  margin-top: 1.5rem;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--header-text-secondary);
  position: relative;
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  transition: color 0.2s, background-color 0.2s;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--header-text);
  background-color: rgba(255, 255, 255, 0.06);
}

.nav-link::after {
  display: none;
}

/* Main Content Wrapper */
.main-content {
  flex: 1 0 auto;
  padding: 3rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Container & Pages Layout */
.container {
  width: 100%;
  max-width: 860px;
  padding: 2rem 0;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.page-subtitle {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 500;
}

/* Profile Header Section */
.profile-header {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--panel-border);
}

.profile-info {
  text-align: center;
}

.profile-info .page-title:nth-child(2) {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.profile-avatar-container {
  flex-shrink: 0;
}

.profile-avatar {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 12px;
  display: block;
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 640px) {
  .profile-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2.5rem;
  }

  .profile-info {
    text-align: left;
    flex: 1;
  }
}

.page-body {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.page-body p {
  margin-bottom: 1.5rem;
}

.page-body p:last-child {
  margin-bottom: 0;
}

/* Form Styling (Contact Page) */
.contact-form {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: grid;
  gap: 0.5rem;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-input,
.form-textarea {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

.submit-btn {
  background: var(--header-bg);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Static Footer */
.site-footer {
  flex-shrink: 0;
  width: 100%;
  padding: 1.5rem;
  background-color: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.footer-link:hover {
  color: var(--text-primary);
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .site-header {
    padding: 0 3rem;
  }

  .site-footer {
    flex-direction: row;
    justify-content: space-between;
    padding: 1.5rem 3rem;
    text-align: left;
  }


  .page-title {
    font-size: 3rem;
  }
}

/* Publications */
.publications-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.publication-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--panel-border);
}

.publication-card:first-child {
  padding-top: 0;
}

.publication-card:last-child {
  border-bottom: none;
}

.publication-cover {
  flex-shrink: 0;
  width: 100%;
  max-width: 160px;
}

.publication-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.publication-info {
  flex: 1;
}

.publication-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.publication-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.publication-link {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.01em;
  transition: color 0.2s, gap 0.2s;
}

.publication-link:hover {
  color: var(--accent-secondary);
}

@media (min-width: 540px) {
  .publication-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }

  .publication-cover {
    width: 140px;
  }
}

/* Leaf animation */
#leaf-container {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: -9999;
  pointer-events: none;
  opacity: 0.4;
}

.leaf-sway {
  will-change: transform;
}

.leaf-spin {
  will-change: transform;
}

/* ── Collapsible Description (Read More) ── */
.js-collapsible-text {
  position: relative;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.js-collapsible-text.collapsed-clamp {
  overflow: hidden;
}

/* Blur/Fade effect when text is clamped */
.js-collapsible-text.collapsed-clamp::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2.5rem;
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0), var(--bg-body, #f8fafc));
  pointer-events: none;
}

/* Read More Button (Chevron Toggle) */
.read-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--panel-border, #e2e8f0);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: var(--accent-primary, #111111);
  cursor: pointer;
  padding: 0;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.read-more-btn:hover {
  background-color: var(--panel-border, #e2e8f0);
  color: var(--accent-secondary, #475569);
  transform: translateY(2px);
}

.read-more-btn svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 18px;
  height: 18px;
}

.read-more-btn.is-expanded svg {
  transform: rotate(180deg);
}

/* ── Therapy Services Grid ── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  border: 1px solid var(--panel-border, #e2e8f0);
  padding: 1.5rem;
  border-radius: 8px;
  background-color: var(--panel-bg, #ffffff);
}

.service-card h2 {
  margin-top: 0;
}

.service-card details {
  margin-bottom: 0.5rem;
}

.service-card summary {
  cursor: pointer;
  font-weight: bold;
}

.service-card details p {
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.service-card ul {
  padding-left: 1.2rem;
  margin-top: 1rem;
}

.service-card p + p {
  margin-top: 1rem;
}

/* ── Onboarding Panel ── */
.onboarding-panel {
  background-color: var(--bg-body, #f8fafc);
  padding: 2rem;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
}

.pricing-info, .initial-session-info {
  flex: 1;
  min-width: 250px;
}

.pricing-info ul {
  list-style: none;
  padding: 0;
  font-size: 1.1rem;
}

.pricing-info li {
  margin-bottom: 0.5rem;
}

.pricing-info .concessions-note {
  font-size: 0.85em;
  color: var(--text-secondary, #475569);
}

.initial-session-info {
  border-left: 2px solid var(--panel-border, #e2e8f0);
  padding-left: 2rem;
}

@media (max-width: 768px) {
  .initial-session-info {
    border-left: none;
    border-top: 2px solid var(--panel-border, #e2e8f0);
    padding-left: 0;
    padding-top: 2rem;
  }
}

.cta-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-primary, #111111);
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.2s, transform 0.2s;
}

.cta-button:hover {
  background-color: var(--accent-secondary, #475569);
  transform: translateY(-2px);
}