/* ==========================================================================
   Instituto OdontoGuia
   Base: frame "Desktop - 1" do Figma (1440px)
   ========================================================================== */

:root {
  --color-off-white: #efecea;
  --color-petrol: #296982;
  --color-petrol-dark: #1e4e60;
  --color-teal: #009193;
  --color-teal-card: #34aaaa;
  --color-teal-light: #90b8b2;
  --color-peach: #edaf8a;
  --color-white: #fff;
  --color-text: #000;

  --font-title: "Quicksand", "Segoe UI", sans-serif;
  --font-body: "Arimo", Arial, Helvetica, sans-serif;

  --size-hero: 38px;
  --size-h2: 32px;
  --size-h3: 22px;
  --size-body: 16px;
  --size-small: 14px;
  --size-button: 13px;

  --container: 1280px;
  --gutter: 80px;
  --radius: 16px;
  --header-height: 82px;
}

/* Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: normal;
}

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

h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }

h1, h2, h3 { font-family: var(--font-title); text-wrap: balance; }

ul[class], ol[class] { list-style: none; }

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

:focus-visible { outline: 3px solid var(--color-peach); outline-offset: 3px; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--color-petrol-dark);
  color: var(--color-white);
}
.skip-link:focus { top: 16px; }

.section-title {
  color: var(--color-petrol-dark);
  font-size: var(--size-h2);
  font-weight: 700;
}

.subsection-title {
  font-size: var(--size-h3);
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 12px 24px;
  border: 0;
  border-radius: 26px;
  font-family: var(--font-title);
  font-weight: 700;
  line-height: normal;
  text-align: center;
  cursor: pointer;
  transition: filter .2s;
}
.button:hover { filter: brightness(1.08); }

.button--primary {
  background: var(--color-teal);
  color: var(--color-off-white);
  font-size: var(--size-button);
}

.button--accent {
  background: var(--color-peach);
  color: var(--color-petrol);
  font-size: var(--size-small);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-off-white);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-height);
}

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

.site-nav__links {
  display: flex;
  gap: 24px;
  color: var(--color-petrol);
  font-family: var(--font-title);
  font-size: var(--size-button);
  font-weight: 700;
}
.site-nav__links a { display: block; padding-block: 8px; }
.site-nav__links a:hover { color: var(--color-teal); }

.social-links { display: flex; gap: 20px; }

.social-links a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  transition: filter .2s;
}
.social-links a:hover { filter: brightness(1.2); }
.social-links img { grid-area: 1 / 1; }
.social-links__icon { height: 18px; }

.menu-toggle { display: none; }

/* Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 600px;
  overflow: hidden;
  background: var(--color-petrol);
  color: var(--color-white);
}

.hero__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 76%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,
    rgb(41 105 130 / .88) 0%,
    rgb(41 105 130 / .5) 38.462%,
    rgb(41 105 130 / .05) 67.308%);
}

.hero__inner { display: flex; align-items: center; padding-block: 48px; }

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 680px;
}

.hero__title { display: flex; flex-direction: column; gap: 8px; }

.hero__eyebrow {
  color: var(--color-off-white);
  font-size: var(--size-h3);
  font-weight: 700;
}

.hero__headline {
  font-size: var(--size-hero);
  font-weight: 400;
}

/* Desafio
   -------------------------------------------------------------------------- */

.challenge {
  padding-block: 44px 51px;
  background: var(--color-peach);
  color: var(--color-petrol-dark);
}

.challenge__lead { max-width: 880px; margin-top: 12px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 54px;
}

.stats__card {
  min-height: 160px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--color-off-white);
}

.stats__value {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-title);
  font-size: var(--size-h3);
  font-weight: 700;
}

.challenge__source {
  margin-top: 24px;
  font-size: 11.5px;
  font-style: italic;
}

/* Instituto
   -------------------------------------------------------------------------- */

.about {
  padding-block: 64px;
  background: var(--color-off-white);
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 560fr) minmax(0, 600fr);
  align-items: start;
  column-gap: min(120px, 8.34vw);
}

.about__text { margin-top: 16px; }
.about__text p + p { margin-top: 18px; }
.about strong { color: var(--color-teal); }

.about__values { margin-top: 34px; }

/* Linhas divisórias exportadas do Figma */
.about__values p {
  padding-block: 16px;
  background: url("../img/line-instituto.svg") no-repeat top / 100% 1px;
}
.about__values p:first-child { padding-bottom: 20px; }
.about__values p:last-child {
  background-image: url("../img/line-instituto.svg"), url("../img/line-instituto.svg");
  background-position: top, bottom;
}

