/* =========================================================
   Flávia Moreira · Psicologia Clínica
   Paleta quente e sóbria · CSS com nesting nativo
   ========================================================= */

:root {
  /* Cores */
  --ground: #F8EDE3;        /* creme base */
  --surface: #FFFFFF;
  --surface-warm: #FCF6EF;
  --beige: #DFD3C3;
  --tan: #D0B8A8;
  --clay: #C5705D;          /* acento terracota */
  --clay-deep: #A9594A;
  --text: #463A33;          /* castanho quente escuro */
  --text-soft: #6E5F55;
  --line: rgba(70, 58, 51, 0.12);

  /* Tipografia */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;

  /* Ritmo e formas */
  --radius: 18px;
  --radius-lg: 32px;
  --shadow-soft: 0 18px 50px -28px rgba(70, 58, 51, 0.35);
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  font-optical-sizing: auto;
}

p {
  margin: 0;
}

/* ---------- Utilitários ---------- */
.container {
  width: min(100% - 2.6rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--clay);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 100;
  transition: top 0.2s var(--ease);

  &:focus {
    top: 1rem;
  }
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);
  margin: 0 0 1.1rem;

  &.eyebrow--light {
    color: var(--tan);
  }
}

.section-title {
  font-size: clamp(1.85rem, 1.3rem + 2.4vw, 3.1rem);
}

.section-head {
  max-width: 40rem;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;

  & .section-intro {
    margin-top: 1.1rem;
    color: var(--text-soft);
    font-size: 1.08rem;
  }

  &.section-head--left {
    margin-inline: 0;
    text-align: left;
  }
}

/* ---------- Botões ---------- */
.btn {
  --btn-bg: var(--clay);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.4s var(--ease), background-color 0.3s var(--ease),
    color 0.3s var(--ease), box-shadow 0.4s var(--ease);

  &:hover {
    transform: translateY(-2px);
  }

  &.btn--solid {
    background: var(--clay);
    color: #fff;
    box-shadow: 0 12px 28px -14px var(--clay-deep);

    &:hover {
      background: var(--clay-deep);
      box-shadow: 0 18px 34px -14px var(--clay-deep);
    }
  }

  &.btn--ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line);

    &:hover {
      border-color: var(--clay);
      color: var(--clay);
    }
  }

  &.btn--ghost-light {
    color: var(--ground);
    border-color: rgba(248, 237, 227, 0.4);

    &:hover {
      border-color: var(--ground);
      color: #fff;
    }
  }

  &.btn--lg {
    padding: 1.1rem 2.2rem;
    font-size: 1.05rem;
  }
}

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 237, 227, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);

  &.is-scrolled {
    background: rgba(248, 237, 227, 0.92);
    border-color: var(--line);
    box-shadow: 0 10px 30px -24px rgba(70, 58, 51, 0.5);
  }

  & .header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 1.05rem;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;

  & .brand__mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, var(--tan), var(--clay) 78%);
    box-shadow: inset 0 0 0 4px rgba(248, 237, 227, 0.55);
    flex: none;
  }

  & .brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }

  & .brand__name {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 500;
    letter-spacing: -0.01em;
  }

  & .brand__role {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-soft);
  }
}

.nav {
  & .nav__list {
    display: flex;
    gap: 1.9rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  & a {
    text-decoration: none;
    font-size: 0.96rem;
    font-weight: 500;
    color: var(--text-soft);
    position: relative;
    transition: color 0.25s var(--ease);

    &::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -6px;
      width: 100%;
      height: 1.5px;
      background: var(--clay);
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.3s var(--ease);
    }

    &:hover {
      color: var(--text);

      &::after {
        transform: scaleX(1);
      }
    }
  }
}

