/* =========================================================
   Dr. Paulo Grandal · base do site
   Tokens, tipografia, header, rodapé e componentes comuns
   ========================================================= */

:root {
  --ink: #13211f;
  --ink-soft: #40514e;
  --muted: #5f706c;

  --teal-900: #093b37;
  --teal-800: #0d4f4a;
  --teal-700: #106860;
  --teal-600: #128077;
  --teal-400: #5cbfb2;
  --teal-200: #a9ded5;

  --mint-100: #e7f3f0;
  --mint-50: #f2faf8;
  --cream: #fbfaf6;
  --white: #ffffff;

  --gold: #c7a15a;
  --gold-soft: #e6cf9f;

  --line: #dbe8e4;
  --line-strong: #c3d8d3;

  --shadow-sm: 0 1px 2px rgba(9, 59, 55, 0.05), 0 6px 20px rgba(9, 59, 55, 0.05);
  --shadow-md: 0 12px 40px rgba(9, 59, 55, 0.1);
  --shadow-lg: 0 24px 80px rgba(9, 59, 55, 0.14);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1180px;
  --radius: 20px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

* {
  margin: 0;
}

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

::selection {
  background: var(--teal-200);
  color: var(--teal-900);
}

:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.7rem, 6vw, 5.2rem);
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3.4rem);
}

h3 {
  font-size: clamp(1.2rem, 1.5vw, 1.45rem);
  line-height: 1.2;
}

