/* ============================================
   Marta Bergamin — Psicologa Psicoterapeuta
   Font: Roboto, self-hosted (no third-party requests)
   ============================================ */
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-Variable.woff2') format('woff2-variations'),
       url('../fonts/Roboto-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-Italic-Variable.woff2') format('woff2-variations'),
       url('../fonts/Roboto-Italic-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ============================================
   Design tokens
   ============================================ */
:root {
  --bg: #FAF5EC;
  --bg-soft: #F1E3D2;
  --card: #FFFDF9;
  --ink: #372B23;
  --ink-soft: #6E5D4E;
  --ink-faint: #9C8C7C;
  --sage: #6E7F5F;
  --sage-dark: #4C5B41;
  --sage-tint: #E4E9DC;
  --clay: #A25C3B;
  --clay-tint: #F1DDCC;
  --gold: #C0913F;
  --line: rgba(55, 43, 35, 0.14);
  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 48px -28px rgba(55, 43, 35, 0.35);
  --shadow-sm: 0 10px 24px -16px rgba(55, 43, 35, 0.3);
  --serif: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
  --max: 1120px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.35rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-dark);
  font-weight: 700;
  margin-bottom: 14px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--clay);
  flex: none;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.lede {
  font-size: 1.15rem;
  max-width: 640px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-primary {
  background: var(--sage-dark);
  color: #FBF7EE;
}
.btn-primary:hover { background: var(--clay); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--sage-dark); transform: translateY(-2px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 236, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: var(--max);
  margin: 0 auto;
}
.wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.wordmark span { color: inherit; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-links a:hover { background: var(--sage-tint); color: var(--sage-dark); }
.nav-links a.active { background: var(--sage-dark); color: #FBF7EE; }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #FBF7EE; }

.nav-cta { margin-left: 6px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav.open .nav-toggle::before { transform: translateY(5.5px) rotate(45deg); }
.nav.open .nav-toggle span { opacity: 0; }
.nav.open .nav-toggle::after { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- Genogram connector motif ---------- */
.thread {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 34px;
}
.thread .node { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
.thread .node.alt { background: var(--clay); }
.thread .link { width: 46px; height: 1.5px; background: var(--line); }

.connector-art { position: absolute; pointer-events: none; opacity: 0.65; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 88px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero-copy .cta-row { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.hero-photo {
  position: relative;
  justify-self: center;
}
.frame {
  aspect-ratio: 1367 / 2048;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  background: var(--sage-tint);
}
.hero-photo .frame {
  width: min(360px, 82vw);
}
.frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero-photo .ring {
  position: absolute;
  border-radius: 999px;
  border: 1.5px solid var(--line);
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Cards / services grid ---------- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  align-items: start;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card .node-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--sage);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card .node-mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--clay); }

.card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.card p { margin: 0; font-size: 0.97rem; }

/* ---------- About teaser ---------- */
.about-teaser {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 54px;
  align-items: center;
}
.about-teaser img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  aspect-ratio: 1367 / 2048;
  object-fit: cover;
}

/* ---------- Quote / approach band ---------- */
.approach {
  position: relative;
  background: var(--sage-dark);
  color: #F5EEDF;
  border-radius: var(--radius-lg);
  padding: 64px 56px;
  overflow: hidden;
}
.approach h2, .approach p { color: #F5EEDF; }
.approach .lede { max-width: 720px; font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 500; font-style: italic; color: #FBF7EE; }

.approach-light { background: var(--card); border: 1px solid var(--line); }
.approach-light h2, .approach-light p { color: var(--ink); }
.approach-light .lede { color: var(--ink-soft); font-style: normal; font-weight: 400; font-size: 1.05rem; }

/* ---------- Timeline (genogram-style) ---------- */
.timeline {
  position: relative;
  padding-left: 34px;
  border-left: 1.5px solid var(--line);
}
.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 4px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--clay);
}
.timeline-year {
  font-family: var(--serif);
  font-style: italic;
  color: var(--clay);
  font-weight: 700;
  font-size: 1.05rem;
  display: block;
  margin-bottom: 4px;
}
.timeline-item h3 { margin-bottom: 6px; font-size: 1.08rem; }
.timeline-item p { margin: 0; }

/* ---------- Formation list ---------- */
.formation-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.formation-list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.formation-list .yr { font-family: var(--serif); font-style: italic; color: var(--sage-dark); font-weight: 700; }
.formation-list strong { color: var(--ink); display: block; }
.formation-list span.place { color: var(--ink-faint); font-size: 0.92rem; }

/* ---------- Services detail ---------- */
.service-row {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 26px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.service-row:first-of-type { padding-top: 0; }
.service-row:last-of-type { border-bottom: none; }
.service-visual {
  width: 128px; height: 128px;
  border-radius: 22px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  background: var(--sage-tint);
  box-shadow: var(--shadow-sm);
}
.service-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-row .node-mark {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--sage);
  display: flex; align-items: center; justify-content: center;
}
.service-row .node-mark::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--clay); }
.service-row h3 { margin-bottom: 8px; }
.service-row p { max-width: 620px; }
.service-row .for-tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--sage-dark);
  background: var(--sage-tint);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
}

/* ---------- Contact page ---------- */
.contact-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.contact-line {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contact-line:last-child { border-bottom: none; }
.contact-line .ic {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--sage-tint);
  display: flex; align-items: center; justify-content: center;
  flex: none;
  color: var(--sage-dark);
}
.contact-line a, .contact-line .val { font-size: 1.08rem; font-weight: 700; text-decoration: none; color: var(--ink); }
.contact-line .lab { display: block; font-size: 0.8rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }

.map-note {
  border-radius: var(--radius-lg);
  background: var(--sage-tint);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

/* ---------- Footer ---------- */
footer {
  background: var(--sage-dark);
  color: #E9E4D6;
  padding: 56px 0 30px;
}
footer a { color: #F5EEDF; text-decoration: none; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-grid h4 { color: #FBF7EE; font-family: var(--sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.footer-grid p, .footer-grid a { color: #D9D2BF; font-size: 0.94rem; }
.footer-nav { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  font-size: 0.85rem;
  color: #C7BFA9;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-word { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: #FBF7EE; margin-bottom: 10px; display: inline-block; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 56px 0 20px; }
.page-hero .eyebrow { margin-bottom: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .about-teaser { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .contact-hero { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-links a { text-align: center; padding: 12px; }
  .approach { padding: 40px 26px; }
  .formation-list li { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 92px 1fr; gap: 18px; }
  .service-visual { width: 92px; height: 92px; border-radius: 18px; }
}
