/* Ivy Psychology - Design Tokens */

:root {
  /* Palette: Ivy (default - official brand) */
  --bg: #FBFBF8;
  --bg-warm: #EFF6EE;
  --bg-card: #FFFFFF;
  --bg-soft: #F0F0F0;
  --bg-dark: #1A2E1A;
  --ink: #15281A;
  --ink-soft: #3F5340;
  --ink-mute: #7A8A7C;
  --line: #DDE6DC;
  --line-soft: #ECEFEA;

  --primary: #1F3A1F;        /* Primary Ivy Green */
  --primary-hover: #122312;
  --primary-soft: #D1E7D3;
  --secondary: #2EB872;       /* Secondary Ivy Green */
  --secondary-soft: #B2DDB6;
  --sage: #8BD6A2;
  --leaf: #2F8749;
  --mint: #D1E7D3;
  --gold: #B89968;           /* warm accent (rare) */

  --grad: linear-gradient(140deg, #1F3A1F 0%, #2F8749 55%, #8BD6A2 100%);
  --grad-soft: linear-gradient(140deg, #B2DDB6 0%, #D1E7D3 100%);

  /* Type */
  --font-sans: "Quicksand", -apple-system, system-ui, sans-serif;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 36px;
  --r-full: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(21,40,26,0.04), 0 1px 1px rgba(21,40,26,0.03);
  --shadow-md: 0 6px 18px rgba(21,40,26,0.06), 0 2px 4px rgba(21,40,26,0.04);
  --shadow-lg: 0 22px 48px rgba(21,40,26,0.10), 0 8px 14px rgba(21,40,26,0.05);

  --container: 1240px;
  --container-narrow: 920px;
}

/* Density */
[data-density="airy"] {
  --space-8: 80px;
  --space-9: 120px;
  --space-10: 160px;
}
[data-density="cozy"] {
  --space-8: 48px;
  --space-9: 72px;
  --space-10: 96px;
}

/* Reset / base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* Typography - Quicksand */
.display-xl { font-weight: 300; font-size: clamp(48px, 6.8vw, 88px); line-height: 1.02; letter-spacing: -0.025em; }
.display-lg { font-weight: 300; font-size: clamp(40px, 5.2vw, 68px); line-height: 1.05; letter-spacing: -0.02em; }
.display-md { font-weight: 400; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -0.018em; }
.display-sm { font-weight: 500; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; letter-spacing: -0.012em; }
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.22em; color: var(--secondary); }
.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; font-weight: 400; }
.body { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.tiny { font-size: 13px; color: var(--ink-mute); }

em.in-line { font-weight: 500; color: var(--secondary); font-style: normal; }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 32px; }
section.section { padding: var(--space-9) 0; }
.section-sm { padding: var(--space-8) 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-full);
  font-size: 15px; font-weight: 600;
  transition: all .2s ease;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.btn-primary { background: var(--primary); color: #FFFFFF; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--secondary); color: #FFFFFF; }
.btn-secondary:hover { background: var(--leaf); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary); background: var(--bg-warm); }
.btn-text { padding: 8px 0; color: var(--primary); font-weight: 600; }
.btn-text:hover { color: var(--secondary); }
.btn-text .arrow { transition: transform .2s ease; display: inline-flex; }
.btn-text:hover .arrow { transform: translateX(4px); }

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--secondary-soft); }

/* Form */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--ink-mute); }
.input, .textarea, .select {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 15px;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-family: inherit;
  font-weight: 500;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 4px var(--primary-soft); }
.textarea { resize: vertical; min-height: 110px; }

/* Helpers */
.muted { color: var(--ink-mute); }
.divider { height: 1px; background: var(--line); margin: var(--space-7) 0; border: 0; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-full); background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600; }
.tag-soft { background: var(--bg-warm); color: var(--ink-soft); }
.tag-secondary { background: var(--secondary-soft); color: var(--primary); }
.tag-outline { background: transparent; border: 1px solid var(--secondary-soft); color: var(--primary); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Responsive 2-column layout: aside + content. Stacks to 1 column ≤ 980px. */
.split-2 { display: grid; grid-template-columns: 1fr 1.8fr; gap: 64px; align-items: start; }
@media (max-width: 980px) {
  .split-2 { grid-template-columns: 1fr; gap: 32px; }
  .split-2 > aside, .split-2 > div[style*="sticky"] { position: static !important; }
}
/* Tables on narrow screens: allow horizontal scroll rather than squish cells */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 520px; }

/* Catch-all: inline 2-column grids should stack on narrow viewports.
   Without this, pages using inline `grid-template-columns: 1fr 1.4fr` etc.
   stay 2-up at all widths and squish their content. */
@media (max-width: 980px) {
  main div[style*="grid-template-columns: 1fr 1fr"],
  main div[style*="grid-template-columns: 1fr 1.2fr"],
  main div[style*="grid-template-columns: 1fr 1.4fr"],
  main div[style*="grid-template-columns: 1fr 1.6fr"],
  main div[style*="grid-template-columns: 1fr 1.8fr"],
  main div[style*="grid-template-columns: 1fr 2fr"],
  main ul[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  /* Disable position:sticky on the now-stacked left columns */
  main aside[style*="position: sticky"],
  main div[style*="position: sticky"] {
    position: static !important;
  }
}

/* Animations */
.fade-in { animation: fadeIn .6s ease both; }
.fade-up { animation: fadeUp .7s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.page { animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Nav */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav-wrap.scrolled { border-bottom-color: var(--line-soft); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 16px; }
.nav-links { display: flex; gap: 0; align-items: center; }
.nav-link { padding: 9px 13px; border-radius: var(--r-full); font-size: 14px; font-weight: 500; color: var(--ink-soft); transition: all .15s ease; white-space: nowrap; }
.nav-link:hover { color: var(--primary); background: var(--bg-warm); }
.nav-link.active { color: var(--primary); background: var(--primary-soft); }

.logo { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--primary); }
.logo-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--grad); color: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); }

