/* ═══════════════════════════════════════════════
   Sorriso&Cia Odontologia — acolhedor e confiável
   Marfim quente · verde profundo · tinta marrom
   Display: Fraunces (serifa suave) · Corpo: Karla
   Assinatura: a curva de sorriso, repetida com intenção
   ═══════════════════════════════════════════════ */

:root {
  --ivory:    #f8f3e9;
  --ivory-2:  #f1e9d9;
  --ink:      #33291f;
  --ink-soft: #6f6354;
  --green:    #2f6d5f;
  --green-2:  #1f4f45;
  --sage:     #b9cfc2;

  --display: "Fraunces", serif;
  --body:    "Karla", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; }

::selection { background: var(--green); color: var(--ivory); }

a { color: inherit; }

/* ── Preloader ────────────────────────────── */
#preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ivory);
  display: flex; align-items: center; justify-content: center;
}
.pre-inner { text-align: center; }
#smilePath {
  stroke: var(--green); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 220; stroke-dashoffset: 220;
}
.pre-label {
  font-family: var(--display); font-weight: 500; font-size: 1.6rem;
  color: var(--ink); margin-top: 1rem;
}
.pre-label span { color: var(--green); font-style: italic; }
.pre-count { color: var(--ink-soft); font-size: .9rem; letter-spacing: .15em; margin-top: .4rem; }

/* ── Nav ──────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 5vw, 4rem);
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled {
  background: rgba(248,243,233,.95);
  box-shadow: 0 1px 0 rgba(51,41,31,.08);
}
.nav-brand {
  font-family: var(--display); font-weight: 600; font-size: 1.45rem;
  color: var(--ink); text-decoration: none;
}
.nav-brand span { color: var(--green); font-style: italic; }
.nav-links { display: flex; gap: 2.2rem; align-items: center; }
.nav-links a {
  font-weight: 600; font-size: .92rem; color: var(--ink-soft);
  text-decoration: none; transition: color .25s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.nav-cta {
  color: var(--ivory); background: var(--green);
  padding: .55rem 1.3rem; border-radius: 999px;
  transition: background .25s;
}
.nav-links a.nav-cta:hover { background: var(--green-2); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 34px; position: relative;
}
.nav-toggle span {
  position: absolute; left: 7px; right: 7px; height: 2px; border-radius: 2px;
  background: var(--ink); transition: transform .3s, top .3s;
}
.nav-toggle span:first-child { top: 12px; }
.nav-toggle span:last-child { top: 20px; }
.nav-toggle.open span:first-child { top: 16px; transform: rotate(45deg); }
.nav-toggle.open span:last-child { top: 16px; transform: rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(248,243,233,.98);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2rem;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.nav-mobile.open { opacity: 1; pointer-events: auto; }
.nav-mobile a {
  font-family: var(--display); font-size: 1.8rem; font-weight: 500;
  color: var(--ink); text-decoration: none;
}

/* ── Hero ─────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 7rem clamp(1.25rem, 5vw, 4rem) 4rem;
  position: relative;
}
.hero-inner {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 3.5rem; align-items: center;
  text-align: left;
}
.hero-photo {
  margin: 0; overflow: hidden;
  border-radius: 999px 999px 24px 24px; /* arco, eco da curva de sorriso */
  aspect-ratio: 4 / 5;
  box-shadow: 0 24px 60px -30px rgba(51,41,31,.45);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.eyebrow {
  font-weight: 700; font-size: .78rem;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.08;
  color: var(--ink);
}
.hero-title em { font-style: italic; color: var(--green); }

.smile-underline { display: block; margin: .75rem 0 0; }
#heroSmile {
  stroke: var(--green); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 230; stroke-dashoffset: 230;
}

.hero-sub {
  max-width: 560px; margin: 1.5rem 0 0;
  color: var(--ink-soft); font-size: 1.08rem;
}

.hero-actions {
  display: flex; gap: 1rem; margin-top: 2.25rem;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--body); font-weight: 700; font-size: .95rem;
  padding: 1rem 2rem; text-decoration: none; border-radius: 999px;
  display: inline-flex; align-items: center; gap: .6rem;
  cursor: pointer; border: 0;
  transition: transform .2s, background .25s, color .25s;
}
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--green); color: var(--ivory); }
.btn-solid:hover { background: var(--green-2); }
.btn-soft { background: var(--ivory-2); color: var(--ink); }
.btn-soft:hover { background: var(--sage); }

.hero-badges {
  margin-top: 4rem; text-align: center;
  color: var(--ink-soft); font-size: .85rem;
  letter-spacing: .04em;
  display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap;
}
.hero-badges .dot { color: var(--green); }

