/* Reset e Variáveis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1c1917; /* Stone 900 */
    --bg-main: #fdfcfb; /* Bone/Off-white */
    --bg-secondary: #f5f5f4; /* Stone 100 */
    --accent: #78350f; /* Amber 900 */
    --accent-light: #fef3c7; /* Amber 100 */
    --border-color: #e7e5e4; /* Stone 200 */
    --text-main: #1c1917;
    --text-muted: #57534e; /* Stone 600 */
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-mono: 'JetBrains Mono', monospace;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.5;
    overflow-x: hidden;
    border-top: 8px solid var(--accent);
    cursor: progress; /* Retro loading feel */
}

a, button, .carousel-arrow, .service-card, .maxim-card, .team-member {
    cursor: help;
}

/* Flash Alert */
.flash-alert {
    background: #ffffe0;
    color: #333;
    text-align: center;
    padding: 6px;
    font-family: 'Verdana', sans-serif;
    font-size: 0.75rem;
    border-bottom: 1px solid #ccc;
    position: fixed;
    top: 8px;
    width: 100%;
    z-index: 1002;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* News Ticker */
.news-ticker {
    background: var(--primary);
    color: #10b981; /* Emerald 500 style */
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 8px 0;
    overflow: hidden;
    position: fixed;
    top: 36px;
    width: 100%;
    z-index: 1001;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ticker-wrapper {
    display: flex;
    white-space: nowrap;
    animation: ticker 40s linear infinite;
}

.ticker-item {
    padding-right: 150px;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Header & Navigation */
header {
    position: fixed;
    top: 40px;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

nav .logo {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--primary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.2s;
}

nav ul li a:hover {
    color: var(--accent);
}

/* Hero Section */
#hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('img/bg-image.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding-top: 80px;
}

.hero-content h1 {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 7rem;
    margin-bottom: 24px;
    font-weight: 700;
    text-transform: none;
    line-height: 1;
}

.hero-content .slogan {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 40px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    background: var(--bg-main);
    color: var(--primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0;
    transition: all 0.3s;
    border: 1px solid var(--primary);
    box-shadow: 4px 4px 0 var(--accent);
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--accent);
    background: var(--accent);
    color: white;
}

/* Sections General */
section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: center;
}

/* Manifesto */
#missao {
    background: var(--bg-main);
}

.manifesto-text {
    font-family: var(--font-serif);
    font-size: 24px;
    max-width: 900px;
    margin: 0 auto 0 auto;
    font-style: italic;
    text-align: center;
    line-height: 1.4;
    color: #78350f;
}

/* Safe Carousel/Grid for Maxims, Team and Services */
.carousel-wrapper {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%); /* Força o full-width estourando o container sem usar left/transform que quebra o layout relativo */
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    margin-bottom: 24px;
}

.carousel-arrow {
    width: 56px;
    height: 56px;
    background: var(--bg-main);
    border: 2px solid var(--primary);
    color: var(--primary);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 4px 4px 0 var(--accent);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-arrow:hover {
    background: var(--accent);
    color: white;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--primary);
    border-color: var(--primary);
}

.carousel-arrow:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--primary);
}

.maxims-carousel, .team-grid, .services-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 32px;
    padding: 32px 24px; /* Padding base seguro */
    width: 100vw;
    margin-left: calc(-50vw + 50%); /* Vaza o container até as bordas */
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
    
    /* A MÁGICA AQUI: Centraliza por padrão, e se o conteúdo for maior que a tela, 
       o 'safe center' impede que o começo fique cortado na esquerda */
    justify-content: safe center; 
}

.maxims-carousel.dragging, .team-grid.dragging, .services-grid.dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.maxims-carousel::-webkit-scrollbar, .team-grid::-webkit-scrollbar, .services-grid::-webkit-scrollbar {
    display: none;
}

/* Card Styles */
.maxim-card, .service-card, .team-member {
    flex: 0 0 320px;
    background: white;
    padding: 40px 32px;
    border: 1px solid var(--border-color);
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 0;
    scroll-snap-align: center;
}

.maxim-card:hover, .service-card:hover, .team-member:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 12px 12px 0 var(--accent-light);
}

/* Especificidades das Máximas */
.maxim-icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
    display: block;
    color: var(--accent);
}

.maxim-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary);
    line-height: 1.2;
}

.maxim-card p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Serviços */
#servicos {
    background: var(--bg-secondary);
}

.service-card {
    display: flex;
    flex-direction: column;
}

.service-card .icon {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 24px;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-quote {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-style: italic;
    color: var(--accent);
    margin-bottom: 16px;
}

.service-card p:not(.service-quote) {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Equipe */
#equipe {
    background: var(--bg-main);
}

.team-member {
    text-align: center;
}

.team-member img {
    width: 160px;
    height: 160px;
    border-radius: 0;
    object-fit: cover;
    margin-bottom: 32px;
    filter: grayscale(1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

.team-member:hover img {
    filter: grayscale(0) sepia(0.2);
    transform: translateY(-8px);
}

.team-member h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.team-member .title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.lore {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.5;
}

.gear-list {
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: left;
    padding: 24px 0 0 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gear-list li::before {
    content: "$ ";
    color: var(--accent);
}

/* Footer */
footer {
    background: var(--primary);
    color: white;
    padding: 80px 24px;
    text-align: center;
}

footer p {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    margin-bottom: 32px;
    color: var(--border-color);
}

.badges {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.badge, .counter {
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}

/* Responsividade */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: 5rem; }
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 3.5rem; }
    nav ul { display: none; }
    
    .carousel-arrow { display: none; }
    
    .carousel-wrapper {
        width: 100%;
        left: auto;
        transform: none;
    }
    
    .maxims-carousel, .team-grid, .services-grid {
        flex-wrap: wrap; /* Em celulares, empilhamos em vez de rolar horizontalmente */
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        width: 100%;
    }
    
    .maxims-carousel::before,
    .maxims-carousel::after,
    .team-grid::before,
    .team-grid::after,
    .services-grid::before,
    .services-grid::after {
        display: none;
    }
    
    .maxim-card, .team-member, .service-card {
        flex: 1 1 100%;
        max-width: 100%;
        margin-right: 0;
    }
}}