/* Custom Properties */
:root {
    --primary-color: #164894; /* Institutional Blue */
    --primary-dark: #0f3062; /* High-contrast deeper Blue */
    --bg-cream: #F8F9F5; /* Light Cream/Off-White */
    --bg-white: #FFFFFF;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;
    
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    font-family: var(--font-body);
    border: none;
    outline: none;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--bg-white);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(22, 72, 148, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 72, 148, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 1rem;
    border: 2px solid white;
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 0.95rem;
    width: 100%;
}

.btn-secondary:hover {
    background-color: var(--primary-dark);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1280px;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled .nav-container {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-glass);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 1.1;
    color: var(--primary-dark);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset for fixed nav */
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.hero-bg img, .hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Zoom considerável para cortar as bordas pretas se o vídeo for vertical salvo em 16:9 */
    transform: scale(3.2);
}

@media (max-width: 768px) {
    .hero-video {
        transform: scale(1.5);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    position: relative;
}

.hero-text {
    max-width: 600px;
    color: white;
}

.hero-text h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-text p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.hero-widget {
    position: relative;
    width: 240px;
    height: 160px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glass);
    border: 3px solid rgba(255,255,255,0.2);
    transform: translateY(-20px);
}

.hero-widget img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.play-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Search Bar */
.search-bar-wrapper {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    z-index: 10;
}

.search-bar {
    background: var(--bg-white);
    padding: 12px 12px 12px 32px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.search-item {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.search-item label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.search-item select {
    border: none;
    background: transparent;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
    appearance: none;
}

.divider {
    width: 1px;
    height: 40px;
    background-color: var(--border-color);
    margin: 0 24px;
}

.btn-search {
    background: var(--primary-color);
    color: white;
    height: 56px;
    padding: 0 32px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(22, 72, 148, 0.3);
    margin-left: 16px;
}

.btn-search:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

/* Scroll Video Section */
.scroll-video-section {
    padding: 100px 0;
    background-color: var(--bg-cream);
}

.scroll-video-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: flex-start;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Sticky video — stays pinned while text scrolls */
.scroll-video-sticky {
    position: sticky;
    top: 120px;
    width: 100%;
}

/* Modifier to place video on the right */
.scroll-video-container.reverse .scroll-video-sticky {
    order: 2;
}
.scroll-video-container.reverse .scroll-text-side {
    order: 1;
}

.scroll-video-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glass);
    position: relative;
    background: var(--primary-dark);
}

.scroll-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.4);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Progress bar under the video */
.scroll-video-progress {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    margin-top: -4px;
    position: relative;
    z-index: 2;
}

.scroll-video-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), #38bdf8);
    border-radius: 0 2px 2px 0;
    transition: width 0.1s linear;
}

/* Text side */
.scroll-text-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 160px;
    padding: 0 0 160px 0;
}

.scroll-text-block {
    padding: 40px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.scroll-text-block:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glass);
    border-color: rgba(22, 72, 148, 0.15);
}

.scroll-text-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(22, 72, 148, 0.25);
}

.scroll-text-block h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
    line-height: 1.3;
}

.scroll-text-block p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 0;
}

.scroll-text-block p strong {
    color: var(--text-dark);
}

.scroll-text-block .btn-primary {
    margin-top: 20px;
}

/* Products Grid */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.product-card {
    background: var(--bg-cream);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glass);
}

.card-img-wrapper {
    height: 240px;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
    flex: 1;
}

/* Case Study */
.case-study {
    position: relative;
    height: 600px;
}

.case-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
}

.case-panel {
    background: rgba(15, 48, 98, 0.85); /* Deep blue with opacity */
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 48px;
    border-radius: var(--radius-lg);
    max-width: 500px;
    color: white;
    margin-left: auto;
    box-shadow: var(--shadow-glass);
}

.case-panel h3 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.case-panel p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.stat-item i {
    font-size: 2rem;
    color: #38bdf8; /* Brighter blue accent */
}

.stat-item span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 80px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand p {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: white;
}

.footer-contact p, .footer-address p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-contact i {
    font-size: 1.25rem;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-social a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Responsive */
@media (max-width: 1024px) {
    .hero-text h1 { font-size: 3rem; }
    .scroll-video-container { gap: 40px; }
    .scroll-text-block { padding: 32px; }
    .scroll-text-block h2 { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions { display: none; }
    .hero-content { flex-direction: column; justify-content: center; gap: 40px; text-align: center; }
    .hero-text { align-items: center; }
    .search-bar { flex-direction: column; padding: 24px; border-radius: var(--radius-md); gap: 16px; align-items: stretch; }
    .search-item { align-items: flex-start; }
    .divider { width: 100%; height: 1px; margin: 8px 0; }
    .search-bar-wrapper { bottom: -180px; }
    .hero { margin-bottom: 180px; }
    
    .scroll-video-section { padding: 60px 0; }
    .scroll-video-container { grid-template-columns: 1fr; gap: 32px; }
    .scroll-video-container.reverse .scroll-video-sticky,
    .scroll-video-container.reverse .scroll-text-side { order: unset; }
    
    .scroll-video-sticky { flex: none; position: relative; top: 0; width: 100%; }
    .scroll-video-wrapper { aspect-ratio: 16 / 9; }
    .scroll-text-side { gap: 32px; }
    .scroll-text-block { padding: 24px; }
    .scroll-text-block h2 { font-size: 1.35rem; }

    .products-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 32px; text-align: center; }
    .footer-contact p, .footer-address p, .footer-social a { justify-content: center; }
}