/* ── Divisores curvos (sorriso) ───────────── */
.curve-divider { line-height: 0; }
.curve-divider svg { width: 100%; height: 70px; display: block; }
.curve-divider path { fill: var(--ivory-2); }
.curve-divider.flip svg { transform: rotate(180deg); }

/* ── Seções ───────────────────────────────── */
.section { padding: clamp(4.5rem, 11vh, 8rem) clamp(1.25rem, 5vw, 4rem); }
.section-alt { background: var(--ivory-2); }

.section-head { max-width: 1000px; margin: 0 auto 3.25rem; text-align: center; }

.section-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.12; color: var(--ink);
}

/* ── Cuidados ─────────────────────────────── */
.care-grid {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem;
}
.care-card {
  background: var(--ivory);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.care-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px -20px rgba(51,41,31,.28);
}
.care-photo { margin: 0; height: 190px; overflow: hidden; }
.care-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.care-card:hover .care-photo img { transform: scale(1.05); }
.care-body { padding: 1.75rem 2rem 2rem; }
.care-smile { display: block; width: 56px; height: 22px; margin-bottom: 1rem; }
.care-smile path {
  stroke: var(--green); stroke-width: 4; stroke-linecap: round;
}
.care-card h3 {
  font-family: var(--display); font-weight: 600; font-size: 1.35rem;
  color: var(--ink); margin-bottom: .5rem;
}
.care-card p { color: var(--ink-soft); font-size: .97rem; }

/* ── Primeira consulta ────────────────────── */
.journey-wrap {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: .9fr 1.1fr;
  gap: 3rem; align-items: center;
}
.journey-photo {
  margin: 0; overflow: hidden; border-radius: 24px;
  aspect-ratio: 4 / 5; max-height: 520px;
  box-shadow: 0 24px 60px -30px rgba(51,41,31,.4);
}
.journey-photo img { width: 100%; height: 100%; object-fit: cover; }

.journey {
  list-style: none;
  display: flex; flex-direction: column; gap: 0;
}
.journey-step {
  display: flex; gap: 1.5rem; align-items: flex-start;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--ivory-2);
}
.journey-step:last-child { border-bottom: 0; }
.journey-num {
  flex: 0 0 auto;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 600; font-size: 1.3rem;
  color: var(--green); border: 2px solid var(--sage);
  background: var(--ivory);
}
.journey-step h3 {
  font-family: var(--display); font-weight: 600; font-size: 1.3rem;
  color: var(--ink); margin-bottom: .35rem;
}
.journey-step p { color: var(--ink-soft); font-size: .97rem; }

/* ── Histórias ────────────────────────────── */
.quotes {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.quote {
  background: var(--ivory);
  border-radius: 20px;
  padding: 2rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.25rem;
}
.quote p {
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: 1.12rem; line-height: 1.5; color: var(--ink);
}
.quote footer {
  color: var(--green); font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; gap: .7rem;
}
.quote-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover; flex: 0 0 auto;
  border: 2px solid var(--sage);
}

/* ── Formulário ───────────────────────────── */
.form { max-width: 820px; margin: 0 auto; }
.hp { position: absolute; left: -9999px; opacity: 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; }
.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }

