/*
Theme Name: Кабінет психолога
Theme URI:
Author:
Description: Персональна тема для психолога — блог/журнал, послуги, гайди, двомовна (UA/EN) шапка та футер. Базується на макеті, узгодженому з клієнтом.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: psych-theme
*/

:root {
  --ink: #22281F;
  --ink-soft: #52594A;
  --paper: #EDEAE0;
  --paper-raised: #F7F4EC;
  --paper-sunk: #E3DFD2;
  --moss: #4F6350;
  --moss-deep: #38473A;
  --amber: #B5722A;
  --rose: #8C4F49;
  --line: rgba(34,40,31,0.16);
  --line-soft: rgba(34,40,31,0.09);
  --shadow: rgba(34,40,31,0.14);

  --font-display: 'PT Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Golos Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #EAE5D6;
    --ink-soft: #B6BBA9;
    --paper: #14170F;
    --paper-raised: #1C2016;
    --paper-sunk: #10130C;
    --moss: #93B08F;
    --moss-deep: #6D8B70;
    --amber: #DE9C57;
    --rose: #C08681;
    --line: rgba(234,229,214,0.16);
    --line-soft: rgba(234,229,214,0.08);
    --shadow: rgba(0,0,0,0.45);
  }
}
:root[data-theme="dark"] {
  --ink: #EAE5D6;
  --ink-soft: #B6BBA9;
  --paper: #14170F;
  --paper-raised: #1C2016;
  --paper-sunk: #10130C;
  --moss: #93B08F;
  --moss-deep: #6D8B70;
  --amber: #DE9C57;
  --rose: #C08681;
  --line: rgba(234,229,214,0.16);
  --line-soft: rgba(234,229,214,0.08);
  --shadow: rgba(0,0,0,0.45);
}

* { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.site { padding: 0 clamp(18px, 5vw, 64px); }
a { color: inherit; }

.lang-en { display: none; }
.site[data-lang="en"] .lang-uk { display: none; }
.site[data-lang="en"] .lang-en { display: inline; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss-deep);
  font-weight: 600;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; text-wrap: balance; margin: 0; }
.max { max-width: 1180px; margin: 0 auto; }

/* ---------- Header ---------- */
header.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; flex-wrap: wrap; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.wordmark span { color: var(--moss-deep); }
nav.links { display: flex; gap: 28px; flex-wrap: wrap; }
nav.links a { font-size: 0.92rem; text-decoration: none; color: var(--ink-soft); position: relative; padding-bottom: 3px; }
nav.links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--moss-deep); transition: right 0.25s ease; }
nav.links a:hover { color: var(--ink); }
nav.links a:hover::after { right: 0; }

.top-actions { display: flex; align-items: center; gap: 14px; }
button.lang-toggle {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
button.lang-toggle:hover { border-color: var(--moss-deep); background: var(--paper-raised); }
button.lang-toggle:focus-visible, a:focus-visible, .btn:focus-visible, input:focus-visible { outline: 2px solid var(--moss-deep); outline-offset: 2px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover { color: var(--moss-deep); border-color: var(--moss-deep); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(48px, 9vw, 96px) 0 clamp(40px, 7vw, 72px);
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 72px);
  align-items: center;
  background-image: radial-gradient(var(--line-soft) 1px, transparent 1px);
  background-size: 16px 16px; background-position: -8px -8px;
}
.hero-copy { animation: rise 0.7s ease both; }
@keyframes rise { from { transform: translateY(10px); } to { transform: translateY(0); } }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.12; margin: 14px 0 20px; }
.hero .lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 46ch; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.btn {
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  padding: 13px 24px; border-radius: 8px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--moss-deep); color: var(--paper-raised); }
.btn-primary:hover { box-shadow: 0 6px 18px -6px var(--shadow); background: var(--moss); }
.btn-outline { border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--moss-deep); color: var(--moss-deep); }

.stat-row { display: flex; gap: clamp(20px, 4vw, 44px); flex-wrap: wrap; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--moss-deep); }
.stat span { font-size: 0.82rem; color: var(--ink-soft); }

.hero-portrait {
  aspect-ratio: 3 / 4; border-radius: 18px; border: 1.5px dashed var(--line);
  background: var(--paper-raised);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--ink-soft); text-align: center; padding: 24px; overflow: hidden;
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.hero-portrait svg { width: 56px; height: 56px; opacity: 0.7; }
.hero-portrait .cap { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; }

/* ---------- Section shell ---------- */
section { padding: clamp(56px, 9vw, 96px) 0; border-top: 1px solid var(--line-soft); }
.section-head { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 10px 0 12px; }
.section-head p { color: var(--ink-soft); margin: 0; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(28px, 5vw, 56px); }
.index-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 14px; padding: 26px; box-shadow: 0 1px 0 var(--line-soft) inset; }
.index-card dl { margin: 18px 0 0; display: grid; gap: 12px; }
.index-card dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--moss-deep); }
.index-card dd { margin: 2px 0 0; font-size: 0.95rem; }
.about-copy h3 { font-size: 1.5rem; margin-bottom: 14px; }
.about-copy p { color: var(--ink-soft); max-width: 60ch; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tag { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--ink-soft); }

