/* ==========================================================================
   LOCMED · Landing page
   1. Fonte  2. Tokens  3. Base  4. Botões  5. Cabeçalho  6. Abertura
   7. Seções  8. Lista de consultas/exames  9. Como agendar  10. Como chegar
   11. Rodapé  12. Barra fixa (celular)  13. Aviso  14. Movimento
   ========================================================================== */

/* 1. Fonte (Montserrat, a mesma dos stories da clínica) */
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-latin.woff2") format("woff2-variations"),
       url("../assets/fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* 2. Tokens — cores medidas no logo oficial */
:root {
  --salvia: #D7E2C4;          /* fundo do logo */
  --salvia-clara: #EEF3E5;
  --salvia-borda: #C9D6B4;
  --verde: #475E43;           /* "MED" do logo — 7,1:1 no branco */
  --verde-escuro: #2F3E2D;    /* texto corrido — 11,4:1 no branco */
  --laranja: #D76018;         /* "LOC" do logo — ícones e detalhes */
  --laranja-botao: #C0510E;   /* fundo de botão com texto branco — 4,8:1 */
  --laranja-botao-hover: #AD480B;
  --branco: #FFFFFF;

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --raio-pilula: 999px;
  --raio-grande: 28px;
  --raio-medio: 20px;

  --sombra-suave: 0 1px 2px rgb(47 62 45 / .08), 0 10px 24px -10px rgb(47 62 45 / .38);
  --sombra-suave-hover: 0 2px 4px rgb(47 62 45 / .10), 0 18px 32px -12px rgb(47 62 45 / .45);
  --sombra-laranja: 0 1px 2px rgb(120 45 5 / .25), 0 12px 24px -10px rgb(192 81 14 / .62);
  --sombra-laranja-hover: 0 2px 4px rgb(120 45 5 / .25), 0 18px 32px -12px rgb(192 81 14 / .7);
  --sombra-afundada: inset 0 3px 6px rgb(0 0 0 / .2);

  --altura-cabecalho: 68px;
  --largura: 1160px;
}

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--altura-cabecalho) + 16px);
}

body {
  margin: 0;
  padding-bottom: calc(84px + env(safe-area-inset-bottom)); /* espaço da barra fixa */
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 450;
  line-height: 1.6;
  color: var(--verde-escuro);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }

h1, h2, h3 {
  margin: 0;
  color: var(--verde);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  stroke-width: 1.8;
}

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

.nowrap { white-space: nowrap; }

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

.skip-link {
  position: absolute;
  top: -80px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--raio-pilula);
  background: var(--verde-escuro);
  color: var(--branco);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* 4. Botões — pílula com sombra que sobe ao passar o mouse e afunda ao tocar */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border: 0;
  border-radius: var(--raio-pilula);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { width: 22px; height: 22px; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--laranja-botao);
  color: var(--branco);
  box-shadow: var(--sombra-laranja);
}
.btn--primary:active { box-shadow: var(--sombra-afundada); }

.btn--soft {
  background: var(--branco);
  color: var(--verde);
  box-shadow: var(--sombra-suave);
}
.btn--soft:active { box-shadow: inset 0 3px 6px rgb(47 62 45 / .18); }

.btn--ghost {
  background: transparent;
  color: var(--verde);
  box-shadow: inset 0 0 0 2px var(--verde);
}

.btn--large { min-height: 58px; padding: 14px 30px; font-size: 1.0625rem; }
.btn--small { min-height: 44px; padding: 8px 20px; font-size: .9375rem; }
.btn--block { width: 100%; }

@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(1px); }
  .btn--primary:hover { background: var(--laranja-botao-hover); box-shadow: var(--sombra-laranja-hover); }
  .btn--soft:hover { box-shadow: var(--sombra-suave-hover); }
  .btn--ghost:hover { background: rgb(255 255 255 / .45); }
}

/* 5. Cabeçalho */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / .94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--salvia-borda), 0 10px 24px -18px rgb(47 62 45 / .5);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--altura-cabecalho);
}
.site-header__logo { display: block; border-radius: 8px; }
.site-header__logo img { width: auto; height: 40px; }

