/* ==========================================================================
   Olga Sherer — Psychotherapy
   Bilingual (he / ru), RTL-aware, dependency-free CSS
   ========================================================================== */

:root {
  /* palette — warm, calm earth tones */
  --cream:      #faf6f0;
  --cream-deep: #f2ebe1;
  --surface:    #ffffff;
  --ink:        #2f2a25;
  --ink-soft:   #574f47;
  /* text colours below are checked against every background they sit on
     (cream / cream-deep / white / contact gradient) at WCAG AA — 4.5:1 min */
  --muted:      #6a6053;
  --sage:       #7d8f74;
  --sage-deep:  #556647;
  --sand:       #c8a98a;
  --line:       #e4dad0;
  --wa:         #149a55; /* darkened WhatsApp green: white glyph stays ≥3:1 */
  --wa-deep:    #0f7a46;

  /* type */
  --font: "Rubik", ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
  --h1: clamp(2.1rem, 6.2vw, 3.8rem);
  --h2: clamp(1.5rem, 3.6vw, 2.35rem);
  --h3: clamp(1.1rem, 2vw, 1.3rem);
  --body: clamp(1rem, 1.15vw, 1.09rem);

  /* space & shape */
  --wrap: 1120px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --sec-y: clamp(3.5rem, 8vw, 6.5rem);
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --shadow-sm: 0 2px 10px rgba(58, 45, 32, .06);
  --shadow-md: 0 12px 34px rgba(58, 45, 32, .10);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--body);
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-soft);
  background: var(--cream);
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0 0 .6em;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

img, picture, svg { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--sage-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Language switching: one DOM, two languages
   -------------------------------------------------------------------------- */
html[lang="he"] [lang="ru"] { display: none !important; }
html[lang="ru"] [lang="he"] { display: none !important; }

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: 760px; }
.center { text-align: center; }

.section { padding-block: var(--sec-y); }
.section-alt { background: var(--cream-deep); }

.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.center .section-head { margin-inline: auto; }

.visually-hidden, .skip-link:not(:focus) {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  inset-block-start: .75rem;
  inset-inline-start: .75rem;
  z-index: 200;
  background: var(--surface);
  color: var(--ink);
  padding: .6rem 1rem;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
}

.eyebrow {
  margin: 0 0 .7em;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.body-text { max-width: 68ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  background: rgba(250, 246, 240, .88);
  backdrop-filter: saturate(140%) blur(10px);
  border-block-end: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--ink);
  margin-inline-end: auto;
}
.brand-mark {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, #fff 0 18%, transparent 19%),
    linear-gradient(150deg, var(--sage) 0%, var(--sand) 100%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-weight: 500; font-size: 1.02rem; }
.brand-text small { font-size: .74rem; color: var(--muted); letter-spacing: .06em; }

.site-nav { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.6rem); }
.site-nav ul {
  display: flex;
  gap: clamp(.5rem, 1.8vw, 1.5rem);
  margin: 0; padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: .4rem .1rem;
  color: var(--ink-soft);
  font-size: .95rem;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--sage-deep); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
  flex: none;
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .82rem;
  padding: .35rem .8rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.6;
}
.lang-switch button[aria-pressed="true"] { background: var(--sage-deep); color: #fff; }

/* Single-tap language toggle — shown on mobile instead of .lang-switch.
   Its label is the language the visitor would switch TO. */
.lang-toggle {
  display: none;
  align-items: center;
  gap: .35rem;
  flex: none;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: .38rem .8rem;
  min-height: 38px; /* same height as .nav-toggle beside it — aligned, thumb-sized */
  font: inherit;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ink);
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--sage); color: var(--sage-deep); }
.lang-toggle svg {
  width: 15px; height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

/* The toggle deliberately shows the OTHER language, so its label visibility is
   inverted relative to the global html[lang] rules — hence the !important,
   which only ever overrides those two rules. */
html[lang="he"] .lang-toggle [lang="ru"],
html[lang="ru"] .lang-toggle [lang="he"] { display: inline !important; }
html[lang="he"] .lang-toggle [lang="he"],
html[lang="ru"] .lang-toggle [lang="ru"] { display: none !important; }

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-sm);
  width: 42px; height: 38px;
  padding: 9px 10px;
  cursor: pointer;
  flex: none;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn .ico { width: 20px; height: 20px; fill: currentColor; flex: none; }

