/* ============================================
   KODRYN — Style.css
   Design System & Components
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    /* Colors */
    --color-bg: #09090B;          /* Obsidian */
    --color-surface: #18181B;     /* Graphite */
    --color-text: #F4F4F0;        /* Off-White */
    --color-accent: #C7F000;      /* Kodryn Lime */
    --color-muted: #8A8A8F;       /* Muted Gray */

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul,
ol {
    list-style: none;
}

/* ---------- Accessibility ---------- */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* ---------- Typography Helpers ---------- */
.text-accent {
    color: var(--color-accent);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 32px;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    text-align: center;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

.btn-primary:hover {
    background-color: #d4f52a; /* slightly lighter lime */
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(199, 240, 0, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-muted);
}

.btn-secondary:hover {
    border-color: var(--color-text);
    background-color: rgba(244, 244, 240, 0.05);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1.1rem 2.5rem;
    font-size: 1rem;
}

/* ---------- Section Header ---------- */
.section-header {
    max-width: 700px;
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    color: var(--color-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: background-color var(--transition-base), padding var(--transition-base);
    padding: 1.2rem 0;
}

.site-header.scrolled {
    background-color: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(12px);
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(244, 244, 240, 0.05);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
/* Logo (container) */
.logo {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    /* Remova width: 40px; ← estava limitando a largura */
    width: auto;
}

/* Imagem da logo */
.logo-img {
    height: 40px;        /* Ajuste conforme necessário */
    width: auto;
    display: block;
    flex-shrink: 0;
    max-width: 100%;     /* Evita que estoure */
}

/* Wordmark */
.logo-wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1;
    white-space: nowrap;
}

/* Tagline (escondida no desktop) */
.logo-tagline {
    display: none;
    flex-basis: 100%;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--color-muted);
    text-transform: uppercase;
    margin-left: 0;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.desktop-nav ul {
    display: flex;
    gap: 2rem;
}

.desktop-nav .nav-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-muted);
    transition: color var(--transition-fast);
}

.desktop-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: width var(--transition-base);
}

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

.desktop-nav .nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    margin: 5px 0;
    transition: all var(--transition-base);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(9, 9, 11, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform var(--transition-slow) cubic-bezier(0.77, 0, 0.175, 1);
    visibility: hidden;
}

.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu nav {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-nav-link {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-text);
    transition: color var(--transition-fast);
}

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

.mobile-cta {
    margin-top: 2rem;
    width: 100%;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(244,244,240,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(244,244,240,0.03) 1px, transparent 1px);
    background-size: 80px 80px;
}

/* Geometric shapes */
.hero-shape {
    position: absolute;
    border: 1px solid rgba(244,244,240,0.08);
    border-radius: var(--radius-md);
}

.hero-shape-1 {
    top: 15%;
    right: 10%;
    width: 300px;
    height: 300px;
    transform: rotate(45deg);
    animation: floatShape 8s ease-in-out infinite;
}

.hero-shape-2 {
    bottom: 10%;
    left: 5%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border-color: rgba(199, 240, 0, 0.15);
    animation: floatShape 10s ease-in-out infinite reverse;
}

.hero-shape-3 {
    top: 30%;
    left: 20%;
    width: 80px;
    height: 80px;
    background-color: rgba(199, 240, 0, 0.05);
    border: none;
    animation: floatShape 6s ease-in-out infinite;
}

.hero-line {
    position: absolute;
    background-color: rgba(244,244,240,0.05);
}

.hero-line-1 {
    top: 0;
    right: 25%;
    width: 1px;
    height: 60%;
    transform: rotate(30deg);
    transform-origin: top;
}

.hero-line-2 {
    bottom: 0;
    left: 35%;
    width: 1px;
    height: 50%;
    transform: rotate(-45deg);
    transform-origin: bottom;
}

.hero-dots {
    position: absolute;
    bottom: 15%;
    right: 20%;
    width: 80px;
    height: 80px;
    background-image: radial-gradient(circle, rgba(244,244,240,0.2) 1px, transparent 1px);
    background-size: 16px 16px;
}