.site-nav { display: none; margin-left: auto; gap: 2px; }
.site-nav a {
  padding: 10px 14px;
  border-radius: var(--raio-pilula);
  color: var(--verde);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover { background: var(--salvia-clara); }
.site-header__cta { display: none; }

@media (min-width: 960px) {
  .site-header__logo img { height: 46px; }
  .site-nav { display: flex; }
  .site-header__cta { display: inline-flex; }
}

/* 6. Abertura */
.hero {
  padding: 36px 0 28px;
  background: var(--salvia);
  overflow: hidden;
}
.hero__grid { display: grid; gap: 28px; }

.hero__title {
  max-width: 14ch;
  font-size: clamp(2.125rem, 1.2rem + 4.2vw, 4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.quebra-desktop { display: none; }

.hero__lead {
  max-width: 44ch;
  margin-top: 16px;
  color: var(--verde-escuro);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 8px 16px 8px 12px;
  border-radius: 20px;
  background: rgb(255 255 255 / .72);
  color: var(--verde-escuro);
  font-size: .9375rem;
  font-weight: 600;
}
.status__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 0 4px rgb(71 94 67 / .18);
}
.status[data-open="false"] .status__dot {
  background: var(--laranja);
  box-shadow: 0 0 0 4px rgb(215 96 24 / .2);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
@media (min-width: 560px) {
  .hero__actions { flex-direction: row; flex-wrap: wrap; }
}

/* Bolhas: o mesmo desenho dos destaques do Instagram da clínica */
.bubbles {
  display: flex;
  gap: 12px;
  margin-inline: -20px;
  padding: 10px 20px 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  scrollbar-width: none;
}
.bubbles::-webkit-scrollbar { display: none; }

.bubble {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 84px;
  color: var(--verde-escuro);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  scroll-snap-align: start;
  border-radius: 16px;
  -webkit-tap-highlight-color: transparent;
}
.bubble__circle {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--branco);
  color: var(--laranja);
  box-shadow:
    0 0 0 4px var(--salvia),
    0 0 0 6px var(--branco),
    0 14px 24px -10px rgb(47 62 45 / .55);
  transition: transform .18s ease, box-shadow .18s ease;
}
.bubble__circle .icon { width: 32px; height: 32px; stroke-width: 1.6; }
.bubble:active .bubble__circle { transform: scale(.95); }

@media (hover: hover) {
  .bubble:hover .bubble__circle {
    transform: translateY(-3px);
    box-shadow:
      0 0 0 4px var(--salvia),
      0 0 0 6px var(--branco),
      0 20px 30px -12px rgb(47 62 45 / .6);
  }
}

@media (min-width: 960px) {
  .hero { padding: 72px 0 84px; }
  .hero__grid {
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 48px;
  }
  .hero__title { max-width: none; }
  .quebra-desktop { display: inline; }
  .hero__lead { font-size: 1.1875rem; }
  .bubbles {
    flex-wrap: wrap;
    justify-content: center;
    justify-self: end;
    gap: 30px 26px;
    max-width: 440px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .bubble { width: 124px; font-size: .9375rem; }
  .bubble__circle {
    width: 108px;
    height: 108px;
    box-shadow:
      0 0 0 5px var(--salvia),
      0 0 0 8px var(--branco),
      0 20px 32px -14px rgb(47 62 45 / .55);
  }
  .bubble__circle .icon { width: 44px; height: 44px; stroke-width: 1.5; }
}

/* 7. Seções */
.section { padding: 56px 0; }
.section--tint { background: var(--salvia-clara); }
.section--sage { background: var(--salvia); }

.section__head { max-width: 60ch; margin-bottom: 24px; }
.section__title { font-size: clamp(1.875rem, 1.35rem + 2.2vw, 2.75rem); letter-spacing: -0.02em; }
.section__lead { margin-top: 10px; color: var(--verde); }

@media (min-width: 768px) {
  body { font-size: 1.125rem; }
  .section { padding: 88px 0; }
  .section__head { margin-bottom: 32px; }
}

/* 8. Lista de consultas e exames — a linha inteira é o botão */
.services {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--salvia-borda);
}
.services > li { border-bottom: 1px solid var(--salvia-borda); }

.service {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 8px;
  border-radius: 18px;
  text-decoration: none;
  transition: background-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.service__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--salvia-clara);
  color: var(--laranja);
}
.section--tint .service__icon { background: var(--branco); }
.service__icon .icon { width: 26px; height: 26px; }

.service__name {
  display: block;
  color: var(--verde-escuro);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.3;
}
.service__desc {
  display: block;
  margin-top: 2px;
  color: var(--verde);
  font-size: .9375rem;
  line-height: 1.45;
}
.service__go {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--branco);
  color: var(--laranja-botao);
  box-shadow: var(--sombra-suave);
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.service__go .icon { width: 22px; height: 22px; }
.service:active .service__go { box-shadow: var(--sombra-afundada); }

@media (hover: hover) {
  .service:hover { background: var(--salvia-clara); }
  .section--tint .service:hover { background: var(--branco); }
  .service:hover .service__go {
    background: var(--laranja-botao);
    color: var(--branco);
    box-shadow: var(--sombra-laranja);
  }
}

@media (min-width: 768px) {
  .services { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 28px;
  padding: 16px 20px;
  border-radius: var(--raio-medio);
  background: var(--branco);
  box-shadow: inset 0 0 0 1px var(--salvia-borda);
  font-size: .9375rem;
}
.note .icon { width: 24px; height: 24px; margin-top: 1px; color: var(--laranja); }

/* 9. Como agendar */
.agendar { display: grid; gap: 48px; }

.steps {
  display: grid;
  margin: 28px 0 8px;
  padding: 0;
  list-style: none;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding-bottom: 28px;
}
/* linha vertical que liga os passos (como nos stories da clínica) */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 60px;
  bottom: 4px;
  left: 27px;
  width: 2px;
  border-radius: 2px;
  background: var(--salvia-borda);
}
.step__num {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--laranja-botao);
  color: var(--branco);
  font-size: 1.375rem;
  font-weight: 700;
  box-shadow: var(--sombra-laranja);
}
.step__title { margin-top: 13px; font-size: 1.25rem; }
.step p { margin-top: 6px; }