.about__image {
  width: 100%;
  aspect-ratio: 600 / 544;
  border-radius: var(--radius);
  object-fit: cover;
}

/* Frentes de atuação
   -------------------------------------------------------------------------- */

.areas {
  padding-block: 64px 68px;
  background: rgb(144 184 178 / .3);
}

.areas__intro { max-width: 760px; }
.areas__intro p { margin-top: 16px; }

.areas__list { margin-top: 52px; }

.area {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  max-width: 960px;
  padding-block: 28px 38px;
  background: url("../img/line-frentes.svg") no-repeat top / 100% 1px;
}
.area:nth-child(2) { padding-bottom: 34px; }
.area:last-child { padding-bottom: 32px; }

.area__number {
  color: var(--color-peach);
  font-family: var(--font-title);
  font-size: var(--size-h2);
  font-weight: 700;
  line-height: 40px;
}

.area .subsection-title { margin-bottom: 12px; color: var(--color-petrol); }

.area__topics { margin-top: 18px; }
ul.area__topics { padding-left: 26px; list-style: disc; }
.area__topics li { padding-left: 0; }
.area__topics li::marker,
.area__topics strong { color: var(--color-teal); }

.areas__image {
  width: 100%;
  margin-top: 28px;
  aspect-ratio: 4 / 1;
  border-radius: var(--radius);
  object-fit: cover;
}

/* Impacto social
   -------------------------------------------------------------------------- */

.impact {
  display: grid;
  /* 560px em uma tela de 1440px; a foto acompanha a borda em telas maiores */
  grid-template-columns: max(38.889%, calc(50% - 160px)) minmax(0, 1fr);
  background: var(--color-teal);
  color: var(--color-white);
}

.impact__media { position: relative; min-height: 496px; }

.impact__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 50%;
}

.impact__content {
  width: 100%;
  max-width: calc(640px + 2 * var(--gutter));
  padding: 64px var(--gutter) 68px;
}

.impact .section-title { color: var(--color-white); }
.impact__content > p { margin-top: 16px; }

.impact__card {
  margin-top: 46px;
  padding: 32px 32px 28px;
  border-radius: var(--radius);
  background: var(--color-teal-card);
}

.impact__card ul { margin-top: 12px; padding-left: 24px; }

/* Contato
   -------------------------------------------------------------------------- */

.contact {
  padding-block: 64px 48px;
  background: var(--color-petrol);
  color: var(--color-off-white);
  text-align: center;
}

.contact .section-title { color: var(--color-off-white); }

.contact__lead { max-width: 380px; margin: 16px auto 0; text-wrap: balance; }

.contact__subtitle { margin-top: 60px; position: relative; }
.contact__subtitle::before {
  content: "";
  position: absolute;
  top: -28px;
  left: 50%;
  width: 48px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-peach);
  transform: translateX(-50%);
}

.form { max-width: 640px; margin: 28px auto 0; }

.field {
  position: relative;
  height: 48px;
  background: url("../img/line-form.svg") no-repeat left 39px / 100% 1px;
  text-align: left;
}
.field + .field { margin-top: 24px; }

.field input,
.field select {
  width: 100%;
  height: 39px;
  padding: 14px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-off-white);
  font-family: var(--font-body);
  font-size: var(--size-body); /* 16px evita zoom automático no iOS */
}

.field select { appearance: none; padding-right: 32px; cursor: pointer; }
.field option { color: var(--color-text); }

.field input:focus-visible,
.field select:focus-visible {
  outline: 0;
  box-shadow: 0 2px 0 var(--color-peach);
}

.field input:autofill {
  -webkit-text-fill-color: var(--color-off-white);
  transition: background-color 9999s;
}

