/* ==========================================================================
   Clínica Essência — Estilos Consolidados e Otimizados
   ========================================================================== */

:root {
    color-scheme: light;
    --bg: #f8f4ef;
    --sf: #f0eae2;
    --tx: #2b2622;
    --mu: #766b60;
    --ac: #5a4a3e;
    --ac2: #3f3329;
    --bl: #e9e0d4;
    --sg: #e4dfd3;
    --ln: #dcd3c7;
    --on: #ffffff;
    --radius-sm: 8px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-pill: 999px;
    --font-heading: "Cormorant Garamond", Georgia, serif;
    --font-body: "Jost", system-ui, -apple-system, sans-serif;
    --shadow-soft: 0 4px 18px rgba(43, 38, 34, 0.08);
    --shadow-floating: 0 6px 20px rgba(43, 38, 34, 0.22);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 74px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--tx);
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: env(safe-area-inset-top, 0px);
    background: var(--bg);
    z-index: 60;
}

/* Tipografia */
h1,
h2,
h3,
.logo,
q,
.ph,
.av,
.eb {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--tx);
}

h1 {
    font-size: clamp(2.2rem, 5.6vw, 3.7rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    max-width: 19ch;
    margin: 0 0 0.5em;
}

h2 {
    font-size: clamp(1.8rem, 4.4vw, 2.7rem);
    line-height: 1.15;
    max-width: 26ch;
    margin: 0 0 0.6em;
}

h3 {
    font-size: 1.35rem;
    line-height: 1.25;
    margin: 0 0 0.5em;
    font-weight: 600;
}

p {
    margin: 0 0 1em;
    max-width: 62ch;
}

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

/* Layout */
.w {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: clamp(56px, 9vw, 96px) 0;
}

.alt {
    background: var(--sf);
    border-radius: clamp(36px, 7vw, 84px);
    margin: 0 clamp(8px, 2vw, 24px);
}

.final {
    text-align: center;
    background: var(--bl);
    border-radius: clamp(36px, 7vw, 84px);
    margin: 0 clamp(8px, 2vw, 24px);
}

.final h2,
.final p {
    margin-left: auto;
    margin-right: auto;
}

/* Header & Navegação */
header {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 40;
    background: rgba(248, 244, 239, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ln);
}

header .w {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
}

.logo {
    font-size: 1.45rem;
    letter-spacing: 0.02em;
    font-weight: 600;
    margin-right: auto;
    white-space: nowrap;
}

nav.desktop-nav {
    display: flex;
    gap: 20px;
    font-size: 0.94rem;
    align-items: center;
}

nav.desktop-nav a {
    color: var(--mu);
    transition: color 0.2s ease;
}

nav.desktop-nav a:hover {
    color: var(--ac);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 8px;
    color: var(--tx);
}

.menu-toggle svg {
    display: block;
    width: 26px;
    height: 26px;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: calc(64px + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--ln);
    padding: 20px;
    z-index: 39;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.mobile-nav.open {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.25s ease;
}

.mobile-nav a {
    font-size: 1.05rem;
    color: var(--tx);
    padding: 8px 0;
    border-bottom: 1px solid var(--ln);
}

.mobile-nav a:last-child {
    border-bottom: 0;
}

@media (max-width: 860px) {
    nav.desktop-nav {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ac);
    color: var(--on);
    padding: 15px 28px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    border: 0;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(90, 74, 62, 0.15);
}

.btn:hover {
    background: var(--ac2);
    color: var(--on);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 74, 62, 0.25);
}

.btn.o {
    background: transparent;
    color: var(--ac);
    border: 1.5px solid var(--ac);
    box-shadow: none;
}

.btn.o:hover {
    background: var(--ac);
    color: var(--on);
}

.btn.s {
    padding: 10px 18px;
    font-size: 0.88rem;
}

.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(64px, 10vw, 112px) 0 clamp(56px, 8vw, 88px);
}

.hero .w {
    position: relative;
    z-index: 1;
}

.hero::after {
    content: "";
    position: absolute;
    right: -10%;
    top: 6%;
    width: min(52vw, 460px);
    aspect-ratio: 1;
    background: var(--bl);
    border-radius: 62% 38% 55% 45%/48% 58% 42% 52%;
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
}

.eb {
    font: italic 500 1.35rem var(--font-heading);
    color: var(--ac);
    margin: 0 0 14px;
}

.lead {
    font-weight: 300;
    font-size: 1.2rem;
    color: var(--mu);
    margin-bottom: 24px;
}

.proof {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 32px;
    color: var(--mu);
    font-size: 0.95rem;
}

.av-group {
    display: flex;
    align-items: center;
}

.av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bl);
    border: 2.5px solid var(--bg);
    margin-left: -12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.av:first-child {
    margin-left: 0;
}

/* Chips / Tags */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 28px;
}