.tip {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px 20px;
  border-radius: var(--raio-medio);
  background: var(--salvia-clara);
  font-size: .9375rem;
}
.tip .icon { width: 26px; height: 26px; color: var(--laranja); }
.tip strong { color: var(--verde); }

/* Celular com conversa de exemplo */
.phone { justify-self: center; width: min(100%, 340px); margin: 0; }
.phone__frame {
  padding: 12px;
  border-radius: 42px;
  background: var(--verde-escuro);
  box-shadow: 0 34px 60px -30px rgb(47 62 45 / .7), inset 0 0 0 2px rgb(255 255 255 / .08);
}
.phone__screen { overflow: hidden; border-radius: 31px; background: #F4F7EF; }
.phone__top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: var(--verde);
  color: var(--branco);
}
.phone__avatar { width: 38px; height: 38px; border-radius: 50%; }
.phone__name { line-height: 1.2; }
.phone__name strong { display: block; font-size: .9375rem; }
.phone__name small { font-size: .75rem; opacity: .85; }

.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 330px;
  padding: 20px 14px 24px;
}
.msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: .9375rem;
  line-height: 1.4;
  box-shadow: 0 1px 1px rgb(47 62 45 / .12);
}
.msg--out { align-self: flex-end; background: var(--salvia); border-bottom-right-radius: 6px; }
.msg--in { align-self: flex-start; background: var(--branco); border-bottom-left-radius: 6px; }
.phone figcaption { margin-top: 14px; color: var(--verde); font-size: .875rem; text-align: center; }

@media (min-width: 960px) {
  .agendar { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 72px; }
}

/* 10. Como chegar */
.chegar { display: grid; gap: 28px; }
.chegar > * { min-width: 0; }

.map {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--raio-grande);
  background: var(--salvia-clara);
  box-shadow: var(--sombra-suave);
}
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

.address { font-style: normal; }
.address__line1 {
  display: block;
  color: var(--verde-escuro);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
}
.address__line2 { display: block; margin-top: 4px; color: var(--verde); }

