/**
 * SMARTER studio – prototype nav, buttons, single-project layout.
 * Zero dependency on Tailwind or Bootstrap .hidden
 */

/* Cassiopeia template.min.css defines .hidden globally — never let it break our nav */
body.prototype-home .ss-nav,
body.prototype-home .ss-nav__inner,
body.prototype-home .ss-nav__toggle,
body.prototype-home .ss-nav__backdrop,
body.prototype-home #mobile-menu.ss-nav__drawer {
    visibility: visible;
}

body.prototype-home .ss-nav__toggle {
    display: flex !important;
}

@media (min-width: 880px) {
    body.prototype-home .ss-nav__toggle,
    body.prototype-home .ss-nav__backdrop,
    body.prototype-home #mobile-menu.ss-nav__drawer {
        display: none !important;
    }
}

body.prototype-home {
    background-color: #0a0a0a;
    color: #e4e4e7;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body.prototype-home.view-article,
body.prototype-home.view-category {
    padding-top: 5rem;
    box-sizing: border-box;
}

/* ── Outline button (Iniciar Conversa / Quero iniciar…) ── */
.ss-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 1.5rem; /* matches Tailwind rounded-3xl */
    border: 1px solid #4695c1;
    color: #ffffff;
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ss-btn-outline:hover {
    background-color: #4695c1;
    color: #0a0a0a;
    border-color: #4695c1;
}

/* ── Top bar ───────────────────────────────────────────── */
.ss-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 80;
    background-color: rgba(10, 10, 10, 0.96);
    border-bottom: 1px solid #27272a;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ss-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
    width: 100%;
    max-width: 96rem;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.ss-nav__brand {
    display: block;
    height: 5rem;
    flex-shrink: 0;
    min-width: 0;
}

.ss-nav__brand a {
    display: block;
    height: 100%;
}

.ss-nav__brand img {
    display: block;
    height: 100%;
    max-width: 220px;
    padding: 1rem;
    box-sizing: border-box;
}

.ss-nav__desktop {
    display: none;
    align-items: center;
    gap: 2.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.ss-nav__link {
    position: relative;
    color: #d4d4d8;
    text-decoration: none;
    padding: 0.5rem 0.25rem;
    white-space: nowrap;
}

.ss-nav__link:hover {
    color: #ffffff;
}

.ss-nav__link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #14b8a6;
    transition: width 0.3s ease;
}

.ss-nav__link:hover::after {
    width: 100%;
}

.ss-nav__cta {
    display: none;
}

.ss-nav__cta-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 1rem;
    border: 1px solid #4695c1;
    color: #ffffff;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ss-nav__cta-btn:hover {
    background-color: #4695c1;
    color: #0a0a0a;
}

.ss-nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    background: none;
    color: #d4d4d8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.ss-nav__toggle:hover {
    color: #ffffff;
}

/* ── Mobile drawer (outside nav bar, full width) ───────── */
.ss-nav__backdrop {
    display: none;
    position: fixed;
    top: 5rem;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 85;
}

.ss-nav__backdrop.is-open {
    display: block;
}

#mobile-menu.ss-nav__drawer {
    display: none;
    position: fixed;
    top: 5rem;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 2.5rem 1.25rem 2.5rem;
    background-color: #0a0a0a;
    border: 0;
    box-shadow: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

#mobile-menu.ss-nav__drawer.is-open {
    display: flex !important;
    visibility: visible !important;
}

#mobile-menu.ss-nav__drawer a,
#mobile-menu.ss-nav__drawer button {
    display: block;
    width: auto;
    min-width: 12rem;
    padding: 0.875rem 1.5rem;
    margin: 0;
    border: 0;
    background: none;
    color: #f4f4f5;
    font-size: 1.25rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

#mobile-menu.ss-nav__drawer a:hover,
#mobile-menu.ss-nav__drawer button:hover {
    color: #ffffff;
}

#mobile-menu.ss-nav__drawer .ss-nav__mobile-cta {
    margin-top: 1.25rem;
    padding: 1rem 1.5rem;
    text-align: center;
    border: 1px solid #4695c1;
    border-radius: 1rem;
    color: #ffffff;
    background-color: transparent;
}

