/* L'H psicoanálisis — static site
   Literata (SIL OFL) for reading and headings, Public Sans (SIL OFL) for interface. */

@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(fonts/literata-latin-opsz-normal.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url(fonts/literata-latin-opsz-italic.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/public-sans-latin-wght-normal.woff2) format("woff2-variations");
}

:root {
  --paper: #f2f4f1;
  --surface: #ffffff;
  --ink: #1a2a2e;
  --muted: #55676a;
  --petrol: #1d3b40;
  --petrol-2: #2b5a60;
  --link: #22656b;
  --ochre: #b8862b;
  --ochre-soft: #f3e7cc;
  --rule: #d3dbd7;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 2rem;
  --step-4: clamp(2.25rem, 1.6rem + 2.6vw, 3.4rem);
  --step-5: clamp(6rem, 3rem + 16vw, 17rem);

  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --measure: 66ch;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.7 var(--serif);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--petrol); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.2; color: var(--petrol); margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: var(--step-4); font-weight: 400; letter-spacing: -0.01em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--petrol); color: #fff; padding: 0.6rem 1rem; z-index: 10; font-family: var(--sans); }
.skip:focus { left: 1rem; top: 1rem; }

/* ------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
}
.head-row { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: flex; align-items: baseline; gap: 0.45rem; text-decoration: none; color: var(--petrol); white-space: nowrap; }
.brand-mark { font: italic 500 1.9rem/1 var(--serif); letter-spacing: -0.02em; }
.brand-name { font: 400 1.05rem/1 var(--serif); color: var(--ink); }
.menu { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.menu ul { display: flex; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.menu ul a {
  display: block; padding: 0.5rem 0.6rem; font-size: 0.94rem; color: var(--ink); text-decoration: none; border-radius: var(--radius);
}
.menu ul a:hover { background: var(--surface); color: var(--petrol); }
.menu ul a[aria-current], .menu ul a.in { color: var(--petrol); box-shadow: inset 0 -2px 0 var(--ochre); border-radius: 0; }
.menu-aside { display: flex; align-items: center; gap: 0.9rem; font-size: 0.9rem; }
.menu-aside .lang { color: var(--muted); }
.menu-aside .call {
  white-space: nowrap; text-decoration: none; color: #fff; background: var(--petrol); padding: 0.5rem 0.85rem; border-radius: var(--radius); font-weight: 600;
}
.menu-aside .call:hover { background: var(--petrol-2); color: #fff; }
.menu-btn { display: none; }

@media (max-width: 68rem) {
  .menu-btn {
    display: inline-flex; margin-left: auto; font: 600 0.95rem var(--sans); color: var(--petrol);
    background: transparent; border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.5rem 0.9rem; cursor: pointer;
  }
  .menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1.25rem;
  }
  .menu.open { display: flex; }
  .menu ul { flex-direction: column; }
  .menu ul a { padding: 0.75rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .menu ul a[aria-current], .menu ul a.in { box-shadow: inset 3px 0 0 var(--ochre); padding-left: 0.75rem; }
  .menu-aside { justify-content: space-between; padding-top: 1rem; }
  .no-js .menu { display: flex; position: static; }
}

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-block; font: 600 1rem/1.2 var(--sans); text-decoration: none;
  background: var(--petrol); color: #fff; padding: 0.85rem 1.25rem; border-radius: var(--radius); border: 1px solid var(--petrol);
}
.btn:hover { background: var(--petrol-2); color: #fff; }
.btn.ghost { background: transparent; color: var(--petrol); }
.btn.ghost:hover { background: var(--surface); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }

/* ------------------------------------------------------------ home */
.hero { padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gutter); align-items: center; }
.hero h1 { font-size: var(--step-4); max-width: 18ch; }
.hero-lede { font-size: var(--step-1); line-height: 1.6; max-width: 38ch; color: var(--ink); }
.hero-note { font: 400 var(--step--1)/1.5 var(--sans); color: var(--muted); margin-top: 0.9rem; }
.hero-photo { margin: 0; }
.hero-photo img { display: block; width: 100%; border-radius: var(--radius); filter: grayscale(1) contrast(1.02); mix-blend-mode: multiply; }
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: 1rem; }
.gallery figure { margin: 0; }
.gallery .g-wide { grid-row: span 2; }
.gallery img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.gallery .g-wide img { height: calc(100% - 1.9rem); }
.gallery figcaption { font: 400 var(--step--1)/1.4 var(--sans); color: var(--muted); margin-top: 0.5rem; }
.hero-mark { position: relative; justify-self: end; }
.hero-mark span {
  display: block;
  font: italic 300 var(--step-5)/0.8 var(--serif);
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.04em;
  color: var(--petrol);
  padding-bottom: 0.08em;
  border-bottom: 3px solid var(--ochre);
}

