:root {
    --bg: #0B0B0D;
    --surface: #121216;
    --surface-elevated: #16161B;
    --surface-raised: #1B1B22;
    --border-color: #22222A;

    --text-primary: #FFFFFF;
    --text-secondary: #B3B3BA;
    --text-tertiary: #8C8C95;

    --brand-accent: #FF2A2A;
    --brand-accent-hover: #FC466B;
    --brand-accent-dark: #8D2A3E;

    --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-sm: none;
    --shadow-md: none;
    --shadow-hover: none;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===============================
   TYPOGRAPHY
=============================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 700;
}

h1 {
    font-size: clamp(2.75rem, 5vw, 4rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2.25rem, 3.5vw, 3rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* Tabler Icon Customization */
.ti {
    color: var(--brand-accent);
    stroke-width: 1.5;
}

/* ===============================
   LAYOUT & UTILITIES
=============================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.center-btn {
    text-align: center;
}

.section-subtitle {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===============================
   COMPONENTS
=============================== */

/* NAVBAR */
.navbar {
    background-color: rgba(11, 11, 13, 0.98);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    width: 100%;
}

.logo.text-logo {
    display: inline-block;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-links li {
    list-style-type: none !important;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 600px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--bg);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 1.1rem;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--brand-accent);
    color: #FFFFFF;
    border: none;
}

.btn-primary:hover {
    background-color: var(--brand-accent-hover);
}

.btn-secondary {
    background-color: var(--surface-raised);
    color: #FFFFFF;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
    border-color: var(--text-secondary);
}

.btn-tertiary {
    background-color: transparent;
    color: var(--brand-accent);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--brand-accent);
    border-radius: 0;
    font-weight: 500;
}

.btn-tertiary:hover {
    color: var(--brand-accent-hover);
    border-color: var(--brand-accent-hover);
    background-color: transparent;
}

.btn-primary-light {
    background-color: #E6E6EB;
    color: var(--bg);
    border: none;
}

.btn-primary-light:hover {
    background-color: #FFFFFF;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.btn-wide {
    min-width: 250px;
}

.badge {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ===============================
   SECTIONS
=============================== */

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem;
    background: url('images/technical-product-owner.webp') center/cover no-repeat;
    position: relative;
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero p {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ABOUT */
.about {
    padding: 8rem 0;
    background-color: var(--surface);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.05rem;
}

.about-image {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 3/4;
    box-shadow: var(--shadow-md);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.about-image:hover img {
    transform: scale(1.03);
}

/* CAPABILITIES */
.capabilities {
    padding: 8rem 0;
    background-color: var(--bg);
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2.5rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--brand-accent);
}

/* PHILOSOPHY */
.philosophy {
    padding: 8rem 0;
    background-color: var(--surface);
    text-align: center;
}

.philosophy h2 {
    margin-bottom: 0.5rem;
}

.philosophy-desc {
    max-width: 700px;
    margin: 0 auto 4rem;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: left;
}

.phil-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.phil-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand-accent);
}

.phil-icon {
    margin-bottom: 1.5rem;
    text-align: center;
}

.phil-icon i {
    color: #ff0000;
    font-size: 2.5rem !important;
}

/* ===============================
   TRABAJOS SECTION
=============================== */
.trabajos {
    background: var(--bg);
    padding: 6rem 0;
}

.text-center {
    text-align: center;
}

.trabajos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.trabajo-card {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    text-decoration: none;
    transition: var(--transition);
}

.trabajo-card:hover {
    transform: translateY(-4px);
}

.trabajo-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface-raised);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.trabajo-img-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    z-index: 1;
}

.trabajo-card:hover .trabajo-img-wrapper::before {
    background: rgba(0, 0, 0, 0.6);
}

