/* 
   TECNOÉTICA - Style Guide v6.0
   Design Editorial, Sofisticado e Acadêmico
*/

:root {
    --bg: #F4F1EA;
    --bg-elevated: #FFFFFF;
    --text: #141312;
    --text-muted: #6B655C;
    --accent: #1F5F4F;
    --accent-soft: #D4E0DC;
    --line: rgba(20, 19, 18, 0.08);
    
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Manrope', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --max-width-text: 680px;
    --max-width-grid: 1024px;
    --section-spacing: clamp(3rem, 5vw, 4.5rem);
    --transition: 0.3s cubic-bezier(0.2, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* Tipografia */
h1, h2, h3, h4 { color: var(--text); font-family: var(--font-display); font-weight: 600; }
h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 2rem; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin-bottom: 1.5rem; }
h3 { font-size: 1.3rem; line-height: 1.3; margin-bottom: 1rem; }

p { margin-bottom: 1.5rem; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.label, .mono { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 500; }

/* Layout Geral */
.container { max-width: var(--max-width-grid); margin: 0 auto; padding: 0 1.5rem; }
section { padding: var(--section-spacing) 0; }

nav { position: sticky; top: 0; background: rgba(244, 241, 234, 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); z-index: 1000; }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 0; max-width: var(--max-width-grid); margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.logo { font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.15em; text-decoration: none; color: var(--text); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

/* Grid e Cards */
.grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { padding: 2rem; background: var(--bg-elevated); border: 1px solid var(--line); border-left: 3px solid var(--accent); transition: transform var(--transition); }
.card:hover { transform: translateY(-4px); }

/* Layout Sobre / Bio */
.about-intro { display: grid; grid-template-columns: 6fr 4fr; gap: 3rem; align-items: start; margin-bottom: 4rem; }
.profile-photo { width: 100%; max-width: 400px; border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); object-fit: cover; aspect-ratio: 4/5; }

/* Timeline Grid */
.timeline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-top: 3rem; }
.timeline-item { margin-bottom: 2.5rem; padding-left: 1.5rem; border-left: 1px solid var(--line); position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -6px; top: 0.5rem; width: 10px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline-item span { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); font-weight: 600; display: block; margin-bottom: 0.5rem; }
.timeline-item h4 { font-family: var(--font-body); font-size: 1rem; margin-bottom: 0.5rem; font-weight: 700; }
.timeline-item p { margin-bottom: 0; font-size: 0.95rem; text-align: left; }

/* Formulário e Contato */
.contact-container { display: grid; grid-template-columns: 1.5fr 1fr; gap: 4rem; margin-top: 4rem; align-items: start; }
form { display: grid; gap: 1.5rem; }
input, textarea { width: 100%; padding: 1rem; font-family: var(--font-body); font-size: 1rem; border: 1px solid var(--line); background: var(--bg-elevated); color: var(--text); transition: border-color var(--transition); border-radius: 2px; }
input:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 150px; resize: vertical; }

.contact-info-block { background: var(--bg-elevated); padding: 2.5rem; border: 1px solid var(--line); border-left: 4px solid var(--accent); margin-bottom: 2rem; }
.contact-info-block p { text-align: left; margin-bottom: 0; }

/* Botões e Links */
a { color: var(--accent); text-decoration: none; transition: color var(--transition); font-family: inherit; }
a:hover { color: var(--text); }

.btn { display: inline-flex; padding: 1rem 2rem; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: 0.9rem; border: 1px solid transparent; transition: 0.3s; cursor: pointer; }
.btn:hover { opacity: 0.9; color: #fff; }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent); }

.btn-dynamic { padding: 0.6rem 1.2rem; font-size: 0.85rem; transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1); box-shadow: 0 2px 4px rgba(31, 95, 79, 0.1); }
.btn-dynamic:hover { background: #237560; transform: translateY(-3px); box-shadow: 0 6px 16px rgba(31, 95, 79, 0.35); color: #fff; opacity: 1; border-color: transparent; }
.btn-dynamic-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-dynamic-outline:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 6px 16px rgba(31, 95, 79, 0.35); }

