/* ============================================================
   LUCID PSYCHIATRY — Design System
   Editorial · Holistic · Premium Wellness
   ============================================================ */

:root {
  /* Palette — Sage */
  --sage: #9AA23C;
  --sage-deep: #7d8430;
  --deep-green: #3C493F;
  --deep-green-soft: #4d5d51;
  --sand: #EAE7DC;
  --sand-warm: #e3dfd1;
  --bg: #F7F8F3;
  --bg-warm: #FAF8F2;
  --taupe: #B1A296;
  --taupe-soft: #c7bbb0;
  --ink: #2a3329;
  --ink-soft: #5a6759;
  --ink-mute: #8a958a;
  --line: rgba(60, 73, 63, 0.12);
  --line-soft: rgba(60, 73, 63, 0.06);

  /* Type */
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Layout */
  --container: 1240px;
  --container-narrow: 920px;
  --container-prose: 720px;

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

  /* Shadows */
  --shadow-soft: 0 1px 2px rgba(60, 73, 63, 0.04), 0 8px 24px rgba(60, 73, 63, 0.06);
  --shadow-lift: 0 2px 4px rgba(60, 73, 63, 0.05), 0 18px 48px rgba(60, 73, 63, 0.10);
  --shadow-deep: 0 4px 8px rgba(60, 73, 63, 0.06), 0 32px 80px rgba(60, 73, 63, 0.14);

  /* Radii */
  --r-1: 8px;
  --r-2: 14px;
  --r-3: 22px;
  --r-4: 32px;
  --r-5: 48px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-scale: 1; /* tweakable */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ─── Type ─────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 380;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--deep-green);
  margin: 0;
  text-wrap: balance;
  font-variation-settings: "SOFT" 50, "WONK" 0;
}
h1 { font-size: clamp(2.6rem, 5.4vw, 5.4rem); }
h2 { font-size: clamp(2.1rem, 3.8vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 2.1vw, 1.85rem); }
h4 { font-size: 1.25rem; line-height: 1.3; }

p { margin: 0 0 1em; text-wrap: pretty; }
.lead { font-size: 1.18rem; line-height: 1.65; color: var(--ink-soft); max-width: 60ch; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--sage-deep);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.italic-serif { font-style: italic; font-family: var(--serif); }

/* ─── Layout ─────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 32px; }
.prose-w { max-width: var(--container-prose); margin: 0 auto; padding: 0 32px; }
section { position: relative; }
.section-pad { padding: clamp(64px, 9vw, 144px) 0; }
.section-pad-sm { padding: clamp(48px, 6vw, 96px) 0; }

/* ─── Header ─────────────────────────── */
.nav-mobile { display: none; }
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: all 0.5s var(--ease);
  background: transparent;
}
.site-header.scrolled {
  background: rgba(247, 248, 243, 0.78);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 0;
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-mark img { height: 80px; width: auto; transition: height 0.4s var(--ease); }
.site-header.scrolled .logo-mark img { height: 64px; }
.header-right {
  display: flex;
  align-items: center;
  gap: 38px;
  margin-left: auto;
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: 38px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-primary a {
  font-size: 0.95rem;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s;
}
.nav-primary a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 1px;
  background: var(--sage);
  transition: all 0.4s var(--ease);
  transform: translateX(-50%);
}
.nav-primary a:hover { color: var(--sage-deep); }
.nav-primary a:hover::after { width: 100%; }
.nav-primary a.active { color: var(--sage-deep); }
.nav-primary a.active::after { width: 14px; opacity: 0.7; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 50%;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--deep-green);
  position: relative;
  transition: all 0.3s var(--ease);
}
.menu-toggle span::before, .menu-toggle span::after {
  content: ''; position: absolute; left: 0;
  width: 22px; height: 1.5px; background: currentColor;
  transition: all 0.3s var(--ease);
}
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }
.menu-toggle.open span { background: transparent; }
.menu-toggle.open span::before { transform: rotate(45deg); top: 0; }
.menu-toggle.open span::after { transform: rotate(-45deg); top: 0; }

/* ─── Buttons ────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.4s var(--ease);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--deep-green);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(60, 73, 63, 0.22);
}
.btn-sage { background: var(--sage); color: white; }
.btn-sage:hover { background: var(--sage-deep); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(154, 162, 60, 0.3); }

.btn-ghost {
  background: transparent;
  color: var(--deep-green);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--deep-green); background: rgba(60, 73, 63, 0.04); }

.btn-light {
  background: rgba(255, 255, 255, 0.9);
  color: var(--deep-green);
  backdrop-filter: blur(10px);
}
.btn-light:hover { background: white; transform: translateY(-2px); }

.btn-outline-light {
  background: transparent;
  color: var(--bg);
  border: 1px solid rgba(247, 248, 243, 0.4);
}
.btn-outline-light:hover { border-color: var(--bg); background: rgba(247, 248, 243, 0.08); }

.btn-arrow svg { transition: transform 0.4s var(--ease); }
.btn:hover .btn-arrow svg { transform: translateX(4px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--deep-green);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: all 0.3s;
  font-weight: 500;
}
.text-link:hover { border-color: var(--sage); color: var(--sage-deep); gap: 12px; }

/* ─── Header CTA ─────────────────────── */
.header-cta {
  padding: 11px 22px;
  font-size: 0.9rem;
}