.chips span {
    border: 1px solid var(--ln);
    border-radius: var(--radius-pill);
    padding: 7px 16px;
    font-size: 0.92rem;
    background: var(--bg);
    color: var(--tx);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tabs button {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--ln);
    background: transparent;
    color: var(--tx);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tabs button[aria-selected="true"] {
    background: var(--ac);
    color: var(--on);
    border-color: var(--ac);
    box-shadow: 0 2px 8px rgba(90, 74, 62, 0.2);
}

.tabs button:hover:not([aria-selected="true"]) {
    border-color: var(--ac);
    color: var(--ac);
}

.panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.panel.on {
    display: block;
}

q {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    line-height: 1.35;
    display: block;
    padding: 10px 0 10px 24px;
    position: relative;
    margin: 16px 0;
    max-width: 54ch;
    quotes: none;
}

q::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 3px;
    background: var(--ac);
}

.close {
    margin-top: 24px;
    font-size: 1.1rem;
    color: var(--tx);
}

/* Lista de Desejos / Acolhimento */
.wish {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    display: grid;
    gap: 12px;
    max-width: 660px;
}

.wish li {
    background: var(--sf);
    border-radius: 20px;
    padding: 16px 22px;
    font-size: 1rem;
    line-height: 1.5;
}

.note {
    color: var(--mu);
    font-size: 0.9rem;
}

/* Cards & Grid de Atendimentos */
.grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin: 28px 0;
}

.card {
    background: var(--bg);
    border: 1px solid var(--ln);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.card p {
    color: var(--mu);
    font-size: 0.97rem;
    margin-bottom: 16px;
    flex-grow: 1;
}

.card a.l {
    color: var(--ac);
    font-weight: 600;
    font-size: 0.95rem;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.card a.l:hover {
    gap: 8px;
    color: var(--ac2);
}

/* Sobre & Equipe */
.about {
    display: grid;
    gap: 36px;
    grid-template-columns: 1fr;
    align-items: start;
}

@media (min-width: 820px) {
    .about {
        grid-template-columns: 280px 1fr;
    }
}

.ph {
    aspect-ratio: 4/5;
    border-radius: 999px 999px 30px 30px;
    background: var(--bl);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
    display: block;
}

.team .ph {
    aspect-ratio: 1;
    border-radius: 24px;
    margin-bottom: 16px;
}

.forma {
    padding-left: 20px;
    color: var(--mu);
    font-size: 0.97rem;
    margin-top: 16px;
    line-height: 1.6;
}

.crp {
    color: var(--mu);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.ig {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ac);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 4px 16px 12px 0;
    transition: color 0.2s ease;
}

.ig:hover {
    color: var(--ac2);
}

/* Depoimentos / Carrossel */
.dep {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 8px 4px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--ln) transparent;
}

.dep::-webkit-scrollbar {
    height: 6px;
}

.dep::-webkit-scrollbar-thumb {
    background: var(--ln);
    border-radius: 6px;
}

.dep figure {
    margin: 0;
    flex: 0 0 min(350px, 86%);
    scroll-snap-align: start;
    background: var(--bg);
    border: 1px solid var(--ln);
    border-radius: 24px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dep blockquote {
    margin: 0 0 16px;
    font-size: 1rem;
    line-height: 1.6;
    font-style: normal;
}

.dep figcaption {
    color: var(--mu);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Steps (Como Funciona) */
.steps {
    counter-reset: s;
    list-style: none;
    padding: 0;
    display: grid;
    gap: 16px;
    margin: 26px 0;
}

.steps li {
    counter-increment: s;
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.steps li::before {
    content: counter(s);
    flex: 0 0 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ac);
    color: var(--on);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 1rem;
}

.steps b {
    display: block;
    margin-bottom: 4px;
}

/* Materiais Gratuitos */
.mat {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

@media (min-width: 820px) {
    .mat {
        grid-template-columns: 1.5fr 1fr;
    }
}

.big {
    background: var(--bl);
    border-radius: var(--radius-lg);
    padding: 34px;
}

.small {
    background: var(--sg);
    border-radius: var(--radius-lg);
    padding: 30px;
}

/* FAQ (Details / Summary) */
details {
    background: var(--sf);
    border-radius: 22px;
    padding: 18px 24px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
}

details[open] {
    background: var(--bg);
    border-color: var(--ln);
}

details summary {
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    user-select: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::after {
    content: "+";
    font-size: 1.4rem;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.2s ease;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details p {
    margin: 12px 0 0;
    color: var(--mu);
    font-size: 0.98rem;
    line-height: 1.6;
}

/* Footer */
footer {
    padding: 48px 0 100px;
    font-size: 0.92rem;
    color: var(--mu);
    border-top: 1px solid var(--ln);
    background: var(--bg);
}

/* Botão Flutuante (FAB) */
.fab {
    position: fixed;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 50;
    box-shadow: var(--shadow-floating);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
}

/* Acessibilidade & Animações */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--ac);
    outline-offset: 3px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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