p {
  text-wrap: pretty;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.section {
  padding-block: clamp(72px, 9vw, 124px);
}

.section--tight {
  padding-block: clamp(52px, 6vw, 84px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--teal-900);
  color: var(--cream);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: none;
}

/* ---------- ícones ---------- */

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

.icon--lg {
  width: 26px;
  height: 26px;
}

.icon--fill {
  fill: currentColor;
  stroke: none;
}

/* ---------- olho / etiqueta ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.eyebrow--light {
  color: var(--teal-200);
}

/* ---------- cabeçalhos de seção ---------- */

.section-head {
  max-width: 780px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head h2 {
  margin-top: 14px;
}

.section-head__lead {
  margin-top: 18px;
  max-width: 62ch;
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  color: var(--ink-soft);
}

.section-head--split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: end;
  max-width: none;
}

.section-head--split .section-head__lead {
  margin-top: 0;
  padding-bottom: 6px;
}

/* ---------- cabeçalho de página interna ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 7vw, 96px) clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: var(--mint-50);
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -240px;
  right: -160px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(92, 191, 178, 0.18), transparent 66%);
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: end;
}

.page-hero h1 {
  max-width: 15ch;
  margin-top: 16px;
}

.page-hero__lead {
  max-width: 46ch;
  color: var(--ink-soft);
}

.page-hero__lead strong {
  display: block;
  margin-top: 18px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--teal-800);
}

/* ---------- botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transition:
    transform 0.3s var(--ease),
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}

.btn .icon {
  width: 17px;
  height: 17px;
  transition: transform 0.3s var(--ease);
}

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

.btn:hover .icon {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--teal-800);
  color: var(--cream);
  box-shadow: 0 10px 24px rgba(13, 79, 74, 0.18);
}

.btn--primary:hover {
  background: var(--teal-900);
  box-shadow: 0 14px 30px rgba(13, 79, 74, 0.24);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--teal-600);
  background: var(--white);
  color: var(--teal-800);
}

.btn--light {
  background: var(--cream);
  color: var(--teal-900);
}

.btn--light:hover {
  background: var(--white);
}

.btn--outline-light {
  border-color: rgba(251, 250, 246, 0.32);
  color: var(--cream);
}

.btn--outline-light:hover {
  border-color: rgba(251, 250, 246, 0.7);
  background: rgba(251, 250, 246, 0.08);
}

.btn--sm {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.82rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--teal-800);
}

.link-arrow .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease);
}

.link-arrow:hover .icon {
  transform: translateX(4px);
}

/* ---------- barra superior ---------- */

.topbar {
  background: var(--teal-900);
  color: var(--teal-200);
  font-size: 0.76rem;
  letter-spacing: 0.01em;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 38px;
}

.topbar p {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar a {
  color: var(--cream);
  opacity: 0.78;
}

.topbar a:hover {
  opacity: 1;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 0 4px rgba(92, 191, 178, 0.16);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: rgba(251, 250, 246, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(251, 250, 246, 0.97);
  box-shadow: 0 8px 30px rgba(9, 59, 55, 0.04);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}

.brand {
  position: relative;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--teal-800);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.22rem;
  letter-spacing: -0.04em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

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

.brand__name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.brand__role {
  margin-top: 5px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav > a:not(.btn) {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.site-nav > a:not(.btn):hover {
  background: var(--mint-100);
  color: var(--teal-900);
}

.site-nav > a[aria-current="page"] {
  color: var(--teal-800);
}

.site-nav > a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 3px;
  left: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal-600);
}

.site-nav__cta {
  margin-left: 10px;
}

.menu-toggle {
  position: relative;
  z-index: 95;
  display: none;
  width: 46px;
  height: 46px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.menu-toggle > span:not(.sr-only) {
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition:
    transform 0.3s var(--ease),
    opacity 0.2s ease;
}

.site-header.is-open .menu-toggle > span:not(.sr-only):nth-child(1) {
  transform: translateY(3.75px) rotate(45deg);
}

.site-header.is-open .menu-toggle > span:not(.sr-only):nth-child(2) {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ---------- cards de serviço ---------- */

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.35s ease;
}

.service-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.service-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 14px;
  background: var(--mint-100);
  color: var(--teal-700);
}

.service-card h2,
.service-card h3 {
  font-size: 1.3rem;
  line-height: 1.2;
}

.service-card p {
  flex: 1;
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.service-card .link-arrow {
  margin-top: 22px;
}

/* ---------- chamada final ---------- */

.closing {
  padding-block: clamp(64px, 8vw, 100px);
}

.closing__inner {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px);
  border-radius: var(--radius-lg);
  background: var(--teal-800);
  color: var(--cream);
  text-align: center;
}

.closing__inner::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(199, 161, 90, 0.16), transparent 66%);
  transform: translateX(-50%);
  pointer-events: none;
}

.closing__inner > * {
  position: relative;
  z-index: 1;
}

.closing .eyebrow {
  justify-content: center;
  color: var(--teal-200);
}

.closing h2 {
  margin-top: 14px;
  color: var(--cream);
}

.closing p:not(.eyebrow) {
  max-width: 52ch;
  margin: 18px auto 0;
  color: rgba(251, 250, 246, 0.75);
}

.closing .btn {
  margin-top: 28px;
}

/* ---------- rodapé ---------- */

.site-footer {
  padding-top: clamp(56px, 7vw, 88px);
  background: var(--teal-900);
  color: rgba(251, 250, 246, 0.72);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.9fr 1.1fr;
  gap: 40px;
}

.footer__brand .brand__mark {
  background: var(--cream);
  color: var(--teal-900);
}

.footer__brand .brand__name {
  color: var(--cream);
}

.footer__brand .brand__role {
  color: rgba(251, 250, 246, 0.6);
}

.footer__about {
  max-width: 34ch;
  margin-top: 20px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer__social {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.footer__social a {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(251, 250, 246, 0.18);
  border-radius: 50%;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.footer__social a:hover {
  border-color: rgba(251, 250, 246, 0.45);
  background: rgba(251, 250, 246, 0.08);
}

.footer h3 {
  margin-bottom: 18px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-200);
}

.footer ul {
  display: grid;
  gap: 10px;
}

.footer ul a {
  font-size: 0.9rem;
}

.footer ul a:hover {
  color: var(--cream);
}

.footer__contact li {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer__contact .icon {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  color: var(--teal-400);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding: 22px 0;
  border-top: 1px solid rgba(251, 250, 246, 0.12);
  font-size: 0.78rem;
  color: rgba(251, 250, 246, 0.62);
}

/* ---------- revelação no scroll ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: var(--delay, 0ms);
}

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

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- responsivo base ---------- */

@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1.2fr 0.8fr 1fr;
  }

  .footer__contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 120px 24px 40px;
    background: var(--cream);
    overflow-y: auto;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-100%);
    transition:
      transform 0.45s var(--ease),
      visibility 0.45s;
  }

  .site-nav.is-open {
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav > a:not(.btn) {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
  }

  .site-nav > a[aria-current="page"]::after {
    display: none;
  }

  .site-nav__cta {
    width: 100%;
    margin: 24px 0 0;
  }

  .topbar__inner {
    justify-content: center;
  }

  .topbar a {
    display: none;
  }

  .section-head--split {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-head--split .section-head__lead {
    padding-bottom: 0;
  }

  .page-hero__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .page-hero h1 {
    max-width: 18ch;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 32px, var(--container));
  }

  .topbar {
    font-size: 0.7rem;
  }

  .topbar__inner {
    min-height: 34px;
  }

  .site-header__inner {
    min-height: 68px;
  }

  .brand__mark {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .brand__name {
    font-size: 1.05rem;
  }

  .brand__role {
    font-size: 0.54rem;
    letter-spacing: 0.18em;
  }

  .site-nav {
    padding-top: 120px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .footer__contact {
    grid-column: auto;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 6px;
    margin-top: 40px;
  }
}