/* Portfolio Style */
.portfolio-item { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.portfolio-item h4 { font-family: var(--font-body); font-size: 1.15rem; margin-bottom: 0.5rem; }
.portfolio-item p { font-size: 0.95rem; margin-bottom: 1rem; }

/* Responsividade Base */
@media (max-width: 850px) {
    .timeline-grid, .contact-container { grid-template-columns: 1fr; gap: 3rem; }
    .about-intro { grid-template-columns: 1fr; }
    .profile-photo { order: -1; max-width: 300px; margin: 0 auto; display: block; aspect-ratio: 1/1; }
    .grid { grid-template-columns: 1fr; }
}

/* =====================
   FADE-IN ANIMATION
   ===================== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* =====================
   HAMBURGER / MOBILE NAV
   ===================== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================
   FOOTER
   ===================== */
footer { background: var(--bg); border-top: 1px solid var(--line); }
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2.5rem;
    padding: 3rem 1.5rem 2.5rem;
    max-width: var(--max-width-grid);
    margin: 0 auto;
}
.footer-brand .logo { color: var(--text); font-size: 0.85rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; margin-bottom: 0; text-align: left; line-height: 1.5; }
.footer-nav-col, .footer-contact-col { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav-col span, .footer-contact-col span { font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 0.25rem; display: block; }
.footer-nav-col a, .footer-contact-col a { color: var(--text-muted); font-size: 0.85rem; text-decoration: none; transition: color 0.25s; }
.footer-nav-col a:hover, .footer-contact-col a:hover { color: var(--accent); }
.footer-bottom { max-width: var(--max-width-grid); margin: 0 auto; padding: 1rem 1.5rem 2rem; border-top: 1px solid var(--line); }
.footer-bottom p { color: var(--text-muted); font-size: 0.75rem; font-family: var(--font-mono); margin: 0; }

/* =====================
   INDEX - Impact Section
   ===================== */
.impact-insight { background: var(--accent); color: var(--bg); padding: 3rem 0; margin: 0; }
.impact-grid { display: grid; grid-template-columns: 0.8fr 2fr; gap: 3rem; align-items: center; }
.impact-stat { font-family: var(--font-display); font-size: clamp(3.5rem, 8vw, 5rem); line-height: 1; color: var(--accent-soft); border-right: 1px solid rgba(244, 241, 234, 0.2); padding-right: 2rem; }
.impact-text h2 { color: var(--bg); font-size: clamp(1.6rem, 2.5vw, 2.1rem); margin-bottom: 0.8rem; line-height: 1.1; }
.impact-text p { color: var(--bg); text-align: left; font-size: 1.05rem; opacity: 0.9; margin-bottom: 0; max-width: 100%; }

/* =====================
   INDEX - Solutions Grid
   ===================== */
.solutions-wrapper { margin-top: 4rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.sol-block { background: var(--bg); padding: 3.5rem 2.5rem; display: flex; flex-direction: column; justify-content: flex-start; transition: all 0.4s ease; }
.sol-block:hover { background: var(--accent); }
.sol-block:hover h3, .sol-block:hover p, .sol-block:hover .mono { color: var(--bg) !important; }
.sol-block .mono { font-size: 0.8rem; color: var(--accent); letter-spacing: 0.2em; margin-bottom: 1.5rem; display: block; }
.sol-block h3 { font-size: 1.5rem; margin-bottom: 1.2rem; line-height: 1.2; }
.sol-block p { font-size: 1.05rem; line-height: 1.6; margin-bottom: 0; text-align: left; }

/* =====================
   SOLUÇÕES PAGE
   ===================== */

/* Presença — green band */
.sol-presenca {
    background: var(--accent);
    padding: 3.5rem 0;
    margin-top: 2rem;
}
.sol-presenca-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(244, 241, 234, 0.08);
}
.sol-presenca-grid--2x2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
}
.sol-presenca-item {
    padding: 2.5rem 2rem;
    transition: background 0.4s;
    background: var(--accent);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.sol-presenca-item:hover { background: rgba(20, 16, 12, 0.15); }
.sol-presenca-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-soft);
    opacity: 0.4;
    display: block;
    margin-bottom: 1.2rem;
    letter-spacing: 0.2em;
}
.sol-presenca-item h3 {
    font-size: 1.3rem;
    color: var(--bg);
    margin-bottom: 1rem;
    line-height: 1.2;
}
.sol-presenca-item p {
    color: var(--bg);
    opacity: 0.8;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

/* Consultoria — row items */
.sol-consul-item {
    display: grid;
    grid-template-columns: 5rem 1fr;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--line);
    align-items: start;
}
.sol-consul-item:first-of-type { border-top: 1px solid var(--line); }
.sol-consul-num {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--accent);
    opacity: 0.12;
    line-height: 1;
    transition: opacity 0.3s;
}
.sol-consul-item:hover .sol-consul-num { opacity: 0.35; }
.sol-consul-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
    transition: color 0.3s;
}
.sol-consul-item:hover h3 { color: var(--accent); }
.sol-consul-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    text-align: left;
    max-width: 600px;
    line-height: 1.6;
}

@media (max-width: 850px) {
    .sol-presenca-grid,
    .sol-presenca-grid--2x2 { grid-template-columns: 1fr; }
}

/* =====================
   PORTFOLIO PAGE
   ===================== */