@media (max-width: 900px) {
  .nav {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(4.5rem, 9vw, 8.5rem) clamp(4rem, 8vw, 7rem);
  overflow: hidden;

  & .hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
  }

  & .hero__inner {
    position: relative;
    z-index: 1;
    max-width: 52rem;
  }

  & .hero__title {
    font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.4rem);
    font-weight: 300;
    margin-bottom: 1.6rem;

    & em {
      font-style: italic;
      font-weight: 500;
      color: var(--clay);
    }
  }

  & .hero__lead {
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.32rem);
    color: var(--text-soft);
    max-width: 38rem;
    margin-bottom: 2.2rem;
  }

  & .hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  & .hero__note {
    margin-top: 1.5rem;
    font-size: 0.92rem;
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;

    &::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--clay);
    }
  }
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.75;

  &.blob--1 {
    width: 46vw;
    height: 46vw;
    max-width: 620px;
    max-height: 620px;
    top: -14%;
    right: -8%;
    background: radial-gradient(circle at 35% 35%, var(--tan), var(--beige) 70%);
  }

  &.blob--2 {
    width: 30vw;
    height: 30vw;
    max-width: 380px;
    max-height: 380px;
    bottom: -18%;
    left: -10%;
    background: radial-gradient(circle at 40% 40%, rgba(197, 112, 93, 0.55), rgba(197, 112, 93, 0) 70%);
    filter: blur(30px);
  }

  &.blob--3 {
    width: 22vw;
    height: 22vw;
    max-width: 260px;
    max-height: 260px;
    top: 30%;
    right: 18%;
    background: radial-gradient(circle at 40% 40%, var(--surface), rgba(255, 255, 255, 0) 72%);
    filter: blur(14px);
    opacity: 0.6;
  }
}

/* ---------- Empatia ---------- */
.empathy {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);

  & .empathy__inner {
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
  }

  & .empathy__text {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.4rem, 1rem + 1.8vw, 2.35rem);
    line-height: 1.45;
    letter-spacing: -0.01em;

    & strong {
      font-weight: 500;
      font-style: italic;
      color: var(--clay);
    }
  }
}

/* ---------- Áreas de apoio ---------- */
.areas {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);

  & .areas__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.4rem;
  }
}

.area-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem 2.4rem;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease),
    border-color 0.45s var(--ease);

  & .area-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--surface-warm);
    color: var(--clay);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-bottom: 1.4rem;
    transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  }

  & .area-card__title {
    font-size: 1.5rem;
    margin-bottom: 0.7rem;
  }

  & p {
    color: var(--text-soft);
    font-size: 1rem;
  }

  &:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
    border-color: transparent;

    & .area-card__icon {
      background: var(--clay);
      color: #fff;
    }
  }
}

/* ---------- Abordagem ---------- */
.approach {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
  background: linear-gradient(180deg, transparent, var(--surface-warm) 30%, var(--surface-warm) 70%, transparent);

  & .approach__inner {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.step {
  display: flex;
  gap: 1.5rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);

  &:last-child {
    border-bottom: 1px solid var(--line);
  }

  & .step__num {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--tan);
    flex: none;
    line-height: 1;
    padding-top: 0.2rem;
  }

  & .step__title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
  }

  & p {
    color: var(--text-soft);
  }
}

@media (max-width: 820px) {
  .approach .approach__inner {
    grid-template-columns: 1fr;
  }
}

/* ---------- Sobre ---------- */
.about {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);

  & .about__inner {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
  }

  & .about__text {
    & .section-title {
      margin-bottom: 1.3rem;
    }

    & p {
      color: var(--text-soft);
      margin-bottom: 1.1rem;
      max-width: 34rem;
    }

    & .btn {
      margin-top: 0.8rem;
    }
  }

  & .about__credentials {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: var(--text-soft);

    & li {
      padding-left: 1.4rem;
      position: relative;

      &::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0.62em;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--clay);
      }
    }

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

.portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--tan), var(--clay) 120%);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;

  &::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 15%, rgba(255, 255, 255, 0.35), transparent 55%);
  }

  & .portrait__initials {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.05em;
  }
}

@media (max-width: 820px) {
  .about .about__inner {
    grid-template-columns: 1fr;
  }

  .about .about__portrait {
    max-width: 360px;
  }
}

/* ---------- Testemunhos ---------- */
.voices {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);

  & .voices__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.4rem;
  }
}

