/* ============================================================
   Triuno Psicologia — Design System
   Identidade: #F0EEE9 (base 50%) · #383737 (grafite 10%)
               #C88242 (laranja 20%) · #6A8CC3 (azul 20%)
   Tipografia: Archivo (≈Interstate) + Fraunces (≈Exclusive Editorial)
   Estética: clean, minimalismo clínico, Apple-like
   ============================================================ */

:root {
  --bg: #F0EEE9;
  --bg-soft: #FAF8F4;
  --ink: #383737;
  --ink-soft: rgba(56, 55, 55, 0.72);
  --ink-faint: rgba(56, 55, 55, 0.45);
  --accent: #C88242;
  --accent-dark: #A96A2F;
  --blue: #6A8CC3;
  --hairline: rgba(56, 55, 55, 0.12);
  --card: #FFFFFF;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(56, 55, 55, 0.05), 0 4px 16px rgba(56, 55, 55, 0.05);
  --shadow-md: 0 2px 6px rgba(56, 55, 55, 0.06), 0 14px 40px rgba(56, 55, 55, 0.10);
  --font-sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.container { width: min(1140px, 92vw); margin-inline: auto; }

::selection { background: rgba(200, 130, 66, 0.25); }

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.35rem; }

.overline {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 1.1rem;
}

.lead { font-size: 1.25rem; color: var(--ink-soft); line-height: 1.6; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(200, 130, 66, 0.35); }
.btn-ghost { border-color: var(--hairline); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-light { background: var(--bg); color: var(--ink); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(240, 238, 233, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--hairline); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand-logo { height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 1.6rem; }
.main-nav a:not(.btn) {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color 0.2s;
  position: relative;
}
.main-nav a:not(.btn):hover, .main-nav a.is-active { color: var(--ink); }
.main-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.btn-nav { padding: 0.6rem 1.3rem; font-size: 0.88rem; }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px auto; border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(4.5rem, 10vw, 8.5rem) 0 clamp(4rem, 8vw, 7rem); overflow: hidden; }
.hero-symbol {
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: min(540px, 48vw);
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
}
.hero-content { max-width: 640px; position: relative; }
.hero p.lead { margin: 1.6rem 0 2.4rem; max-width: 540px; }
.hero-ctas { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* ---------- Seções ---------- */
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section-head { max-width: 620px; margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.section-head p { color: var(--ink-soft); margin-top: 0.9rem; font-size: 1.08rem; }

.section-dark { background: var(--ink); color: var(--bg); }
.section-dark .overline { color: var(--accent); }
.section-dark .section-head p { color: rgba(240, 238, 233, 0.65); }

/* ---------- Cards genéricos ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }

.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: 0.7rem; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }

.card-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(200, 130, 66, 0.12);
  margin-bottom: 1.3rem;
}
.card-icon img { width: 30px; height: 30px; }
.card-link {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.2rem;
}
.card-link::after { content: '→'; transition: transform 0.3s var(--ease); }
.card:hover .card-link::after { transform: translateX(4px); }

/* ---------- Equipe ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.team-card { text-align: left; }
.team-photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 3.6;
  box-shadow: var(--shadow-sm);
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.team-card:hover .team-photo img { transform: scale(1.04); }
.team-card h3 { margin-top: 1.2rem; font-size: 1.25rem; }
.team-card .crp { font-family: var(--font-sans); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; color: var(--ink-faint); text-transform: uppercase; }

/* ---------- Serviços (página) ---------- */
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(2.8rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--hairline);
}
.service-row:last-child { border-bottom: 0; }
.service-row.is-reverse .service-media { order: 2; }
.service-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow-md); }
.service-media img { width: 100%; height: 100%; object-fit: cover; }
.service-body h2 { margin-bottom: 1rem; }
.service-body p { color: var(--ink-soft); margin-bottom: 1rem; }
.service-body ul { list-style: none; margin: 1.2rem 0; }
.service-body li {
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.55rem;
  color: var(--ink-soft);
}
.service-body li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.service-body h4 { font-family: var(--font-sans); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); margin: 1.4rem 0 0.6rem; }