.band { padding: clamp(2.5rem, 5vw, 4.5rem) 0; border-top: 1px solid var(--rule); }
.two-col { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gutter); }
.two-col > h2 { font-size: var(--step-3); font-weight: 400; margin: 0; }
.two-col .prose { max-width: var(--measure); }

.who-list, .svc-list { list-style: none; margin: 0; padding: 0; }
.who-list li { border-bottom: 1px solid var(--rule); }
.who-list li:first-child { border-top: 1px solid var(--rule); }
.who-list a {
  display: grid; grid-template-columns: minmax(10rem, 3fr) 7fr; gap: 1rem; padding: 1.1rem 0; text-decoration: none; color: var(--ink);
}
.who-name { font: 500 var(--step-1)/1.3 var(--serif); color: var(--petrol); }
.who-text { color: var(--muted); font-size: 0.98rem; line-height: 1.6; }
.who-list a:hover .who-name { text-decoration: underline; text-decoration-color: var(--ochre); text-underline-offset: 0.2em; }

.step-list { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 1.6rem; }
.step-list li { counter-increment: s; display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem; }
.step-list li::before {
  content: counter(s); grid-row: span 2;
  font: italic 400 2.6rem/1 var(--serif); color: var(--ochre);
}
.step-list h3 { margin: 0.2rem 0 0.3rem; }
.step-list p { margin: 0; max-width: 56ch; }
.more { margin-top: 1.5rem; font-family: var(--sans); font-size: 0.95rem; }

.svc-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.svc-list a {
  display: inline-block; padding: 0.55rem 0.95rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface);
  font: 500 0.95rem var(--sans); color: var(--petrol); text-decoration: none;
}
.svc-list a:hover { border-color: var(--petrol); }
.aside-box { max-width: 56ch; padding-left: 1rem; border-left: 3px solid var(--ochre); color: var(--ink); }

.quotes { display: grid; gap: 1.75rem; max-width: var(--measure); }
.quotes figure { margin: 0; }
.quotes blockquote { margin: 0; font-style: italic; font-size: var(--step-1); line-height: 1.55; color: var(--petrol); }
.quotes blockquote p { margin: 0 0 0.3rem; }
.quotes figcaption { font: 400 var(--step--1) var(--sans); color: var(--muted); }