.quote {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;

  & blockquote {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text);

    &::before {
      content: "“";
      display: block;
      font-size: 3rem;
      line-height: 0.4;
      color: var(--tan);
      margin-bottom: 0.6rem;
    }
  }

  & figcaption {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--clay);
  }
}

/* ---------- FAQ ---------- */
.faq {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);

  & .faq__inner {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }

  & .faq__list {
    display: flex;
    flex-direction: column;
  }
}

.faq-item {
  border-top: 1px solid var(--line);
  padding: 0.4rem 0;

  &:last-child {
    border-bottom: 1px solid var(--line);
  }

  & summary {
    list-style: none;
    cursor: pointer;
    padding: 1.2rem 2.5rem 1.2rem 0;
    font-family: var(--font-display);
    font-size: 1.22rem;
    font-weight: 500;
    position: relative;
    transition: color 0.25s var(--ease);

    &::-webkit-details-marker {
      display: none;
    }

    &::after {
      content: "+";
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      font-size: 1.5rem;
      color: var(--clay);
      transition: transform 0.3s var(--ease);
    }

    &:hover {
      color: var(--clay);
    }
  }

  & p {
    color: var(--text-soft);
    padding-bottom: 1.3rem;
    max-width: 42rem;
  }

  &[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
  }
}

@media (max-width: 820px) {
  .faq .faq__inner {
    grid-template-columns: 1fr;
  }
}

/* ---------- CTA final ---------- */
.cta {
  padding-block: clamp(2rem, 5vw, 4rem) clamp(4rem, 8vw, 7rem);

  & .cta__inner {
    background: linear-gradient(150deg, var(--clay), var(--clay-deep));
    color: var(--ground);
    border-radius: var(--radius-lg);
    padding: clamp(2.8rem, 6vw, 5.5rem);
    text-align: center;
    position: relative;
    overflow: hidden;

    &::before {
      content: "";
      position: absolute;
      width: 60%;
      height: 160%;
      top: -40%;
      right: -10%;
      background: radial-gradient(circle, rgba(248, 237, 227, 0.16), transparent 65%);
      pointer-events: none;
    }
  }

  & .cta__title {
    color: #fff;
    font-weight: 300;
    font-size: clamp(1.9rem, 1.3rem + 2.8vw, 3.4rem);
    max-width: 18ch;
    margin-inline: auto;
    position: relative;
  }

  & .cta__lead {
    margin: 1.3rem auto 2.3rem;
    max-width: 36rem;
    color: rgba(248, 237, 227, 0.88);
    font-size: 1.1rem;
    position: relative;
  }

  & .cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    position: relative;
  }

  & .btn--solid {
    background: var(--ground);
    color: var(--clay-deep);

    &:hover {
      background: #fff;
    }
  }
}

/* ---------- Rodapé ---------- */
.site-footer {
  background: var(--text);
  color: rgba(248, 237, 227, 0.75);
  padding-block: clamp(3rem, 5vw, 4.5rem) 2rem;

  & a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s var(--ease);

    &:hover {
      color: #fff;
    }
  }

  & .footer__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(248, 237, 227, 0.14);
  }

  & .footer__brand {
    & .brand__name {
      font-family: var(--font-display);
      font-size: 1.4rem;
      color: var(--ground);
      display: block;
      margin-bottom: 0.8rem;
    }

    & p {
      max-width: 26rem;
      font-size: 0.96rem;
    }
  }

  & .footer__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    font-size: 0.96rem;
  }

  & .footer__contact {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    font-size: 0.96rem;

    & p {
      color: rgba(248, 237, 227, 0.5);
      font-size: 0.85rem;
      margin-top: 0.3rem;
    }
  }

  & .footer__bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 2rem;
    justify-content: space-between;
    padding-top: 2rem;
    font-size: 0.84rem;
    color: rgba(248, 237, 227, 0.55);
  }

  & .footer__crisis a {
    color: var(--tan);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

@media (max-width: 760px) {
  .site-footer .footer__inner {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
}

/* ---------- Animações de revelação ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  will-change: opacity, transform;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
