/* ==========================================================================
   Gárivum — Manual de Marca
   Fontes oficiais da marca (arquivos em assets/fonts):
   - ZT Bros Oskon 90s (Regular + Italic) → voz de autoridade, títulos
   - AOT Serial Mono (variável)            → voz do dado, parágrafos e labels
   The Californication existe como terceira voz da marca (voz manuscrita),
   mas fica de fora da interface deste site — é exibida apenas como amostra
   na página de Tipografia.
   ========================================================================== */

@font-face {
    font-family: 'ZT Bros Oskon 90s';
    src: url('../assets/fonts/ZTBrosOskon90s-Regular.woff2') format('woff2'),
         url('../assets/fonts/ZTBrosOskon90s-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ZT Bros Oskon 90s';
    src: url('../assets/fonts/ZTBrosOskon90s-Italic.woff2') format('woff2'),
         url('../assets/fonts/ZTBrosOskon90s-Italic.woff') format('woff');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'AOT Serial Mono';
    src: url('../assets/fonts/AOTSerialMono-VF.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Carregada só para a amostra na página de Tipografia — não integra o sistema --font-* do site */
@font-face {
    font-family: 'The Californication';
    src: url('../assets/fonts/TheCalifornication.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --breu: #000000;
    --neve: #F3EDEA;
    --vaga-lume: #B8E2A8;
    --floresta: #013125;

    --bg-primary: var(--neve);
    --bg-secondary: #E9E1D9;
    --text-primary: var(--breu);
    --text-secondary: #55524C;
    --border-color: #DCD3C8;
    --accent: var(--floresta);
    --accent-soft: var(--vaga-lume);

    --font-serif: 'ZT Bros Oskon 90s', Georgia, 'Times New Roman', serif;
    --font-mono: 'AOT Serial Mono', 'IBM Plex Mono', 'Courier New', monospace;

    --sidebar-width: 280px;
    --masthead-height: 120px;
    --section-padding: 6rem 4vw;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-mono);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: -0.1em;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.15;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

ul {
    color: var(--text-secondary);
}

a {
    font-family: inherit;
}

/* Sidebar
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-primary);
    padding: 3rem 1.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
}

/* Masthead: símbolo (sidebar) e wordmark + título (hero) compartilham a
   mesma altura e centralização vertical, para ficarem alinhados na horizontal */
.logo-container {
    height: var(--masthead-height);
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.wordmark {
    display: block;
    text-decoration: none;
}

.sidebar-logo-img {
    display: block;
    width: 100%;
    max-width: 216px;
    height: auto;
}

.sidebar-logo-symbol {
    width: 140px;
    height: auto;
    /* o SVG do símbolo tem ~23% de margem interna ao redor do desenho;
       este deslocamento compensa isso para alinhar o besouro (não a
       caixa da imagem) com a margem esquerda do menu */
    transform: translateX(-22.87%);
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-serif);
    font-size: 1.15rem;
    letter-spacing: normal;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link.active {
    color: var(--accent);
    font-weight: 600;
}

.nav-link .num {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: inherit;
    min-width: 1.5rem;
}

/* Content Area
   ========================================================================== */
.content-area {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero Banner */
.hero-banner {
    width: 100%;
    min-height: 42vh;
    background-color: var(--floresta);
    position: relative;
    display: flex;
    padding: 3rem 4vw;
    color: var(--neve);
    overflow: hidden;
}

/* Foto de fundo em preto e branco (via ::before, para o filtro não
   atingir o overlay nem o texto). Cada página define --hero-bg-image
   inline; páginas sem imagem (ex. Cores) caem no --floresta sólido. */
.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-bg-image, none);
    background-size: cover;
    background-position: center;
    filter: grayscale(1);
    z-index: 0;
}

/* Camada escura sobre a imagem de fundo, para manter o wordmark e o
   título legíveis independente da foto usada em cada página. */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(1, 49, 37, 0.55) 0%, rgba(1, 49, 37, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: var(--masthead-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-brand {
    display: flex;
    align-items: center;
}

/* O wordmark-neve.svg tem uma margem interna grande (viewBox 1920x1080 com
   glifo ocupando só uma faixa central). Este wrapper recorta e amplia só a
   área do glifo, com proporções relativas à própria altura do wrapper. */
.wordmark-crop {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4.372 / 1;
}

.wordmark-crop img {
    position: absolute;
    max-width: none;
    height: 446.28%;
    width: auto;
    left: -40.64%;
    top: -172.73%;
}

.hero-wordmark-crop {
    height: 2.75rem;
}

.footer-wordmark-crop {
    height: 1.9rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 2.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: right;
}

/* Editorial Content Rows
   ========================================================================== */
.content-section {
    padding: var(--section-padding);
}

.content-row {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0;
    display: flex;
    gap: 4rem;
}

/* Column 1: title only (wide, so column 2 sits well clear of the sidebar) */
.row-title-col {
    width: 440px;
    flex-shrink: 0;
}

.row-title-col h2, .row-title-col h3 {
    font-size: 1.7rem;
    max-width: none;
}

/* Column 2: body (paragraphs, lists, grids, etc. — occasionally a headline) */
.row-title-desc {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.row-title-desc h2, .row-title-desc h3 {
    font-size: 2.25rem;
    max-width: 700px;
}

.row-main-text {
    max-width: 700px;
}

.row-main-text p {
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.45;
}

.row-main-text p:last-child {
    margin-bottom: 0;
}

.row-main-text ul {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
}

.row-main-text ul li {
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.45;
    margin-bottom: 0.6rem;
}

/* Quote accent (ZT Bros Oskon 90s Italic) */
.hand-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 2rem;
    letter-spacing: normal;
    color: var(--accent);
    line-height: 1.3;
    margin: 0.5rem 0 1rem;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.force-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.force-group h4 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 500;
}

.force-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.force-group ul li {
    font-size: 1.2rem;
    color: var(--text-primary);
}

/* Color bands (página Cores) */
.color-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
}

.color-band {
    min-height: 460px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    border-left: 1px solid rgba(128, 128, 128, 0.25);
}

.color-band:first-child {
    border-left: none;
}

.band-codes {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.band-name {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Typography register blocks (página Tipografia) */
.type-eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.type-glyph {
    font-size: 3rem;
    color: var(--text-primary);
    margin-top: 1.25rem;
    line-height: 1;
}

.type-usage {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.type-usage-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-weight: 600;
    margin-right: 0.6rem;
}

/* Voice values (página Comunicação) */
.voice-value {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.voice-value h4 {
    font-size: 1.3rem;
}

.voice-value .row-main-text {
    max-width: none;
}

.voice-example {
    font-family: var(--font-serif);
    font-style: italic;
    letter-spacing: normal;
    color: var(--accent);
    font-size: 1.05rem;
}

/* Do / don't comparison */
.example-pair {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.example-bad, .example-good {
    font-size: 1.2rem;
}

.example-bad {
    color: var(--text-secondary);
    text-decoration: line-through;
    text-decoration-color: var(--text-secondary);
}

.example-good {
    color: var(--accent);
    font-weight: 600;
}

/* Simple data tables (clichês, tom por canal) */
.table-wrap {
    overflow-x: auto;
}

.simple-table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
}

.simple-table th, .simple-table td {
    text-align: left;
    padding: 0.85rem 1.5rem 0.85rem 0;
    border-bottom: 1px solid var(--border-color);
}

.simple-table th {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--text-primary);
}

.simple-table td {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Tagline */
.tagline-quote {
    font-family: var(--font-serif);
    font-style: italic;
    letter-spacing: normal;
    font-size: 2.25rem;
    color: var(--text-primary);
    max-width: 700px;
}

/* Placeholder blocks (conteúdo pendente) */
.placeholder-block {
    border: 1px dashed var(--border-color);
    background: var(--bg-secondary);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

/* Image gallery (referências visuais, mockups, aplicações reais) */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1.5rem;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-item.span-2 {
    grid-column: span 2;
}

.gallery-image {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-placeholder {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    height: 100%;
    border: 1px dashed var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem;
}

/* Mosaic gallery (página Aplicações — muitos itens, sem legenda) */
.mosaic-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.mosaic-item {
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mosaic-item .gallery-placeholder {
    aspect-ratio: auto;
}

.gallery-caption {
    font-family: var(--font-serif);
    font-style: italic;
    letter-spacing: normal;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Identity elements (logo suite) + download
   ========================================================================== */
.header-with-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.header-with-btn h3 {
    font-size: 1.3rem;
}

.btn-download {
    display: inline-block;
    padding: 0.6rem 1.75rem;
    border: 1px solid var(--accent);
    border-radius: 50px;
    text-decoration: none;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    background: transparent;
}

.btn-download:hover {
    background: var(--accent);
    color: var(--neve);
}

.identity-item {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
}

.identity-item-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 2.5rem;
}

.identity-item-header h4 {
    font-size: 1.05rem;
    font-weight: 600;
}

.identity-item-note {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.identity-showcase {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 3rem;
}

.identity-showcase.on-dark {
    background: var(--floresta);
}

.identity-showcase img {
    max-width: 60%;
    max-height: 220px;
    object-fit: contain;
}

.identity-placeholder {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 101;
    background: var(--bg-primary);
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    margin: 4px 0;
}

/* Footer
   ========================================================================== */
.brand-footer {
    background-color: var(--floresta);
    color: var(--neve);
    padding: 3rem 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    width: 100%;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-wordmark {
    display: flex;
    align-items: center;
}


.footer-info-container {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-column .column-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.75;
}

.footer-column .column-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--neve);
    text-decoration: none;
}

.footer-column a.column-value:hover {
    text-decoration: underline;
}

/* Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }
    .row-title-col { width: 280px; }
    .content-row { gap: 2.5rem; }
    .row-title-col h2, .row-title-col h3 { font-size: 1.6rem; }
    .row-title-desc h2, .row-title-desc h3 { font-size: 1.9rem; }
    .hero-title { font-size: 1.9rem; }
    .hero-wordmark-crop { height: 2.3rem; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 100%;
        max-width: 320px;
        transition: transform 0.3s ease;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0,0,0,0.15);
    }
    .mobile-toggle { display: block; }
    .content-area { margin-left: 0; }
    .content-row { flex-direction: column; gap: 1rem; }
    .row-title-col { width: 100%; }
    .grid-2, .grid-3, .image-gallery { grid-template-columns: 1fr; }
    .gallery-item.span-2 { grid-column: span 1; }
    .color-strip { grid-template-columns: 1fr; }
    .mosaic-gallery { grid-template-columns: repeat(2, 1fr); }
    .color-band { border-left: none; border-top: 1px solid rgba(128, 128, 128, 0.25); min-height: 320px; }
    .color-band:first-child { border-top: none; }

    .hero-banner {
        min-height: 0;
        padding: 5.5rem 6vw 2.5rem;
    }
    .hero-content {
        height: auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .logo-container {
        height: auto;
    }
    .hero-title {
        font-size: 1.5rem;
        text-align: left;
    }
    .hero-wordmark-crop {
        height: 1.9rem;
    }

    .brand-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
        padding: 3rem 6vw;
    }

    .footer-info-container {
        flex-direction: column;
        gap: 1.5rem;
    }
}