/* Image placeholders */
.img-ph {
  border-radius: var(--r-lg);
  background: var(--grad-soft);
  display: grid; place-items: center;
  color: var(--primary);
  font-size: 13px;
  overflow: hidden;
  position: relative;
}
.img-ph::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.5), transparent 40%),
                    radial-gradient(circle at 80% 90%, rgba(31,58,31,0.10), transparent 50%);
  pointer-events: none;
}

/* Pricing */
.price-tag { font-size: 44px; font-weight: 500; color: var(--primary); letter-spacing: -0.02em; line-height: 1; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px dashed var(--line); }
.price-row:last-child { border-bottom: 0; }
.price-row .pname { font-weight: 500; }
.price-row .pamt { font-size: 22px; color: var(--primary); font-weight: 600; }

/* Booking flow */
.step-bar { display: flex; gap: 8px; align-items: center; }
.step-dot { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background .3s ease; }
.step-dot.active { background: var(--secondary); }
.step-dot.done { background: var(--primary); }

.option-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all .15s ease;
  display: flex; align-items: flex-start; gap: 14px;
  text-align: left;
  width: 100%;
}
.option-card:hover { border-color: var(--secondary); background: var(--bg-warm); }
.option-card.selected { border-color: var(--secondary); background: var(--primary-soft); box-shadow: 0 0 0 4px color-mix(in oklab, var(--secondary-soft) 50%, transparent); }
.option-card .icon-cell { width: 42px; height: 42px; border-radius: 50%; background: var(--bg-warm); display: grid; place-items: center; color: var(--primary); flex-shrink: 0; }
.option-card.selected .icon-cell { background: var(--secondary); color: #fff; }

.timeslot {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-card);
  cursor: pointer;
  transition: all .15s ease;
}
.timeslot:hover:not(.disabled):not(.selected) { border-color: var(--secondary); background: var(--bg-warm); }
.timeslot.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.timeslot.disabled { color: var(--ink-mute); background: var(--bg-soft); cursor: not-allowed; opacity: 0.55; }

/* Footer */
.footer { background: var(--bg-dark); color: #E8EFE8; padding: var(--space-9) 0 var(--space-6); }
.footer a { color: #E8EFE8; opacity: 0.75; }
.footer a:hover { opacity: 1; color: var(--sage); }

/* Article / blog */
.prose { max-width: 680px; margin: 0 auto; }
.prose p { font-size: 17px; line-height: 1.8; color: var(--ink); margin: 0 0 22px; }
.prose h2 { font-weight: 500; font-size: 28px; margin: 48px 0 16px; letter-spacing: -0.012em; }
.prose blockquote { border-left: 3px solid var(--secondary); padding: 6px 0 6px 22px; margin: 28px 0; font-weight: 400; font-size: 20px; color: var(--primary); line-height: 1.5; }
.prose a { color: var(--secondary); border-bottom: 1px solid var(--secondary-soft); }

/* Mobile */
.menu-btn { display: none; }
.desktop-only { display: inline-flex; }
@media (max-width: 1100px) {
  .desktop-only { display: none; }
}
@media (max-width: 860px) {
  .nav-links.desktop { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-full); border: 1px solid var(--line); font-weight: 500; }
  .container, .container-narrow { padding: 0 20px; }
}

.mobile-sheet {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg);
  padding: 80px 32px 32px;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  animation: fadeIn .25s ease both;
}
.mobile-sheet a { padding: 14px 8px; border-bottom: 1px solid var(--line-soft); font-size: 22px; font-weight: 500; }
.close-btn { position: absolute; top: 18px; right: 22px; padding: 10px; border-radius: 50%; }

/* Trust strip */
.trust-strip { display: flex; gap: 56px; align-items: center; flex-wrap: wrap; }
.trust-strip .trust-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); font-weight: 500; }

.u-accent { background: linear-gradient(transparent 64%, var(--secondary-soft) 64%); padding: 0 3px; }

/* Avatar */
.avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--grad-soft); display: grid; place-items: center; color: var(--primary); font-size: 20px; font-weight: 600; flex-shrink: 0; }
.avatar-lg { width: 96px; height: 96px; font-size: 32px; }

.ornament { position: absolute; pointer-events: none; }

/* Hero frame */
.hero-frame {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--grad);
}

/* Pill stat */
.stat-pill { display: inline-flex; flex-direction: column; gap: 2px; padding: 14px 22px; background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); }
.stat-pill .n { font-size: 28px; font-weight: 500; color: var(--primary); letter-spacing: -0.02em; }
.stat-pill .l { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-mute); }

/* Subtle leaf pattern bg */
.bg-leaf {
  background:
    radial-gradient(circle at 12% 18%, var(--secondary-soft) 0%, transparent 25%),
    radial-gradient(circle at 88% 82%, var(--primary-soft) 0%, transparent 30%),
    var(--bg-warm);
}

/* Accordion */
.accordion-item { border-top: 1px solid var(--line); }
.accordion-item:last-child { border-bottom: 1px solid var(--line); }
.accordion-trigger { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 22px 0; font-size: 18px; font-weight: 500; color: var(--ink); text-align: left; }
.accordion-trigger:hover { color: var(--primary); }
.accordion-content { padding: 0 0 22px; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.accordion-chev { transition: transform .25s ease; color: var(--secondary); }
.accordion-item.open .accordion-chev { transform: rotate(45deg); }