/* ─── Hero ───────────────────────────── */
.hero {
  position: relative;
  padding: 200px 0 120px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-eyebrow { margin-bottom: 24px; }
.hero h1 { margin-bottom: 28px; }
.hero h1 em {
  font-style: italic;
  color: var(--sage-deep);
  font-weight: 300;
}
.hero-sub {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 36px;
  line-height: 1.6;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 40px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.hero-meta-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--sage);
}
.hero-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Hero visual — botanical composition */
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
}

/* Background washes */
.wash {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.55;
}
.wash-sage { background: var(--sage); }
.wash-sand { background: var(--sand-warm); }
.wash-deep { background: var(--deep-green); opacity: 0.15; }
.wash-taupe { background: var(--taupe); }

/* ─── Section dividers (organic) ─── */
.divider-leaf {
  display: flex;
  justify-content: center;
  padding: 40px 0;
  color: var(--sage);
  opacity: 0.5;
}
.divider-leaf svg { width: 28px; height: 28px; }

/* ─── Cards ──────────────────────────── */
.card {
  background: white;
  border-radius: var(--r-3);
  padding: 36px;
  border: 1px solid var(--line-soft);
  transition: all 0.5s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: transparent;
}
.card-glass {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.card-sand {
  background: var(--sand);
  border-radius: var(--r-3);
  padding: 36px;
}
.card-deep {
  background: var(--deep-green);
  color: var(--bg);
  border-radius: var(--r-3);
  padding: 36px;
}
.card-deep h3 { color: var(--bg); }

/* ─── Reveal animations ──────────────── */
.reveal {
  opacity: 0;
  transform: translateY(calc(28px * var(--motion-scale)));
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }
.reveal-d6 { transition-delay: 0.48s; }

/* ─── Footer ─────────────────────────── */
.site-footer {
  background: var(--deep-green);
  color: var(--sand);
  padding: 96px 0 32px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -300px; right: -200px;
  width: 600px; height: 600px;
  background: var(--sage);
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.15;
  pointer-events: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 80px;
  position: relative;
}
.footer-brand img { height: 64px; margin-bottom: 24px; filter: brightness(0) invert(0.92) sepia(0.1); }
.footer-brand p { color: rgba(234, 231, 220, 0.7); max-width: 32ch; }
.footer-col h5 {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(234, 231, 220, 0.5);
  margin: 0 0 20px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  color: var(--sand);
  font-size: 0.96rem;
  transition: color 0.3s;
  position: relative;
}
.footer-col a:hover { color: var(--sage); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid rgba(234, 231, 220, 0.12);
  font-size: 0.86rem;
  color: rgba(234, 231, 220, 0.55);
  position: relative;
}
.footer-disclaimer {
  margin-top: 24px;
  padding: 20px 24px;
  background: rgba(247, 248, 243, 0.06);
  border-left: 2px solid var(--sage);
  border-radius: 0 var(--r-2) var(--r-2) 0;
  font-size: 0.85rem;
  color: rgba(234, 231, 220, 0.7);
  line-height: 1.6;
}

/* ─── Mobile ─────────────────────────── */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .nav-primary { display: none; }
  .menu-toggle { display: flex; }
  .header-cta { display: none; }
  .hero { padding: 140px 0 80px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
  .container, .narrow, .prose-w { padding: 0 24px; }
  .header-inner { padding: 0 24px; }
  .nav-mobile {
    display: flex;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 99;
    display: flex; flex-direction: column;
    padding: 100px 32px 40px;
    transform: translateY(-100%);
    transition: transform 0.5s var(--ease);
  }
  .nav-mobile.open { transform: translateY(0); }
  .nav-mobile a {
    font-family: var(--serif);
    font-size: 2rem;
    color: var(--deep-green);
    padding: 16px 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-mobile .btn { margin-top: 32px; align-self: flex-start; }
}

/* ─── Animation keyframes ─────────── */
@keyframes float-slow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -16px); }
}
@keyframes float-slow-2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-15px, 22px); }
}
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}
.float-1 { animation: float-slow 14s ease-in-out infinite; }
.float-2 { animation: float-slow-2 17s ease-in-out infinite; }
.drift { animation: drift 9s ease-in-out infinite; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ─── Utility ────────────────────────── */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 24px; }
.gap-6 { gap: 32px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
