/* Cristiana Rebelo - Psicóloga Clínica
   Rebuilt from the original Squarespace site.
   Original fonts (Minerva Modern + Freight Text) are Adobe fonts licensed to Squarespace,
   so these are the closest free Google Fonts. */

:root {
  --green: #3d4435;
  --grey: #e6e6e6;
  --beige: #e7d9cb;
  --white: #ffffff;
  --black: #000000;
  --light-text: #e6e6e6;

  --font-heading: "Marcellus", "Optima", Georgia, serif;
  --font-body: "Newsreader", "Georgia", serif;

  --gutter: clamp(20px, 8vw, 122px);
  --gutter-wide: clamp(20px, 4vw, 61px);
  --max: 1400px;
}

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

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

body {
  margin: 0;
  background: var(--grey);
  color: var(--black);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.24vw, 19px);
  line-height: 1.6;
  letter-spacing: 0.01em;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.3;
  margin: 0 0 0.6em;
}

h2 { font-size: clamp(30px, 3vw, 48px); }
h4 { font-size: clamp(17px, 1.2vw, 20px); }

p { margin: 0 0 1em; }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 12px; }

/* ---------- Layout helpers ---------- */

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container.wide { padding: 0 var(--gutter-wide); max-width: none; }

.section { position: relative; padding: clamp(60px, 7vw, 110px) 0; }
.section.green { background: var(--green); color: var(--light-text); }
.section.green h2 { color: var(--light-text); }
.section.grey { background: var(--grey); }
.section.white { background: var(--white); }
.section.beige { background: var(--beige); }

.center { text-align: center; }
.justify { text-align: justify; }

/* Angled dividers: a shape in the NEXT section's colour sitting at the bottom of a section */
.divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(40px, 6vw, 92px);
  pointer-events: none;
}
.divider.peak-left { clip-path: polygon(0 100%, 25% 0, 100% 100%); }
.divider.peak-right { clip-path: polygon(0 100%, 75% 0, 100% 100%); }
.divider.slope { clip-path: polygon(0 0, 100% 100%, 0 100%); height: clamp(50px, 8vw, 122px); }
.divider.to-white { background: var(--white); }
.divider.to-green { background: var(--green); }
.divider.to-grey { background: var(--grey); }
.has-divider { padding-bottom: calc(clamp(60px, 7vw, 110px) + clamp(40px, 6vw, 92px)); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 0;
  border-radius: 6.4px;
  padding: 1.2em 2.4em;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.8; }
.btn-dark { background: var(--black); color: var(--light-text); }
.btn-light { background: var(--grey); color: var(--black); }
.btn-lg { font-size: 18px; padding: 1.15em 2em; }

/* ---------- Header ---------- */

.site-header {
  background: var(--grey);
  position: relative;
  z-index: 10;
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 26px var(--gutter-wide) 22px;
}
.site-title {
  grid-column: 2;
  text-align: center;
}
.site-title > a {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.03vw, 31px);
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.4;
}
.header-actions { grid-column: 3; justify-self: end; }
.header-actions .btn { padding: 1.2em 2em; }

.main-nav { margin-top: 8px; }
.main-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1.4em;
}
.main-nav a,
.main-nav .folder-toggle {
  font-family: var(--font-body);
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 2px 0;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover,
.main-nav .folder-toggle:hover,
.main-nav .active > a,
.main-nav .active > .folder-toggle { border-bottom-color: currentColor; }

.folder { position: relative; }
.folder-menu {
  list-style: none;
  margin: 0;
  padding: 14px 20px;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grey);
  min-width: 220px;
  text-align: center;
  display: none;
}
.folder:hover .folder-menu,
.folder:focus-within .folder-menu { display: block; }
.folder-menu li { padding: 4px 0; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  height: 1px;
  background: var(--black);
  margin: 7px 0;
}

/* ---------- Home hero ---------- */