.btn-primary {
  background: var(--wa-deep);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #0c6b3c; color: #fff; box-shadow: var(--shadow-md); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--sage); color: var(--sage-deep); }

.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.center-row { justify-content: center; }

.link-arrow {
  display: inline-block;
  margin-top: 1.4rem;
  font-weight: 500;
  text-decoration: none;
  border-block-end: 1px solid currentColor;
  padding-block-end: 2px;
}
.link-arrow::after {
  content: "→";
  display: inline-block;
  margin-inline-start: .4em;
  transition: transform .2s ease;
}
html[dir="rtl"] .link-arrow::after { content: "←"; }
.link-arrow:hover::after { transform: translateX(-3px); }
html[dir="ltr"] .link-arrow:hover::after { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(78vh, 660px);
  padding-block: clamp(3.5rem, 9vw, 7rem);
  overflow: hidden;
  background: linear-gradient(160deg, #f6efe4 0%, #efe6d9 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* source art is small & soft by design — a light blur keeps it intentional */
  filter: blur(2px) saturate(1.08);
  transform: scale(1.06);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(250, 246, 240, .82) 0%,
    rgba(250, 246, 240, .70) 45%,
    rgba(242, 235, 225, .88) 100%);
}
.hero-inner { max-width: 720px; }
.hero h1 { margin-bottom: .25em; }
.hero-tagline {
  margin: 0 0 1rem;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  font-weight: 400;
  color: var(--sage-deep);
}
.hero-lead { max-width: 56ch; font-size: clamp(1.02rem, 1.5vw, 1.15rem); }

/* --------------------------------------------------------------------------
   Lead quote
   -------------------------------------------------------------------------- */
.section-lead { padding-block: clamp(2.6rem, 6vw, 4.5rem); }
.lead-quote {
  position: relative;
  margin: 0;
  font-size: clamp(1.08rem, 1.9vw, 1.3rem);
  line-height: 1.9;
  color: var(--ink);
  text-align: center;
}
.lead-quote::before {
  content: "";
  display: block;
  width: 48px; height: 2px;
  margin: 0 auto 1.6rem;
  background: var(--sand);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: clamp(1.8rem, 5vw, 4rem);
  align-items: center;
}
.about-photo img {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 22%;
}
.about-text h2 { margin-bottom: 1.2em; }

.check-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .9rem; }
.check-list li {
  position: relative;
  padding-inline-start: 2rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: .62em;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(125, 143, 116, .18);
}

/* --------------------------------------------------------------------------
   Approach / poem
   -------------------------------------------------------------------------- */
.poem {
  margin: clamp(2.2rem, 5vw, 3.2rem) auto 0;
  max-width: 620px;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border-inline-start: 3px solid var(--sand);
}
.poem blockquote { margin: 0; font-size: 1.05rem; line-height: 1.9; color: var(--ink); }
.poem figcaption {
  margin-top: 1rem;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { color: var(--ink); }
.card-note { color: var(--muted); font-style: italic; }
.card-article { border-inline-start: 3px solid var(--sage); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.section-contact {
  background: linear-gradient(170deg, #f4ede2 0%, #ece2d4 100%);
}
.section-contact .btn-ghost { word-break: break-word; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: #d8d0c6;
  padding-block: clamp(2.2rem, 5vw, 3.2rem);
  font-size: .92rem;
}
.footer-inner { display: grid; gap: 1.4rem; justify-items: center; text-align: center; }
.footer-brand { display: grid; gap: .2rem; margin: 0; }
.footer-brand strong { color: #fff; font-size: 1.1rem; font-weight: 500; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; justify-content: center; }
.footer-nav a { color: #d8d0c6; text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-legal { margin: 0; color: #9d948a; font-size: .82rem; }

/* --------------------------------------------------------------------------
   Floating WhatsApp
   -------------------------------------------------------------------------- */
.wa-float {
  position: fixed;
  inset-block-end: clamp(1rem, 3vw, 1.6rem);
  inset-inline-end: clamp(1rem, 3vw, 1.6rem);
  z-index: 90;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--wa);
  box-shadow: 0 6px 20px rgba(15, 122, 70, .38);
  transition: transform .2s ease;
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.wa-float:hover { transform: scale(1.07); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 340px; margin-inline: auto; }
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    inset-inline: 0;
    inset-block-start: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    padding: 1rem var(--gutter) 1.4rem;
    background: var(--cream);
    border-block-end: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li + li { border-block-start: 1px solid var(--line); }
  .site-nav a { padding: .75rem .2rem; font-size: 1.02rem; }
  .lang-toggle { display: inline-flex; }
  .lang-switch { display: none; } /* replaced by .lang-toggle in the header */
  .header-inner { position: relative; }
  .cta-row .btn { flex: 1 1 100%; }
  .center-row .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .site-header, .wa-float, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
}