.portfolio-list { margin-top: 5rem; max-width: 800px; }
.portfolio-item { margin-bottom: 4rem; padding: 2rem; border-bottom: 1px solid var(--line); transition: background-color 0.3s ease, border-color 0.3s ease; position: relative; background: transparent; margin-left: -2rem; margin-right: -2rem; border-radius: 4px; }
.portfolio-item:hover { background-color: rgba(31, 95, 79, 0.03); border-color: var(--accent); }
.portfolio-item:last-child { border-bottom: 1px solid var(--line); }
.item-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.item-year { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; color: var(--accent); padding: 0.2rem 0.6rem; background: var(--accent-soft); border-radius: 2px; }
.item-tag { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.portfolio-item h4 { font-size: 1.4rem; margin-bottom: 1rem; line-height: 1.25; }
.portfolio-item p { font-size: 1rem; color: var(--text); opacity: 0.9; margin-bottom: 1.5rem; }
.btn-small { font-family: var(--font-mono); font-size: 0.8rem; text-decoration: none; color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem; transition: gap 0.3s; }
.btn-small:hover { gap: 0.8rem; color: var(--accent); }

/* In-progress tag */
.item-tag.em-andamento { color: var(--accent); background: var(--accent-soft); padding: 0.15rem 0.5rem; border-radius: 2px; }

/* =====================
   PORTFOLIO — TIMELINE
   ===================== */
.tl-wrapper {
    position: relative;
    padding: 1rem 0 2rem;
    margin-top: 3rem;
}
.tl-wrapper::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--line);
    transform: translateX(-50%);
}
.tl-item {
    position: relative;
    width: calc(50% - 40px);
    margin-bottom: 3.5rem;
    z-index: 1;
}
.tl-left  { margin-right: auto; }
.tl-right { margin-left: calc(50% + 40px); }

/* Dot on center line */
.tl-left::after, .tl-right::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 9px;
    background: var(--accent);
    border-radius: 50%;
    top: 1.6rem;
    z-index: 2;
}
.tl-left::after  { right: -44px; }
.tl-right::after { left: -44px; }

/* Card */
.tl-card {
    border: 1px solid var(--line);
    overflow: hidden;
    transition: border-color 0.3s;
    background: var(--bg);
}
.tl-card:hover { border-color: var(--accent); }
.tl-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}
.tl-card-placeholder {
    width: 100%;
    height: 100px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.tl-card-placeholder span {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: rgba(244, 241, 234, 0.25);
}
.tl-card-body { padding: 1.5rem; }
.tl-card-body h3 {
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: 0.6rem;
    font-family: var(--font-body);
    font-weight: 700;
}
.tl-card-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    text-align: left;
    line-height: 1.6;
}
.tl-metrics {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}
.tl-metric { line-height: 1; }
.tl-metric strong {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--accent);
    display: block;
    margin-bottom: 0.2rem;
}
.tl-metric span {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* Publications compact list */
.pub-list { margin-top: 1.5rem; }
.pub-item {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
}
.pub-item:first-child { border-top: 1px solid var(--line); }
.pub-year {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    min-width: 2.5rem;
    flex-shrink: 0;
}
.pub-title {
    font-size: 0.88rem;
    line-height: 1.45;
    flex: 1;
    margin: 0;
    text-align: left;
}
.pub-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}
.pub-link {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-decoration: none;
    flex-shrink: 0;
    transition: color 0.25s;
}
.pub-link:hover { color: var(--accent); }
@media (max-width: 600px) {
    .pub-item { flex-wrap: wrap; gap: 0.5rem; }
    .pub-title { width: 100%; }
}

/* Mobile timeline */
@media (max-width: 750px) {
    .tl-wrapper::before { left: 12px; transform: none; }
    .tl-item { width: 100%; margin-left: 0 !important; padding-left: 2rem; }
    .tl-left::after, .tl-right::after { left: 8px; right: auto; top: 1.4rem; }
}

/* =====================
   MOBILE RESPONSIVE (EXTENDED)
   ===================== */
@media (max-width: 850px) {
    .nav-toggle { display: flex; }
    .nav-container { flex-direction: row; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(244, 241, 234, 0.98);
        backdrop-filter: blur(12px);
        padding: 1.5rem;
        border-bottom: 1px solid var(--line);
        gap: 1.2rem;
        z-index: 999;
    }
    .nav-links.open { display: flex; }
    .impact-grid { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
    .impact-stat { border-right: none; border-bottom: 1px solid rgba(244, 241, 234, 0.2); padding-right: 0; padding-bottom: 1.5rem; }
    .impact-text p { text-align: center; }
    .solutions-wrapper { grid-template-columns: 1fr; }
    .product-meta { gap: 2rem; flex-direction: column; align-items: center; }
    .monolith-grid { grid-template-columns: 1fr; }
    .product-faixa { width: 100%; left: 0; right: 0; margin-left: 0; margin-right: 0; }
    .portfolio-item { padding: 1.5rem; margin-left: 0; margin-right: 0; }
    .portfolio-item h4 { font-size: 1.2rem; }
    .footer-inner { flex-direction: column; gap: 1.5rem; padding: 2rem 1.5rem; }
}