.hero { padding: clamp(60px, 6vw, 90px) 0 calc(clamp(60px, 6vw, 90px) + clamp(40px, 6vw, 92px)); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}
.hero-quote { padding-left: 6%; }
.hero-quote h2 {
  font-size: clamp(28px, 2.82vw, 46px);
  line-height: 1.75;
  margin: 0;
  font-weight: 400;
  -webkit-text-stroke: 0.6px currentColor; /* Minerva Modern Bold look */
}
.hero-quote h4 {
  text-align: right;
  margin-top: 1.4em;
  padding-right: 22%;
  -webkit-text-stroke: 0.3px currentColor;
}
.hero-photo {
  width: min(100%, 460px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  justify-self: center;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

/* Hand-drawn highlights in the hero quote */
.hl { position: relative; display: inline-block; }
.hl svg {
  position: absolute;
  pointer-events: none;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: square;
}
.hl-wave svg { left: 0; bottom: 0.05em; width: 100%; height: 0.35em; }
.hl-circle svg { left: -3%; top: 2%; width: 106%; height: 100%; stroke-width: 2.6; }
.hl-curve svg { left: -5%; bottom: 0.05em; width: 110%; height: 0.3em; }

/* ---------- Two column blocks ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 70px);
}
.two-col.align-start { align-items: start; }

/* ---------- Forms ---------- */

.form-intro p { max-width: 36em; }
.form-intro .btn { margin-top: 2.5em; }
.form-intro .btn-wrap { text-align: center; }

.contact-form { display: grid; gap: 22px; }
.contact-form fieldset { border: 0; margin: 0; padding: 0; }
.contact-form legend { padding: 0; margin-bottom: 4px; font-size: 1.05em; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-form label { display: block; }
.contact-form .label { font-size: 1.05em; }
.contact-form .row .label { font-size: 0.85em; }
.contact-form .req { opacity: 0.7; font-size: 0.85em; margin-left: 4px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form input[type="number"],
.contact-form textarea {
  display: block;
  width: 100%;
  background: transparent;
  color: inherit;
  font: inherit;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 14px 2px 8px;
  border-radius: 0;
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: 1px solid currentColor; outline-offset: 2px; }
.contact-form textarea { min-height: 110px; resize: vertical; }
.contact-form .submit { text-align: center; }
.contact-form .submit .btn { font-weight: 600; padding: 1.1em 2em; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: inline-block;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.95em;
  transition: background 0.15s, color 0.15s;
}
.pill input:checked + span { background: var(--light-text); color: var(--green); }
.pill input:focus-visible + span { outline: 2px solid currentColor; outline-offset: 2px; }

.form-success { display: none; text-align: center; padding: 30px 0; }
.form-sent .contact-form { display: none; }
.form-sent .form-success { display: block; }

/* ---------- FAQ accordion ---------- */

.faq-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding-left: 4%; }
.faq-grid h2 { font-size: clamp(30px, 3vw, 46px); }
.accordion { border-top: 1px solid #999; }
.accordion details { border-bottom: 1px solid #999; }
.accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 28px 0;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: clamp(16px, 1.25vw, 20px);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion .icon { position: relative; width: 24px; height: 24px; flex: none; }
.accordion .icon::before,
.accordion .icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  left: 0; right: 0; top: 50%; height: 1px;
  transition: transform 0.2s;
}
.accordion .icon::after { transform: rotate(90deg); }
.accordion details[open] .icon::after { transform: rotate(0deg); }
.accordion .answer { padding: 0 0 26px; font-size: 0.9em; }
.accordion .answer p { margin-bottom: 0.6em; }
.accordion ol { padding-left: 1.4em; }

/* ---------- Áreas de Atuação (blog list) ---------- */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(30px, 5.5vw, 83px);
  row-gap: 70px;
}
.blog-card .thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.blog-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card h2 {
  font-size: clamp(24px, 2.2vw, 36px);
  margin: 1.9em 0 0.8em;
}
.blog-card h2 a { text-decoration: none; }
.blog-card p { font-size: 0.95em; }
.read-more { display: inline-block; margin-top: 1em; text-decoration: none; border-bottom: 1px solid currentColor; line-height: 1.3; }

/* ---------- Post page ---------- */

.post h1 { font-size: clamp(28px, 2.5vw, 40px); margin-bottom: 1.4em; }
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: clamp(80px, 10vw, 160px);
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: clamp(16px, 1.3vw, 20px);
}
.post-nav a { display: flex; align-items: center; gap: 22px; text-decoration: none; }
.post-nav svg { width: 14px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* ---------- Contrato ---------- */

.contract h4 { font-family: var(--font-heading); font-size: clamp(15px, 1.1vw, 18px); margin: 2em 0 1.2em; }
.contract h4 strong { font-weight: 400; -webkit-text-stroke: 0.4px currentColor; }
.contract ul { padding-left: 1.4em; }
.contract li { margin-bottom: 0.4em; }

.consultas-quote h2 { -webkit-text-stroke: 0.7px currentColor; padding: 0 8%; }

/* ---------- Footer ---------- */

.site-footer { background: var(--grey); padding: 80px 0 100px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  row-gap: 26px;
}
.footer-text { grid-column: 2; grid-row: 1; font-size: 0.9em; line-height: 1.6; max-width: 310px; }
.footer-text p { margin: 0; }
.footer-left { grid-column: 1; grid-row: 2; }
.footer-right { grid-column: 3; grid-row: 2; justify-self: end; }
.footer-left img { width: 106px; }
.footer-right img { width: 166px; }

/* ---------- Mobile ---------- */

@media (max-width: 800px) {
  .header-inner { grid-template-columns: 1fr auto; padding: 18px 20px; }
  .site-title { grid-column: 1; text-align: left; }
  .header-actions { display: none; }
  .menu-toggle { display: block; grid-column: 2; }
  .main-nav { display: none; }
  .nav-open .main-nav {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--grey);
    padding: 100px 30px 40px;
    overflow-y: auto;
    font-size: 26px;
    text-align: center;
  }
  .nav-open .main-nav > ul { flex-direction: column; gap: 18px; }
  .nav-open .folder-menu { display: block; position: static; transform: none; font-size: 20px; padding: 6px 0 0; }
  .nav-open .main-nav .mobile-contact { display: block; }
  .nav-open .menu-toggle { position: fixed; top: 18px; right: 20px; z-index: 20; }

  .hero-grid,
  .two-col,
  .faq-grid,
  .blog-grid { grid-template-columns: 1fr; }
  .hero-quote { padding-left: 0; text-align: center; order: 2; }
  .hero-quote h4 { text-align: center; padding-right: 0; }
  .hero-photo { width: 78%; }
  .faq-grid { padding-left: 0; }
  .contact-form .row { grid-template-columns: 1fr; }
  .justify { text-align: left; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-text { grid-column: 1 / -1; max-width: none; text-align: center; }
  .footer-left { grid-column: 1; }
  .footer-right { grid-column: 2; }
}

.mobile-contact { display: none; }