.field label {
  position: absolute;
  top: 12px;
  left: 0;
  font-family: var(--font-title);
  font-size: var(--size-small);
  font-weight: 700;
  pointer-events: none;
  transform-origin: left top;
  transition: transform .15s;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field select:focus + label,
.field.is-filled label { transform: translateY(-14px) scale(.82); }

.field__arrow {
  position: absolute;
  top: 8px;
  right: 15px;
  pointer-events: none;
}

.form .button { min-width: 96px; margin-top: 24px; }

.form__status:not(:empty) { margin-top: 12px; }

/* Rodapé
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--color-petrol-dark);
  color: var(--color-off-white);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  min-height: 112px;
  padding-block: 32px;
  font-family: var(--font-title);
  font-size: var(--size-small);
}

/* Animações (ver assets/js/animations.js)
   -------------------------------------------------------------------------- */

.anim-pending .site-header__logo,
.anim-pending .hero__content > * { opacity: 0; }

/* Com o scroll suave ativo, o Lenis controla a rolagem */
html.lenis { height: auto; scroll-behavior: auto; }

/* Impede que fotos ampliadas ou textos deslocados vazem da seção */
.impact__media { overflow: hidden; }
main > section { overflow-x: clip; }

/* Responsivo
   -------------------------------------------------------------------------- */

@media (max-width: 1199px) {
  :root { --gutter: 48px; }

  .hero__content { max-width: 480px; }

  .stats { gap: 24px; }

  .about__grid { align-items: center; }
  .about__image { aspect-ratio: 3 / 4; }

  .impact { grid-template-columns: 40% minmax(0, 1fr); }
}

/* Tablet */
@media (max-width: 899px) {
  :root {
    --gutter: 32px;
    --header-height: 72px;
    --size-h2: 28px;
    --size-h3: 20px;
  }

  .site-header__logo img { width: 94px; }

  /* Menu em painel */
  .js .menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-petrol);
    cursor: pointer;
  }

  .menu-toggle__bars,
  .menu-toggle__bars::before,
  .menu-toggle__bars::after {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .2s;
  }
  .menu-toggle__bars { position: relative; }
  .menu-toggle__bars::before,
  .menu-toggle__bars::after { content: ""; position: absolute; top: 0; left: 0; }
  .menu-toggle__bars::before { transform: translateY(-7px); }
  .menu-toggle__bars::after { transform: translateY(7px); }

  .menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: rotate(-45deg); }

  .js .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    padding: 8px var(--gutter) 28px;
    border-top: 1px solid rgb(41 105 130 / .15);
    background: var(--color-off-white);
    box-shadow: 0 12px 24px rgb(0 0 0 / .12);
  }
  .js .site-nav.is-open { display: flex; }

  .js .site-nav nav { width: 100%; }
  .js .site-nav__links { flex-direction: column; gap: 0; font-size: 17px; text-align: center; }
  .js .site-nav__links a { padding-block: 14px; }

  /* Sem JavaScript, o menu fica sempre visível */
  html:not(.js) .site-header { position: static; }
  html:not(.js) .site-header__inner { flex-direction: column; height: auto; padding-block: 12px; }
  html:not(.js) .site-nav { flex-direction: column; gap: 12px; }
  html:not(.js) .site-nav__links { flex-wrap: wrap; justify-content: center; }

  .hero { min-height: 520px; }
  .hero__image { object-position: 72% 50%; }
  .hero::after {
    background: linear-gradient(90deg,
      rgb(41 105 130 / .92) 0%,
      rgb(41 105 130 / .65) 55%,
      rgb(41 105 130 / .15) 100%);
  }
  .hero__content { max-width: 440px; }

  .stats { grid-template-columns: 1fr; gap: 16px; margin-top: 32px; }
  .stats__card { min-height: 0; }

  .about__grid { grid-template-columns: 1fr; row-gap: 32px; }
  .about__image { aspect-ratio: 4 / 3; }

  .areas__list { margin-top: 32px; }
  .areas__image { aspect-ratio: 2 / 1; }

  .impact { grid-template-columns: 1fr; }
  .impact__media { min-height: 0; aspect-ratio: 16 / 10; }
  .impact__content { max-width: none; padding-block: 48px; }
  .impact__card { margin-top: 32px; }
}

/* Celular */
@media (max-width: 599px) {
  :root {
    --gutter: 20px;
    --size-hero: 32px;
    --size-h2: 26px;
  }

  body { line-height: 1.4; }
  h1, h2, h3 { line-height: 1.25; }

  /* A foto ocupa o topo e o texto fica sobre o azul, sem cobrir o rosto */
  .hero { flex-direction: column; min-height: 0; }
  .hero__image {
    position: static;
    height: auto;
    aspect-ratio: 1 / 1;
    object-position: 78% 50%;
  }
  .hero::after { display: none; }
  .hero__inner { padding-block: 32px 40px; }

  .challenge { padding-block: 40px; }

  .about,
  .areas { padding-block: 48px; }

  .area { grid-template-columns: 1fr; padding-block: 24px 28px; }
  .area:nth-child(2),
  .area:last-child { padding-bottom: 28px; }
  .area__number { margin-bottom: 4px; }
  ul.area__topics { padding-left: 20px; }
  .area__topics li + li { margin-top: 10px; }

  .areas__image { aspect-ratio: 4 / 3; }

  .impact__card { padding: 24px 20px; }
  .impact__card ul { padding-left: 18px; }
  .impact__card li + li { margin-top: 8px; }

  .contact { padding-block: 48px 36px; }
  .form .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