/* ------------------------------------------------------------ inner pages */
.page { padding-top: clamp(1.5rem, 4vw, 3rem); padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.page.has-side { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; column-gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.page.has-side .crumbs { grid-column: 1 / -1; }
.crumbs { font: 400 var(--step--1)/1.5 var(--sans); color: var(--muted); margin-bottom: 1.5rem; }
.crumbs a { color: var(--muted); }
.article { max-width: var(--measure); }
.article.wide { max-width: 60rem; }
.page-head { margin-bottom: 2rem; }
.page-head h1 { margin-bottom: 0.4em; }
.lede { font-size: var(--step-1); line-height: 1.6; color: var(--ink); max-width: 46ch; }
.meta { font: 400 var(--step--1) var(--sans); color: var(--muted); }
.note { font: 400 0.95rem var(--sans); background: var(--ochre-soft); padding: 0.7rem 1rem; border-radius: var(--radius); }

.side { position: sticky; top: 6rem; font-family: var(--sans); font-size: 0.95rem; border-left: 1px solid var(--rule); padding-left: 1.25rem; }
.side-head { margin: 0 0 0.5rem; font-weight: 600; }
.side-head a { color: var(--petrol); text-decoration: none; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: block; padding: 0.35rem 0; color: var(--ink); text-decoration: none; line-height: 1.4; }
.side li a:hover { color: var(--link); text-decoration: underline; }
.side li a[aria-current] { color: var(--petrol); font-weight: 600; box-shadow: -1.25rem 0 0 -1.1rem var(--ochre); }

/* body text coming from WordPress */
.prose { hyphens: auto; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: var(--step-2); margin-top: 2em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.8em; }
.prose h4 { font-size: var(--step-0); margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--ochre); }
.prose ul ul { margin: 0.4em 0 0.6em; }
.prose blockquote { margin: 1.5em 0; padding-left: 1.2rem; border-left: 3px solid var(--rule); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose img { border-radius: var(--radius); }
.prose img.align-right { float: right; margin: 0.35em 0 1em 1.75rem; max-width: 42%; }
.prose img.align-left { float: left; margin: 0.35em 1.75rem 1em 0; max-width: 42%; }
.prose img.align-center { display: block; margin: 0 auto; }
.prose p.media { text-align: center; }
.prose a.file::after { content: " (PDF)"; font: 400 0.8em var(--sans); color: var(--muted); }
.prose::after { content: ""; display: table; clear: both; }
@media (max-width: 40rem) {
  .prose img.align-right, .prose img.align-left { float: none; display: block; margin: 0 0 1.25rem; max-width: 100%; }
}

.table-wrap { overflow-x: auto; margin: 0 0 1.5em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--surface); }
.prose td, .prose th { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--rule); vertical-align: top; text-align: left; }
.prose td:first-child { width: 11rem; color: var(--muted); font-family: var(--sans); font-size: 0.88rem; }
.prose td:first-child strong { font-weight: 600; }

/* accordions (old [su_spoiler]) and FAQ */
details { border-bottom: 1px solid var(--rule); }
.accordion { border-top: 1px solid var(--rule); margin: 1.5em 0; clear: both; }
details > summary {
  list-style: none; cursor: pointer; padding: 1rem 2.25rem 1rem 0; position: relative;
  font: 500 var(--step-1)/1.35 var(--serif); color: var(--petrol);
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: ""; position: absolute; right: 0.4rem; top: 1.35rem; width: 0.6rem; height: 0.6rem;
  border-right: 2px solid var(--ochre); border-bottom: 2px solid var(--ochre); transform: rotate(45deg); transition: transform 0.2s;
}
details[open] > summary::after { transform: rotate(-135deg); top: 1.6rem; }
details > summary:hover { color: var(--link); }
details > :not(summary) { padding-bottom: 0.5rem; }
.faq-group { margin-bottom: 3rem; }
.faq-group > h2 { font: 600 var(--step--1)/1.4 var(--sans); color: var(--muted); letter-spacing: 0.02em; border-bottom: 1px solid var(--rule); padding-bottom: 0.6rem; margin-bottom: 0; }
.answer > :last-child { margin-bottom: 1rem; }
@media (prefers-reduced-motion: reduce) { details > summary::after { transition: none; } }