.hero-k-fragment {
    position: absolute;
    top: 20%;
    right: 5%;
    opacity: 0.05;
    transform: rotate(15deg);
}

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

.hero-content {
    max-width: 750px;
}

.hero-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: var(--space-sm);
    font-weight: 500;
}

.location-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 50%;
    display: inline-block;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-sm);
    animation: fadeInUp 0.8s ease forwards;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--color-muted);
    max-width: 550px;
    margin-bottom: var(--space-lg);
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

/* ---------- Sobre ---------- */
.sobre {
    padding: var(--space-xl) 0;
    background-color: var(--color-bg);
    border-top: 1px solid rgba(244,244,240,0.05);
}

.sobre-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.sobre-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-muted);
    max-width: 800px;
}

.pilares {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
}

.pilar {
    background-color: var(--color-surface);
    border: 1px solid rgba(244,244,240,0.05);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: transform var(--transition-base), border-color var(--transition-base);
}

.pilar:hover {
    transform: translateY(-5px);
    border-color: rgba(199, 240, 0, 0.3);
}

.pilar-icon {
    margin-bottom: var(--space-sm);
    color: var(--color-accent);
}

.pilar h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.pilar p {
    color: var(--color-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---------- Projetos ---------- */
.projetos {
    padding: var(--space-xl) 0;
    background-color: var(--color-bg);
    border-top: 1px solid rgba(244,244,240,0.05);
}

.projetos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.projeto-card {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: 1px solid rgba(244,244,240,0.05);
    display: flex;
    flex-direction: column;
}

.projeto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: rgba(199, 240, 0, 0.2);
}

.projeto-visual {
    aspect-ratio: 4 / 3;
    background-color: var(--color-bg);
    overflow: hidden;
}

.placeholder-mockup {
    width: 100%;
    height: 100%;
    display: block;
}

.placeholder-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Faz a imagem preencher todo o espaço sem achatar */
    object-position: center; /* Centraliza o foco da imagem */
    display: block;
}

.projeto-info {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex-grow: 1;
}

.projeto-categoria {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    font-weight: 600;
}

.projeto-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.projeto-info p {
    color: var(--color-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.projeto-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: color var(--transition-fast);
    margin-top: auto;
}

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

.arrow-icon {
    transition: transform var(--transition-fast);
}

.projeto-link:hover .arrow-icon {
    transform: translateX(5px);
}

/* Estilos do Pop-up (Dialog nativo) */
.modal-projeto {
    border: none;
    border-radius: var(--radius-md, 8px);
    padding: 0;
    background: transparent;
    max-width: 90vw;
    max-height: 90vh;
    overflow: visible;
    
    /* --- CÓDIGO NOVO PARA FORÇAR A CENTRALIZAÇÃO --- */
    margin: auto; 
    position: fixed;
    inset: 0; /* Um atalho moderno que significa top: 0, right: 0, bottom: 0, left: 0 */
}
/* Escurece o fundo ao redor da imagem */
.modal-projeto::backdrop {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    display: flex;
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-md, 8px);
    object-fit: contain;
}

/* Botão de fechar (no padrão de cores que você já usa) */
.fechar-modal {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 36px;
    height: 36px;
    background-color: #C7F000;
    color: #111;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.fechar-modal:hover {
    transform: scale(1.1);
}

/* ---------- Processo ---------- */
.processo {
    padding: var(--space-xl) 0;
    background-color: var(--color-bg);
    border-top: 1px solid rgba(244,244,240,0.05);
}

.processo-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    counter-reset: processo-counter;
    position: relative;
}

.processo-list::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: rgba(244,244,240,0.1);
    z-index: 0;
}

.processo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 var(--space-sm);
}

.processo-numero {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-accent);
    background-color: var(--color-bg);
    padding: 0.5rem 1rem;
    border: 1px solid rgba(199, 240, 0, 0.3);
    border-radius: 50px;
    margin-bottom: var(--space-sm);
}

