/* ==========================================================
   Cairo Filho — Psicólogo Clínico
   Direção: editorial-orgânica · Paleta terrosa · Fraunces+Inter
   ========================================================== */

:root {
  --bg:        #F4EFE6;
  --bg-warm:   #ECE4D5;
  --bg-deep:   #E2D7C0;
  --paper:    #FBF7EF;
  --ink:       #1F1B16;
  --ink-soft:  #564C3F;
  --ink-mute:  #8B7F6E;
  --line:      #D9CFB9;

  --sage:      #4A5D3D;
  --sage-soft: #889A74;
  --warm:      #A77E4F;
  --warm-soft: #D9B894;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(31,27,22,.04), 0 8px 30px rgba(31,27,22,.06);

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
}

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }

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

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); font-weight: 300; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.4rem; }
em { font-style: italic; color: var(--sage); font-weight: 400; }
strong { color: var(--ink); font-weight: 500; }

p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm);
  font-weight: 500;
  margin: 0 0 1.2em;
}

/* ====== HEADER ====== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(244, 239, 230, 0.82);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark { color: var(--sage); display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.brand-role { font-size: 0.7rem; letter-spacing: 0.1em; color: var(--ink-mute); text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  font-size: 0.93rem; color: var(--ink-soft);
  position: relative; padding: 6px 0; transition: color .2s;
}
.nav a:hover { color: var(--ink); }
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; bottom: 0; left: 0; height: 1px; width: 0;
  background: var(--sage); transition: width .25s ease;
}
.nav a:hover:not(.nav-cta)::after { width: 100%; }
.nav-cta {
  background: var(--ink); color: var(--paper) !important;
  padding: 10px 18px !important; border-radius: 999px;
  transition: background .2s;
}
.nav-cta:hover { background: var(--sage); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
  flex-direction: column; gap: 5px;
}
.nav-toggle span {
  width: 22px; height: 1.5px; background: var(--ink); transition: transform .25s, opacity .2s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; font-family: var(--sans); font-size: 0.95rem; font-weight: 500;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.btn-primary {
  background: var(--ink); color: var(--paper);
}
.btn-primary:hover { background: var(--sage); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-large { padding: 18px 36px; font-size: 1rem; }

/* ====== HERO ====== */
.hero {
  position: relative;
  padding: clamp(80px, 12vw, 160px) 0 clamp(60px, 9vw, 120px);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0; opacity: 1;
}
.hero-bg svg { width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 1; max-width: 880px; }
.hero-title {
  margin: 0 0 28px;
}
.hero-lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  max-width: 620px;
  color: var(--ink-soft);
  margin-bottom: 40px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 64px; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 64px);
  padding-top: 32px; border-top: 1px solid var(--line);
  max-width: 720px;
}
.hero-meta div { display: flex; flex-direction: column; gap: 2px; }
.hero-meta strong {
  font-family: var(--serif); font-size: 1.4rem; color: var(--ink); font-weight: 400;
}
.hero-meta span { font-size: 0.85rem; color: var(--ink-mute); letter-spacing: 0.04em; }

/* ====== SECTIONS ====== */
.section {
  padding: clamp(80px, 11vw, 140px) 0;
}
.section-header {
  max-width: 720px; margin: 0 auto clamp(48px, 6vw, 80px); text-align: center;
}
.section-header--inline {
  text-align: left;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: end;
  max-width: var(--max);
}
.section-header--inline .eyebrow { margin-bottom: 1em; }
.section-lead {
  font-size: 1.1rem; color: var(--ink-soft);
}

