/* Alina Panova — psychologist site */

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Manrope:wght@300;400;500;600;700&family=Caveat:wght@400;500;600;700&display=swap');

/* ─────────  Palette: Роза  ───────── */
:root, :root[data-palette="pastel"] {
  --bg:        #FBF5EF;
  --bg-soft:   #F4E9E2;
  --bg-card:   #FFFAF5;
  --ink:       #4A3A3E;
  --ink-soft:  #7B6A6D;
  --ink-muted: #A7958F;
  --accent:    #D49A93;   /* тёплая роза */
  --accent-deep: #A87470;
  --moss:      #A7A6C4;   /* приглушённая лаванда */
  --gold:      #D4B89E;
  --divider:   rgba(74,58,62,0.10);
  --shadow:    0 1px 2px rgba(74,58,62,0.04), 0 12px 40px -8px rgba(74,58,62,0.10);
  --shadow-lg: 0 2px 6px rgba(74,58,62,0.05), 0 30px 80px -20px rgba(74,58,62,0.20);
}

/* ─────────  Mode: light (both bg and bg-soft lightened) ───────── */
:root[data-mode="light"] {
  --bg:        #FDF9F6;
  --bg-soft:   #FAF3ED;
  --bg-card:   #FFFDFA;
}

/* ─────────  Mode: medium (only --bg lightened; dark --bg-soft stays) ───────── */
:root[data-mode="medium"] {
  --bg:        #FDF9F6;
}

/* ─────────  Fonts  ───────── */
:root[data-font="comfortaa"] {
  --font-display: 'Comfortaa', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-serif:   'Cormorant Garamond', 'Georgia', serif;
}
:root[data-font="serif"] {
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-serif:   'Cormorant Garamond', 'Georgia', serif;
}

/* ─────────  Density  ───────── */
:root[data-density="dense"]   { --section-pad: 44px;  --gap-lg: 24px; }
:root[data-density="regular"] { --section-pad: 64px;  --gap-lg: 32px; }
:root[data-density="airy"]    { --section-pad: 120px; --gap-lg: 56px; }

/* ─────────  Base  ───────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.display { font-family: var(--font-display); letter-spacing: -0.01em; }
.serif   { font-family: var(--font-serif); }
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 500;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section { padding: var(--section-pad) 0; }

/* Subtle grain for warmth */
.grain::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-1px); background: var(--accent-deep); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--divider);
}
.btn-ghost:hover { transform: translateY(-1px); background: var(--bg-card); }

/* Links */
.link-inline {
  border-bottom: 1px solid var(--accent);
  text-decoration: none;
  transition: color .2s;
}
.link-inline:hover { color: var(--accent); }

/* Dividers / flourishes */
.flourish {
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
  color: var(--accent);
  opacity: 0.7;
}
.flourish::before, .flourish::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}

/* Card */
.card {
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--divider);
}

/* ─────────  Method cards: uniform fixed height (set by JS), expand on click  ───────── */
.method-card {
  overflow: hidden;
}
.method-card .method-text {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.method-card.has-overflow .method-text {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.8em), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 1.8em), transparent 100%);
}
.method-card .method-more {
  display: none;
}
.method-card.has-overflow .method-more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  cursor: pointer;
  user-select: none;
}
.method-card.has-overflow .method-more:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}
.method-card.has-overflow .method-more .chev {
  display: inline-block;
  transition: transform .2s ease;
}
.method-card.is-expanded {
  height: auto !important;
  overflow: visible;
}
.method-card.is-expanded .method-text {
  flex: 0 0 auto;
  overflow: visible;
  -webkit-mask-image: none;
          mask-image: none;
}
.method-card.is-expanded .method-more .chev {
  transform: rotate(180deg);
}

/* Scrollbar for horizontal galleries */
.h-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 0 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-muted) transparent;
}
.h-scroll::-webkit-scrollbar { height: 6px; }
.h-scroll::-webkit-scrollbar-thumb { background: var(--ink-muted); border-radius: 999px; }

/* Wrapper that hints at scrollable content */
.h-scroll-wrap {
  position: relative;
}
.h-scroll-wrap::before,
.h-scroll-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 24px; /* match h-scroll padding-bottom so fade ends above scrollbar */
  width: 64px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity .25s ease;
}
.h-scroll-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}
.h-scroll-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}
.h-scroll-wrap[data-can-scroll-left="1"]::before { opacity: 1; }
.h-scroll-wrap[data-can-scroll-right="1"]::after { opacity: 1; }
/* When parent section uses --bg-soft, fade should match */
section[style*="bg-soft"] .h-scroll-wrap::before { background: linear-gradient(to right, var(--bg-soft) 0%, transparent 100%); }
section[style*="bg-soft"] .h-scroll-wrap::after  { background: linear-gradient(to left,  var(--bg-soft) 0%, transparent 100%); }

/* Scroll indicators (decorative chevrons, not interactive) */
.h-scroll-arrow {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity .25s ease;
}
.h-scroll-arrow svg { width: 44px; height: 44px; display: block; stroke-width: 1.4; }
.h-scroll-arrow.left { right: auto; left: 8px; }
.h-scroll-wrap[data-can-scroll-right="1"] .h-scroll-arrow.right { opacity: .85; }
.h-scroll-wrap[data-can-scroll-left="1"] .h-scroll-arrow.left { opacity: .85; }

/* Subtle "scroll to see more" hint pill below the row */
.h-scroll-hint {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.h-scroll-hint .arrow {
  display: inline-block;
  animation: hintShift 1.6s ease-in-out infinite;
}
@keyframes hintShift {
  0%, 100% { transform: translateX(0); opacity: .55; }
  50% { transform: translateX(6px); opacity: 1; }
}

/* Hide scrollbar in artboard mode (inside canvas) */
.artboard-scope .h-scroll::-webkit-scrollbar { display: none; }
.artboard-scope { font-size: 15px; }

/* ─────────  Scroll reveal (soft fade-up)  ───────── */
.reveal { opacity: 0; will-change: opacity, transform; transform: translateY(60px); transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1); }
html[data-no-reveal] .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.reveal.is-visible { opacity: 1; transform: none; }
html[data-no-reveal] .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* Mobile: longer fade so the tail is visible after fast flick-scrolls */
@media (max-width: 768px) {
  .reveal { transform: translateY(80px); transition-duration: 1.6s; }
}

.footer-br { display: none; }
.footer-sep { display: inline; }

/* Reduced motion: respect user pref */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