.trabajo-img-wrapper span {
    position: relative;
    z-index: 2;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.trabajo-card:hover .trabajo-img-wrapper {
    border-color: var(--brand-accent);
}

.trabajo-card:hover .trabajo-img-wrapper span {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 1024px) {
    .trabajos-grid {
        grid-template-columns: repeat(auto-fit, 530px);
        justify-content: center;
    }
}

/* ===============================
   MODERN FOOTER
=============================== */
.modern-footer {
    background: var(--surface-elevated);
    padding: 6rem 0 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.footer-left h3 {
    margin: 0;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.2;
}

.footer-right h2 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-right p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 80%;
}

.social-links-circle {
    display: flex;
    gap: 1rem;
}

.circle-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--surface-raised);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
}

.circle-link:hover {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #FFF;
    transform: translateY(-2px);
}

/* ===============================
   ANIMATIONS
=============================== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image {
        aspect-ratio: 3/4;
        max-width: 600px;
        margin: 0 auto;
    }

    .philosophy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .capabilities-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .trabajos-grid {
        grid-template-columns: 1fr;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 4rem 1.5rem;
    }

    .footer-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        justify-items: center;
    }

    .footer-right h2 {
        font-size: 2.5rem;
    }

    .social-links-circle {
        justify-content: center;
    }
}

/* ===============================
   CASE STUDY PAGE (LINEAR LAYOUT)
=============================== */
.case-study-linear {
    background-color: var(--bg);
    color: var(--text-primary);
}

.case-study-linear .navbar {
    background-color: rgba(11, 11, 13, 0.98);
    border-bottom: 1px solid var(--border-color);
}

.case-study-linear .logo.text-logo {
    color: var(--text-primary);
}

.cs-hero-banner {
    width: 100%;
    height: 350px;
    background-image: url('images/distribuidora-papa.webp');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 11, 13, 0.8);
}

.cs-hero-title {
    position: relative;
    z-index: 2;
    color: var(--text-primary);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.02em;
}

.cs-top-header {
    background-color: var(--bg);
    padding: 2rem 0;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.cs-back-link {
    display: inline-block;
    color: var(--brand-accent);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s;
}

.cs-back-link:hover {
    color: var(--brand-accent-hover);
    text-decoration: underline;
}

.cs-top-header h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.cs-top-header p {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
}

.doc-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 2rem;
}

.cs-wireframe-img-box {
    width: 100%;
    margin: 3rem 0;
}

.cs-wireframe-img-box img {
    width: 100%;
    display: block;
    border-radius: 8px;
    box-shadow: none;
}

.cs-image-full {
    width: 100%;
    margin-top: 2rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cs-image-full img {
    width: 100%;
    display: block;
    height: auto;
}

.mb-large {
    margin-bottom: 4rem;
}

.mt-medium {
    margin-top: 2rem;
}

.mt-large {
    margin-top: 4rem;
}

.pb-large {
    padding-bottom: 4rem;
}

.cs-doc-section {
    margin-bottom: 5rem;
}

.cs-doc-section h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.cs-doc-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cs-doc-section h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.cs-doc-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.cs-exec-summary p {
    margin-bottom: 0.75rem;
}

.cs-exec-summary strong {
    color: var(--brand-accent);
}

.cs-doc-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.cs-doc-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.cs-doc-list li strong {
    color: var(--text-primary);
}

.cs-doc-list li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: var(--brand-accent);
    font-weight: bold;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

.classic-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
}

.classic-table th,
.classic-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
    font-size: 1rem;
    color: var(--text-secondary);
}

.classic-table th {
    background-color: var(--surface-raised);
    color: var(--text-primary);
    font-weight: 600;
    border: none;
}

.classic-table tbody tr:last-child td {
    border-bottom: none;
}

.classic-table tbody tr:hover {
    background-color: var(--surface-elevated);
}

.cs-image-stack {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

.cs-image-stack img {
    width: 100%;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: none;
}

@media (max-width: 600px) {
    .doc-container {
        padding: 0 1.5rem;
    }

    .cs-top-header {
        padding: 2rem 0;
    }

    .cs-doc-section {
        margin-bottom: 3.5rem;
    }
}