/* SOBRE — split */
.sobre { background: var(--bg-warm); }
.split {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.portrait {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--bg-deep);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.portrait-frame {
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at center, var(--warm-soft) 0%, var(--bg-deep) 70%);
  display: flex; align-items: center; justify-content: center;
}
.portrait-placeholder {
  font-family: var(--serif); color: var(--warm);
  text-align: center; font-size: 1.1rem; font-style: italic;
  letter-spacing: 0.08em;
}
.portrait-tag {
  position: absolute; bottom: 18px; left: 18px;
  background: var(--paper); color: var(--ink-soft);
  font-size: 0.72rem; padding: 6px 12px; border-radius: 999px;
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* COMO — steps */
.como { background: var(--paper); }
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  counter-reset: step;
}
.steps li {
  padding: 36px 28px; background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  position: relative;
  transition: transform .3s, box-shadow .3s;
}
.steps li:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num {
  font-family: var(--serif); font-size: 0.85rem; color: var(--warm);
  letter-spacing: 0.15em; display: inline-block; margin-bottom: 16px;
}
.steps h3 { font-size: 1.5rem; margin-bottom: 10px; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* ABORDAGEM */
.abordagem {
  background: var(--bg-warm);
  position: relative;
}
.abordagem-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.abordagem-card {
  background: var(--ink); color: var(--paper);
  padding: 44px 36px;
  border-radius: var(--radius-lg);
  position: sticky; top: 100px;
}
.card-title {
  font-family: var(--serif); font-size: 1.5rem;
  color: var(--paper); margin-bottom: 28px;
  padding-bottom: 20px; border-bottom: 1px solid rgba(251,247,239,0.15);
}
.abordagem-card ul { display: flex; flex-direction: column; gap: 22px; }
.abordagem-card li { display: grid; grid-template-columns: 92px 1fr; align-items: baseline; gap: 14px; }
.abordagem-card span {
  font-family: var(--serif); font-style: italic;
  color: var(--warm-soft); font-size: 1.05rem;
}
.abordagem-card p { margin: 0; color: rgba(251,247,239,0.78); font-size: 0.92rem; }

/* TEMAS */
.temas { background: var(--paper); }
.temas-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.tema {
  padding: 40px 32px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: border-color .25s, transform .25s, background .25s;
}
.tema:hover {
  border-color: var(--sage-soft);
  background: var(--paper);
  transform: translateY(-3px);
}
.tema-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  background: var(--bg-warm);
  color: var(--sage); border-radius: 50%;
  font-size: 1.2rem; margin-bottom: 22px;
  font-family: var(--serif);
}
.tema h3 { font-size: 1.25rem; margin-bottom: 8px; }
.tema p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* ESCRITA */
.escrita { background: var(--bg-warm); }
.posts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.post {
  padding: 36px 32px;
  background: var(--paper);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  transition: transform .3s, box-shadow .3s;
  cursor: pointer;
}
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-meta {
  font-size: 0.74rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--warm);
  margin-bottom: 18px;
}
.post h3 { font-size: 1.35rem; margin-bottom: 12px; }
.post p { margin-bottom: 24px; flex: 1; font-size: 0.95rem; }
.post-link {
  font-size: 0.9rem; color: var(--sage); font-weight: 500;
}

/* AGENDAR */
.agendar { background: var(--paper); padding-bottom: clamp(120px, 14vw, 180px); }
.agendar-card {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 5vw, 72px);
  background: var(--ink); color: var(--paper);
  padding: clamp(48px, 6vw, 80px);
  border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
.agendar-card::before {
  content: ""; position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--sage) 0%, transparent 70%);
  opacity: 0.35; border-radius: 50%;
}
.agendar-text { position: relative; }
.agendar-text .eyebrow { color: var(--warm-soft); }
.agendar-text h2 { color: var(--paper); margin-bottom: 18px; }
.agendar-text p {
  color: rgba(251,247,239,0.78); margin-bottom: 32px;
  font-size: 1.05rem;
}
.agendar-text .btn-primary {
  background: var(--paper); color: var(--ink);
}
.agendar-text .btn-primary:hover { background: var(--warm-soft); }

.agendar-info {
  position: relative;
  display: flex; flex-direction: column; gap: 22px;
  padding-left: clamp(0px, 3vw, 36px);
  border-left: 1px solid rgba(251,247,239,0.18);
}
.agendar-info li { display: flex; flex-direction: column; gap: 4px; }
.info-label {
  font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--warm-soft);
}
.info-value {
  font-family: var(--serif); font-size: 1.05rem;
  color: var(--paper); line-height: 1.4;
}
.info-link { transition: color .2s; }
.info-link:hover { color: var(--warm-soft); }

/* FOOTER */
.site-footer {
  background: var(--bg-deep);
  padding: clamp(64px, 8vw, 96px) 0 40px;
  text-align: center;
}
.footer-quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  color: var(--ink); margin: 0 auto 48px;
  max-width: 720px; line-height: 1.4;
  font-weight: 300;
}
.footer-meta {
  display: flex; justify-content: center; align-items: center; gap: 16px;
  font-size: 0.85rem; color: var(--ink-mute);
}
.footer-meta a:hover { color: var(--ink); }
.footer-sep { opacity: 0.4; }

/* WHATSAPP FLOAT */
.whats-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 60;
  width: 56px; height: 56px;
  background: #25D366; color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  transition: transform .25s;
}
.whats-float:hover { transform: scale(1.08); }

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--paper);
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .25s, opacity .25s;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px var(--gutter); width: 100%; text-align: left; }
  .nav-cta { margin: 12px var(--gutter); width: calc(100% - var(--gutter) * 2); }

  .split, .abordagem-grid, .agendar-card { grid-template-columns: 1fr; }
  .section-header--inline { grid-template-columns: 1fr; gap: 20px; }
  .steps, .temas-grid, .posts { grid-template-columns: 1fr; }
  .abordagem-card { position: static; }
  .agendar-info { padding-left: 0; border-left: 0; padding-top: 24px; border-top: 1px solid rgba(251,247,239,0.18); }
}

@media (max-width: 560px) {
  .hero-meta div { flex-basis: calc(50% - 14px); }
  .hero-actions .btn { width: 100%; }
}

@media (min-width: 561px) and (max-width: 900px) {
  .temas-grid, .posts, .steps { grid-template-columns: repeat(2, 1fr); }
}