/* index lists (sections, blog) */
.index { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.index li { border-bottom: 1px solid var(--rule); }
.index a { display: block; padding: 1.1rem 0; text-decoration: none; color: var(--ink); }
.ix-title { display: block; font: 500 var(--step-1)/1.35 var(--serif); color: var(--petrol); }
.ix-ex { display: block; margin-top: 0.3rem; color: var(--muted); font-size: 0.97rem; line-height: 1.6; }
.index a:hover .ix-title { text-decoration: underline; text-decoration-color: var(--ochre); text-underline-offset: 0.2em; }
.index time { display: block; font: 400 var(--step--1) var(--sans); color: var(--muted); margin-bottom: 0.2rem; }
.index.compact { margin-top: 0; }
.tag { font: 400 0.8rem var(--sans); color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 0.05rem 0.5rem; vertical-align: middle; margin-left: 0.3rem; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.post-nav a { text-decoration: none; font-family: var(--serif); line-height: 1.4; }
.post-nav span { display: block; font: 400 var(--step--1) var(--sans); color: var(--muted); }
.post-nav .next { grid-column: 2; text-align: right; }

/* contact */
.channels { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.channels a {
  display: flex; flex-direction: column; gap: 0.2rem; height: 100%; padding: 1.25rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink);
}
.channels a:hover { border-color: var(--petrol); }
.ch-k { font: 600 var(--step--1) var(--sans); color: var(--muted); }
.ch-v { font: 500 var(--step-2)/1.25 var(--serif); color: var(--petrol); }
.ch-v.ch-mail { font-size: var(--step-1); overflow-wrap: anywhere; }
.ch-h { font: 400 0.9rem/1.5 var(--sans); color: var(--muted); }
.privacy-hint { font: 400 0.92rem/1.6 var(--sans); color: var(--muted); max-width: 70ch; }
.visit { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter); margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); }
.addr { font-size: var(--step-1); line-height: 1.5; }
.transit { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; font-family: var(--sans); font-size: 0.95rem; margin: 0 0 1rem; }
.transit dt { font-weight: 600; color: var(--muted); }
.transit dd { margin: 0; }
.map { margin: 0; position: relative; }
.map img, .map iframe { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 0; border-radius: var(--radius); background: var(--rule); }
.map-load {
  position: absolute; left: 1rem; bottom: 3rem; font: 600 0.95rem var(--sans); background: var(--surface); color: var(--petrol);
  border: 1px solid var(--petrol); border-radius: var(--radius); padding: 0.6rem 1rem; cursor: pointer;
}
.map-load:hover { background: var(--petrol); color: #fff; }
.map figcaption { font: 400 var(--step--1) var(--sans); color: var(--muted); margin-top: 0.5rem; }
.second-site { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); max-width: var(--measure); }

.prose .role { font-size: var(--step-1); color: var(--petrol); margin-bottom: 0.5em; }

/* legal */
.legal h2 { font-size: var(--step-1); margin-top: 2em; }
mark.todo { background: var(--ochre-soft); color: var(--ink); padding: 0 0.25em; font-family: var(--sans); font-size: 0.9em; }

/* ------------------------------------------------------------ call strip + footer */
.cta-strip { background: var(--surface); border-top: 1px solid var(--rule); padding: 2.25rem 0; }
.cta-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; }
.cta-text { margin: 0; font-size: var(--step-1); color: var(--petrol); max-width: 36ch; }

.site-foot { background: var(--petrol); color: #dfe8e5; font: 400 0.95rem/1.65 var(--sans); padding: 3.5rem 0 1.5rem; }
.site-foot a { color: #fff; }
.site-foot h2 { font: 600 var(--step--1) var(--sans); color: #a9c0bb; margin-bottom: 0.6rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 0.8fr; gap: 2rem; }
.foot-mark { font: italic 400 3rem/1 var(--serif); color: #fff; margin: 0 0 0.75rem; }
.foot-brand p:last-child { max-width: 30ch; }
.foot-base { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.85rem; color: #a9c0bb; }
.foot-base p { margin: 0; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 60rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .g-wide { grid-column: 1 / -1; grid-row: auto; }
  .gallery .g-wide img { height: auto; }
  .two-col { grid-template-columns: 1fr; gap: 1.25rem; }
  .page.has-side { display: block; }
  .side { position: static; border-left: 0; border-top: 1px solid var(--rule); padding: 1.5rem 0 0; margin-top: 3rem; }
  .side li a[aria-current] { box-shadow: none; }
  .visit { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .who-list a { grid-template-columns: 1fr; gap: 0.25rem; }
  .channels { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { grid-column: 1; text-align: left; }
  .cta-actions .btn { flex: 1 1 auto; text-align: center; }
}

@media print {
  .site-head, .site-foot, .cta-strip, .side, .crumbs { display: none; }
  body { background: #fff; }
}