.processo-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.processo-content p {
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ---------- CTA Final ---------- */
.cta-final {
    padding: var(--space-xl) 0;
    background-color: var(--color-surface);
    text-align: center;
    border-top: 1px solid rgba(244,244,240,0.05);
}

.cta-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    margin-bottom: var(--space-sm);
    font-weight: 700;
}

.cta-subtitle {
    color: var(--color-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto var(--space-lg);
    line-height: 1.7;
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: var(--space-md);
}

.cta-location {
    color: var(--color-muted);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

/* ---------- Footer ---------- */
.site-footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(244,244,240,0.05);
    background-color: var(--color-bg);
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;          /* alinha verticalmente os itens */
    justify-content: space-between;
    gap: var(--space-md);
}

/* Coluna da esquerda (logo + tagline) */
.footer-brand {
    flex: 1 1 200px;
    display: flex;
    flex-wrap: wrap;          /* permite que a tagline quebre para a próxima linha */
    align-items: center;      /* alinha imagem e wordmark verticalmente */
    gap: 0.5rem; 
}

.footer-logo-img {
    height: 28px;
}

.footer-tagline {
    flex-basis: 100%;         /* ocupa toda a largura, forçando a quebra */
    margin: 0;                /* remove margens padrão */
    font-size: 0.85rem;
    color: var(--color-muted);
    letter-spacing: 0.05em;
}
/* Coluna do centro (informações) */
.footer-info {
    flex: 1 1 200px;
    text-align: center;
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-info a {
    color: var(--color-text);
    transition: color var(--transition-fast);
}

.footer-info a:hover {
    color: var(--color-accent);
}

/* Coluna da direita (redes sociais) */
.footer-social {
    flex: 1 1 200px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(244, 244, 240, 0.15);
    transition: all var(--transition-base);
    overflow: hidden; /* garante que a imagem não ultrapasse o círculo */
}

.social-link:hover {
    background-color: rgba(199, 240, 0, 0.1);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.social-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.social-link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Linha de copyright */
.footer-copyright {
    flex-basis: 100%;
    text-align: center;
    color: var(--color-muted);
    font-size: 0.8rem;
    margin-top: var(--space-sm);
    border-top: 1px solid rgba(244,244,240,0.05);
    padding-top: var(--space-sm);
}
/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatShape {
    0%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    50% {
        transform: translateY(-20px) rotate(45deg);
    }
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .hero-title,
    .hero-subtitle,
    .hero-cta-group {
        animation: none;
        opacity: 1;
    }
}

/* ---------- Responsive ---------- */
/* Tablets e menores */
@media (max-width: 1024px) {
    .processo-list {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
    .processo-list::before {
        display: none;
    }
    .processo-item {
        align-items: flex-start;
        text-align: left;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .logo-tagline {
        display: block;
        font-size: 0.55rem;
    }
    .hero {
        padding-top: 6rem;
        min-height: auto;
    }
    .projetos-grid {
        grid-template-columns: 1fr;
    }
    .sobre-layout {
        gap: var(--space-md);
    }
    .pilares {
        grid-template-columns: 1fr;
    }
    .processo-list {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    .processo-item {
        align-items: center;
        text-align: center;
    }
    .cta-group {
        flex-direction: column;
        align-items: center;
    }
    .footer-container {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    .footer-brand,
    .footer-info,
    .footer-social {
        flex-basis: auto;
        justify-content: center;
        flex: 1 1 auto;
        width: 100%;
        align-items: center;
        text-align: center;
    }
    .footer-social {
        justify-content: center;
    }
    .footer-copyright {
        text-align: center;
        flex-basis: 100%;
    }
}

/* Pequenos phones */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    .btn-lg {
        padding: 0.9rem 1.8rem;
        font-size: 0.9rem;
    }
    .container {
        padding: 0 var(--space-sm);
    }
    .section-title {
        font-size: 1.8rem;
    }
}

/* Large screens */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
    .hero-title {
        font-size: 5rem;
    }
}