/* ---------- Citação ---------- */
.quote-section { text-align: center; padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; overflow: hidden; }
.quote-section .quote-symbol { width: 64px; margin: 0 auto 2rem; opacity: 0.9; }
.quote-section blockquote {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 400;
  line-height: 1.45;
  max-width: 860px;
  margin-inline: auto;
  letter-spacing: -0.01em;
}

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post-cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, rgba(106,140,195,0.18), rgba(200,130,66,0.18)); position: relative; overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.post-card:hover .post-cover img { transform: scale(1.05); }
.post-cover .cover-symbol { position: absolute; inset: 0; margin: auto; width: 72px; opacity: 0.35; }
.post-body { padding: 1.6rem 1.6rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.post-body time { font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.6rem; }
.post-body h3 { font-size: 1.18rem; line-height: 1.3; margin-bottom: 0.6rem; }
.post-body p { font-size: 0.95rem; color: var(--ink-soft); flex: 1; }

.load-more-wrap { text-align: center; margin-top: 2.6rem; }

/* ---------- Artigo ---------- */
.article-header { max-width: 760px; margin: 0 auto; text-align: center; padding: clamp(3rem, 6vw, 5rem) 0 2.5rem; }
.article-header h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.article-header time { font-family: var(--font-sans); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); display: block; margin-top: 1.2rem; }
.article-cover { max-width: 920px; margin: 0 auto 3rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.article-content { max-width: 700px; margin: 0 auto; padding-bottom: 4rem; font-size: 1.1rem; }
.article-content p { margin-bottom: 1.4rem; }
.article-content h2 { font-size: 1.7rem; margin: 2.4rem 0 1rem; }
.article-content ul, .article-content ol { margin: 0 0 1.4rem 1.4rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Formulários ---------- */
.form-grid { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label { display: block; font-family: var(--font-sans); font-weight: 600; font-size: 0.85rem; margin-bottom: 0.45rem; }
.field input, .field textarea {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(200, 130, 66, 0.15);
}
.field textarea { min-height: 150px; resize: vertical; }
.form-feedback { font-family: var(--font-sans); font-weight: 600; font-size: 0.92rem; padding: 0.9rem 1.2rem; border-radius: var(--radius-sm); display: none; }
.form-feedback.ok { display: block; background: rgba(106, 140, 195, 0.15); color: #3f5e8f; }
.form-feedback.err { display: block; background: rgba(200, 80, 66, 0.12); color: #a33d2e; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }

/* ---------- Contato ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact-channels { display: grid; gap: 1rem; margin-top: 2rem; }
.channel {
  display: flex; align-items: center; gap: 1.1rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.4rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.channel:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.channel-icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(200, 130, 66, 0.12); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.channel strong { font-family: var(--font-sans); font-size: 0.95rem; display: block; }
.channel span { font-size: 0.88rem; color: var(--ink-faint); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--bg); padding: 4rem 0 2rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(240, 238, 233, 0.14); }
.footer-logo { height: 56px; width: auto; }
.footer-tagline { margin-top: 1rem; color: rgba(240, 238, 233, 0.6); font-style: italic; }
.footer-col h4 { font-family: var(--font-sans); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.1rem; }
.footer-col a, .footer-col span { display: block; color: rgba(240, 238, 233, 0.72); font-size: 0.95rem; margin-bottom: 0.55rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--bg); }
.footer-bottom { padding-top: 1.6rem; font-family: var(--font-sans); font-size: 0.78rem; color: rgba(240, 238, 233, 0.45); }

/* ---------- WhatsApp flutuante ---------- */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08) translateY(-2px); box-shadow: 0 12px 34px rgba(37, 211, 102, 0.55); }

/* ---------- Animações de entrada ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ---------- Pattern decorativo ---------- */
.pattern-band {
  background-image: url('../img/logo/triuno-simbolo-grafite.svg');
  background-size: 56px;
  background-repeat: space;
  opacity: 0.05;
  height: 80px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .post-grid, .grid-3, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .main-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(240, 238, 233, 0.97);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--hairline);
    padding: 0.8rem 4vw 1.4rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .main-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .main-nav a:not(.btn) { padding: 0.9rem 0.2rem; border-bottom: 1px solid var(--hairline); font-size: 1.05rem; }
  .main-nav .btn-nav { margin-top: 1rem; justify-content: center; }
  .nav-toggle { display: block; }
  .hero-symbol { display: none; }
  .grid-3, .grid-4, .post-grid, .team-grid { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 1fr; }
  .service-row.is-reverse .service-media { order: 0; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}
