/* Shared visual refinement layer. Keeps the existing brand while normalizing rhythm. */
:root {
    --surface: #fffdf9;
    --surface-muted: #f8f3ec;
    --ink-soft: #6f6a64;
    --line-soft: rgba(54, 54, 54, .10);
    --shadow-soft: 0 14px 40px rgba(54, 43, 31, .08);
    --shadow-lift: 0 20px 50px rgba(54, 43, 31, .14);
}

html { scroll-padding-top: 76px; }
.public-site {
    background: var(--brand-light);
    color: var(--brand-dark);
}

#navbar {
    min-height: 64px;
    background: rgba(255, 253, 249, .88);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 4px 24px rgba(54, 43, 31, .04);
}

#navbar > .container { height: 100%; }
#navbar img { transition: transform .25s ease, opacity .25s ease; }
#navbar a:hover img { transform: scale(1.03); opacity: .88; }
#navbar nav a, #navbar > div > div > a { transition: color .2s ease, background-color .2s ease, transform .2s ease; }
#navbar > div > div > a[href*="agendar"] { padding: .7rem 1.25rem; font-size: .72rem; letter-spacing: .14em; }
#navbar #mobile-menu-toggle { width: 44px; height: 44px; border-radius: 12px; transition: background-color .2s ease; }
#navbar #mobile-menu-toggle:hover { background: var(--brand-light); }

#mobile-menu {
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid rgba(var(--brand-primary-rgb), .32);
    box-shadow: 0 18px 32px rgba(54, 43, 31, .12);
}
#mobile-menu > div { padding: 1.1rem 1rem 1.35rem; }
#mobile-menu a { min-height: 44px; align-items: center; }
#mobile-menu { max-height: calc(100dvh - 76px); overscroll-behavior: contain; }
.public-site #mobile-menu > div { gap: .25rem; }
.public-site #mobile-menu > div > * { margin-top: 0; }
.public-site #mobile-menu a { font-size: 1rem; }
.public-site #mobile-menu a[href$="/login"] { color: #626262; font-size: .8rem; }
#navbar #pwa-install-mobile { width: 100%; min-height: 48px; height: auto; animation: none; }

section[id] { scroll-margin-top: 92px; }

/* Public pages: more breathing room and fewer abrupt utility-style edges. */
#home { padding-top: 7rem; padding-bottom: 4rem; }
#home > .container { padding-inline: clamp(1.25rem, 4vw, 3.5rem); gap: 2.5rem; }
#home .home-copy { max-width: 36rem; }
#home .home-actions { display: grid; grid-template-columns: 1fr; gap: .75rem; }
#home .home-actions a { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: .85rem 1.25rem; font-size: .95rem; box-shadow: none; }
#home .home-actions a[href="#portfolio"] { border-color: rgba(var(--brand-dark-rgb), .25); }
#home .home-review { left: .75rem; bottom: 1rem; box-shadow: var(--shadow-soft); }
#servicos, #portfolio { padding-block: clamp(3rem, 6vw, 5rem); }
#servicos > .container, #portfolio > .container { padding-inline: clamp(1.25rem, 4vw, 3.5rem); }
#servicos .service-card { padding: 1.5rem; box-shadow: none; background: transparent; }
#portfolio .grid { gap: 1rem; }
#home h1 { letter-spacing: -.035em; }
#home .hero-image-mask { box-shadow: var(--shadow-lift); }
#home .service-card, .service-card {
    background: rgba(255, 255, 255, .62);
    border-color: var(--line-soft);
    box-shadow: 0 8px 26px rgba(54, 43, 31, .035);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
#home .service-card:hover, .service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); }

.btn, a[class*="bg-brand-dark"], button[class*="bg-brand-dark"] {
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover, a[class*="bg-brand-dark"]:hover, button[class*="bg-brand-dark"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(54, 54, 54, .16);
}

input, select, textarea { border-radius: .85rem; transition: border-color .2s ease, box-shadow .2s ease; }
input:focus, select:focus, textarea:focus {
    border-color: var(--brand-accent) !important;
    box-shadow: 0 0 0 4px rgba(var(--brand-accent-rgb), .12) !important;
    outline: none;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(var(--brand-accent-rgb), .35);
    outline-offset: 3px;
}

.modal-overlay { padding: clamp(.75rem, 3vw, 2rem); }
.modal-shell { border-radius: 1.25rem; box-shadow: 0 28px 80px rgba(15, 23, 42, .28); }
.modal-header { padding: 1rem 1.25rem; }
.modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

@media (max-width: 767px) {
    #navbar { min-height: 64px; }
    #navbar > .container { padding: .5rem .9rem; }
    #navbar img { height: 2.15rem; max-width: 142px; }
    #home h1 { font-size: clamp(2.4rem, 10vw, 3.6rem); line-height: 1.1; }
    #home .hero-image-mask { height: min(105vw, 480px); }
    .public-site input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .public-site select, .public-site textarea { font-size: 16px; }
    #servicos, #portfolio { padding-top: 4.5rem; padding-bottom: 4.5rem; }
    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal-shell { max-height: 92dvh; border-radius: 1.25rem 1.25rem 0 0; }
    .modal-header { padding: .85rem 1rem; }
    .modal-header > button, .modal-close-button { width: 2.25rem; height: 2.25rem; flex-basis: 2.25rem; }
}

@media (min-width: 480px) {
    #home .home-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 28rem; }
}
@media (min-width: 1024px) {
    #home { padding-top: 9rem; padding-bottom: 5rem; }
    #home > .container { gap: 4rem; }
    #home .hero-image-mask { height: clamp(420px, 43vw, 580px); }
}
@media (hover: none) {
    .service-card:hover, .btn:hover, a[class*="bg-brand-dark"]:hover, button[class*="bg-brand-dark"]:hover { transform: none; }
}

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