.ref {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--raio-medio);
  background: rgb(255 255 255 / .7);
}
.ref .icon { width: 26px; height: 26px; color: var(--laranja); }
.ref strong { color: var(--verde); }

.route-buttons { display: grid; gap: 12px; margin-top: 20px; }

.hours {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: var(--raio-grande);
  background: var(--branco);
  box-shadow: var(--sombra-suave);
}
.hours__title { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; }
.hours__title .icon { color: var(--laranja); }
.hours__table { width: 100%; margin-top: 8px; border-collapse: collapse; }
.hours__table th,
.hours__table td {
  padding: 10px 0;
  border-top: 1px solid var(--salvia-clara);
  font-weight: 500;
  text-align: left;
}
.hours__table td { font-weight: 650; text-align: right; }
.hours__table tr:first-child th,
.hours__table tr:first-child td { border-top: 0; }
.hours__table .is-today th,
.hours__table .is-today td { color: var(--laranja-botao); }
.today-tag {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--raio-pilula);
  background: var(--laranja-botao);
  color: var(--branco);
  font-size: .75rem;
  font-weight: 700;
  vertical-align: 2px;
}

@media (min-width: 960px) {
  .chegar { grid-template-columns: 1.25fr .95fr; align-items: stretch; gap: 40px; }
  .map { height: 100%; min-height: 540px; aspect-ratio: auto; }
}

/* 11. Rodapé */
.site-footer {
  padding: 52px 0 28px;
  background: var(--verde);
  color: var(--branco);
  font-size: 1rem;
}
.site-footer a { color: var(--branco); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__grid { display: grid; gap: 36px; }
.site-footer__logo { width: auto; height: 46px; margin-bottom: 16px; }
.site-footer__title { margin-bottom: 12px; color: var(--branco); font-size: 1rem; }
.site-footer__hours { margin-top: 10px; }

.contact-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.contact-list a { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; }
.contact-list .icon { width: 22px; height: 22px; }

.site-footer__legal {
  display: grid;
  gap: 6px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / .22);
  color: rgb(255 255 255 / .88);
  font-size: .875rem;
}
/* marca visual de conteúdo que falta preencher */
.pendente { padding: 0 6px; border-radius: 4px; background: #FFE58A; color: #3A3000; }

@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; }
}

/* 12. Barra fixa (celular) */
.bottom-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgb(255 255 255 / .96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 -12px 30px -14px rgb(47 62 45 / .4);
}
.bottom-bar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 58px;
  border-radius: 18px;
  background: var(--salvia-clara);
  color: var(--verde);
  font-size: .8125rem;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 6px 14px -8px rgb(47 62 45 / .5);
  -webkit-tap-highlight-color: transparent;
}
.bottom-bar__btn .icon { width: 24px; height: 24px; }
.bottom-bar__btn--primary { background: var(--laranja-botao); color: var(--branco); box-shadow: var(--sombra-laranja); }
.bottom-bar__btn:active { transform: translateY(1px); box-shadow: var(--sombra-afundada); }

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .bottom-bar { display: none; }
}

/* 13. Aviso "Endereço copiado" */
.toast {
  position: fixed;
  bottom: calc(100px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 70;
  padding: 12px 22px;
  border-radius: var(--raio-pilula);
  background: var(--verde-escuro);
  color: var(--branco);
  font-size: .9375rem;
  font-weight: 600;
  box-shadow: 0 14px 30px -12px rgb(0 0 0 / .45);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 960px) { .toast { bottom: 32px; } }

/* 14. Movimento — um único momento: as bolhas aparecem em sequência */
@media (prefers-reduced-motion: no-preference) {
  .bubble { animation: bolha-entra .55s cubic-bezier(.2, .8, .25, 1.15) both; }
  .bubble:nth-child(2) { animation-delay: .07s; }
  .bubble:nth-child(3) { animation-delay: .14s; }
  .bubble:nth-child(4) { animation-delay: .21s; }
  .bubble:nth-child(5) { animation-delay: .28s; }
}
@keyframes bolha-entra {
  from { opacity: 0; transform: translateY(12px) scale(.88); }
  to   { opacity: 1; transform: none; }
}

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