/* ============================================================
PSYCHOANALYTIC PRACTICE — SHARED STYLESHEET
Design tokens, typography, layout primitives, components.
============================================================ */

body.t-body {
  background: var(--ivory) !important;
}

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* ---- Design tokens ---- */
:root {
  /* Color */
  --ivory: #F6F3EC;
  --stone: #EAE4D8;
  --stone-deep: #DED5C4;
  --charcoal: #2B2926;
  --charcoal-soft: #46433E;
  --forest: #3C4A3E;
  --forest-deep: #2C372E;
  --clay-muted: #8C7A68;
  --navy-whisper: #3A4250;
  --hairline: rgba(43, 41, 38, 0.12);
  --hairline-soft: rgba(43, 41, 38, 0.07);

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Measure */
  --measure: 590px;
  --measure-wide: 760px;

  /* Rhythm */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6.5rem;
  --space-2xl: 9rem;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection {
  background: var(--forest);
  color: var(--ivory);
}

/* ---- Focus states (accessibility) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--charcoal);
  color: var(--ivory);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.skip-link:focus {
  left: var(--space-md);
  top: var(--space-md);
}

/* ============================================================
NAVIGATION
============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 243, 236, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline-soft);
}
.site-nav__inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.1rem var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.site-nav__mark {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--charcoal);
  white-space: nowrap;
}
.site-nav__links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__links a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--charcoal-soft);
  letter-spacing: 0.01em;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.site-nav__links a:hover {
  color: var(--forest);
}
.site-nav__links a[aria-current="page"] {
  color: var(--forest-deep);
  border-bottom-color: var(--forest-deep);
}

/* ============================================================
HERO
============================================================ */
.hero {
  position: relative;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  overflow: hidden;
}

/* Signature element: concentric rings suggesting depth beneath the surface */
.hero__rings {
  position: absolute;
  top: 50%;
  right: -8%;
  transform: translateY(-50%);
  width: min(60vw, 780px);
  height: min(60vw, 780px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
.hero__rings circle {
  fill: none;
  stroke: var(--forest);
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--measure);
  margin: 0 auto;
}
.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--forest-deep);
  margin-bottom: var(--space-sm);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.15rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin: 0 0 var(--space-md);
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--forest-deep);
}
.hero__lede {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--charcoal-soft);
  max-width: 34ch;
}

/* ============================================================
CONTENT / TYPOGRAPHY
============================================================ */
.content {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: 5.5rem 0;
}
.section--tinted {
  background: var(--stone);
}

h2.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1.28;
  color: var(--charcoal);
  margin: 0 0 var(--space-md);
  max-width: 22ch;
}

h3.subhead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--forest-deep);
  margin: var(--space-lg) 0 var(--space-sm);
}
.section > h3.subhead:first-child { margin-top: 0; }

p {
  margin: 0 0 1.7em;
  max-width: 66ch;
}
.content p:last-child { margin-bottom: 0; }

strong { font-weight: 600; color: var(--charcoal); }

/* Pull-quote emphasis for load-bearing sentences — typographic emphasis only,
no wording altered */
.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  line-height: 1.5;
  color: var(--forest-deep);
  max-width: 24ch;
  margin: var(--space-lg) 0;
  padding-left: var(--space-md);
  border-left: 2px solid var(--forest);
}

.signature {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--clay-muted);
}

/* ---- Lists rendered as quiet editorial left‑border accents ---- */
.pattern-list {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.pattern-list li {
  background: none;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--forest);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--charcoal-soft);
  margin: 0;
}

/* ---- Definition-style rows (setting/frame details on page 3) ---- */
.frame-list {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.frame-list li {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: var(--space-md);
}
.frame-list li:last-child { border-bottom: 1px solid var(--hairline); }
.frame-list dt {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  color: var(--forest-deep);
  font-size: 1.05rem;
}
.frame-list dd {
  margin: 0;
  color: var(--charcoal-soft);
}
@media (max-width: 640px) {
  .frame-list li {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* ============================================================
AUTHOR / CREDENTIAL BLOCK
============================================================ */
.author-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md) 0 0;
}
.author-block__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--charcoal);
}
.author-block__role {
  font-size: 0.95rem;
  color: var(--clay-muted);
  letter-spacing: 0.01em;
}

.author-photo {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  margin: 0 auto 1.8rem;
  background: var(--stone);
  border: 1px solid var(--hairline);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}
/* ============================================================
PAGE FOOTER NAV (continue reading)
============================================================ */
.continue {
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  border-top: 1px solid var(--hairline);
}
.continue__label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--clay-muted);
  margin-bottom: var(--space-sm);
}
.continue__link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 400;
  font-style: italic;
  text-decoration: none;
  color: var(--forest-deep);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, gap 0.25s ease;
}
.continue__link:hover {
  border-bottom-color: var(--forest-deep);
  gap: 0.75rem;
}
.continue__link .arrow {
  font-style: normal;
  transition: transform 0.25s ease;
}
.continue__link:hover .arrow { transform: translateX(3px); }

/* ============================================================
CTA / CONTACT (page 3)
============================================================ */
.cta-block {
  background: var(--forest-deep);
  color: var(--ivory);
  border-radius: 16px;
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  margin: var(--space-lg) 0;
}
.cta-block .price {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 400;
  margin-bottom: var(--space-xs);
}
.cta-block .price-note {
  font-size: 0.95rem;
  color: rgba(246, 243, 236, 0.72);
  margin-bottom: var(--space-md);
}
.cta-button {
  display: inline-block;
  background: var(--ivory);
  color: var(--forest-deep);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  padding: 0.95rem 2.1rem;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}
.telegram-note {
  margin-top: var(--space-md);
  font-size: 0.98rem;
  color: var(--charcoal-soft);
}
.telegram-note a {
  color: var(--forest-deep);
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 3px;
}
.telegram-note a:hover { text-decoration-color: var(--forest-deep); }

.closing-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--forest-deep);
  text-align: center;
  margin: var(--space-lg) auto 0;
  max-width: 40ch;
}

/* ============================================================
SITE FOOTER
============================================================ */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  text-align: center;
}
.site-footer__nav {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md);
  flex-wrap: wrap;
}
.site-footer__nav a {
  text-decoration: none;
  color: var(--charcoal-soft);
  font-size: 0.92rem;
}
.site-footer__nav a:hover { color: var(--forest-deep); }
.site-footer__meta {
  font-size: 0.85rem;
  color: var(--clay-muted);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.035; /* Adjust between 0.02 and 0.05 for taste */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* ============================================================
RESPONSIVE — mobile first priority
============================================================ */
@media (max-width: 640px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-2xl: 5rem;
  }
  body { font-size: 1.05rem; line-height: 1.72; }
  .hero { padding: var(--space-2xl) var(--space-sm) var(--space-lg); }
  .hero__rings { width: 92vw; height: 92vw; right: -30%; }
  .content { padding: 0 var(--space-sm); }
  .site-nav__inner { padding: 0.9rem var(--space-sm); }
  .site-nav__links { gap: var(--space-sm); }
  .site-nav__links a { font-size: 0.85rem; }
  .pull-quote { padding-left: var(--space-sm); margin: var(--space-lg) 0; }
  .cta-block { padding: var(--space-lg) var(--space-sm); border-radius: 12px; }
  h3.subhead { font-size: 1.2rem; }
}