.field label {
  font-weight: 700; font-size: .85rem; color: var(--ink);
  margin-bottom: .45rem;
}
.field input, .field select, .field textarea {
  background: #fffdf8;
  border: 1.5px solid var(--ivory-2);
  color: var(--ink); font-family: var(--body); font-size: 1rem;
  padding: .9rem 1.1rem; border-radius: 14px;
  transition: border-color .25s;
  width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green);
}
.field input.invalid, .field select.invalid, .field textarea.invalid { border-color: #c2554a; }
.field input.valid, .field select.valid, .field textarea.valid { border-color: var(--green); }
.field-err { color: #c2554a; font-size: .8rem; margin-top: .35rem; min-height: 1em; }

.btn-submit { margin-top: 1.5rem; }
.btn-spinner {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(248,243,233,.4); border-top-color: var(--ivory);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-submit.loading .btn-spinner { display: inline-block; }
.btn-submit.loading { pointer-events: none; opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-ok, .form-fail {
  margin-top: 1.25rem; padding: 1rem 1.25rem;
  font-size: .95rem; border-radius: 14px;
}
.form-ok { color: var(--green-2); background: rgba(47,109,95,.1); }
.form-fail { color: #c2554a; background: rgba(194,85,74,.1); }

/* ── Onde estamos ─────────────────────────── */
.contact-grid {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 1.25rem;
  align-items: stretch;
}
.contact-info { display: grid; gap: 1rem; align-content: start; }
.contact-item {
  background: var(--ivory); border-radius: 16px;
  padding: 1.1rem 1.35rem;
}
.contact-item span {
  display: block;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: .16em; font-size: .72rem; color: var(--green);
  margin-bottom: .3rem;
}
.contact-item p { color: var(--ink-soft); }
.contact-item a { color: var(--ink); text-decoration: none; font-weight: 600; transition: color .25s; }
.contact-item a:hover { color: var(--green); }
.contact-map {
  border-radius: 20px; background: var(--ivory);
  overflow: hidden; clip-path: inset(0 round 20px);
  min-height: 400px;
  box-shadow: 0 18px 40px -24px rgba(51,41,31,.35);
}
.contact-map iframe {
  width: 100%; height: 100%; min-height: 400px; border: 0; display: block;
}

/* ── Footer ───────────────────────────────── */
.footer {
  padding: 4rem clamp(1.25rem, 5vw, 4rem) 2rem;
  background: var(--ink);
  color: rgba(248,243,233,.75);
  font-size: .9rem;
}
.footer-grid {
  max-width: 1000px; margin: 0 auto 2.5rem;
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2.5rem;
}
.footer-smile { display: block; margin-bottom: .75rem; }
.footer-smile path { stroke: var(--sage); stroke-width: 5; stroke-linecap: round; }
.footer-brand {
  font-family: var(--display); font-weight: 500; font-size: 1.5rem;
  color: var(--ivory); margin-bottom: .6rem;
}
.footer-brand span { color: var(--sage); font-style: italic; }
.footer-tag { max-width: 300px; font-size: .9rem; }
.footer-col h4 {
  font-weight: 700; text-transform: uppercase;
  letter-spacing: .16em; font-size: .78rem; color: var(--ivory);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: grid; gap: .5rem; }
.footer-col a { color: rgba(248,243,233,.75); text-decoration: none; transition: color .25s; }
.footer-col a:hover { color: var(--ivory); }
.footer-bottom {
  max-width: 1000px; margin: 0 auto;
  border-top: 1px solid rgba(248,243,233,.15); padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  font-size: .8rem;
}
.footer-credit { display: flex; align-items: flex-start; gap: .45rem; }
.codenx-link { display: inline-flex; align-items: center; }
.codenx-link img { height: 15px; display: block; }

/* ── Acessibilidade ───────────────────────── */
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ═══ Microinterações ═══════════════════════
   A régua: gestos suaves e acolhedores — o sublinhado
   ondulado é a curva de sorriso em miniatura. */

/* nav e rodapé: sublinhado ondulado (sorriso) no hover */
.nav-links a:not(.nav-cta):hover,
.footer-col a:hover {
  text-decoration: underline wavy var(--green) 1px;
  text-underline-offset: 5px;
}
.footer-col a:hover { text-decoration-color: var(--sage); }

/* formulário: rótulo acompanha o foco, campo ganha um halo calmo */
.field label { transition: color .25s; }
.field:focus-within label { color: var(--green); }
.field input:focus, .field select:focus, .field textarea:focus {
  box-shadow: 0 0 0 4px rgba(47,109,95,.1);
}

/* primeira consulta: o número preenche de verde sob o cursor */
.journey-num {
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.journey-step:hover .journey-num {
  background: var(--green); border-color: var(--green); color: var(--ivory);
}

/* histórias: o cartão respira e o anel do retrato esverdeia */
.quote { transition: transform .35s ease, box-shadow .35s ease; }
.quote:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px -24px rgba(51,41,31,.32);
}
.quote-avatar { transition: border-color .3s ease; }
.quote:hover .quote-avatar { border-color: var(--green); }

/* CTA: sombra que floresce, aperto suave no clique */
.btn { will-change: transform; }
.btn-solid { transition: transform .2s, background .25s, box-shadow .35s ease; }
.btn-solid:hover { box-shadow: 0 12px 28px -12px rgba(47,109,95,.55); }

/* contato: o cartão levanta de leve, como os de cuidado */
.contact-item { transition: transform .3s ease, box-shadow .3s ease; }
.contact-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -22px rgba(51,41,31,.35);
}

.codenx-link { transition: opacity .25s; opacity: .85; }
.codenx-link:hover { opacity: 1; }

/* ── Mobile ───────────────────────────────── */
@media (max-width: 900px) {
  .care-grid { grid-template-columns: 1fr; }
  .quotes { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 6.5rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.25rem; text-align: center; }
  .hero-photo { max-width: 320px; margin: 0 auto; }
  .smile-underline { margin: .75rem auto 0; }
  .hero-sub { margin: 1.5rem auto 0; }
  .hero-actions { justify-content: center; }
  .journey-wrap { grid-template-columns: 1fr; gap: 2rem; }
  .journey-photo { aspect-ratio: 16 / 10; max-height: 300px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-map, .contact-map iframe { min-height: 300px; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { justify-content: center; text-align: center; }
}