#mobile-menu.ss-nav__drawer .ss-nav__mobile-cta:hover {
    background-color: #4695c1;
    color: #0a0a0a;
}

body.prototype-home.ss-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.ss-nav.is-scrolled {
    background-color: rgba(10, 10, 10, 0.99);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

@media (min-width: 880px) {
    .ss-nav__inner {
        padding: 0 3rem;
    }

    .ss-nav__desktop {
        display: flex;
    }

    .ss-nav__cta {
        display: block;
    }

    .ss-nav__toggle,
    .ss-nav__backdrop,
    #mobile-menu.ss-nav__drawer {
        display: none !important;
        visibility: hidden !important;
    }
}

/* ── Homepage (featured) ─────────────────────────────────── */
body.prototype-home.view-featured .home-section {
    width: 100%;
    max-width: 96rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
    box-sizing: border-box;
}

body.prototype-home.view-featured #sobre.home-section,
body.prototype-home.view-featured #projectos.home-section {
    padding-top: 5rem;
    padding-bottom: 4rem;
}

body.prototype-home.view-featured .home-hero__wrap {
    width: 100%;
    max-width: 96rem;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

body.prototype-home.view-featured .home-hero__content {
    max-width: 52rem;
}

body.prototype-home.view-featured .home-hero h1 {
    font-size: clamp(3rem, 5vw + 0.5rem, 5.75rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
}

body.prototype-home.view-featured .home-section__header {
    margin-bottom: 3rem;
}

body.prototype-home.view-featured .home-section__header--compact {
    margin-bottom: 2.5rem;
}

body.prototype-home.view-featured .home-section__eyebrow {
    display: block;
    color: #4695c1;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

body.prototype-home.view-featured .section-header {
    margin: 0.5rem 0 0;
    font-size: clamp(2.5rem, 3.5vw, 3.25rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

body.prototype-home.view-featured .home-section__prose,
body.prototype-home.view-featured #sobre .prose {
    max-width: none !important;
    width: 100%;
    font-size: clamp(1rem, 0.95rem + 0.15vw, 1.125rem);
}

body.prototype-home.view-featured .bim-advantages-block {
    padding-bottom: 4rem;
}

body.prototype-home.view-featured .bim-advantages-block .section-header {
    margin-bottom: 2rem;
}

body.prototype-home.view-featured .home-stats {
    margin-top: 1rem;
}

body.prototype-home.view-featured .bim-advantages-lead {
    font-size: clamp(0.9375rem, 0.9rem + 0.15vw, 1.0625rem);
}

body.prototype-home.view-featured .bim-advantages-list li {
    font-size: clamp(0.9375rem, 0.9rem + 0.1vw, 1rem);
}

body.prototype-home.view-featured .home-stats__inner {
    max-width: 80rem;
}

body.prototype-home.view-featured .home-stats__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem 1.5rem;
    width: 100%;
    text-align: center;
}

body.prototype-home.view-featured .home-stats__item {
    min-width: 0;
}

body.prototype-home.view-featured .home-stats__value {
    font-size: clamp(2rem, 1.5rem + 1vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: #fafafa;
}

body.prototype-home.view-featured .home-stats__label {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #71717a;
}

@media (min-width: 680px) {
    body.prototype-home.view-featured .home-stats__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1251px) {
    body.prototype-home.view-featured .home-stats__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

body.prototype-home.view-featured #projectos .home-projects-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
}

body.prototype-home.view-featured #projectos .home-projects-grid > .project-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}

body.prototype-home.view-featured #projectos .home-projects-grid .project-card h3 {
    font-size: clamp(1.375rem, 1.25rem + 0.5vw, 1.875rem);
}

body.prototype-home.view-featured .home-section__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

body.prototype-home.view-featured .home-contact__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem 2rem;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    body.prototype-home.view-featured .home-section {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    body.prototype-home.view-featured .home-hero__wrap {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    body.prototype-home.view-featured .home-section__actions {
        flex-direction: row;
    }

    body.prototype-home.view-featured .home-contact__grid {
        grid-template-columns: 5fr 7fr;
        gap: 3rem;
    }
}

@media (min-width: 900px) {
    body.prototype-home.view-featured #projectos .home-projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1251px) {
    body.prototype-home.view-featured #projectos .home-projects-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ── Category listing ───────────────────────────────────── */
body.prototype-home.view-category .projects-list-page,
body.prototype-home.view-category #projectos {
    width: 100%;
    max-width: 96rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

body.prototype-home.view-category .projects-list-header {
    margin-bottom: 2.5rem;
}

body.prototype-home.view-category .projects-list-eyebrow {
    display: block;
    color: #4695c1;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

body.prototype-home.view-category .projects-list-title {
    margin: 0.5rem 0 0;
    font-size: clamp(2.5rem, 4vw, 3.25rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 600;
    color: #fafafa;
}

body.prototype-home.view-category .projects-list-grid,
body.prototype-home.view-category #projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}

body.prototype-home.view-category .projects-list-grid .project-card h3,
body.prototype-home.view-category #projects-grid .project-card h3 {
    font-size: clamp(1.375rem, 1.5vw, 1.75rem);
}

body.prototype-home.view-category .projects-list-back {
    margin-top: 2.5rem;
    text-align: center;
}

body.prototype-home.view-category .projects-list-back__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e4e4e7;
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 1rem;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease;
}

body.prototype-home.view-category .projects-list-back__link:hover {
    border-color: #52525b;
    color: #ffffff;
}

@media (min-width: 768px) {
    body.prototype-home.view-category .projects-list-page,
    body.prototype-home.view-category #projectos {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    body.prototype-home.view-category .projects-list-grid,
    body.prototype-home.view-category #projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    body.prototype-home.view-category .projects-list-grid,
    body.prototype-home.view-category #projects-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ── Single project layout ────────────────────────────────── */
body.prototype-home.view-article .project-detail-page {
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    padding: 1rem 1rem 4rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

body.prototype-home.view-article .project-detail-inner {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    box-sizing: border-box;
}

body.prototype-home.view-article .project-detail-layout {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

body.prototype-home.view-article .project-detail-media {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

body.prototype-home.view-article .project-detail-cover {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    cursor: zoom-in;
    box-sizing: border-box;
    aspect-ratio: 4 / 3;
    background: #18181b;
}

body.prototype-home.view-article .project-detail-cover img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
}

body.prototype-home.view-article .project-gallery-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

body.prototype-home.view-article .project-detail-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 1.5rem 0 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

body.prototype-home.view-article .project-detail-content .flex-1,
body.prototype-home.view-article .project-detail-content [class*="flex-1"] {
    flex: 1 1 auto;
}

body.prototype-home.view-article .project-detail-meta {
    font-size: clamp(0.875rem, 0.8rem + 0.25vw, 1.0625rem);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #4695c1;
}

body.prototype-home.view-article .project-detail-meta--location {
    margin-bottom: 1.5rem;
}

body.prototype-home.view-article .project-detail-content h1 {
    margin: 0.25rem 0 0.5rem;
    font-size: clamp(1.75rem, 1.25rem + 1.75vw, 3.5rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: #fafafa;
}

body.prototype-home.view-article .project-detail-desc {
    flex: 1 1 auto;
    margin-bottom: 2rem;
    font-size: clamp(0.9375rem, 0.875rem + 0.2vw, 1.125rem);
    line-height: 1.65;
    color: #d4d4d8;
    white-space: pre-line;
}

body.prototype-home.view-article #project-contact-link {
    margin-top: auto;
    font-size: clamp(0.9375rem, 0.875rem + 0.15vw, 1.0625rem);
    padding: clamp(1rem, 0.75rem + 0.5vw, 1.25rem) 1.5rem;
}

/* Prev / next project navigation */
body.prototype-home.view-article .project-detail-siblings {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #27272a;
    box-sizing: border-box;
}

body.prototype-home.view-article .project-detail-siblings__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: calc(50% - 0.5rem);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    color: #a1a1aa;
    text-decoration: none;
    transition: color 0.2s ease;
    box-sizing: border-box;
}

body.prototype-home.view-article .project-detail-siblings__link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

body.prototype-home.view-article .project-detail-siblings__link:hover {
    color: #ffffff;
}

body.prototype-home.view-article .project-detail-siblings__link i {
    flex-shrink: 0;
    font-size: 0.75rem;
}

body.prototype-home.view-article .project-detail-siblings__link--prev {
    justify-content: flex-start;
    text-align: left;
}

body.prototype-home.view-article .project-detail-siblings__link--next {
    justify-content: flex-end;
    text-align: right;
    margin-left: auto;
}

body.prototype-home.view-article .project-detail-siblings__link--prev:only-child {
    max-width: 100%;
}

body.prototype-home.view-article .project-detail-siblings__link--next:only-child {
    max-width: 100%;
    margin-left: auto;
}

@media (min-width: 768px) {
    body.prototype-home.view-article .project-detail-page {
        padding: 1.5rem 3rem 4rem;
    }

    body.prototype-home.view-article .project-detail-layout {
        display: grid;
        grid-template-columns: 3fr 2fr;
        gap: 0;
    }

    body.prototype-home.view-article .project-detail-cover {
        aspect-ratio: 16 / 10;
    }

    body.prototype-home.view-article .project-detail-content {
        padding: 2rem 2.5rem 2rem 2rem;
    }

    body.prototype-home.view-article .project-detail-siblings__link {
        max-width: 45%;
        font-size: 0.9375rem;
    }
}

/* ── Large / 4K screens ─────────────────────────────────── */
@media (min-width: 1920px) {
    .ss-nav__inner {
        max-width: 112rem;
        padding-left: 4rem;
        padding-right: 4rem;
    }

    body.prototype-home.view-featured .home-section,
    body.prototype-home.view-featured .home-hero__wrap {
        max-width: 112rem;
        padding-left: 4rem;
        padding-right: 4rem;
    }

    body.prototype-home.view-featured .home-hero__content {
        max-width: 64rem;
    }

    body.prototype-home.view-featured .home-hero h1 {
        font-size: clamp(4.5rem, 3rem + 2vw, 6.5rem);
    }

    body.prototype-home.view-featured .section-header {
        font-size: clamp(3.25rem, 2.5rem + 1vw, 4rem);
    }

    body.prototype-home.view-featured .home-stats__inner {
        max-width: 96rem;
    }

    body.prototype-home.view-featured #projectos .home-projects-grid {
        gap: 2rem;
    }

    body.prototype-home.view-category .projects-list-page,
    body.prototype-home.view-category #projectos {
        max-width: 112rem;
        padding: 2rem 4rem 5rem;
    }

    body.prototype-home.view-category .projects-list-title {
        font-size: clamp(3.25rem, 2.5rem + 1vw, 4rem);
    }

    body.prototype-home.view-category .projects-list-grid,
    body.prototype-home.view-category #projects-grid {
        gap: 2rem;
    }

    body.prototype-home.view-article .project-detail-page {
        padding: 2rem 4rem 5rem;
    }

    body.prototype-home.view-article .project-detail-inner {
        max-width: 88rem;
    }

    body.prototype-home.view-article .project-detail-content {
        padding: 2.5rem 3rem 2.5rem 2.5rem;
    }
}

@media (min-width: 2560px) {
    .ss-nav__inner {
        max-width: 128rem;
    }

    body.prototype-home.view-featured .home-section,
    body.prototype-home.view-featured .home-hero__wrap {
        max-width: 128rem;
    }

    body.prototype-home.view-featured .home-hero__content {
        max-width: 72rem;
    }

    body.prototype-home.view-featured .home-stats__inner {
        max-width: 112rem;
    }

    body.prototype-home.view-featured #projectos .home-projects-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2.25rem;
    }

    body.prototype-home.view-category .projects-list-page,
    body.prototype-home.view-category #projectos {
        max-width: 128rem;
    }

    body.prototype-home.view-category .projects-list-grid,
    body.prototype-home.view-category #projects-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2.25rem;
    }

    body.prototype-home.view-article .project-detail-inner {
        max-width: 104rem;
    }
}