/* 
    Olbins Chile - Premium Design System
    Aesthetic: Refined Organic Industrial (Wood & Steel)
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@700;800&display=swap');

:root {
    /* Primary Palette */
    --primary: #163526;
    --primary-light: #1e4d35;
    --primary-dark: #0a1b13;

    /* Accent Palette (Cedar/Wood) */
    --accent: #c39b77;
    --accent-dark: #a67c52;
    --accent-soft: #f4ece4;

    /* Neutral Palette */
    --surface: #f9fbf8;
    --surface-alt: #f0f4ef;
    --text-main: #171d16;
    --text-muted: #5b635a;
    --white: #ffffff;

    /* UI Tokens */
    --glass: rgba(255, 255, 255, 0.7);
    --glass-dark: rgba(22, 53, 38, 0.85);
    --shadow-soft: 0 10px 30px -10px rgba(22, 53, 38, 0.1);
    --shadow-strong: 0 20px 40px -15px rgba(22, 53, 38, 0.2);
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Animation Tokens */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: 0.5s var(--ease-out);
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--surface);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://www.transparenttextures.com/patterns/dark-matter.png");
    /* Subtle grain */
    opacity: 0.05;
    pointer-events: none;
    z-index: 100;
}

h1,
h2,
h3,
h4 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    text-wrap: balance;
    color: var(--primary);
}

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

/* --- LAYOUT --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
    position: relative;
}

.section-alt {
    background-color: var(--surface-alt);
}

.grid {
    display: grid;
    gap: 2rem;
}

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

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- COMPONENTS --- */

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(22, 53, 38, 0.05);
    transition: var(--transition);
}

.nav-container {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Estilos específicos para el logo */
.logo-img {
    height: auto; /* Mantiene la proporción */
    max-height: 60px; /* Evita que toque los bordes del nav de 80px */
    width: auto;
    display: block;
    transition: transform 0.3s var(--ease-out);
    /* Opcional: un ligero drop-shadow si el logo se pierde con el fondo */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

.logo-img:hover {
    transform: scale(1.05); /* Efecto sutil al pasar el mouse */
}

/* Ajuste al contenedor del logo para asegurar alineación */
.flex.items-center.gap-2 {
    display: flex;
    align-items: center;
    padding: 5px 0;
}

.nav-links {
    display: none;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
    opacity: 0.8;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: var(--primary);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    border-radius: var(--radius-full);
}

/* Buttons */
.btn {
    padding: 1rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    border: none;
    transition: transform 0.3s var(--ease-out), background 0.3s ease, box-shadow 0.3s ease;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(22, 53, 38, 0.2);
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 8px 25px rgba(22, 53, 38, 0.25);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-secondary {
    background: var(--accent);
    color: var(--white);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
    overflow: hidden;
}

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

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) contrast(1.1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--primary-dark) 0%, transparent 60%);
}

.hero-title {
    font-size: clamp(3rem, 10vw, 5.5rem);
    line-height: 1;
    margin-bottom: 2rem;
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 3rem;
    opacity: 0.9;
    font-weight: 400;
}

.text-accent {
    color: var(--accent);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(22, 53, 38, 0.05);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.8s var(--ease-out);
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-body {
    padding: 2.5rem;
    flex-grow: 1;
}

.card-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Common Text Elements */
.section-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    display: block;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

/* Animations */
.animate-fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 1s var(--ease-out) forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- UTILITIES --- */
.text-center {
    text-align: center;
}

.badge {
    background: var(--accent);
    color: var(--white);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    margin-bottom: 1.5rem;
}

/* Form Styles */
.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.input-field {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-alt);
    background: var(--surface-alt);
    transition: var(--transition);
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    background: var(--white);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(195, 155, 119, 0.1);
}

/* Link Arrow */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 700;
    font-size: 1rem;
}

.link-arrow span {
    transition: var(--transition);
}

.link-arrow:hover span {
    transform: translateX(6px);
}

/* --- RESPONSIVE --- */
@media (max-width: 640px) {
    .section {
        padding: 5rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2.25rem;
    }
}