/* ---------- Services ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; height: 100%; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -16px var(--shadow); }
.service-card svg { width: 30px; height: 30px; color: var(--moss-deep); margin-bottom: 18px; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.service-card p { color: var(--ink-soft); font-size: 0.94rem; flex-grow: 1; }
.service-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.price { font-family: var(--font-mono); font-size: 0.85rem; color: var(--amber); }
.card-link { font-size: 0.88rem; font-weight: 600; text-decoration: none; color: var(--moss-deep); }
.card-link:hover { text-decoration: underline; }

/* ---------- Journal ---------- */
.journal-list { display: flex; flex-direction: column; }
.journal-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: start; padding: 26px 0; border-top: 1px solid var(--line-soft); text-decoration: none; color: inherit; }
.journal-item:first-child { border-top: none; }
.journal-item .no { font-family: var(--font-mono); color: var(--ink-soft); font-size: 0.9rem; padding-top: 4px; }
.journal-item h3 { font-size: 1.2rem; margin: 4px 0 8px; }
.journal-item p { margin: 0; color: var(--ink-soft); max-width: 58ch; }
.journal-tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--rose); margin-bottom: 6px; display: inline-block; }
.journal-meta { text-align: right; font-size: 0.82rem; color: var(--ink-soft); white-space: nowrap; padding-top: 4px; }
.journal-item:hover h3 { color: var(--moss-deep); }
.journal-foot { margin-top: 30px; }

/* ---------- Single article ---------- */
.article-head { max-width: 68ch; margin: 0 auto 12px; }
.article-body { max-width: 68ch; margin: 0 auto; font-size: 1.05rem; }
.article-body p { margin: 0 0 1.3em; }
.article-body h2 { font-size: 1.5rem; margin: 1.6em 0 0.6em; }
.article-body img { max-width: 100%; border-radius: 12px; }
.article-back { display: inline-block; margin-bottom: 24px; font-size: 0.9rem; color: var(--moss-deep); text-decoration: none; }
.article-back:hover { text-decoration: underline; }
.pagination-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; flex-wrap: wrap; }
.pagination-row a { font-size: 0.9rem; color: var(--moss-deep); text-decoration: none; }
.pagination-row a:hover { text-decoration: underline; }

/* ---------- Testimonials ---------- */
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.quote-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 14px; padding: 30px; }
.quote-card blockquote { margin: 0 0 18px; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; line-height: 1.5; }
.quote-card cite { font-style: normal; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Newsletter band ---------- */
.band { background: var(--moss-deep); color: var(--paper-raised); border-radius: 20px; padding: clamp(32px, 6vw, 56px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; margin: clamp(56px, 9vw, 96px) 0; }
.band h2 { color: var(--paper-raised); font-size: clamp(1.5rem, 2.6vw, 2rem); }
.band p { color: color-mix(in srgb, var(--paper-raised) 78%, transparent); margin: 10px 0 0; max-width: 44ch; }
form.subscribe { display: flex; gap: 10px; flex-wrap: wrap; }
form.subscribe input { flex: 1; min-width: 180px; padding: 13px 16px; border-radius: 8px; border: 1px solid transparent; font-family: var(--font-body); font-size: 0.95rem; background: rgba(255,255,255,0.94); color: var(--ink); }
form.subscribe .btn-primary { background: var(--amber); color: var(--ink); white-space: nowrap; }
form.subscribe .btn-primary:hover { background: color-mix(in srgb, var(--amber) 85%, white); }
.fine-print { font-size: 0.78rem; margin-top: 10px; color: color-mix(in srgb, var(--paper-raised) 65%, transparent); }
.form-note { font-size: 0.85rem; margin-top: 10px; color: var(--paper-raised); min-height: 1em; }

/* ---------- Footer ---------- */
footer.site-footer { border-top: 1px solid var(--line-soft); padding: 48px 0 32px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
footer.site-footer h4 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--ink-soft); margin: 0 0 14px; text-transform: uppercase; }
footer.site-footer .brand-blurb { color: var(--ink-soft); max-width: 40ch; font-size: 0.92rem; }
footer.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
footer.site-footer a { text-decoration: none; color: var(--ink-soft); font-size: 0.92rem; }
footer.site-footer a:hover { color: var(--moss-deep); }
.foot-bottom { max-width: 1180px; margin: 0 auto; padding-top: 24px; margin-top: 8px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; color: var(--ink-soft); }

@media (max-width: 640px) {
  nav.links { display: none; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 320px; }
  .about-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .quote-grid { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; }
  .journal-item { grid-template-columns: 40px 1fr; }
  .journal-meta { grid-column: 2; text-align: left; }
  footer.site-footer { grid-template-columns: 1fr 1fr; }
  footer.site-footer .brand-blurb { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  footer.site-footer { grid-template-columns: 1fr; }
  .hero-ctas .btn { flex: 1; justify-content: center; }
}
